aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorDreyfuss, Haim <[email protected]>2018-08-31 08:31:04 +0000
committerJohannes Berg <[email protected]>2018-09-03 08:35:03 +0000
commitabd76d255d69d70206c01b9cb19ba36a9c1df6a1 (patch)
tree892c68a86412f9ab8c86995f55cfe4540df93c56 /net/mac80211/util.c
parentcfg80211: fix a type issue in ieee80211_chandef_to_operating_class() (diff)
downloadkernel-abd76d255d69d70206c01b9cb19ba36a9c1df6a1.tar.gz
kernel-abd76d255d69d70206c01b9cb19ba36a9c1df6a1.zip
mac80211: fix WMM TXOP calculation
In commit 9236c4523e5b ("mac80211: limit wmm params to comply with ETSI requirements"), we have limited the WMM parameters to comply with 802.11 and ETSI standard. Mistakenly the TXOP value was caluclated wrong. Fix it by taking the minimum between 802.11 to ETSI to make sure we are not violating both. Fixes: e552af058148 ("mac80211: limit wmm params to comply with ETSI requirements") Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index c80187d6e6bb..93b5bb849ad7 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1151,8 +1151,7 @@ void ieee80211_regulatory_limit_wmm_params(struct ieee80211_sub_if_data *sdata,
qparam->cw_min = max_t(u16, qparam->cw_min, wmm_ac->cw_min);
qparam->cw_max = max_t(u16, qparam->cw_max, wmm_ac->cw_max);
qparam->aifs = max_t(u8, qparam->aifs, wmm_ac->aifsn);
- qparam->txop = !qparam->txop ? wmm_ac->cot / 32 :
- min_t(u16, qparam->txop, wmm_ac->cot / 32);
+ qparam->txop = min_t(u16, qparam->txop, wmm_ac->cot / 32);
rcu_read_unlock();
}