From patchwork Thu Jan 12 11:49:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Ashok Powar X-Patchwork-Id: 135623 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 492F3B6EF2 for ; Thu, 12 Jan 2012 22:55:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3E2249C1D1; Thu, 12 Jan 2012 06:55:45 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5HkpkaRHNUje; Thu, 12 Jan 2012 06:55:45 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 0ACAC9C1AE; Thu, 12 Jan 2012 06:55:40 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 985029C1B4 for ; Thu, 12 Jan 2012 06:55:38 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w21KN7zpYjv9 for ; Thu, 12 Jan 2012 06:55:34 -0500 (EST) Received: from na3sys009aog104.obsmtp.com (na3sys009aog104.obsmtp.com [74.125.149.73]) by maxx.maxx.shmoo.com (Postfix) with SMTP id 7D0BA9C1AE for ; Thu, 12 Jan 2012 06:55:33 -0500 (EST) Received: from MSI-MTA.marvell.com ([65.219.4.132]) by na3sys009aob104.postini.com ([74.125.148.12]) with SMTP ID DSNKTw7KNJjoGORE9RstwLUduwEdgeyWKNly@postini.com; Thu, 12 Jan 2012 03:55:34 PST Received: from maili.marvell.com ([10.68.76.210]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Jan 2012 03:50:48 -0800 Received: from hertz.marvell.com (unknown [10.31.131.207]) by maili.marvell.com (Postfix) with ESMTP id 664D24E4BF; Thu, 12 Jan 2012 03:50:47 -0800 (PST) Date: Thu, 12 Jan 2012 17:19:58 +0530 From: Yogesh Ashok Powar To: "j@w1.fi" Subject: [PATCH v2 2/2] hostapd: Subscribe management frames for WPA_IF_AP_BSS types Message-ID: <20120112114952.GA19592@hertz.marvell.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 12 Jan 2012 11:50:48.0165 (UTC) FILETIME=[6CD04950:01CCD120] Cc: "hostap@shmoo.com" X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.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;