mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
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: Richard Kennedy <richard@rsk.demon.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4ffab68882
commit
9d3b3bb0b5
1 changed files with 43 additions and 57 deletions
|
@ -1680,64 +1680,50 @@ static int p80211_wext_get_iwauth(struct net_device *dev,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static iw_handler p80211wext_handlers[] = {
|
#define IW_IOCTL(x) [(x)-SIOCSIWCOMMIT]
|
||||||
(iw_handler) p80211wext_siwcommit, /* SIOCSIWCOMMIT */
|
|
||||||
(iw_handler) p80211wext_giwname, /* SIOCGIWNAME */
|
|
||||||
(iw_handler) NULL, /* SIOCSIWNWID */
|
|
||||||
(iw_handler) NULL, /* SIOCGIWNWID */
|
|
||||||
(iw_handler) p80211wext_siwfreq, /* SIOCSIWFREQ */
|
|
||||||
(iw_handler) p80211wext_giwfreq, /* SIOCGIWFREQ */
|
|
||||||
(iw_handler) p80211wext_siwmode, /* SIOCSIWMODE */
|
|
||||||
(iw_handler) p80211wext_giwmode, /* SIOCGIWMODE */
|
|
||||||
(iw_handler) NULL, /* SIOCSIWSENS */
|
|
||||||
(iw_handler) NULL, /* SIOCGIWSENS */
|
|
||||||
(iw_handler) NULL, /* not used *//* SIOCSIWRANGE */
|
|
||||||
(iw_handler) p80211wext_giwrange, /* SIOCGIWRANGE */
|
|
||||||
(iw_handler) NULL, /* not used *//* SIOCSIWPRIV */
|
|
||||||
(iw_handler) NULL, /* kernel code *//* SIOCGIWPRIV */
|
|
||||||
(iw_handler) NULL, /* not used *//* SIOCSIWSTATS */
|
|
||||||
(iw_handler) NULL, /* kernel code *//* SIOCGIWSTATS */
|
|
||||||
(iw_handler) p80211wext_siwspy, /* SIOCSIWSPY */
|
|
||||||
(iw_handler) p80211wext_giwspy, /* SIOCGIWSPY */
|
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
|
||||||
(iw_handler) NULL, /* SIOCSIWAP */
|
|
||||||
(iw_handler) p80211wext_giwap, /* SIOCGIWAP */
|
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
|
||||||
(iw_handler) NULL, /* SIOCGIWAPLIST */
|
|
||||||
(iw_handler) p80211wext_siwscan, /* SIOCSIWSCAN */
|
|
||||||
(iw_handler) p80211wext_giwscan, /* SIOCGIWSCAN */
|
|
||||||
(iw_handler) p80211wext_siwessid, /* SIOCSIWESSID */
|
|
||||||
(iw_handler) p80211wext_giwessid, /* SIOCGIWESSID */
|
|
||||||
(iw_handler) NULL, /* SIOCSIWNICKN */
|
|
||||||
(iw_handler) p80211wext_giwessid, /* SIOCGIWNICKN */
|
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
|
||||||
(iw_handler) NULL, /* SIOCSIWRATE */
|
|
||||||
(iw_handler) p80211wext_giwrate, /* SIOCGIWRATE */
|
|
||||||
(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 */
|
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
|
||||||
(iw_handler) NULL, /* SIOCSIWGENIE set generic IE */
|
|
||||||
(iw_handler) NULL, /* SIOCGIWGENIE get generic IE */
|
|
||||||
(iw_handler) p80211_wext_set_iwauth, /* SIOCSIWAUTH set authentication mode params */
|
|
||||||
(iw_handler) p80211_wext_get_iwauth, /* SIOCGIWAUTH get authentication mode params */
|
|
||||||
|
|
||||||
(iw_handler) p80211wext_set_encodeext, /* SIOCSIWENCODEEXT set encoding token & mode */
|
static iw_handler p80211wext_handlers[] = {
|
||||||
(iw_handler) p80211wext_get_encodeext, /* SIOCGIWENCODEEXT get encoding token & mode */
|
IW_IOCTL(SIOCSIWCOMMIT) = (iw_handler) p80211wext_siwcommit,
|
||||||
(iw_handler) NULL, /* SIOCSIWPMKSA PMKSA cache operation */
|
IW_IOCTL(SIOCGIWNAME) = (iw_handler) p80211wext_giwname,
|
||||||
|
/* SIOCSIWNWID,SIOCGIWNWID */
|
||||||
|
IW_IOCTL(SIOCSIWFREQ) = (iw_handler) p80211wext_siwfreq,
|
||||||
|
IW_IOCTL(SIOCGIWFREQ) = (iw_handler) p80211wext_giwfreq,
|
||||||
|
IW_IOCTL(SIOCSIWMODE) = (iw_handler) p80211wext_siwmode,
|
||||||
|
IW_IOCTL(SIOCGIWMODE) = (iw_handler) p80211wext_giwmode,
|
||||||
|
/* SIOCSIWSENS,SIOCGIWSENS,SIOCSIWRANGE */
|
||||||
|
IW_IOCTL(SIOCGIWRANGE) = (iw_handler) p80211wext_giwrange,
|
||||||
|
/* SIOCSIWPRIV,SIOCGIWPRIV,SIOCSIWSTATS,SIOCGIWSTATS */
|
||||||
|
IW_IOCTL(SIOCSIWSPY) = (iw_handler) p80211wext_siwspy,
|
||||||
|
IW_IOCTL(SIOCGIWSPY) = (iw_handler) p80211wext_giwspy,
|
||||||
|
/* SIOCSIWAP */
|
||||||
|
IW_IOCTL(SIOCGIWAP) = (iw_handler) p80211wext_giwap,
|
||||||
|
/* SIOCGIWAPLIST */
|
||||||
|
IW_IOCTL(SIOCSIWSCAN) = (iw_handler) p80211wext_siwscan,
|
||||||
|
IW_IOCTL(SIOCGIWSCAN) = (iw_handler) p80211wext_giwscan,
|
||||||
|
IW_IOCTL(SIOCSIWESSID) = (iw_handler) p80211wext_siwessid,
|
||||||
|
IW_IOCTL(SIOCGIWESSID) = (iw_handler) p80211wext_giwessid,
|
||||||
|
/* SIOCSIWNICKN */
|
||||||
|
IW_IOCTL(SIOCGIWNICKN) = (iw_handler) p80211wext_giwessid,
|
||||||
|
/* SIOCSIWRATE */
|
||||||
|
IW_IOCTL(SIOCGIWRATE) = (iw_handler) p80211wext_giwrate,
|
||||||
|
IW_IOCTL(SIOCSIWRTS) = (iw_handler) p80211wext_siwrts,
|
||||||
|
IW_IOCTL(SIOCGIWRTS) = (iw_handler) p80211wext_giwrts,
|
||||||
|
IW_IOCTL(SIOCSIWFRAG) = (iw_handler) p80211wext_siwfrag,
|
||||||
|
IW_IOCTL(SIOCGIWFRAG) = (iw_handler) p80211wext_giwfrag,
|
||||||
|
IW_IOCTL(SIOCSIWTXPOW) = (iw_handler) p80211wext_siwtxpow,
|
||||||
|
IW_IOCTL(SIOCGIWTXPOW) = (iw_handler) p80211wext_giwtxpow,
|
||||||
|
IW_IOCTL(SIOCSIWRETRY) = (iw_handler) p80211wext_siwretry,
|
||||||
|
IW_IOCTL(SIOCGIWRETRY) = (iw_handler) p80211wext_giwretry,
|
||||||
|
IW_IOCTL(SIOCSIWENCODE) = (iw_handler) p80211wext_siwencode,
|
||||||
|
IW_IOCTL(SIOCGIWENCODE) = (iw_handler) p80211wext_giwencode,
|
||||||
|
/* SIOCSIWPOWER,SIOCGIWPOWER */
|
||||||
|
/* WPA operations */
|
||||||
|
/* SIOCSIWGENIE,SIOCGIWGENIE generic IE */
|
||||||
|
IW_IOCTL(SIOCSIWAUTH) = (iw_handler) p80211_wext_set_iwauth, /*set authentication mode params */
|
||||||
|
IW_IOCTL(SIOCGIWAUTH) = (iw_handler) p80211_wext_get_iwauth, /*get authentication mode params */
|
||||||
|
IW_IOCTL(SIOCSIWENCODEEXT) = (iw_handler) p80211wext_set_encodeext, /*set encoding token & mode */
|
||||||
|
IW_IOCTL(SIOCGIWENCODEEXT) = (iw_handler) p80211wext_get_encodeext, /*get encoding token & mode */
|
||||||
|
/* SIOCSIWPMKSA PMKSA cache operation */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iw_handler_def p80211wext_handler_def = {
|
struct iw_handler_def p80211wext_handler_def = {
|
||||||
|
|
Loading…
Reference in a new issue