summaryrefslogtreecommitdiff
path: root/drivers/staging/cw1200/wsm.c
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2011-05-30 08:15:00 +0200
committerRobert Marklund <robert.marklund@stericsson.com>2011-10-05 12:16:03 +0200
commit4a026f3b5836e356c474bee3ecd457fa8d3897b2 (patch)
tree9af816745a9702777eada7d728bcbed172e7036e /drivers/staging/cw1200/wsm.c
parent3fa2dc612e62b7c45b4c5894665cf9c6d309ca89 (diff)
cw1200: fix for locked datapath after deauth.
When AP sent more than one deauth requests in a row, datapath was remaining locked after deauthentication/unjoin. Result code of queue_work() was not checked and datapath was not unlocked if unjoin_work was already pending execution. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Change-Id: I9c8394acd75e1aa828fad04c33bda118893ba031 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25615 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/wsm.c')
-rw-r--r--drivers/staging/cw1200/wsm.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/staging/cw1200/wsm.c b/drivers/staging/cw1200/wsm.c
index fa7fb2c246a..028e668f137 100644
--- a/drivers/staging/cw1200/wsm.c
+++ b/drivers/staging/cw1200/wsm.c
@@ -818,7 +818,9 @@ static int wsm_receive_indication(struct cw1200_common *priv,
wsm_printk(KERN_DEBUG \
"[WSM] Issue unjoin command (RX).\n");
wsm_lock_tx_async(priv);
- queue_work(priv->workqueue, &priv->unjoin_work);
+ if (queue_work(priv->workqueue,
+ &priv->unjoin_work) <= 0)
+ wsm_unlock_tx(priv);
}
}
priv->wsm_cbc.rx(priv, &rx, skb_p);
@@ -1310,7 +1312,8 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
wsm_lock_tx_async(priv);
BUG_ON(priv->join_pending_frame);
priv->join_pending_frame = wsm;
- queue_work(priv->workqueue, &priv->join_work);
+ if (queue_work(priv->workqueue, &priv->join_work) <= 0)
+ wsm_unlock_tx(priv);
handled = true;
}
break;
@@ -1319,7 +1322,8 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
wsm_printk(KERN_DEBUG "[WSM] Issue set_default_wep_key.\n");
wsm_lock_tx_async(priv);
priv->wep_default_key_id = tx_info->control.hw_key->keyidx;
- queue_work(priv->workqueue, &priv->wep_key_work);
+ if (queue_work(priv->workqueue, &priv->wep_key_work) <= 0)
+ wsm_unlock_tx(priv);
handled = true;
}
break;
@@ -1357,7 +1361,9 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
wsm->more = 0;
#endif /* 0 */
wsm_lock_tx_async(priv);
- queue_work(priv->workqueue, &priv->unjoin_work);
+ if (queue_work(priv->workqueue,
+ &priv->unjoin_work) <= 0)
+ wsm_unlock_tx(priv);
}
}
break;