aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-19 19:36:16 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:26 -0500
commitd2259243a19894eee06c16e278adfea81dc42bd9 (patch)
tree0e9b2c27151c6d67f789f71b7bef0bfceafb2a95
parent013b73faff107e56cbe75fe4b881f5d80a8cf022 (diff)
mac80211: invoke set_tim() callback after setting own TIM info
Drivers should be allowed to simply get a complete new beacon when set_tim() is invoked (and set_tim() is required for drivers that just want a beacon template!), so we need to update our own TIM bitmap before calling set_tim() so that getting the beacon will now get an already updated beacon. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/rx.c8
-rw-r--r--net/mac80211/sta_info.c4
-rw-r--r--net/mac80211/tx.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c4b7cc07315d..af606f715016 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -600,10 +600,10 @@ static int ap_sta_ps_end(struct net_device *dev, struct sta_info *sta)
600 atomic_dec(&sdata->bss->num_sta_ps); 600 atomic_dec(&sdata->bss->num_sta_ps);
601 sta->flags &= ~(WLAN_STA_PS | WLAN_STA_TIM | WLAN_STA_PSPOLL); 601 sta->flags &= ~(WLAN_STA_PS | WLAN_STA_TIM | WLAN_STA_PSPOLL);
602 if (!skb_queue_empty(&sta->ps_tx_buf)) { 602 if (!skb_queue_empty(&sta->ps_tx_buf)) {
603 if (local->ops->set_tim)
604 local->ops->set_tim(local_to_hw(local), sta->aid, 0);
605 if (sdata->bss) 603 if (sdata->bss)
606 bss_tim_clear(local, sdata->bss, sta->aid); 604 bss_tim_clear(local, sdata->bss, sta->aid);
605 if (local->ops->set_tim)
606 local->ops->set_tim(local_to_hw(local), sta->aid, 0);
607 } 607 }
608#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 608#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
609 printk(KERN_DEBUG "%s: STA %s aid %d exits power save mode\n", 609 printk(KERN_DEBUG "%s: STA %s aid %d exits power save mode\n",
@@ -947,11 +947,11 @@ ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx)
947 dev_queue_xmit(skb); 947 dev_queue_xmit(skb);
948 948
949 if (no_pending_pkts) { 949 if (no_pending_pkts) {
950 if (rx->sdata->bss)
951 bss_tim_clear(rx->local, rx->sdata->bss, rx->sta->aid);
950 if (rx->local->ops->set_tim) 952 if (rx->local->ops->set_tim)
951 rx->local->ops->set_tim(local_to_hw(rx->local), 953 rx->local->ops->set_tim(local_to_hw(rx->local),
952 rx->sta->aid, 0); 954 rx->sta->aid, 0);
953 if (rx->sdata->bss)
954 bss_tim_clear(rx->local, rx->sdata->bss, rx->sta->aid);
955 } 955 }
956#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 956#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
957 } else if (!rx->u.rx.sent_ps_buffered) { 957 } else if (!rx->u.rx.sent_ps_buffered) {
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 746bbdea6b4c..cbe00979e444 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -396,11 +396,11 @@ void sta_info_remove_aid_ptr(struct sta_info *sta)
396 396
397 sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); 397 sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev);
398 398
399 if (sdata->bss)
400 __bss_tim_clear(sdata->bss, sta->aid);
399 if (sdata->local->ops->set_tim) 401 if (sdata->local->ops->set_tim)
400 sdata->local->ops->set_tim(local_to_hw(sdata->local), 402 sdata->local->ops->set_tim(local_to_hw(sdata->local),
401 sta->aid, 0); 403 sta->aid, 0);
402 if (sdata->bss)
403 __bss_tim_clear(sdata->bss, sta->aid);
404} 404}
405 405
406 406
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4f951e78df15..82474a8f251b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -419,11 +419,11 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
419 tx->local->total_ps_buffered++; 419 tx->local->total_ps_buffered++;
420 /* 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 */
421 if (skb_queue_empty(&sta->ps_tx_buf)) { 421 if (skb_queue_empty(&sta->ps_tx_buf)) {
422 if (tx->sdata->bss)
423 bss_tim_set(tx->local, tx->sdata->bss, sta->aid);
422 if (tx->local->ops->set_tim) 424 if (tx->local->ops->set_tim)
423 tx->local->ops->set_tim(local_to_hw(tx->local), 425 tx->local->ops->set_tim(local_to_hw(tx->local),
424 sta->aid, 1); 426 sta->aid, 1);
425 if (tx->sdata->bss)
426 bss_tim_set(tx->local, tx->sdata->bss, sta->aid);
427 } 427 }
428 pkt_data = (struct ieee80211_tx_packet_data *)tx->skb->cb; 428 pkt_data = (struct ieee80211_tx_packet_data *)tx->skb->cb;
429 pkt_data->jiffies = jiffies; 429 pkt_data->jiffies = jiffies;