aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index fab443d717eb..244ee2d50a58 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -647,8 +647,7 @@ static void ap_sta_ps_start(struct net_device *dev, struct sta_info *sta)
647 647
648 sdata = sta->sdata; 648 sdata = sta->sdata;
649 649
650 if (sdata->bss) 650 atomic_inc(&sdata->bss->num_sta_ps);
651 atomic_inc(&sdata->bss->num_sta_ps);
652 set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL); 651 set_and_clear_sta_flags(sta, WLAN_STA_PS, WLAN_STA_PSPOLL);
653#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 652#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
654 printk(KERN_DEBUG "%s: STA %s aid %d enters power save mode\n", 653 printk(KERN_DEBUG "%s: STA %s aid %d enters power save mode\n",
@@ -667,8 +666,7 @@ static int ap_sta_ps_end(struct net_device *dev, struct sta_info *sta)
667 666
668 sdata = sta->sdata; 667 sdata = sta->sdata;
669 668
670 if (sdata->bss) 669 atomic_dec(&sdata->bss->num_sta_ps);
671 atomic_dec(&sdata->bss->num_sta_ps);
672 670
673 clear_sta_flags(sta, WLAN_STA_PS | WLAN_STA_PSPOLL); 671 clear_sta_flags(sta, WLAN_STA_PS | WLAN_STA_PSPOLL);
674 672
@@ -742,7 +740,9 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
742 sta->last_qual = rx->status->qual; 740 sta->last_qual = rx->status->qual;
743 sta->last_noise = rx->status->noise; 741 sta->last_noise = rx->status->noise;
744 742
745 if (!ieee80211_has_morefrags(hdr->frame_control)) { 743 if (!ieee80211_has_morefrags(hdr->frame_control) &&
744 (rx->sdata->vif.type == IEEE80211_IF_TYPE_AP ||
745 rx->sdata->vif.type == IEEE80211_IF_TYPE_VLAN)) {
746 /* Change STA power saving mode only in the end of a frame 746 /* Change STA power saving mode only in the end of a frame
747 * exchange sequence */ 747 * exchange sequence */
748 if (test_sta_flags(sta, WLAN_STA_PS) && 748 if (test_sta_flags(sta, WLAN_STA_PS) &&
@@ -1772,11 +1772,6 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata,
1772 return 0; 1772 return 0;
1773 rx->flags &= ~IEEE80211_RX_RA_MATCH; 1773 rx->flags &= ~IEEE80211_RX_RA_MATCH;
1774 } 1774 }
1775 if (sdata->dev == sdata->local->mdev &&
1776 !(rx->flags & IEEE80211_RX_IN_SCAN))
1777 /* do not receive anything via
1778 * master device when not scanning */
1779 return 0;
1780 break; 1775 break;
1781 case IEEE80211_IF_TYPE_WDS: 1776 case IEEE80211_IF_TYPE_WDS:
1782 if (bssid || !ieee80211_is_data(hdr->frame_control)) 1777 if (bssid || !ieee80211_is_data(hdr->frame_control))