From 001454fc0637475a088bd82d33c53aca518816ce Mon Sep 17 00:00:00 2001 From: Dmitry Tarnyagin Date: Fri, 19 Aug 2011 10:11:24 +0200 Subject: cw1200: Fix for a BUG in cw1200_unjoin_work. Dump was seen twice: deauthentication between scan-req and scan-res. D/wpa_supplicant( 2443): nl80211: Event message available D/wpa_supplicant( 2443): nl80211: New scan results available [ 549.251159] wlan0: deauthenticated from 00:0c:e3:6b:8e:cd (Reason: 7) D/wpa_supplicant( 2443): nl80211: Associated on 2422 MHz D/wpa_supplicant( 2443): Received scan results (38 BSSes) D/wpa_supplicant( 2443): nl80211: Scan results indicate BSS status with 00:0c:e3:6b:8e:cd as associated [ 549.277404] ieee80211 phy0: cw1200_unjoin_work: Unexpected: delayed unjoin is already scheduled. V/WifiMonitor( 1779): Even... [ 549.291015] kernel BUG at drivers/staging/cw1200/sta.c:1139! Fix removes BUG_ON which was added for verification-only purposes and handles multiple DEAUTH during scan correctly. ST-Ericsson ID: 355770 Change-Id: I671fe949555f3e31a634ee27ea237da2aeb1c83e Signed-off-by: Dmitry Tarnyagin Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29087 Reviewed-by: Bartosz MARKOWSKI Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33512 Reviewed-by: Philippe LANGLAIS --- drivers/staging/cw1200/sta.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/cw1200/sta.c b/drivers/staging/cw1200/sta.c index 055d231fc01..47608bb5ed8 100644 --- a/drivers/staging/cw1200/sta.c +++ b/drivers/staging/cw1200/sta.c @@ -1166,13 +1166,14 @@ void cw1200_unjoin_work(struct work_struct *work) mutex_lock(&priv->conf_mutex); if (unlikely(atomic_read(&priv->scan.in_progress))) { if (priv->delayed_unjoin) { - wiphy_err(priv->hw->wiphy, - "%s: Unexpected: delayed unjoin " + wiphy_dbg(priv->hw->wiphy, + "%s: Delayed unjoin " "is already scheduled.\n", __func__); - BUG_ON(1); + wsm_unlock_tx(priv); + } else { + priv->delayed_unjoin = true; } - priv->delayed_unjoin = true; mutex_unlock(&priv->conf_mutex); return; } -- cgit v1.2.3