From 968520da8f301784c06f4817fdca5403552e5bb5 Mon Sep 17 00:00:00 2001 From: Sunil Dutt Date: Mon, 22 Jul 2019 21:34:27 +0530 Subject: [PATCH] nl80211: Add WMM parameters while updating TDLS peer entry 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 --- src/drivers/driver_nl80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 45835a21b..8ad1072a4 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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);