]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: Fix condition validating WMM IE
authorIlan Peer <ilan.peer@intel.com>
Tue, 3 Apr 2018 08:35:22 +0000 (11:35 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 19 Apr 2018 13:46:22 +0000 (15:46 +0200)
Commit c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from
buggy APs") handled cases where an AP reports a zeroed WMM
IE. However, the condition that checks the validity accessed the wrong
index in the ieee80211_tx_queue_params array, thus wrongly deducing
that the parameters are invalid. Fix it.

Fixes: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs")
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 69449db7e283316197a4d900f6cd9159e3185ea5..6fe72ef182a1c0c4668e893742a4e18316276d21 100644 (file)
@@ -1787,7 +1787,7 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
                params[ac].acm = acm;
                params[ac].uapsd = uapsd;
 
-               if (params->cw_min == 0 ||
+               if (params[ac].cw_min == 0 ||
                    params[ac].cw_min > params[ac].cw_max) {
                        sdata_info(sdata,
                                   "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n",