Fix a race condition.

This commit is contained in:
Solomon Peachy 2013-04-10 16:21:11 -04:00
parent 3ae1845b9d
commit a6c52fc5de
1 changed files with 4 additions and 2 deletions

View File

@ -179,11 +179,13 @@ void cw1200_cqm_bssloss_sm(struct cw1200_common *priv, int init, int good, int b
/* Spit out a NULL packet if necessary */
if (tx) {
struct sk_buff *skb;
priv->bss_loss_state++;
skb = ieee80211_nullfunc_get(priv->hw, priv->vif);
WARN_ON(!skb);
if (skb)
cw1200_tx(priv->hw, NULL, skb); /* Transmit NULL to AP */
priv->bss_loss_state++;
}
spin_unlock(&priv->bss_loss_lock);