aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-19 20:07:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:26 -0500
commit836341a70471ba77657b0b420dd7eea3c30a038b (patch)
treef27af297dd49c1aa5d6df3cd496b8b5fb7e43c2a /net/mac80211/sta_info.c
parentd2259243a19894eee06c16e278adfea81dc42bd9 (diff)
mac80211: remove sta TIM flag, fix expiry TIM handling
The TIM flag that is kept in each station's info is completely useless, there's no code (aside from the debugfs display code) checking it, hence it can be removed. While doing that, I noticed that the TIM handling is broken when buffered frames expire, so fix that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c28
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