Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247174
b: refs/heads/master
c: 40db6c7
h: refs/heads/master
v: v3
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Apr 25, 2011
1 parent 262df52 commit ddb4e13
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 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: 0a6c9b1b666671a22905d38bc41ec1a04b85832f
refs/heads/master: 40db6c77ab48c3f3240422ff92fd6da222e2eb95
18 changes: 0 additions & 18 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
#include "cfg.h"
#include "debugfs.h"


static 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");

static struct lock_class_key ieee80211_rx_skb_queue_class;

void ieee80211_configure_filter(struct ieee80211_local *local)
Expand Down Expand Up @@ -728,18 +722,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
}
channels += sband->n_channels;

/*
* Since ieee80211_disable_40mhz_24ghz is global, we can
* modify the sband's ht data even if the driver uses a
* global structure for that.
*/
if (ieee80211_disable_40mhz_24ghz &&
band == IEEE80211_BAND_2GHZ &&
sband->ht_cap.ht_supported) {
sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
}

if (max_bitrates < sband->n_bitrates)
max_bitrates = sband->n_bitrates;
supp_ht = supp_ht || sband->ht_cap.ht_supported;
Expand Down
17 changes: 17 additions & 0 deletions trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ static struct dentry *ieee80211_debugfs_dir;
/* for the cleanup, scan and event works */
struct workqueue_struct *cfg80211_wq;

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

/* requires cfg80211_mutex to be held! */
struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx)
{
Expand Down Expand Up @@ -450,6 +455,18 @@ int wiphy_register(struct wiphy *wiphy)
if (WARN_ON(!sband->n_channels || !sband->n_bitrates))
return -EINVAL;

/*
* Since cfg80211_disable_40mhz_24ghz is global, we can
* modify the sband's ht data even if the driver uses a
* global structure for that.
*/
if (cfg80211_disable_40mhz_24ghz &&
band == IEEE80211_BAND_2GHZ &&
sband->ht_cap.ht_supported) {
sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
}

/*
* Since we use a u32 for rate bitmaps in
* ieee80211_get_response_rate, we cannot
Expand Down

0 comments on commit ddb4e13

Please sign in to comment.