Skip to content

Commit

Permalink
cw1200: Fix spurious BUG_ON() trigger when starting AP mode.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
speachy authored and linvjw committed Aug 5, 2013
1 parent 89b59bc commit 5a6e0cf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/wireless/cw1200/sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5a6e0cf

Please sign in to comment.