include/linux/wireless.h: Add IW_HANDLER macro to initialize array entry
authorJoe Perches <joe@perches.com>
Fri, 19 Mar 2010 01:29:32 +0000 (18:29 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 23 Mar 2010 20:50:26 +0000 (16:50 -0400)
Copied the idea from orinoco

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/linux/wireless.h

index 5b4c6c7..0955b67 100644 (file)
 #define SIOCIWFIRST    0x8B00
 #define SIOCIWLAST     SIOCIWLASTPRIV          /* 0x8BFF */
 #define IW_IOCTL_IDX(cmd)      ((cmd) - SIOCIWFIRST)
+#define IW_HANDLER(id, func)                   \
+       [IW_IOCTL_IDX(id)] = func
 
 /* Odd : get (world access), even : set (root access) */
 #define IW_IS_SET(cmd) (!((cmd) & 0x1))