mac80211: Support ht-cap over-rides.
This implements ht-cap over-rides for mac80211 drivers. HT may be disabled, making an /a/b/g/n station act like an a/b/g station. HT40 may be disabled forcing the station to be HT20 even if the AP and local hardware support HT40. MAX-AMSDU may be disabled. AMPDU-Density may be increased. AMPDU-Factor may be decreased. This has been successfully tested with ath9k using patched wpa_supplicant and iw. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
7e7c8926b2
commit
ef96a84202
@@ -558,6 +558,19 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = {
|
||||
.ampdu_params_info = IEEE80211_HT_AMPDU_PARM_FACTOR |
|
||||
IEEE80211_HT_AMPDU_PARM_DENSITY,
|
||||
|
||||
.cap_info = cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||
IEEE80211_HT_CAP_MAX_AMSDU |
|
||||
IEEE80211_HT_CAP_SGI_40),
|
||||
.mcs = {
|
||||
.rx_mask = { 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, },
|
||||
},
|
||||
};
|
||||
|
||||
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
||||
const struct ieee80211_ops *ops)
|
||||
{
|
||||
@@ -631,6 +644,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
||||
local->user_power_level = -1;
|
||||
local->uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES;
|
||||
local->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
|
||||
wiphy->ht_capa_mod_mask = &mac80211_ht_capa_mod_mask;
|
||||
|
||||
INIT_LIST_HEAD(&local->interfaces);
|
||||
|
||||
|
Reference in New Issue
Block a user