diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-10-22 11:46:05 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-11-03 04:56:13 -0500 |
commit | 730a755017139ddedac08d82f73c3532a020d372 (patch) | |
tree | a97a8e48fef85af57ed106e6318caaaea95ed54f /net/mac80211/mlme.c | |
parent | cec6628350802b0a652486c41b57d4e1dd37a65c (diff) |
mac80211: fixup AIFSN instead of disabling WMM
Disabling WMM has a huge impact these days. It implies that
HT and VHT will be disabled which means that the throughput
will be drammatically reduced.
Since the AIFSN is a transmission parameter, we can play a
bit and fix it up to make it compliant with the 802.11
specification which requires it to be at least 2.
Increasing it from 1 to 2 will slightly reduce the
likelyhood to get a transmission opportunity compared to
other clients that would accept to set AIFSN=1, but at
least it will allow HT and VHT which is a huge gain.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 67f0387bea27..b9534c9902ac 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1816,6 +1816,13 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local, | |||
1816 | } | 1816 | } |
1817 | 1817 | ||
1818 | params.aifs = pos[0] & 0x0f; | 1818 | params.aifs = pos[0] & 0x0f; |
1819 | |||
1820 | if (params.aifs < 2) { | ||
1821 | sdata_info(sdata, | ||
1822 | "AP has invalid WMM params (AIFSN=%d for ACI %d), will use 2\n", | ||
1823 | params.aifs, aci); | ||
1824 | params.aifs = 2; | ||
1825 | } | ||
1819 | params.cw_max = ecw2cw((pos[1] & 0xf0) >> 4); | 1826 | params.cw_max = ecw2cw((pos[1] & 0xf0) >> 4); |
1820 | params.cw_min = ecw2cw(pos[1] & 0x0f); | 1827 | params.cw_min = ecw2cw(pos[1] & 0x0f); |
1821 | params.txop = get_unaligned_le16(pos + 2); | 1828 | params.txop = get_unaligned_le16(pos + 2); |
@@ -4559,17 +4566,10 @@ static bool ieee80211_usable_wmm_params(struct ieee80211_sub_if_data *sdata, | |||
4559 | left = len - 8; | 4566 | left = len - 8; |
4560 | 4567 | ||
4561 | for (; left >= 4; left -= 4, pos += 4) { | 4568 | for (; left >= 4; left -= 4, pos += 4) { |
4562 | u8 aifsn = pos[0] & 0x0f; | ||
4563 | u8 ecwmin = pos[1] & 0x0f; | 4569 | u8 ecwmin = pos[1] & 0x0f; |
4564 | u8 ecwmax = (pos[1] & 0xf0) >> 4; | 4570 | u8 ecwmax = (pos[1] & 0xf0) >> 4; |
4565 | int aci = (pos[0] >> 5) & 0x03; | 4571 | int aci = (pos[0] >> 5) & 0x03; |
4566 | 4572 | ||
4567 | if (aifsn < 2) { | ||
4568 | sdata_info(sdata, | ||
4569 | "AP has invalid WMM params (AIFSN=%d for ACI %d), disabling WMM\n", | ||
4570 | aifsn, aci); | ||
4571 | return false; | ||
4572 | } | ||
4573 | if (ecwmin > ecwmax) { | 4573 | if (ecwmin > ecwmax) { |
4574 | sdata_info(sdata, | 4574 | sdata_info(sdata, |
4575 | "AP has invalid WMM params (ECWmin/max=%d/%d for ACI %d), disabling WMM\n", | 4575 | "AP has invalid WMM params (ECWmin/max=%d/%d for ACI %d), disabling WMM\n", |