Patchwork AP: use uapsd if go_apsd was set

login
register
mail settings
Submitter Arik Nemtsov
Date Dec. 9, 2012, 8:02 a.m.
Message ID <1355040140-17696-1-git-send-email-arik@wizery.com>
Download mbox | patch
Permalink /patch/204690/
State Rejected
Headers show

Comments

Arik Nemtsov - Dec. 9, 2012, 8:02 a.m.
From: Eliad Peller <eliad@wizery.com>

don't set params.uapsd to -1, as it's a valid value.

Signed-hostap: Eliad Peller <eliad@wizery.com>
---
 wpa_supplicant/ap.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Arik Nemtsov - Dec. 9, 2012, 10:18 a.m.
On Sun, Dec 9, 2012 at 10:02 AM, Arik Nemtsov <arik@wizery.com> wrote:
> From: Eliad Peller <eliad@wizery.com>
>
> don't set params.uapsd to -1, as it's a valid value.
>
> Signed-hostap: Eliad Peller <eliad@wizery.com>

Please ignore this one. It introduces a bug and is otherwise incorrect..

Arik

Patch

diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index e261ef9..29ef374 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -486,8 +486,6 @@  int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
 
 	if (wpa_s->parent->set_ap_uapsd)
 		params.uapsd = wpa_s->parent->ap_uapsd;
-	else
-		params.uapsd = -1;
 
 	if (wpa_drv_associate(wpa_s, &params) < 0) {
 		wpa_msg(wpa_s, MSG_INFO, "Failed to start AP functionality");
@@ -511,7 +509,7 @@  int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
 		  wpa_s->conf->wmm_ac_params,
 		  sizeof(wpa_s->conf->wmm_ac_params));
 
-	if (params.uapsd > 0) {
+	if (params.uapsd) {
 		conf->bss->wmm_enabled = 1;
 		conf->bss->wmm_uapsd = 1;
 	}