diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-09-29 10:04:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-30 15:57:10 -0400 |
commit | c868cb35d013896ab6a80a554fb88baef06cedcd (patch) | |
tree | 48ed06dcf3c815e61f38f867e517d5a5dcfa6d79 /net/mac80211/tx.c | |
parent | 042ec4533720122e6cb93dd9f3b6a75fe2fcff16 (diff) |
mac80211: unify TIM bit handling
Currently, the TIM bit for a given station is set
and cleared all over the place. Since the logic to
set/clear it will become much more complex when we
add uAPSD support, as a first step let's collect
the entire logic in one place. This requires a few
small adjustments to other places.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 0ca16880bbb4..d6754908ff79 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -469,15 +469,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
469 | } else | 469 | } else |
470 | tx->local->total_ps_buffered++; | 470 | tx->local->total_ps_buffered++; |
471 | 471 | ||
472 | /* | ||
473 | * Queue frame to be sent after STA wakes up/polls, | ||
474 | * but don't set the TIM bit if the driver is blocking | ||
475 | * wakeup or poll response transmissions anyway. | ||
476 | */ | ||
477 | if (skb_queue_empty(&sta->ps_tx_buf) && | ||
478 | !(staflags & WLAN_STA_PS_DRIVER)) | ||
479 | sta_info_set_tim_bit(sta); | ||
480 | |||
481 | info->control.jiffies = jiffies; | 472 | info->control.jiffies = jiffies; |
482 | info->control.vif = &tx->sdata->vif; | 473 | info->control.vif = &tx->sdata->vif; |
483 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 474 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
@@ -488,6 +479,12 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
488 | round_jiffies(jiffies + | 479 | round_jiffies(jiffies + |
489 | STA_INFO_CLEANUP_INTERVAL)); | 480 | STA_INFO_CLEANUP_INTERVAL)); |
490 | 481 | ||
482 | /* | ||
483 | * We queued up some frames, so the TIM bit might | ||
484 | * need to be set, recalculate it. | ||
485 | */ | ||
486 | sta_info_recalc_tim(sta); | ||
487 | |||
491 | return TX_QUEUED; | 488 | return TX_QUEUED; |
492 | } | 489 | } |
493 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 490 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |