Skip to content

Commit

Permalink
NFC: Add NFC_ATTR_RF_MODE when sending device netlink properties
Browse files Browse the repository at this point in the history
This is useful when getting devices to know if they're in target or
initiator mode.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Thierry Escande authored and Samuel Ortiz committed Oct 26, 2012
1 parent 5bcf099 commit 7ad3939
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/nfc/netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ static int nfc_genl_send_device(struct sk_buff *msg, struct nfc_dev *dev,
if (nla_put_string(msg, NFC_ATTR_DEVICE_NAME, nfc_device_name(dev)) ||
nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx) ||
nla_put_u32(msg, NFC_ATTR_PROTOCOLS, dev->supported_protocols) ||
nla_put_u8(msg, NFC_ATTR_DEVICE_POWERED, dev->dev_up))
nla_put_u8(msg, NFC_ATTR_DEVICE_POWERED, dev->dev_up) ||
nla_put_u8(msg, NFC_ATTR_RF_MODE, dev->rf_mode))
goto nla_put_failure;

return genlmsg_end(msg, hdr);
Expand Down

0 comments on commit 7ad3939

Please sign in to comment.