]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add WMM parameters while updating TDLS peer entry
authorSunil Dutt <usdutt@codeaurora.org>
Mon, 22 Jul 2019 16:04:27 +0000 (21:34 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 26 Jul 2019 12:42:22 +0000 (15:42 +0300)
The AP mode fix for removing NL80211_ATTR_STA_WME from
NL80211_CMD_SET_STATION did not consider the TDLS case and that resulted
in incorrectly removing WMM parameters from TDLS STA entry updates. Fix
this by considering the WPA_STA_TDLS_PEER flag similarly to the other
update parameters.

Fixes: 6d14b98fc6fc ("nl80211: Do not add WMM parameters when updating an existing STA entry")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/drivers/driver_nl80211.c

index 45835a21bc92e5734fb8b254539e179f0e42f516..8ad1072a4b83e602447c3a659a35ef9b080cba28 100644 (file)
@@ -4700,8 +4700,9 @@ static int wpa_driver_nl80211_sta_add(void *priv,
                goto fail;
 #endif /* CONFIG_MESH */
 
-       if ((!params->set || FULL_AP_CLIENT_STATE_SUPP(drv->capa.flags)) &&
-           (params->flags & WPA_STA_WMM)) {
+       if ((!params->set || (params->flags & WPA_STA_TDLS_PEER) ||
+            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);