diff options
author | Senthil Balasubramanian <senthilkumar@atheros.com> | 2008-12-08 15:13:50 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-12 19:48:30 +0100 |
commit | 8aa15e1506bb0b6b643be12baf1f2d4d2f115931 (patch) | |
tree | e8ca7dbdee6b93dea74f51abfab9740b2f48eb98 | |
parent | ath9k: Incorrect band enum causes invalid antenna configuration. (diff) | |
download | linux-8aa15e1506bb0b6b643be12baf1f2d4d2f115931.tar.xz linux-8aa15e1506bb0b6b643be12baf1f2d4d2f115931.zip |
ath9k: avoid rx frames with corrupted descriptor.
Setting RX_ABORT/RX_DIS after MAC reset and clearing RX_ABORT/RX_DIS
after enbling RXE/RXDP to avoid rx frames with corrupted descriptor
status.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath9k/hw.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/mac.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c index 58f94c3f5e94..34474edefc97 100644 --- a/drivers/net/wireless/ath9k/hw.c +++ b/drivers/net/wireless/ath9k/hw.c @@ -1212,6 +1212,14 @@ struct ath_hal *ath9k_hw_attach(u16 devid, struct ath_softc *sc, static void ath9k_hw_override_ini(struct ath_hal *ah, struct ath9k_channel *chan) { + /* + * Set the RX_ABORT and RX_DIS and clear if off only after + * RXE is set for MAC. This prevents frames with corrupted + * descriptor status. + */ + REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); + + if (!AR_SREV_5416_V20_OR_LATER(ah) || AR_SREV_9280_10_OR_LATER(ah)) return; diff --git a/drivers/net/wireless/ath9k/mac.c b/drivers/net/wireless/ath9k/mac.c index 5254ea49f8ac..af32d091dc38 100644 --- a/drivers/net/wireless/ath9k/mac.c +++ b/drivers/net/wireless/ath9k/mac.c @@ -916,12 +916,11 @@ void ath9k_hw_rxena(struct ath_hal *ah) void ath9k_hw_startpcureceive(struct ath_hal *ah) { - REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); - ath9k_enable_mib_counters(ah); ath9k_ani_reset(ah); + REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); } void ath9k_hw_stoppcurecv(struct ath_hal *ah) |