summaryrefslogtreecommitdiffstats
path: root/net/nfc/netlink.c
diff options
context:
space:
mode:
authorIlan Elias2011-12-22 10:51:54 +0100
committerJohn W. Linville2012-01-04 20:30:43 +0100
commit288e0713f469c03dbc412153b5341d6dfc2c9907 (patch)
tree1155f2d96309acb17a23d4a384417c5de3940647 /net/nfc/netlink.c
parentrt2x00: Mark active channel's survey data as "in use" (diff)
downloadkernel-qcow2-linux-288e0713f469c03dbc412153b5341d6dfc2c9907.tar.gz
kernel-qcow2-linux-288e0713f469c03dbc412153b5341d6dfc2c9907.tar.xz
kernel-qcow2-linux-288e0713f469c03dbc412153b5341d6dfc2c9907.zip
NFC: Export a new attribute nfcid1 in target info
The nfcid1 is the NFC-A identifier. It is exported as an attribute of the target info (returned as a response to NFC_CMD_GET_TARGET). Signed-off-by: Ilan Elias <ilane@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/netlink.c')
-rw-r--r--net/nfc/netlink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 43a1c47756a7..6989dfa28ee2 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -67,6 +67,9 @@ static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target,
target->supported_protocols);
NLA_PUT_U16(msg, NFC_ATTR_TARGET_SENS_RES, target->sens_res);
NLA_PUT_U8(msg, NFC_ATTR_TARGET_SEL_RES, target->sel_res);
+ if (target->nfcid1_len > 0)
+ NLA_PUT(msg, NFC_ATTR_TARGET_NFCID1, target->nfcid1_len,
+ target->nfcid1);
return genlmsg_end(msg, hdr);