Return-path: Received: from smtp.nokia.com ([147.243.1.47]:53140 "EHLO mgw-sa01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758571Ab0KQPlY (ORCPT ); Wed, 17 Nov 2010 10:41:24 -0500 Received: from nokia.com (localhost [127.0.0.1]) by mgw-sa01.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id oAHFfMo0002094 for ; Wed, 17 Nov 2010 17:41:23 +0200 Subject: Re: [PATCH] wl12xx: Unset bssid filter, ssid and bssid from firmware on disassoc From: Luciano Coelho To: juuso.oikarinen@nokia.com Cc: linux-wireless@vger.kernel.org In-Reply-To: <1290000541-17828-1-git-send-email-juuso.oikarinen@nokia.com> References: <1290000541-17828-1-git-send-email-juuso.oikarinen@nokia.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 17 Nov 2010 17:41:00 +0200 Message-ID: <1290008460.12140.64.camel@chilepepper> Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Wed, 2010-11-17 at 15:29 +0200, juuso.oikarinen@nokia.com wrote: > From: Juuso Oikarinen > > On the disassociation event from the mac80211, the wl12xx driver does not > clear the chipset configuration related to the AP - i.e. it does not perform > a DISCONNECT and then a JOIN with zero SSID and dummy BSSID. Also, it does not > unset the BSSID filter. > > Often this is not a problem, as the above is performed upon entering idle > state. But if a scenario arises where a new association is attempted without > cycling through idle state, the new association will fail. > > Fix this by resetting the firmware state on disassociation. > > Signed-off-by: Juuso Oikarinen > --- > drivers/net/wireless/wl12xx/main.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c > index 31f0e2f..c523778 100644 > --- a/drivers/net/wireless/wl12xx/main.c > +++ b/drivers/net/wireless/wl12xx/main.c > @@ -2012,6 +2012,10 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw, > /* Disable the keep-alive feature */ > ret = wl1271_acx_keep_alive_mode(wl, false); > > + /* restore the bssid filter and go to dummy bssid */ > + wl1271_handle_idle(wl, true); > + wl1271_handle_idle(wl, false); > + Hmmm... This looks quite hacky. Can 't you create functions with that "restore the bssid" and "go to dummy bssid" and call them instead? If you do so, you don't have to artificially go to idle and leave idle immediately... -- Cheers, Luca.