diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2012-02-16 16:28:31 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-02-16 16:28:31 +0200 |
commit | aa074a6485ee0f876fdfb65b61a3f537f6348963 (patch) | |
tree | 3de7bddeb41c5b11c311459a9f6f511ba988d6b7 | |
parent | 84c78f9570a619885b04896acb3b094a70cb6e2d (diff) | |
download | external_wpa_supplicant_8_ti-aa074a6485ee0f876fdfb65b61a3f537f6348963.zip external_wpa_supplicant_8_ti-aa074a6485ee0f876fdfb65b61a3f537f6348963.tar.gz external_wpa_supplicant_8_ti-aa074a6485ee0f876fdfb65b61a3f537f6348963.tar.bz2 |
Allow U-APSD parameters to be configured with SET command
This can be used in non-P2P case to set U-APSD parameters for a
station mode association.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r-- | wpa_supplicant/ctrl_iface.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index fda6eeb..5eaa539 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -203,6 +203,42 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s, ret = -1; else if (disabled) wpa_supplicant_set_state(wpa_s, WPA_INACTIVE); + } else if (os_strcasecmp(cmd, "uapsd") == 0) { + if (os_strcmp(value, "disable") == 0) + wpa_s->set_sta_uapsd = 0; + else { + int be, bk, vi, vo; + char *pos; + /* format: BE,BK,VI,VO;max SP Length */ + be = atoi(value); + pos = os_strchr(value, ','); + if (pos == NULL) + return -1; + pos++; + bk = atoi(pos); + pos = os_strchr(pos, ','); + if (pos == NULL) + return -1; + pos++; + vi = atoi(pos); + pos = os_strchr(pos, ','); + if (pos == NULL) + return -1; + pos++; + vo = atoi(pos); + /* ignore max SP Length for now */ + + wpa_s->set_sta_uapsd = 1; + wpa_s->sta_uapsd = 0; + if (be) + wpa_s->sta_uapsd |= BIT(0); + if (bk) + wpa_s->sta_uapsd |= BIT(1); + if (vi) + wpa_s->sta_uapsd |= BIT(2); + if (vo) + wpa_s->sta_uapsd |= BIT(3); + } } else { value[-1] = '='; ret = wpa_config_process_global(wpa_s->conf, cmd, -1); |