mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
mac80211: don't WARN on short WMM parameters from AP
commit05aaa5c97dupstream. In a very similar spirit to commitc470bdc1aa("mac80211: don't WARN on bad WMM parameters from buggy APs"), an AP may not transmit a fully-formed WMM IE. For example, it may miss or repeat an Access Category. The above loop won't catch that and will instead leave one of the four ACs zeroed out. This triggers the following warning in drv_conf_tx() wlan0: invalid CW_min/CW_max: 0/0 and it may leave one of the hardware queues unconfigured. If we detect such a case, let's just print a warning and fall back to the defaults. Tested with a hacked version of hostapd, intentionally corrupting the IEs in hostapd_eid_wmm(). Cc: stable@vger.kernel.org Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20190726224758.210953-1-briannorris@chromium.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
aab77d312d
commit
6c529d4d8b
@@ -1867,6 +1867,16 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
|
||||
}
|
||||
}
|
||||
|
||||
/* WMM specification requires all 4 ACIs. */
|
||||
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
|
||||
if (params[ac].cw_min == 0) {
|
||||
sdata_info(sdata,
|
||||
"AP has invalid WMM params (missing AC %d), using defaults\n",
|
||||
ac);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
|
||||
mlme_dbg(sdata,
|
||||
"WMM AC=%d acm=%d aifs=%d cWmin=%d cWmax=%d txop=%d uapsd=%d, downgraded=%d\n",
|
||||
|
||||
Reference in New Issue
Block a user