aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-27 06:01:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-29 15:46:14 -0400
commit0e82ffe3b90bcad72cfe80e4379946b8fb0691ca (patch)
treec6b73524d4db86ddcaa866d7ea81a9600b610413 /drivers/net/wireless/iwmc3200wifi/wext.c
parenta7bc376c858e0e724b8cb2db09b6874562d377ca (diff)
cfg80211: combine iwfreq implementations
Until now we implemented iwfreq for managed mode, we needed to keep the implementations separate, but now that we have all versions implemented we can combine them and export just one handler. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/wext.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/wext.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/wext.c b/drivers/net/wireless/iwmc3200wifi/wext.c
index c3c90d5963bf..8058e9991c30 100644
--- a/drivers/net/wireless/iwmc3200wifi/wext.c
+++ b/drivers/net/wireless/iwmc3200wifi/wext.c
@@ -27,36 +27,6 @@
27#include "iwm.h" 27#include "iwm.h"
28#include "commands.h" 28#include "commands.h"
29 29
30static int iwm_wext_siwfreq(struct net_device *dev,
31 struct iw_request_info *info,
32 struct iw_freq *freq, char *extra)
33{
34 struct iwm_priv *iwm = ndev_to_iwm(dev);
35
36 switch (iwm->conf.mode) {
37 case UMAC_MODE_IBSS:
38 return cfg80211_ibss_wext_siwfreq(dev, info, freq, extra);
39 default:
40 return -EOPNOTSUPP;
41 }
42}
43
44static int iwm_wext_giwfreq(struct net_device *dev,
45 struct iw_request_info *info,
46 struct iw_freq *freq, char *extra)
47{
48 struct iwm_priv *iwm = ndev_to_iwm(dev);
49
50 switch (iwm->conf.mode) {
51 case UMAC_MODE_IBSS:
52 return cfg80211_ibss_wext_giwfreq(dev, info, freq, extra);
53 case UMAC_MODE_BSS:
54 return cfg80211_mgd_wext_giwfreq(dev, info, freq, extra);
55 default:
56 return -EOPNOTSUPP;
57 }
58}
59
60static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info, 30static int iwm_wext_siwap(struct net_device *dev, struct iw_request_info *info,
61 struct sockaddr *ap_addr, char *extra) 31 struct sockaddr *ap_addr, char *extra)
62{ 32{
@@ -125,8 +95,8 @@ static const iw_handler iwm_handlers[] =
125 (iw_handler) cfg80211_wext_giwname, /* SIOCGIWNAME */ 95 (iw_handler) cfg80211_wext_giwname, /* SIOCGIWNAME */
126 (iw_handler) NULL, /* SIOCSIWNWID */ 96 (iw_handler) NULL, /* SIOCSIWNWID */
127 (iw_handler) NULL, /* SIOCGIWNWID */ 97 (iw_handler) NULL, /* SIOCGIWNWID */
128 (iw_handler) iwm_wext_siwfreq, /* SIOCSIWFREQ */ 98 (iw_handler) cfg80211_wext_siwfreq, /* SIOCSIWFREQ */
129 (iw_handler) iwm_wext_giwfreq, /* SIOCGIWFREQ */ 99 (iw_handler) cfg80211_wext_giwfreq, /* SIOCGIWFREQ */
130 (iw_handler) cfg80211_wext_siwmode, /* SIOCSIWMODE */ 100 (iw_handler) cfg80211_wext_siwmode, /* SIOCSIWMODE */
131 (iw_handler) cfg80211_wext_giwmode, /* SIOCGIWMODE */ 101 (iw_handler) cfg80211_wext_giwmode, /* SIOCGIWMODE */
132 (iw_handler) NULL, /* SIOCSIWSENS */ 102 (iw_handler) NULL, /* SIOCSIWSENS */