diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-12-21 06:46:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-16 21:31:55 -0400 |
commit | d2911255590d9ca561a481b9dbebcfcbbf38fa4e (patch) | |
tree | 8050b7d2e93f69619903d07475452f7ab897a7cc /net/wireless/wext.c | |
parent | ca1e8bb8e4e89e2769e2b39eb29fdcfc5c19cf89 (diff) |
wext: Pass iwreq pointer down into standard/private handlers.
They have no need to see the object as an ifreq.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/wext.c')
-rw-r--r-- | net/wireless/wext.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/net/wireless/wext.c b/net/wireless/wext.c index 929d24120f37..e9c88172ec55 100644 --- a/net/wireless/wext.c +++ b/net/wireless/wext.c | |||
@@ -832,11 +832,10 @@ out: | |||
832 | * user space and kernel space. | 832 | * user space and kernel space. |
833 | */ | 833 | */ |
834 | static int ioctl_standard_call(struct net_device * dev, | 834 | static int ioctl_standard_call(struct net_device * dev, |
835 | struct ifreq * ifr, | 835 | struct iwreq *iwr, |
836 | unsigned int cmd, | 836 | unsigned int cmd, |
837 | iw_handler handler) | 837 | iw_handler handler) |
838 | { | 838 | { |
839 | struct iwreq * iwr = (struct iwreq *) ifr; | ||
840 | const struct iw_ioctl_description * descr; | 839 | const struct iw_ioctl_description * descr; |
841 | struct iw_request_info info; | 840 | struct iw_request_info info; |
842 | int ret = -EINVAL; | 841 | int ret = -EINVAL; |
@@ -984,10 +983,9 @@ out: | |||
984 | return err; | 983 | return err; |
985 | } | 984 | } |
986 | 985 | ||
987 | static int ioctl_private_call(struct net_device *dev, struct ifreq *ifr, | 986 | static int ioctl_private_call(struct net_device *dev, struct iwreq *iwr, |
988 | unsigned int cmd, iw_handler handler) | 987 | unsigned int cmd, iw_handler handler) |
989 | { | 988 | { |
990 | struct iwreq *iwr = (struct iwreq *) ifr; | ||
991 | int extra_size = 0, ret = -EINVAL; | 989 | int extra_size = 0, ret = -EINVAL; |
992 | const struct iw_priv_args *descr; | 990 | const struct iw_priv_args *descr; |
993 | struct iw_request_info info; | 991 | struct iw_request_info info; |
@@ -1015,7 +1013,7 @@ static int ioctl_private_call(struct net_device *dev, struct ifreq *ifr, | |||
1015 | } | 1013 | } |
1016 | 1014 | ||
1017 | /* ---------------------------------------------------------------- */ | 1015 | /* ---------------------------------------------------------------- */ |
1018 | typedef int (*wext_ioctl_func)(struct net_device *, struct ifreq *, | 1016 | typedef int (*wext_ioctl_func)(struct net_device *, struct iwreq *, |
1019 | unsigned int, iw_handler); | 1017 | unsigned int, iw_handler); |
1020 | 1018 | ||
1021 | /* | 1019 | /* |
@@ -1027,6 +1025,7 @@ static int wireless_process_ioctl(struct net *net, struct ifreq *ifr, | |||
1027 | wext_ioctl_func standard, | 1025 | wext_ioctl_func standard, |
1028 | wext_ioctl_func private) | 1026 | wext_ioctl_func private) |
1029 | { | 1027 | { |
1028 | struct iwreq *iwr = (struct iwreq *) ifr; | ||
1030 | struct net_device *dev; | 1029 | struct net_device *dev; |
1031 | iw_handler handler; | 1030 | iw_handler handler; |
1032 | 1031 | ||
@@ -1041,11 +1040,11 @@ static int wireless_process_ioctl(struct net *net, struct ifreq *ifr, | |||
1041 | * Note that 'cmd' is already filtered in dev_ioctl() with | 1040 | * Note that 'cmd' is already filtered in dev_ioctl() with |
1042 | * (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) */ | 1041 | * (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) */ |
1043 | if (cmd == SIOCGIWSTATS) | 1042 | if (cmd == SIOCGIWSTATS) |
1044 | return standard(dev, ifr, cmd, | 1043 | return standard(dev, iwr, cmd, |
1045 | &iw_handler_get_iwstats); | 1044 | &iw_handler_get_iwstats); |
1046 | 1045 | ||
1047 | if (cmd == SIOCGIWPRIV && dev->wireless_handlers) | 1046 | if (cmd == SIOCGIWPRIV && dev->wireless_handlers) |
1048 | return standard(dev, ifr, cmd, | 1047 | return standard(dev, iwr, cmd, |
1049 | &iw_handler_get_private); | 1048 | &iw_handler_get_private); |
1050 | 1049 | ||
1051 | /* Basic check */ | 1050 | /* Basic check */ |
@@ -1057,9 +1056,9 @@ static int wireless_process_ioctl(struct net *net, struct ifreq *ifr, | |||
1057 | if (handler) { | 1056 | if (handler) { |
1058 | /* Standard and private are not the same */ | 1057 | /* Standard and private are not the same */ |
1059 | if (cmd < SIOCIWFIRSTPRIV) | 1058 | if (cmd < SIOCIWFIRSTPRIV) |
1060 | return standard(dev, ifr, cmd, handler); | 1059 | return standard(dev, iwr, cmd, handler); |
1061 | else | 1060 | else |
1062 | return private(dev, ifr, cmd, handler); | 1061 | return private(dev, iwr, cmd, handler); |
1063 | } | 1062 | } |
1064 | /* Old driver API : call driver ioctl handler */ | 1063 | /* Old driver API : call driver ioctl handler */ |
1065 | if (dev->do_ioctl) | 1064 | if (dev->do_ioctl) |