mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
nl80211: Send uapsd_queues and max_sp values on STA addition
When a new station is added, send its configured WMM params. Signed-off-by: Eliad Peller <eliad@wizery.com>
This commit is contained in:
parent
5f32f79c6e
commit
774bfa62ce
@ -5353,7 +5353,7 @@ static int wpa_driver_nl80211_sta_add(void *priv,
|
||||
{
|
||||
struct i802_bss *bss = priv;
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
struct nl_msg *msg;
|
||||
struct nl_msg *msg, *wme = NULL;
|
||||
struct nl80211_sta_flag_update upd;
|
||||
int ret = -ENOBUFS;
|
||||
|
||||
@ -5388,6 +5388,20 @@ static int wpa_driver_nl80211_sta_add(void *priv,
|
||||
upd.set = upd.mask;
|
||||
NLA_PUT(msg, NL80211_ATTR_STA_FLAGS2, sizeof(upd), &upd);
|
||||
|
||||
if (params->flags & WPA_STA_WMM) {
|
||||
wme = nlmsg_alloc();
|
||||
if (!wme)
|
||||
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);
|
||||
nla_put_nested(msg, NL80211_ATTR_STA_WME, wme);
|
||||
|
||||
nlmsg_free(wme);
|
||||
wme = NULL;
|
||||
}
|
||||
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
if (ret)
|
||||
wpa_printf(MSG_DEBUG, "nl80211: NL80211_CMD_%s_STATION "
|
||||
@ -5396,6 +5410,8 @@ static int wpa_driver_nl80211_sta_add(void *priv,
|
||||
if (ret == -EEXIST)
|
||||
ret = 0;
|
||||
nla_put_failure:
|
||||
if (wme)
|
||||
nlmsg_free(wme);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user