]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFC: Add netlink support for ISO/IEC 15693
authorMark A. Greer <mgreer@animalcreek.com>
Wed, 15 Jan 2014 00:52:11 +0000 (17:52 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 16 Feb 2014 22:49:53 +0000 (23:49 +0100)
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>
net/nfc/netlink.c

index ebbf6fb88b3596708597331ae630be2a7dcade6d..43cb1c17e267d0f614029bad9d3eebcf7b6f5e4c 100644 (file)
@@ -94,6 +94,14 @@ static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target,
                    target->sensf_res))
                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);
 
 nla_put_failure: