ath9k: avoid accessing MRC registers on single-chain devices
authorFelix Fietkau <nbd@openwrt.org>
Tue, 13 Aug 2013 10:33:28 +0000 (12:33 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Oct 2013 20:05:58 +0000 (21:05 +0100)
commit a1c781bb20ac1e03280e420abd47a99eb8bbdd3b upstream.

They are not implemented, and accessing them might trigger errors

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/ath/ath9k/ar9003_phy.c

index 73be7ff..f146824 100644 (file)
@@ -1016,6 +1016,10 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
                 * is_on == 0 means MRC CCK is OFF (more noise imm)
                 */
                bool is_on = param ? 1 : 0;
+
+               if (ah->caps.rx_chainmask == 1)
+                       break;
+
                REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
                              AR_PHY_MRC_CCK_ENABLE, is_on);
                REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,