Support HT capability overrides

This allows HT capabilities overrides on kernels that
support these features.

MCS Rates can be disabled to force to slower speeds when using HT.
Rates cannot be forced higher.

HT can be disabled, forcing an 802.11a/b/g/n station to act like
an 802.11a/b/g station.

HT40 can be disabled.

MAX A-MSDU can be disabled.
A-MPDU Factor and A-MPDU Density can be modified.

Please note that these are suggestions to the kernel. Only mac80211
drivers will work at all. The A-MPDU Factor can only be decreased and
the A-MPDU Density can only be increased currently.

Signed-hostap: Ben Greear <greearb@candelatech.com>
This commit is contained in:
Ben Greear 2012-01-29 21:01:31 +02:00 committed by Jouni Malinen
parent 499e7286b0
commit 80e8a5eef1
10 changed files with 320 additions and 0 deletions

View file

@ -519,6 +519,9 @@ struct ieee80211_mgmt {
} STRUCT_PACKED;
/* Rx MCS bitmask is in the first 77 bits of supported_mcs_set */
#define IEEE80211_HT_MCS_MASK_LEN 10
struct ieee80211_ht_capabilities {
le16 ht_capabilities_info;
u8 a_mpdu_params;

View file

@ -523,6 +523,19 @@ struct wpa_driver_associate_params {
* 0 = Do not fix BSSID.
*/
int fixed_bssid;
/**
* disable_ht - Disable HT (IEEE 802.11n) for this connection
*/
int disable_ht;
/**
* HT Capabilities over-rides. Only bits set in the mask will be used,
* and not all values are used by the kernel anyway. Currently, MCS,
* MPDU and MSDU fields are used.
*/
const u8 *htcaps; /* struct ieee80211_ht_capabilities * */
const u8 *htcaps_mask; /* struct ieee80211_ht_capabilities * */
};
enum hide_ssid {

View file

@ -6648,6 +6648,16 @@ skip_auth_type:
NLA_PUT_U32(msg, NL80211_ATTR_AKM_SUITES, mgmt);
}
if (params->disable_ht)
NLA_PUT_FLAG(msg, NL80211_ATTR_DISABLE_HT);
if (params->htcaps && params->htcaps_mask) {
int sz = sizeof(struct ieee80211_ht_capabilities);
NLA_PUT(msg, NL80211_ATTR_HT_CAPABILITY, sz, params->htcaps);
NLA_PUT(msg, NL80211_ATTR_HT_CAPABILITY_MASK, sz,
params->htcaps_mask);
}
ret = nl80211_set_conn_keys(params, msg);
if (ret)
goto nla_put_failure;
@ -6795,6 +6805,16 @@ static int wpa_driver_nl80211_associate(
params->prev_bssid);
}
if (params->disable_ht)
NLA_PUT_FLAG(msg, NL80211_ATTR_DISABLE_HT);
if (params->htcaps && params->htcaps_mask) {
int sz = sizeof(struct ieee80211_ht_capabilities);
NLA_PUT(msg, NL80211_ATTR_HT_CAPABILITY, sz, params->htcaps);
NLA_PUT(msg, NL80211_ATTR_HT_CAPABILITY_MASK, sz,
params->htcaps_mask);
}
if (params->p2p)
wpa_printf(MSG_DEBUG, " * P2P group");