Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183295
b: refs/heads/master
c: f38fd12
h: refs/heads/master
i:
  183293: fe4c197
  183291: 825cc62
  183287: 66aab09
  183279: 837451c
  183263: d3a0551
  183231: b4508de
  183167: 2757de7
  183039: d334c03
  182783: 67f1d11
  182271: f857544
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Dec 22, 2009
1 parent a2ab0cc commit 762fad2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 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: 8b73d13a21ae889e747cac180ff27c5a0a88e6a4
refs/heads/master: f38fd12fa7b7b98e158a9b31d388da34eef25c22
2 changes: 2 additions & 0 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,8 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
void ieee80211_configure_filter(struct ieee80211_local *local);
u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);

extern bool ieee80211_disable_40mhz_24ghz;

/* STA code */
void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
Expand Down
6 changes: 6 additions & 0 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
#include "cfg.h"
#include "debugfs.h"


bool ieee80211_disable_40mhz_24ghz;
module_param(ieee80211_disable_40mhz_24ghz, bool, 0644);
MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz,
"Disable 40MHz support in the 2.4GHz band");

void ieee80211_configure_filter(struct ieee80211_local *local)
{
u64 mc;
Expand Down
6 changes: 6 additions & 0 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,

/* determine capability flags */

if (ieee80211_disable_40mhz_24ghz &&
sband->band == IEEE80211_BAND_2GHZ) {
cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
cap &= ~IEEE80211_HT_CAP_SGI_40;
}

switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
if (flags & IEEE80211_CHAN_NO_HT40PLUS) {
Expand Down
14 changes: 11 additions & 3 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,16 +908,24 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
}

if (sband->ht_cap.ht_supported) {
__le16 tmp = cpu_to_le16(sband->ht_cap.cap);
u16 cap = sband->ht_cap.cap;
__le16 tmp;

if (ieee80211_disable_40mhz_24ghz &&
sband->band == IEEE80211_BAND_2GHZ) {
cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
cap &= ~IEEE80211_HT_CAP_SGI_40;
}

*pos++ = WLAN_EID_HT_CAPABILITY;
*pos++ = sizeof(struct ieee80211_ht_cap);
memset(pos, 0, sizeof(struct ieee80211_ht_cap));
tmp = cpu_to_le16(cap);
memcpy(pos, &tmp, sizeof(u16));
pos += sizeof(u16);
/* TODO: needs a define here for << 2 */
*pos++ = sband->ht_cap.ampdu_factor |
(sband->ht_cap.ampdu_density << 2);
(sband->ht_cap.ampdu_density <<
IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
pos += sizeof(sband->ht_cap.mcs);
pos += 2 + 4 + 1; /* ext info, BF cap, antsel */
Expand Down

0 comments on commit 762fad2

Please sign in to comment.