From 6d14b98fc6fcb4ac45bcd1febfbd947cd206084f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 27 Mar 2019 03:14:02 +0200 Subject: [PATCH] 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 --- src/drivers/driver_nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index cc59f1458..52cef4186 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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);