ath9k: Allow PSPOLL only when the interface is configured in AP mode
[linux-2.6.git] / drivers / net / wireless / ath / ath9k / recv.c
index 3a2204d847022571e8c8cf1b21b9ec18463d90fe..c880a55939bf730431b558f0179b191357f1c5d1 100644 (file)
@@ -423,7 +423,10 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
        else
                rfilt |= ATH9K_RX_FILTER_BEACON;
 
        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))
                rfilt |= ATH9K_RX_FILTER_PSPOLL;
 
        if (conf_is_ht(&sc->hw->conf))