浏览代码

NFC: Add netlink support for ISO/IEC 15693

Add ISO/IEC 15693 support by having netlink push the
1-byte DSFID and 8-byte UID tag information upstream.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mark A. Greer 11 年之前
父节点
当前提交
f5f6872ed2
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      net/nfc/netlink.c

+ 8 - 0
net/nfc/netlink.c

@@ -94,6 +94,14 @@ static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target,
 		    target->sensf_res))
 		    target->sensf_res))
 		goto nla_put_failure;
 		goto nla_put_failure;
 
 
+	if (target->is_iso15693) {
+		if (nla_put_u8(msg, NFC_ATTR_TARGET_ISO15693_DSFID,
+			       target->iso15693_dsfid) ||
+		    nla_put(msg, NFC_ATTR_TARGET_ISO15693_UID,
+			    sizeof(target->iso15693_uid), target->iso15693_uid))
+			goto nla_put_failure;
+	}
+
 	return genlmsg_end(msg, hdr);
 	return genlmsg_end(msg, hdr);
 
 
 nla_put_failure:
 nla_put_failure: