aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c14
1 files changed, 13 insertions, 1 deletions
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;