aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/wext.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 654041b93736..bb2c7135a1c8 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -230,13 +230,15 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
230{ 230{
231 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 231 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
232 232
233 if (sdata->vif.type == NL80211_IFTYPE_STATION) 233 if (sdata->vif.type == NL80211_IFTYPE_ADHOC ||
234 sdata->vif.type == NL80211_IFTYPE_STATION)
234 sdata->u.sta.flags &= ~IEEE80211_STA_AUTO_CHANNEL_SEL; 235 sdata->u.sta.flags &= ~IEEE80211_STA_AUTO_CHANNEL_SEL;
235 236
236 /* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */ 237 /* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */
237 if (freq->e == 0) { 238 if (freq->e == 0) {
238 if (freq->m < 0) { 239 if (freq->m < 0) {
239 if (sdata->vif.type == NL80211_IFTYPE_STATION) 240 if (sdata->vif.type == NL80211_IFTYPE_ADHOC ||
241 sdata->vif.type == NL80211_IFTYPE_STATION)
240 sdata->u.sta.flags |= 242 sdata->u.sta.flags |=
241 IEEE80211_STA_AUTO_CHANNEL_SEL; 243 IEEE80211_STA_AUTO_CHANNEL_SEL;
242 return 0; 244 return 0;