summaryrefslogtreecommitdiff
path: root/drivers/staging/cw1200/ap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/cw1200/ap.c')
-rwxr-xr-xdrivers/staging/cw1200/ap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/cw1200/ap.c b/drivers/staging/cw1200/ap.c
index c4b68a42ccd..0e0947a4482 100755
--- a/drivers/staging/cw1200/ap.c
+++ b/drivers/staging/cw1200/ap.c
@@ -134,8 +134,11 @@ static int cw1200_set_tim_impl(struct cw1200_common *priv, bool aid0_bit_set)
skb = ieee80211_beacon_get_tim(priv->hw, priv->vif,
&tim_offset, &tim_length);
- if (WARN_ON(!skb))
- return -ENOMEM;
+ if (!skb) {
+ if (!__cw1200_flush(priv, true));
+ wsm_unlock_tx(priv);
+ return -ENOENT;
+ }
if (tim_offset && tim_length >= 6) {
/* Ignore DTIM count from mac80211: