ath9k: Fix RX Filter handling for BAR
authorSujith <Sujith.Manoharan@atheros.com>
Thu, 3 Sep 2009 06:38:43 +0000 (12:08 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Sep 2009 20:31:05 +0000 (16:31 -0400)
BAR frames have to be sent to mac80211 only if the
current channel is HT. Also, move the macro to
enum ath9k_rx_filter.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/mac.h
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/reg.h

index 71f27f324ceacab0a3e4df2a184aaff43ae21df6..011b14f35e5073ebf8fd1c86bf913d646cb64225 100644 (file)
@@ -3967,7 +3967,8 @@ void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)
 {
        u32 phybits;
 
-       REG_WRITE(ah, AR_RX_FILTER, (bits & 0xffff) | AR_RX_COMPR_BAR);
+       REG_WRITE(ah, AR_RX_FILTER, bits);
+
        phybits = 0;
        if (bits & ATH9K_RX_FILTER_PHYRADAR)
                phybits |= AR_PHY_ERR_RADAR;
index 7b3982295a435970f24fd18a7da9fd9a3e049fca..f56e77da6c3eff8593080603506be72c0116b843 100644 (file)
@@ -568,6 +568,7 @@ enum ath9k_rx_filter {
        ATH9K_RX_FILTER_PROBEREQ = 0x00000080,
        ATH9K_RX_FILTER_PHYERR = 0x00000100,
        ATH9K_RX_FILTER_MYBEACON = 0x00000200,
+       ATH9K_RX_FILTER_COMP_BAR = 0x00000400,
        ATH9K_RX_FILTER_PSPOLL = 0x00004000,
        ATH9K_RX_FILTER_PHYRADAR = 0x00002000,
        ATH9K_RX_FILTER_MCAST_BCAST_ALL = 0x00008000,
index c2efdf2d72d38e437e7e9303c8884684e5c08a84..b1d189c6be8a162c9a4098d0423a0ecd9a96fba8 100644 (file)
@@ -2433,7 +2433,7 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw,
        ath9k_hw_setrxfilter(sc->sc_ah, rfilt);
        ath9k_ps_restore(sc);
 
-       DPRINTF(sc, ATH_DBG_CONFIG, "Set HW RX filter: 0x%x\n", sc->rx.rxfilter);
+       DPRINTF(sc, ATH_DBG_CONFIG, "Set HW RX filter: 0x%x\n", rfilt);
 }
 
 static void ath9k_sta_notify(struct ieee80211_hw *hw,
index 52e62daad3ce41b31b096d7f9f5d16010e62d69e..ec0abf8239952227813add280efa861140aa5943 100644 (file)
@@ -423,6 +423,9 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
        if (sc->rx.rxfilter & FIF_PSPOLL)
                rfilt |= ATH9K_RX_FILTER_PSPOLL;
 
+       if (conf_is_ht(&sc->hw->conf))
+               rfilt |= ATH9K_RX_FILTER_COMP_BAR;
+
        if (sc->sec_wiphy || (sc->rx.rxfilter & FIF_OTHER_BSS)) {
                /* TODO: only needed if more than one BSSID is in use in
                 * station/adhoc mode */
index 3ddb243f0000096f6ca0af00e62dff9ce494620e..e5c29eb86e80b9f0024aad8f757699a1083f33d7 100644 (file)
@@ -1325,7 +1325,6 @@ enum {
 #define AR_CFP_VAL          0x0000FFFF
 
 #define AR_RX_FILTER        0x803C
-#define AR_RX_COMPR_BAR     0x00000400
 
 #define AR_MCAST_FIL0       0x8040
 #define AR_MCAST_FIL1       0x8044
This page took 0.031468 seconds and 5 git commands to generate.