aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index fe01de29bfe..bbf1fa11107 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -46,6 +46,11 @@ static struct dentry *ieee80211_debugfs_dir;
46/* for the cleanup, scan and event works */ 46/* for the cleanup, scan and event works */
47struct workqueue_struct *cfg80211_wq; 47struct workqueue_struct *cfg80211_wq;
48 48
49static bool cfg80211_disable_40mhz_24ghz;
50module_param(cfg80211_disable_40mhz_24ghz, bool, 0644);
51MODULE_PARM_DESC(cfg80211_disable_40mhz_24ghz,
52 "Disable 40MHz support in the 2.4GHz band");
53
49/* requires cfg80211_mutex to be held! */ 54/* requires cfg80211_mutex to be held! */
50struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx) 55struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx)
51{ 56{
@@ -451,6 +456,18 @@ int wiphy_register(struct wiphy *wiphy)
451 return -EINVAL; 456 return -EINVAL;
452 457
453 /* 458 /*
459 * Since cfg80211_disable_40mhz_24ghz is global, we can
460 * modify the sband's ht data even if the driver uses a
461 * global structure for that.
462 */
463 if (cfg80211_disable_40mhz_24ghz &&
464 band == IEEE80211_BAND_2GHZ &&
465 sband->ht_cap.ht_supported) {
466 sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
467 sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
468 }
469
470 /*
454 * Since we use a u32 for rate bitmaps in 471 * Since we use a u32 for rate bitmaps in
455 * ieee80211_get_response_rate, we cannot 472 * ieee80211_get_response_rate, we cannot
456 * have more than 32 legacy rates. 473 * have more than 32 legacy rates.