[PATCH] wpa_supplicant: AP/P2P_GO mode config options for WMM and UAPSD.

Janusz Dziedzic janusz.dziedzic at gmail.com
Wed Aug 31 07:35:46 EDT 2011


Add global configuration option for AP/P2P_GO mode when wpa_supplicant is used.
Options for enabling wmm or/and uapsd - similar like in hostapd config.

---
 wpa_supplicant/ap.c     |    8 ++++++--
 wpa_supplicant/config.c |    6 +++++-
 wpa_supplicant/config.h |   12 ++++++++++++
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 9eb2ba6..655d5a4 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -400,8 +400,12 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
 	wpa_drv_set_intra_bss(wpa_s, wpa_s->conf->p2p_intra_bss);
 #endif /* CONFIG_P2P */

-	if (wpa_s->parent->set_ap_uapsd)
-		params.uapsd = wpa_s->parent->ap_uapsd;
+	conf->bss->wmm_enabled = wpa_s->conf->wmm_enabled;
+	conf->bss->wmm_uapsd = wpa_s->conf->uapsd_advertisement_enabled;
+	conf->bss->wmm_uapsd |= wpa_s->parent->set_ap_uapsd;
+
+	if (conf->bss->wmm_uapsd)
+		params.uapsd = conf->bss->wmm_uapsd;
 	else
 		params.uapsd = -1;

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 7ec4531..201ab4e 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2445,7 +2445,11 @@ static const struct global_parse_data global_fields[] = {
 	{ INT(bss_expiration_scan_count), 0 },
 	{ INT_RANGE(filter_ssids, 0, 1), 0 },
 	{ INT(max_num_sta), 0 },
-	{ INT_RANGE(disassoc_low_ack, 0, 1), 0 }
+	{ INT_RANGE(disassoc_low_ack, 0, 1), 0 },
+#ifdef CONFIG_AP
+	{ INT_RANGE(wmm_enabled, 0, 1), 0},
+	{ INT_RANGE(uapsd_advertisement_enabled, 0, 1), 0}
+#endif /* CONFIG_AP */
 };

 #undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 10abdad..3a0aa33 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -426,6 +426,18 @@ struct wpa_config {
 	 * disassoc_low_ack - Disassocicate stations with massive packet loss
 	 */
 	int disassoc_low_ack;
+
+#ifdef CONFIG_AP
+	/**
+	 * wmm_enabled - Enable WMM for AP/P2P_GO mode
+	 */
+	int wmm_enabled;
+
+	/**
+	 * uapsd_advertisement_enabled - Enable UAPSD for AP/P2P_GO mode
+	 */
+	int uapsd_advertisement_enabled;
+#endif /* CONFIG_AP */
 };


-- 
1.7.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wpa_supplicant-AP-P2P_GO-mode-config-options-for-WMM.patch
Type: application/octet-stream
Size: 2218 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20110831/3d0f1d82/attachment-0001.obj 


More information about the HostAP mailing list