diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2013-08-02 19:57:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-05 14:46:07 -0400 |
commit | 5a6e0cf70743f30c17ccb5f228db9a124b0e7477 (patch) | |
tree | b39eb334aaca9b1ae1a83749652b1ed4e8194421 /drivers/net/wireless/cw1200 | |
parent | 89b59bcd3ad54c5cd5540ae12275f738dad333fb (diff) |
cw1200: Fix spurious BUG_ON() trigger when starting AP mode.
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/cw1200')
-rw-r--r-- | drivers/net/wireless/cw1200/sta.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c index 7365674366f4..010b252be584 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); |