Patchwork [RFC,2/2] hostapd: Subscribe management frames for WPA_IF_AP_BSS types

login
register
mail settings
Submitter Yogesh Ashok Powar
Date Jan. 12, 2012, 10:33 a.m.
Message ID <20120112103259.GA19250@hertz.marvell.com>
Download mbox | patch
Permalink /patch/135616/
State Superseded
Headers show

Comments

Yogesh Ashok Powar - Jan. 12, 2012, 10:33 a.m.
In multiple BSSes scenario for the drivers that dont use
monitor interface and does not implement AP_SME, RX MGMT
frame subscription happens only for the default bss (first_bss).

Subscribing for RX MGMT frames for such BSSes.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
---
 src/drivers/driver_nl80211.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Johannes Berg - Jan. 12, 2012, 10:40 a.m.
On Thu, 2012-01-12 at 16:03 +0530, Yogesh Ashok Powar wrote:
> In multiple BSSes scenario for the drivers that dont use
> monitor interface and does not implement AP_SME, RX MGMT
> frame subscription happens only for the default bss (first_bss).
> 
> Subscribing for RX MGMT frames for such BSSes.
> 
> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
> ---
>  src/drivers/driver_nl80211.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> index 194a752..c4119e3 100644
> --- a/src/drivers/driver_nl80211.c
> +++ b/src/drivers/driver_nl80211.c
> @@ -7782,6 +7782,10 @@ static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
>  		if (drv_priv)
>  			*drv_priv = new_bss;
>  		nl80211_init_bss(new_bss);
> +
> +		/* Subscribe management frames for this WPA_IF_AP_BSS */
> +		if (nl80211_setup_ap(new_bss))
> +			return -1;

That looks right, but shouldn't there be a corresponding teardown_ap()?

johannes

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 194a752..c4119e3 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -7782,6 +7782,10 @@  static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
 		if (drv_priv)
 			*drv_priv = new_bss;
 		nl80211_init_bss(new_bss);
+
+		/* Subscribe management frames for this WPA_IF_AP_BSS */
+		if (nl80211_setup_ap(new_bss))
+			return -1;
 	}
 #endif /* HOSTAPD */