nl80211: add testmode to the list of supported commands
authorKalle Valo <kvalo@qca.qualcomm.com>
Thu, 17 Nov 2011 17:06:10 +0000 (19:06 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 21 Nov 2011 21:20:43 +0000 (16:20 -0500)
User space might want to test if driver supports testmode. Adding testmode
to the list of supported commands makes this easier.

I omitted testmode_dump() in purpose. I assume all drivers implementing
testmode_dump() will also implement testmode_cmd().

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/nl80211.c

index 50482e129263f746891211d2d4ff5540d7e8979c..ae8ea3827acdc4414337efda769e5e6f3de2909d 100644 (file)
@@ -904,6 +904,10 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
                NLA_PUT_U32(msg, i, NL80211_CMD_REGISTER_BEACONS);
        }
 
+#ifdef CONFIG_NL80211_TESTMODE
+       CMD(testmode_cmd, TESTMODE);
+#endif
+
 #undef CMD
 
        if (dev->ops->connect || dev->ops->auth) {