From: Senthil Balasubramanian <senthilkumar@atheros.com>
Date: Fri, 18 Sep 2009 09:36:07 +0000 (+0530)
Subject: ath9k: Allow PSPOLL only when the interface is configured in AP mode
X-Git-Tag: MMI-PSA29.97-13-9~25754^2~865^2~56
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66afad0156a0b673688f309147e57c3a85541329;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git

ath9k: Allow PSPOLL only when the interface is configured in AP mode

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 3a2204d84702..c880a55939bf 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -423,7 +423,10 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
 	else
 		rfilt |= ATH9K_RX_FILTER_BEACON;
 
-	if (sc->rx.rxfilter & FIF_PSPOLL)
+	if ((AR_SREV_9280_10_OR_LATER(sc->sc_ah) ||
+	    AR_SREV_9285_10_OR_LATER(sc->sc_ah)) &&
+	    (sc->sc_ah->opmode == NL80211_IFTYPE_AP) &&
+	    (sc->rx.rxfilter & FIF_PSPOLL))
 		rfilt |= ATH9K_RX_FILTER_PSPOLL;
 
 	if (conf_is_ht(&sc->hw->conf))