diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index dfa752e5520..e059b3a6f28 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -161,6 +161,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
161 | struct ieee80211_supported_band *sband; | 161 | struct ieee80211_supported_band *sband; |
162 | struct sta_info *sta; | 162 | struct sta_info *sta; |
163 | u32 changed = 0; | 163 | u32 changed = 0; |
164 | int hti_cfreq; | ||
164 | u16 ht_opmode; | 165 | u16 ht_opmode; |
165 | bool enable_ht = true; | 166 | bool enable_ht = true; |
166 | enum nl80211_channel_type prev_chantype; | 167 | enum nl80211_channel_type prev_chantype; |
@@ -174,10 +175,27 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
174 | if (!sband->ht_cap.ht_supported) | 175 | if (!sband->ht_cap.ht_supported) |
175 | enable_ht = false; | 176 | enable_ht = false; |
176 | 177 | ||
177 | /* check that channel matches the right operating channel */ | 178 | if (enable_ht) { |
178 | if (local->hw.conf.channel->center_freq != | 179 | hti_cfreq = ieee80211_channel_to_frequency(hti->control_chan, |
179 | ieee80211_channel_to_frequency(hti->control_chan, sband->band)) | 180 | sband->band); |
180 | enable_ht = false; | 181 | /* check that channel matches the right operating channel */ |
182 | if (local->hw.conf.channel->center_freq != hti_cfreq) { | ||
183 | /* Some APs mess this up, evidently. | ||
184 | * Netgear WNDR3700 sometimes reports 4 higher than | ||
185 | * the actual channel, for instance. | ||
186 | */ | ||
187 | printk(KERN_DEBUG | ||
188 | "%s: Wrong control channel in association" | ||
189 | " response: configured center-freq: %d" | ||
190 | " hti-cfreq: %d hti->control_chan: %d" | ||
191 | " band: %d. Disabling HT.\n", | ||
192 | sdata->name, | ||
193 | local->hw.conf.channel->center_freq, | ||
194 | hti_cfreq, hti->control_chan, | ||
195 | sband->band); | ||
196 | enable_ht = false; | ||
197 | } | ||
198 | } | ||
181 | 199 | ||
182 | if (enable_ht) { | 200 | if (enable_ht) { |
183 | channel_type = NL80211_CHAN_HT20; | 201 | channel_type = NL80211_CHAN_HT20; |