Skip to content

Commit

Permalink
include/linux/wireless.h: Add IW_HANDLER macro to initialize array entry
Browse files Browse the repository at this point in the history
Copied the idea from orinoco

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Joe Perches authored and John W. Linville committed Mar 23, 2010
1 parent 3b56dd6 commit f6e0bb5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/wireless.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@
#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))
Expand Down

0 comments on commit f6e0bb5

Please sign in to comment.