Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] cw1200:  Fix spurious BUG_ON() trigger when starting AP mode.
@ 2013-08-02 23:57 Solomon Peachy
  0 siblings, 0 replies; only message in thread
From: Solomon Peachy @ 2013-08-02 23:57 UTC (permalink / raw)
  To: linux-wireless; +Cc: Solomon Peachy

There's an underlying race condition with the unjoin_work() call that is
sometimes triggered depending on scheduling order and the phase of the
moon.  This doesn't fix the race condition, but it does remove the
ill-advised BUG_ON() call in an easily-recoverable situation.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
---
This should go into 3.11-rc!
 drivers/net/wireless/cw1200/sta.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c
index 7365674..010b252 100644
--- a/drivers/net/wireless/cw1200/sta.c
+++ b/drivers/net/wireless/cw1200/sta.c
@@ -1406,11 +1406,8 @@ static void cw1200_do_unjoin(struct cw1200_common *priv)
 	if (!priv->join_status)
 		goto done;
 
-	if (priv->join_status > CW1200_JOIN_STATUS_IBSS) {
-		wiphy_err(priv->hw->wiphy, "Unexpected: join status: %d\n",
-			  priv->join_status);
-		BUG_ON(1);
-	}
+	if (priv->join_status == CW1200_JOIN_STATUS_AP)
+		goto done;
 
 	cancel_work_sync(&priv->update_filtering_work);
 	cancel_work_sync(&priv->set_beacon_wakeup_period_work);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-02 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 23:57 [PATCH] cw1200: Fix spurious BUG_ON() trigger when starting AP mode Solomon Peachy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox