Commit 9d3b3bb0 authored by Richard Kennedy's avatar Richard Kennedy Committed by Greg Kroah-Hartman

Staging: wlan-ng: tidy up iw_handler

Use array initialisation technique copied from ipw2200.c.

This should always get the function pointers in the correct place,
without the needed for endless counting, skipping blanks etc.
Signed-off-by: default avatarRichard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4ffab688
...@@ -1680,64 +1680,50 @@ static int p80211_wext_get_iwauth(struct net_device *dev, ...@@ -1680,64 +1680,50 @@ static int p80211_wext_get_iwauth(struct net_device *dev,
return result; return result;
} }
#define IW_IOCTL(x) [(x)-SIOCSIWCOMMIT]
static iw_handler p80211wext_handlers[] = { static iw_handler p80211wext_handlers[] = {
(iw_handler) p80211wext_siwcommit, /* SIOCSIWCOMMIT */ IW_IOCTL(SIOCSIWCOMMIT) = (iw_handler) p80211wext_siwcommit,
(iw_handler) p80211wext_giwname, /* SIOCGIWNAME */ IW_IOCTL(SIOCGIWNAME) = (iw_handler) p80211wext_giwname,
(iw_handler) NULL, /* SIOCSIWNWID */ /* SIOCSIWNWID,SIOCGIWNWID */
(iw_handler) NULL, /* SIOCGIWNWID */ IW_IOCTL(SIOCSIWFREQ) = (iw_handler) p80211wext_siwfreq,
(iw_handler) p80211wext_siwfreq, /* SIOCSIWFREQ */ IW_IOCTL(SIOCGIWFREQ) = (iw_handler) p80211wext_giwfreq,
(iw_handler) p80211wext_giwfreq, /* SIOCGIWFREQ */ IW_IOCTL(SIOCSIWMODE) = (iw_handler) p80211wext_siwmode,
(iw_handler) p80211wext_siwmode, /* SIOCSIWMODE */ IW_IOCTL(SIOCGIWMODE) = (iw_handler) p80211wext_giwmode,
(iw_handler) p80211wext_giwmode, /* SIOCGIWMODE */ /* SIOCSIWSENS,SIOCGIWSENS,SIOCSIWRANGE */
(iw_handler) NULL, /* SIOCSIWSENS */ IW_IOCTL(SIOCGIWRANGE) = (iw_handler) p80211wext_giwrange,
(iw_handler) NULL, /* SIOCGIWSENS */ /* SIOCSIWPRIV,SIOCGIWPRIV,SIOCSIWSTATS,SIOCGIWSTATS */
(iw_handler) NULL, /* not used *//* SIOCSIWRANGE */ IW_IOCTL(SIOCSIWSPY) = (iw_handler) p80211wext_siwspy,
(iw_handler) p80211wext_giwrange, /* SIOCGIWRANGE */ IW_IOCTL(SIOCGIWSPY) = (iw_handler) p80211wext_giwspy,
(iw_handler) NULL, /* not used *//* SIOCSIWPRIV */ /* SIOCSIWAP */
(iw_handler) NULL, /* kernel code *//* SIOCGIWPRIV */ IW_IOCTL(SIOCGIWAP) = (iw_handler) p80211wext_giwap,
(iw_handler) NULL, /* not used *//* SIOCSIWSTATS */ /* SIOCGIWAPLIST */
(iw_handler) NULL, /* kernel code *//* SIOCGIWSTATS */ IW_IOCTL(SIOCSIWSCAN) = (iw_handler) p80211wext_siwscan,
(iw_handler) p80211wext_siwspy, /* SIOCSIWSPY */ IW_IOCTL(SIOCGIWSCAN) = (iw_handler) p80211wext_giwscan,
(iw_handler) p80211wext_giwspy, /* SIOCGIWSPY */ IW_IOCTL(SIOCSIWESSID) = (iw_handler) p80211wext_siwessid,
(iw_handler) NULL, /* -- hole -- */ IW_IOCTL(SIOCGIWESSID) = (iw_handler) p80211wext_giwessid,
(iw_handler) NULL, /* -- hole -- */ /* SIOCSIWNICKN */
(iw_handler) NULL, /* SIOCSIWAP */ IW_IOCTL(SIOCGIWNICKN) = (iw_handler) p80211wext_giwessid,
(iw_handler) p80211wext_giwap, /* SIOCGIWAP */ /* SIOCSIWRATE */
(iw_handler) NULL, /* -- hole -- */ IW_IOCTL(SIOCGIWRATE) = (iw_handler) p80211wext_giwrate,
(iw_handler) NULL, /* SIOCGIWAPLIST */ IW_IOCTL(SIOCSIWRTS) = (iw_handler) p80211wext_siwrts,
(iw_handler) p80211wext_siwscan, /* SIOCSIWSCAN */ IW_IOCTL(SIOCGIWRTS) = (iw_handler) p80211wext_giwrts,
(iw_handler) p80211wext_giwscan, /* SIOCGIWSCAN */ IW_IOCTL(SIOCSIWFRAG) = (iw_handler) p80211wext_siwfrag,
(iw_handler) p80211wext_siwessid, /* SIOCSIWESSID */ IW_IOCTL(SIOCGIWFRAG) = (iw_handler) p80211wext_giwfrag,
(iw_handler) p80211wext_giwessid, /* SIOCGIWESSID */ IW_IOCTL(SIOCSIWTXPOW) = (iw_handler) p80211wext_siwtxpow,
(iw_handler) NULL, /* SIOCSIWNICKN */ IW_IOCTL(SIOCGIWTXPOW) = (iw_handler) p80211wext_giwtxpow,
(iw_handler) p80211wext_giwessid, /* SIOCGIWNICKN */ IW_IOCTL(SIOCSIWRETRY) = (iw_handler) p80211wext_siwretry,
(iw_handler) NULL, /* -- hole -- */ IW_IOCTL(SIOCGIWRETRY) = (iw_handler) p80211wext_giwretry,
(iw_handler) NULL, /* -- hole -- */ IW_IOCTL(SIOCSIWENCODE) = (iw_handler) p80211wext_siwencode,
(iw_handler) NULL, /* SIOCSIWRATE */ IW_IOCTL(SIOCGIWENCODE) = (iw_handler) p80211wext_giwencode,
(iw_handler) p80211wext_giwrate, /* SIOCGIWRATE */ /* SIOCSIWPOWER,SIOCGIWPOWER */
(iw_handler) p80211wext_siwrts, /* SIOCSIWRTS */
(iw_handler) p80211wext_giwrts, /* SIOCGIWRTS */
(iw_handler) p80211wext_siwfrag, /* SIOCSIWFRAG */
(iw_handler) p80211wext_giwfrag, /* SIOCGIWFRAG */
(iw_handler) p80211wext_siwtxpow, /* SIOCSIWTXPOW */
(iw_handler) p80211wext_giwtxpow, /* SIOCGIWTXPOW */
(iw_handler) p80211wext_siwretry, /* SIOCSIWRETRY */
(iw_handler) p80211wext_giwretry, /* SIOCGIWRETRY */
(iw_handler) p80211wext_siwencode, /* SIOCSIWENCODE */
(iw_handler) p80211wext_giwencode, /* SIOCGIWENCODE */
(iw_handler) NULL, /* SIOCSIWPOWER */
(iw_handler) NULL, /* SIOCGIWPOWER */
/* WPA operations */ /* WPA operations */
(iw_handler) NULL, /* -- hole -- */ /* SIOCSIWGENIE,SIOCGIWGENIE generic IE */
(iw_handler) NULL, /* -- hole -- */ IW_IOCTL(SIOCSIWAUTH) = (iw_handler) p80211_wext_set_iwauth, /*set authentication mode params */
(iw_handler) NULL, /* SIOCSIWGENIE set generic IE */ IW_IOCTL(SIOCGIWAUTH) = (iw_handler) p80211_wext_get_iwauth, /*get authentication mode params */
(iw_handler) NULL, /* SIOCGIWGENIE get generic IE */ IW_IOCTL(SIOCSIWENCODEEXT) = (iw_handler) p80211wext_set_encodeext, /*set encoding token & mode */
(iw_handler) p80211_wext_set_iwauth, /* SIOCSIWAUTH set authentication mode params */ IW_IOCTL(SIOCGIWENCODEEXT) = (iw_handler) p80211wext_get_encodeext, /*get encoding token & mode */
(iw_handler) p80211_wext_get_iwauth, /* SIOCGIWAUTH get authentication mode params */ /* SIOCSIWPMKSA PMKSA cache operation */
(iw_handler) p80211wext_set_encodeext, /* SIOCSIWENCODEEXT set encoding token & mode */
(iw_handler) p80211wext_get_encodeext, /* SIOCGIWENCODEEXT get encoding token & mode */
(iw_handler) NULL, /* SIOCSIWPMKSA PMKSA cache operation */
}; };
struct iw_handler_def p80211wext_handler_def = { struct iw_handler_def p80211wext_handler_def = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment