netlink: Pass IM protocols through NFC_ATTR_PROTOCOLS as well
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 1 Jun 2012 11:32:02 +0000 (13:32 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 1 Jun 2012 11:32:02 +0000 (13:32 +0200)
This way the polling loop will also work with older kernels.

src/netlink.c

index b7e918d..a9b590c 100644 (file)
@@ -240,8 +240,10 @@ int __near_netlink_start_poll(int idx,
        }
 
        NLA_PUT_U32(msg, NFC_ATTR_DEVICE_INDEX, idx);
-       if (im_protocols != 0)
+       if (im_protocols != 0) {
                NLA_PUT_U32(msg, NFC_ATTR_IM_PROTOCOLS, im_protocols);
+               NLA_PUT_U32(msg, NFC_ATTR_PROTOCOLS, im_protocols);
+       }
        if (tm_protocols != 0)
                NLA_PUT_U32(msg, NFC_ATTR_TM_PROTOCOLS, tm_protocols);