Skip to content

Commit

Permalink
NFC: Switch to Initiator mode when getting NFC_ATTR_PROTOCOLS
Browse files Browse the repository at this point in the history
That is needed for keeping backward compatibility with apps using the old
netlink polling API (NFC_ATTR_PROTOCOLS instead of NFC_ATTR_IM_PROTOCOLS).

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Jun 4, 2012
1 parent 56af256 commit 5e50ee3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/nfc/netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,11 @@ static int nfc_genl_start_poll(struct sk_buff *skb, struct genl_info *info)

if (info->attrs[NFC_ATTR_TM_PROTOCOLS])
tm_protocols = nla_get_u32(info->attrs[NFC_ATTR_TM_PROTOCOLS]);
else if (info->attrs[NFC_ATTR_PROTOCOLS])
tm_protocols = nla_get_u32(info->attrs[NFC_ATTR_PROTOCOLS]);

if (info->attrs[NFC_ATTR_IM_PROTOCOLS])
im_protocols = nla_get_u32(info->attrs[NFC_ATTR_IM_PROTOCOLS]);
else if (info->attrs[NFC_ATTR_PROTOCOLS])
im_protocols = nla_get_u32(info->attrs[NFC_ATTR_PROTOCOLS]);

dev = nfc_get_device(idx);
if (!dev)
Expand Down

0 comments on commit 5e50ee3

Please sign in to comment.