diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/chan.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 889c3e93e0f4..d1f7abddb182 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c | |||
@@ -20,23 +20,29 @@ __ieee80211_get_channel_mode(struct ieee80211_local *local, | |||
20 | if (!ieee80211_sdata_running(sdata)) | 20 | if (!ieee80211_sdata_running(sdata)) |
21 | continue; | 21 | continue; |
22 | 22 | ||
23 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR) | 23 | switch (sdata->vif.type) { |
24 | case NL80211_IFTYPE_MONITOR: | ||
24 | continue; | 25 | continue; |
25 | 26 | case NL80211_IFTYPE_STATION: | |
26 | if (sdata->vif.type == NL80211_IFTYPE_STATION && | 27 | if (!sdata->u.mgd.associated) |
27 | !sdata->u.mgd.associated) | 28 | continue; |
28 | continue; | 29 | break; |
29 | 30 | case NL80211_IFTYPE_ADHOC: | |
30 | if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { | ||
31 | if (!sdata->u.ibss.ssid_len) | 31 | if (!sdata->u.ibss.ssid_len) |
32 | continue; | 32 | continue; |
33 | if (!sdata->u.ibss.fixed_channel) | 33 | if (!sdata->u.ibss.fixed_channel) |
34 | return CHAN_MODE_HOPPING; | 34 | return CHAN_MODE_HOPPING; |
35 | } | 35 | break; |
36 | 36 | case NL80211_IFTYPE_AP_VLAN: | |
37 | if (sdata->vif.type == NL80211_IFTYPE_AP && | 37 | /* will also have _AP interface */ |
38 | !sdata->u.ap.beacon) | ||
39 | continue; | 38 | continue; |
39 | case NL80211_IFTYPE_AP: | ||
40 | if (!sdata->u.ap.beacon) | ||
41 | continue; | ||
42 | break; | ||
43 | default: | ||
44 | break; | ||
45 | } | ||
40 | 46 | ||
41 | return CHAN_MODE_FIXED; | 47 | return CHAN_MODE_FIXED; |
42 | } | 48 | } |