aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/main.c14
-rw-r--r--net/mac80211/util.c6
-rw-r--r--net/mac80211/work.c6
4 files changed, 13 insertions, 15 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 44eea1af1553..bb63878d865e 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1066,8 +1066,6 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
1066void ieee80211_configure_filter(struct ieee80211_local *local); 1066void ieee80211_configure_filter(struct ieee80211_local *local);
1067u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata); 1067u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);
1068 1068
1069extern bool ieee80211_disable_40mhz_24ghz;
1070
1071/* STA code */ 1069/* STA code */
1072void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata); 1070void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
1073int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, 1071int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index e7eb2cfaf400..2543e48bd813 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -34,7 +34,7 @@
34#include "debugfs.h" 34#include "debugfs.h"
35 35
36 36
37bool ieee80211_disable_40mhz_24ghz; 37static bool ieee80211_disable_40mhz_24ghz;
38module_param(ieee80211_disable_40mhz_24ghz, bool, 0644); 38module_param(ieee80211_disable_40mhz_24ghz, bool, 0644);
39MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz, 39MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz,
40 "Disable 40MHz support in the 2.4GHz band"); 40 "Disable 40MHz support in the 2.4GHz band");
@@ -723,6 +723,18 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
723 } 723 }
724 channels += sband->n_channels; 724 channels += sband->n_channels;
725 725
726 /*
727 * Since ieee80211_disable_40mhz_24ghz is global, we can
728 * modify the sband's ht data even if the driver uses a
729 * global structure for that.
730 */
731 if (ieee80211_disable_40mhz_24ghz &&
732 band == IEEE80211_BAND_2GHZ &&
733 sband->ht_cap.ht_supported) {
734 sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
735 sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
736 }
737
726 if (max_bitrates < sband->n_bitrates) 738 if (max_bitrates < sband->n_bitrates)
727 max_bitrates = sband->n_bitrates; 739 max_bitrates = sband->n_bitrates;
728 supp_ht = supp_ht || sband->ht_cap.ht_supported; 740 supp_ht = supp_ht || sband->ht_cap.ht_supported;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index cf68700abffa..26fd5d29af7f 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -986,12 +986,6 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
986 u16 cap = sband->ht_cap.cap; 986 u16 cap = sband->ht_cap.cap;
987 __le16 tmp; 987 __le16 tmp;
988 988
989 if (ieee80211_disable_40mhz_24ghz &&
990 sband->band == IEEE80211_BAND_2GHZ) {
991 cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
992 cap &= ~IEEE80211_HT_CAP_SGI_40;
993 }
994
995 *pos++ = WLAN_EID_HT_CAPABILITY; 989 *pos++ = WLAN_EID_HT_CAPABILITY;
996 *pos++ = sizeof(struct ieee80211_ht_cap); 990 *pos++ = sizeof(struct ieee80211_ht_cap);
997 memset(pos, 0, sizeof(struct ieee80211_ht_cap)); 991 memset(pos, 0, sizeof(struct ieee80211_ht_cap));
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 64f2b2871282..204f0a4db969 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -126,12 +126,6 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
126 126
127 /* determine capability flags */ 127 /* determine capability flags */
128 128
129 if (ieee80211_disable_40mhz_24ghz &&
130 sband->band == IEEE80211_BAND_2GHZ) {
131 cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
132 cap &= ~IEEE80211_HT_CAP_SGI_40;
133 }
134
135 switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { 129 switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
136 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: 130 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
137 if (flags & IEEE80211_CHAN_NO_HT40PLUS) { 131 if (flags & IEEE80211_CHAN_NO_HT40PLUS) {