Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 237000
b: refs/heads/master
c: 172710b
h: refs/heads/master
v: v3
  • Loading branch information
Ben Greear authored and John W. Linville committed Feb 3, 2011
1 parent 675a88b commit f6a5765
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0fa025f0a29ec6848b67a3021db4248c9dcc78ed
refs/heads/master: 172710bf8305c1b145796e34426c865480884024
26 changes: 22 additions & 4 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
struct ieee80211_supported_band *sband;
struct sta_info *sta;
u32 changed = 0;
int hti_cfreq;
u16 ht_opmode;
bool enable_ht = true;
enum nl80211_channel_type prev_chantype;
Expand All @@ -174,10 +175,27 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
if (!sband->ht_cap.ht_supported)
enable_ht = false;

/* check that channel matches the right operating channel */
if (local->hw.conf.channel->center_freq !=
ieee80211_channel_to_frequency(hti->control_chan, sband->band))
enable_ht = false;
if (enable_ht) {
hti_cfreq = ieee80211_channel_to_frequency(hti->control_chan,
sband->band);
/* check that channel matches the right operating channel */
if (local->hw.conf.channel->center_freq != hti_cfreq) {
/* Some APs mess this up, evidently.
* Netgear WNDR3700 sometimes reports 4 higher than
* the actual channel, for instance.
*/
printk(KERN_DEBUG
"%s: Wrong control channel in association"
" response: configured center-freq: %d"
" hti-cfreq: %d hti->control_chan: %d"
" band: %d. Disabling HT.\n",
sdata->name,
local->hw.conf.channel->center_freq,
hti_cfreq, hti->control_chan,
sband->band);
enable_ht = false;
}
}

if (enable_ht) {
channel_type = NL80211_CHAN_HT20;
Expand Down

0 comments on commit f6a5765

Please sign in to comment.