nl80211: Do not add WMM parameters when updating an existing STA entry

In the case of the driver not supporting full AP mode STA state (i.e.,
not adding a STA entry before association), the QoS parameters are not
allowed to be modified when going through (re)association exchange for a
STA entry that has not been removed from the kernel. cfg80211 would
reject such command to update STA flags, so do not add the WMM parameter
in this case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-03-27 03:14:02 +02:00
parent 2ffd8076de
commit 6d14b98fc6

View file

@ -4679,7 +4679,8 @@ static int wpa_driver_nl80211_sta_add(void *priv,
goto fail;
#endif /* CONFIG_MESH */
if (params->flags & WPA_STA_WMM) {
if ((!params->set || FULL_AP_CLIENT_STATE_SUPP(drv->capa.flags)) &&
(params->flags & WPA_STA_WMM)) {
struct nlattr *wme = nla_nest_start(msg, NL80211_ATTR_STA_WME);
wpa_printf(MSG_DEBUG, " * qosinfo=0x%x", params->qosinfo);