diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-20 05:21:35 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:26 -0500 |
commit | 004c872e78d433f84f0a5cd4db7a6c780c0946e1 (patch) | |
tree | bd9e7cd0b69e720738d49e170e4f4f64e9111e1a /net/mac80211/tx.c | |
parent | 836341a70471ba77657b0b420dd7eea3c30a038b (diff) |
mac80211: consolidate TIM handling code
This consolidates all TIM handling code to avoid re-introducing
errors with the bitmap/set_tim order and to reduce code. While
reading the code I noticed a possible problem so I also added
a comment about that.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index db6a871b51ed..69fdb763aa8b 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -416,14 +416,11 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx) | |||
416 | dev_kfree_skb(old); | 416 | dev_kfree_skb(old); |
417 | } else | 417 | } else |
418 | tx->local->total_ps_buffered++; | 418 | tx->local->total_ps_buffered++; |
419 | |||
419 | /* Queue frame to be sent after STA sends an PS Poll frame */ | 420 | /* Queue frame to be sent after STA sends an PS Poll frame */ |
420 | if (skb_queue_empty(&sta->ps_tx_buf)) { | 421 | if (skb_queue_empty(&sta->ps_tx_buf)) |
421 | if (tx->sdata->bss) | 422 | sta_info_set_tim_bit(sta); |
422 | bss_tim_set(tx->local, tx->sdata->bss, sta->aid); | 423 | |
423 | if (tx->local->ops->set_tim) | ||
424 | tx->local->ops->set_tim(local_to_hw(tx->local), | ||
425 | sta->aid, 1); | ||
426 | } | ||
427 | pkt_data = (struct ieee80211_tx_packet_data *)tx->skb->cb; | 424 | pkt_data = (struct ieee80211_tx_packet_data *)tx->skb->cb; |
428 | pkt_data->jiffies = jiffies; | 425 | pkt_data->jiffies = jiffies; |
429 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); | 426 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); |