diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index cbe00979e444..a843bb7dd2d3 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -286,6 +286,7 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
286 | { | 286 | { |
287 | unsigned long flags; | 287 | unsigned long flags; |
288 | struct sk_buff *skb; | 288 | struct sk_buff *skb; |
289 | struct ieee80211_sub_if_data *sdata; | ||
289 | DECLARE_MAC_BUF(mac); | 290 | DECLARE_MAC_BUF(mac); |
290 | 291 | ||
291 | if (skb_queue_empty(&sta->ps_tx_buf)) | 292 | if (skb_queue_empty(&sta->ps_tx_buf)) |
@@ -294,21 +295,28 @@ static void sta_info_cleanup_expire_buffered(struct ieee80211_local *local, | |||
294 | for (;;) { | 295 | for (;;) { |
295 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); | 296 | spin_lock_irqsave(&sta->ps_tx_buf.lock, flags); |
296 | skb = skb_peek(&sta->ps_tx_buf); | 297 | skb = skb_peek(&sta->ps_tx_buf); |
297 | if (sta_info_buffer_expired(local, sta, skb)) { | 298 | if (sta_info_buffer_expired(local, sta, skb)) |
298 | skb = __skb_dequeue(&sta->ps_tx_buf); | 299 | skb = __skb_dequeue(&sta->ps_tx_buf); |
299 | if (skb_queue_empty(&sta->ps_tx_buf)) | 300 | else |
300 | sta->flags &= ~WLAN_STA_TIM; | ||
301 | } else | ||
302 | skb = NULL; | 301 | skb = NULL; |
303 | spin_unlock_irqrestore(&sta->ps_tx_buf.lock, flags); | 302 | spin_unlock_irqrestore(&sta->ps_tx_buf.lock, flags); |
304 | 303 | ||
305 | if (skb) { | 304 | if (!skb) |
306 | local->total_ps_buffered--; | ||
307 | printk(KERN_DEBUG "Buffered frame expired (STA " | ||
308 | "%s)\n", print_mac(mac, sta->addr)); | ||
309 | dev_kfree_skb(skb); | ||
310 | } else | ||
311 | break; | 305 | break; |
306 | |||
307 | sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); | ||
308 | local->total_ps_buffered--; | ||
309 | printk(KERN_DEBUG "Buffered frame expired (STA " | ||
310 | "%s)\n", print_mac(mac, sta->addr)); | ||
311 | dev_kfree_skb(skb); | ||
312 | |||
313 | if (skb_queue_empty(&sta->ps_tx_buf)) { | ||
314 | if (sdata->bss) | ||
315 | bss_tim_set(sta->local, sdata->bss, sta->aid); | ||
316 | if (sta->local->ops->set_tim) | ||
317 | sta->local->ops->set_tim(local_to_hw(sta->local), | ||
318 | sta->aid, 0); | ||
319 | } | ||
312 | } | 320 | } |
313 | } | 321 | } |
314 | 322 | ||