diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2010-05-05 09:28:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-07 14:55:51 -0400 |
commit | 0aaffa9b9699894aab3266195a529baf9f96ac29 (patch) | |
tree | 26fe5f5277ac6d7061ea723f92d4038b0c28b0b8 /net/mac80211/ibss.c | |
parent | f444de05d20e27cdd960c13fcbcfca3099f03143 (diff) |
mac80211: improve HT channel handling
Currently, when one interface switches HT mode,
all others will follow along. This is clearly
undesirable, since the new one might switch to
no-HT while another one is operating in HT.
Address this issue by keeping track of the HT
mode per interface, and allowing only changes
that are compatible, i.e. switching into HT40+
is not possible when another interface is in
HT40-, in that case the second one needs to
fall back to HT20.
Also, to allow drivers to know what's going on,
store the per-interface HT mode (channel type)
in the virtual interface's bss_conf.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index d5855ae387e8..36745f494f63 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -102,7 +102,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
102 | sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; | 102 | sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; |
103 | 103 | ||
104 | local->oper_channel = chan; | 104 | local->oper_channel = chan; |
105 | local->oper_channel_type = NL80211_CHAN_NO_HT; | 105 | WARN_ON(!ieee80211_set_channel_type(local, sdata, NL80211_CHAN_NO_HT)); |
106 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | 106 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); |
107 | 107 | ||
108 | sband = local->hw.wiphy->bands[chan->band]; | 108 | sband = local->hw.wiphy->bands[chan->band]; |
@@ -910,7 +910,8 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | |||
910 | /* fix ourselves to that channel now already */ | 910 | /* fix ourselves to that channel now already */ |
911 | if (params->channel_fixed) { | 911 | if (params->channel_fixed) { |
912 | sdata->local->oper_channel = params->channel; | 912 | sdata->local->oper_channel = params->channel; |
913 | sdata->local->oper_channel_type = NL80211_CHAN_NO_HT; | 913 | WARN_ON(!ieee80211_set_channel_type(sdata->local, sdata, |
914 | NL80211_CHAN_NO_HT)); | ||
914 | } | 915 | } |
915 | 916 | ||
916 | if (params->ie) { | 917 | if (params->ie) { |