aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-12-17 09:59:34 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-17 09:59:34 (GMT)
commit774bfa62ce96e38261a3be7f63ef5c4579fbc787 (patch)
tree9375525bd74fb973e6384fe2cf006265eb53ffd3 /src
parent5f32f79c6e071f02076e09931adc8fc4e0ecd383 (diff)
downloadhostap-774bfa62ce96e38261a3be7f63ef5c4579fbc787.zip
hostap-774bfa62ce96e38261a3be7f63ef5c4579fbc787.tar.gz
hostap-774bfa62ce96e38261a3be7f63ef5c4579fbc787.tar.bz2
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>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver_nl80211.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e87b702..43e6597 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -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;
}