diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-11-26 16:36:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-05 09:32:13 -0500 |
commit | fee52678dbda2099a25243e79da98dc390e1939a (patch) | |
tree | 4bf459c869e89cf2bb0be2869be3e6a720f9a218 /net/mac80211/wext.c | |
parent | f650470a8f506bc33a15778432ebb8cdcf89175b (diff) |
cfg80211: handle SIOCGIWNAME
This patch moves the SIOCGIWNAME handling from mac80211 to cfg80211.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r-- | net/mac80211/wext.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index b3ce28d35611..b9eee3c903de 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -135,48 +135,6 @@ static int ieee80211_ioctl_siwgenie(struct net_device *dev, | |||
135 | return -EOPNOTSUPP; | 135 | return -EOPNOTSUPP; |
136 | } | 136 | } |
137 | 137 | ||
138 | static int ieee80211_ioctl_giwname(struct net_device *dev, | ||
139 | struct iw_request_info *info, | ||
140 | char *name, char *extra) | ||
141 | { | ||
142 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
143 | struct ieee80211_supported_band *sband; | ||
144 | u8 is_ht = 0, is_a = 0, is_b = 0, is_g = 0; | ||
145 | |||
146 | |||
147 | sband = local->hw.wiphy->bands[IEEE80211_BAND_5GHZ]; | ||
148 | if (sband) { | ||
149 | is_a = 1; | ||
150 | is_ht |= sband->ht_cap.ht_supported; | ||
151 | } | ||
152 | |||
153 | sband = local->hw.wiphy->bands[IEEE80211_BAND_2GHZ]; | ||
154 | if (sband) { | ||
155 | int i; | ||
156 | /* Check for mandatory rates */ | ||
157 | for (i = 0; i < sband->n_bitrates; i++) { | ||
158 | if (sband->bitrates[i].bitrate == 10) | ||
159 | is_b = 1; | ||
160 | if (sband->bitrates[i].bitrate == 60) | ||
161 | is_g = 1; | ||
162 | } | ||
163 | is_ht |= sband->ht_cap.ht_supported; | ||
164 | } | ||
165 | |||
166 | strcpy(name, "IEEE 802.11"); | ||
167 | if (is_a) | ||
168 | strcat(name, "a"); | ||
169 | if (is_b) | ||
170 | strcat(name, "b"); | ||
171 | if (is_g) | ||
172 | strcat(name, "g"); | ||
173 | if (is_ht) | ||
174 | strcat(name, "n"); | ||
175 | |||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | |||
180 | static int ieee80211_ioctl_giwrange(struct net_device *dev, | 138 | static int ieee80211_ioctl_giwrange(struct net_device *dev, |
181 | struct iw_request_info *info, | 139 | struct iw_request_info *info, |
182 | struct iw_point *data, char *extra) | 140 | struct iw_point *data, char *extra) |
@@ -1146,7 +1104,7 @@ static int ieee80211_ioctl_siwencodeext(struct net_device *dev, | |||
1146 | static const iw_handler ieee80211_handler[] = | 1104 | static const iw_handler ieee80211_handler[] = |
1147 | { | 1105 | { |
1148 | (iw_handler) NULL, /* SIOCSIWCOMMIT */ | 1106 | (iw_handler) NULL, /* SIOCSIWCOMMIT */ |
1149 | (iw_handler) ieee80211_ioctl_giwname, /* SIOCGIWNAME */ | 1107 | (iw_handler) cfg80211_wext_giwname, /* SIOCGIWNAME */ |
1150 | (iw_handler) NULL, /* SIOCSIWNWID */ | 1108 | (iw_handler) NULL, /* SIOCSIWNWID */ |
1151 | (iw_handler) NULL, /* SIOCGIWNWID */ | 1109 | (iw_handler) NULL, /* SIOCGIWNWID */ |
1152 | (iw_handler) ieee80211_ioctl_siwfreq, /* SIOCSIWFREQ */ | 1110 | (iw_handler) ieee80211_ioctl_siwfreq, /* SIOCSIWFREQ */ |