aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/driver.h3
-rw-r--r--src/drivers/driver_nl80211.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 783102e..53d1c25 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -834,8 +834,7 @@ struct hostapd_sta_add_params {
const struct ieee80211_ht_capabilities *ht_capabilities;
u32 flags; /* bitmask of WPA_STA_* flags */
int set; /* Set STA parameters instead of add */
- u8 uapsd_queues;
- u8 max_sp;
+ u8 qosinfo;
};
struct hostapd_freq_params {
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 42bf79f..bc8b1fc 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -5406,12 +5406,11 @@ static int wpa_driver_nl80211_sta_add(void *priv,
goto nla_put_failure;
NLA_PUT_U8(wme, NL80211_STA_WME_UAPSD_QUEUES,
- params->uapsd_queues);
- NLA_PUT_U8(wme, NL80211_STA_WME_MAX_SP, params->max_sp);
+ params->qosinfo & WMM_QOSINFO_STA_AC_MASK);
+ NLA_PUT_U8(wme, NL80211_STA_WME_MAX_SP,
+ (params->qosinfo > WMM_QOSINFO_STA_SP_SHIFT) &
+ WMM_QOSINFO_STA_SP_MASK);
nla_put_nested(msg, NL80211_ATTR_STA_WME, wme);
-
- nlmsg_free(wme);
- wme = NULL;
}
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
@@ -5423,8 +5422,7 @@ static int wpa_driver_nl80211_sta_add(void *priv,
if (ret == -EEXIST)
ret = 0;
nla_put_failure:
- if (wme)
- nlmsg_free(wme);
+ nlmsg_free(wme);
nlmsg_free(msg);
return ret;
}