aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-05-31 05:48:58 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-06-04 15:34:33 -0400
commit5e50ee3ae6e465be89dd0a66f78c3211a412d595 (patch)
tree0aeb30a7c3361199be1f61d222540eae4a553e05 /net/nfc
parent56af2568c27ee697a5a34cf037e3253e7b77e80b (diff)
NFC: Switch to Initiator mode when getting NFC_ATTR_PROTOCOLS
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>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/netlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 21eaa9b5c6bf..03c31db38f12 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -597,11 +597,11 @@ static int nfc_genl_start_poll(struct sk_buff *skb, struct genl_info *info)
597 597
598 if (info->attrs[NFC_ATTR_TM_PROTOCOLS]) 598 if (info->attrs[NFC_ATTR_TM_PROTOCOLS])
599 tm_protocols = nla_get_u32(info->attrs[NFC_ATTR_TM_PROTOCOLS]); 599 tm_protocols = nla_get_u32(info->attrs[NFC_ATTR_TM_PROTOCOLS]);
600 else if (info->attrs[NFC_ATTR_PROTOCOLS])
601 tm_protocols = nla_get_u32(info->attrs[NFC_ATTR_PROTOCOLS]);
602 600
603 if (info->attrs[NFC_ATTR_IM_PROTOCOLS]) 601 if (info->attrs[NFC_ATTR_IM_PROTOCOLS])
604 im_protocols = nla_get_u32(info->attrs[NFC_ATTR_IM_PROTOCOLS]); 602 im_protocols = nla_get_u32(info->attrs[NFC_ATTR_IM_PROTOCOLS]);
603 else if (info->attrs[NFC_ATTR_PROTOCOLS])
604 im_protocols = nla_get_u32(info->attrs[NFC_ATTR_PROTOCOLS]);
605 605
606 dev = nfc_get_device(idx); 606 dev = nfc_get_device(idx);
607 if (!dev) 607 if (!dev)