From patchwork Thu Jan 12 11:49:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2, 2/2] hostapd: Subscribe management frames for WPA_IF_AP_BSS types Date: Thu, 12 Jan 2012 01:49:58 -0000 From: Yogesh Ashok Powar X-Patchwork-Id: 135623 Message-Id: <20120112114952.GA19592@hertz.marvell.com> To: "j@w1.fi" Cc: "hostap@shmoo.com" 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. V2: As suggested by Johannes Adding corresponding teardown_ap() call to unsubscribe the previously subscribed MGMT RX frames. Signed-off-by: Yogesh Ashok Powar --- src/drivers/driver_nl80211.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 69e269c..51087ba 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -7783,6 +7783,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 */ @@ -7834,6 +7838,8 @@ static int wpa_driver_nl80211_if_remove(void *priv, for (tbss = &drv->first_bss; tbss; tbss = tbss->next) { if (tbss->next == bss) { tbss->next = bss->next; + /* Unsubscribe management frames */ + nl80211_teardown_ap(bss); nl80211_destroy_bss(bss); os_free(bss); bss = NULL;