aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorYoni Divinsky <yoni.divinsky@ti.com>2012-07-10 19:32:18 +0300
committerArik Nemtsov <arik@wizery.com>2012-07-30 17:48:04 +0300
commit549cc6951ce88bf063939f2d467bbd5499df32ac (patch)
treefaacbd355dc9cf5114c286d02969bb3ff9707c65 /hostapd
parent748313224b1f3920a49c6985c9580872bf232b45 (diff)
downloadexternal_wpa_supplicant_8_ti-549cc6951ce88bf063939f2d467bbd5499df32ac.zip
external_wpa_supplicant_8_ti-549cc6951ce88bf063939f2d467bbd5499df32ac.tar.gz
external_wpa_supplicant_8_ti-549cc6951ce88bf063939f2d467bbd5499df32ac.tar.bz2
P2P: enable to set in the conf file the wmm params
In case of P2P GO, the wpa_supplicant uses the default hostapd parameters. In the default parameters the ACM bit for video and voice are set to 1, meaning, P2P devices and stations which are connected to the GO cannot pass voice or video data packets. Signed-hostap: Yoni Divinsky <yoni.divinsky@ti.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c74
1 files changed, 1 insertions, 73 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index eebbaa6..03f82b2 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -909,78 +909,6 @@ static int hostapd_config_tx_queue(struct hostapd_config *conf, char *name,
}
-static int hostapd_config_wmm_ac(struct hostapd_config *conf, char *name,
- char *val)
-{
- int num, v;
- char *pos;
- struct hostapd_wmm_ac_params *ac;
-
- /* skip 'wme_ac_' or 'wmm_ac_' prefix */
- pos = name + 7;
- if (os_strncmp(pos, "be_", 3) == 0) {
- num = 0;
- pos += 3;
- } else if (os_strncmp(pos, "bk_", 3) == 0) {
- num = 1;
- pos += 3;
- } else if (os_strncmp(pos, "vi_", 3) == 0) {
- num = 2;
- pos += 3;
- } else if (os_strncmp(pos, "vo_", 3) == 0) {
- num = 3;
- pos += 3;
- } else {
- wpa_printf(MSG_ERROR, "Unknown WMM name '%s'", pos);
- return -1;
- }
-
- ac = &conf->wmm_ac_params[num];
-
- if (os_strcmp(pos, "aifs") == 0) {
- v = atoi(val);
- if (v < 1 || v > 255) {
- wpa_printf(MSG_ERROR, "Invalid AIFS value %d", v);
- return -1;
- }
- ac->aifs = v;
- } else if (os_strcmp(pos, "cwmin") == 0) {
- v = atoi(val);
- if (v < 0 || v > 12) {
- wpa_printf(MSG_ERROR, "Invalid cwMin value %d", v);
- return -1;
- }
- ac->cwmin = v;
- } else if (os_strcmp(pos, "cwmax") == 0) {
- v = atoi(val);
- if (v < 0 || v > 12) {
- wpa_printf(MSG_ERROR, "Invalid cwMax value %d", v);
- return -1;
- }
- ac->cwmax = v;
- } else if (os_strcmp(pos, "txop_limit") == 0) {
- v = atoi(val);
- if (v < 0 || v > 0xffff) {
- wpa_printf(MSG_ERROR, "Invalid txop value %d", v);
- return -1;
- }
- ac->txop_limit = v;
- } else if (os_strcmp(pos, "acm") == 0) {
- v = atoi(val);
- if (v < 0 || v > 1) {
- wpa_printf(MSG_ERROR, "Invalid acm value %d", v);
- return -1;
- }
- ac->admission_control_mandatory = v;
- } else {
- wpa_printf(MSG_ERROR, "Unknown wmm_ac_ field '%s'", pos);
- return -1;
- }
-
- return 0;
-}
-
-
#ifdef CONFIG_IEEE80211R
static int add_r0kh(struct hostapd_bss_config *bss, char *value)
{
@@ -2142,7 +2070,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
bss->wmm_uapsd = atoi(pos);
} else if (os_strncmp(buf, "wme_ac_", 7) == 0 ||
os_strncmp(buf, "wmm_ac_", 7) == 0) {
- if (hostapd_config_wmm_ac(conf, buf, pos)) {
+ if (wpa_config_wmm_ac(conf->wmm_ac_params, buf, pos)) {
wpa_printf(MSG_ERROR, "Line %d: invalid WMM "
"ac item", line);
errors++;