aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-07-30 22:26:55 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-30 22:26:55 -0400
commit2f6d7c1b34403b97fa57473edcb6749d1db5ace3 (patch)
tree97da33c077b08b72a361ff5a4542b86d190b0164 /net/mac80211/rx.c
parentdf597efb5737063497f1a4f7c996cc9aec294230 (diff)
parent1e4247d457c6a42e4a05cb7dfa4e6ea1fa65c112 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b6ddde3848fb..25a669c86e14 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -418,10 +418,11 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
418 struct ieee80211_local *local = rx->local; 418 struct ieee80211_local *local = rx->local;
419 struct sk_buff *skb = rx->skb; 419 struct sk_buff *skb = rx->skb;
420 420
421 if (unlikely(local->hw_scanning)) 421 if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning)))
422 return ieee80211_scan_rx(rx->sdata, skb); 422 return ieee80211_scan_rx(rx->sdata, skb);
423 423
424 if (unlikely(local->sw_scanning)) { 424 if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning) &&
425 (rx->flags & IEEE80211_RX_IN_SCAN))) {
425 /* drop all the other packets during a software scan anyway */ 426 /* drop all the other packets during a software scan anyway */
426 if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED) 427 if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED)
427 dev_kfree_skb(skb); 428 dev_kfree_skb(skb);
@@ -782,7 +783,7 @@ static void ap_sta_ps_start(struct sta_info *sta)
782 struct ieee80211_local *local = sdata->local; 783 struct ieee80211_local *local = sdata->local;
783 784
784 atomic_inc(&sdata->bss->num_sta_ps); 785 atomic_inc(&sdata->bss->num_sta_ps);
785 set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL); 786 set_sta_flags(sta, WLAN_STA_PS);
786 drv_sta_notify(local, &sdata->vif, STA_NOTIFY_SLEEP, &sta->sta); 787 drv_sta_notify(local, &sdata->vif, STA_NOTIFY_SLEEP, &sta->sta);
787#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 788#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
788 printk(KERN_DEBUG "%s: STA %pM aid %d enters power save mode\n", 789 printk(KERN_DEBUG "%s: STA %pM aid %d enters power save mode\n",
@@ -798,7 +799,7 @@ static int ap_sta_ps_end(struct sta_info *sta)
798 799
799 atomic_dec(&sdata->bss->num_sta_ps); 800 atomic_dec(&sdata->bss->num_sta_ps);
800 801
801 clear_sta_flags(sta, WLAN_STA_PS | WLAN_STA_PSPOLL); 802 clear_sta_flags(sta, WLAN_STA_PS);
802 drv_sta_notify(local, &sdata->vif, STA_NOTIFY_AWAKE, &sta->sta); 803 drv_sta_notify(local, &sdata->vif, STA_NOTIFY_AWAKE, &sta->sta);
803 804
804 if (!skb_queue_empty(&sta->ps_tx_buf)) 805 if (!skb_queue_empty(&sta->ps_tx_buf))
@@ -1116,14 +1117,15 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
1116 skb_queue_empty(&rx->sta->ps_tx_buf); 1117 skb_queue_empty(&rx->sta->ps_tx_buf);
1117 1118
1118 if (skb) { 1119 if (skb) {
1120 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1119 struct ieee80211_hdr *hdr = 1121 struct ieee80211_hdr *hdr =
1120 (struct ieee80211_hdr *) skb->data; 1122 (struct ieee80211_hdr *) skb->data;
1121 1123
1122 /* 1124 /*
1123 * Tell TX path to send one frame even though the STA may 1125 * Tell TX path to send this frame even though the STA may
1124 * still remain is PS mode after this frame exchange. 1126 * still remain is PS mode after this frame exchange.
1125 */ 1127 */
1126 set_sta_flags(rx->sta, WLAN_STA_PSPOLL); 1128 info->flags |= IEEE80211_TX_CTL_PSPOLL_RESPONSE;
1127 1129
1128#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 1130#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
1129 printk(KERN_DEBUG "STA %pM aid %d: PS Poll (entries after %d)\n", 1131 printk(KERN_DEBUG "STA %pM aid %d: PS Poll (entries after %d)\n",
@@ -1138,7 +1140,7 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
1138 else 1140 else
1139 hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA); 1141 hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
1140 1142
1141 dev_queue_xmit(skb); 1143 ieee80211_add_pending_skb(rx->local, skb);
1142 1144
1143 if (no_pending_pkts) 1145 if (no_pending_pkts)
1144 sta_info_clear_tim_bit(rx->sta); 1146 sta_info_clear_tim_bit(rx->sta);
@@ -1539,7 +1541,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1539 info = IEEE80211_SKB_CB(fwd_skb); 1541 info = IEEE80211_SKB_CB(fwd_skb);
1540 memset(info, 0, sizeof(*info)); 1542 memset(info, 0, sizeof(*info));
1541 info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; 1543 info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
1542 fwd_skb->iif = rx->dev->ifindex; 1544 info->control.vif = &rx->sdata->vif;
1543 ieee80211_select_queue(local, fwd_skb); 1545 ieee80211_select_queue(local, fwd_skb);
1544 if (is_multicast_ether_addr(fwd_hdr->addr3)) 1546 if (is_multicast_ether_addr(fwd_hdr->addr3))
1545 memcpy(fwd_hdr->addr1, fwd_hdr->addr3, 1547 memcpy(fwd_hdr->addr1, fwd_hdr->addr3,
@@ -2136,7 +2138,8 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2136 return; 2138 return;
2137 } 2139 }
2138 2140
2139 if (unlikely(local->sw_scanning || local->hw_scanning)) 2141 if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning) ||
2142 test_bit(SCAN_OFF_CHANNEL, &local->scanning)))
2140 rx.flags |= IEEE80211_RX_IN_SCAN; 2143 rx.flags |= IEEE80211_RX_IN_SCAN;
2141 2144
2142 ieee80211_parse_qos(&rx); 2145 ieee80211_parse_qos(&rx);