]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Do not add WMM parameters when updating an existing STA entry
authorJouni Malinen <jouni@codeaurora.org>
Wed, 27 Mar 2019 01:14:02 +0000 (03:14 +0200)
committerJouni Malinen <jouni@codeaurora.org>
Wed, 27 Mar 2019 01:14:02 +0000 (03:14 +0200)
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>
src/drivers/driver_nl80211.c

index cc59f1458f7f267c786889914ba19c2037724b81..52cef41865c5b93991855a81e83a46468a781c07 100644 (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);