aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2013-12-24 00:14:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-01-03 15:36:57 -0500
commita7abaf7da975ecac58e22bae75605b2a1d8e7ff0 (patch)
tree47316caf7a542633efb2b02a5e84d360531091d8 /drivers
parent222e04830ff08428edeb7909fd45a7eef39e84a8 (diff)
ath9k: Fix PHY restart workaround
The PHY restart workaround that handles baseband hangs for packets with unsupported rates is required only for a HW bug in AR9300 v2.2. All the subsequent chips in the AR9003 family do not require this driver fix since it has been addressed in the HW. Since the value of the AR_PHY_RESTART register is written with the default initvals, make sure that PHY restart is always disabled once this particular BB hang signaure has been encountered. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c17
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c5
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 9f051a08e143..b0203318e50c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1930,6 +1930,7 @@ EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info);
1930 1930
1931void ar9003_hw_disable_phy_restart(struct ath_hw *ah) 1931void ar9003_hw_disable_phy_restart(struct ath_hw *ah)
1932{ 1932{
1933 u8 result;
1933 u32 val; 1934 u32 val;
1934 1935
1935 /* While receiving unsupported rate frame rx state machine 1936 /* While receiving unsupported rate frame rx state machine
@@ -1937,15 +1938,13 @@ void ar9003_hw_disable_phy_restart(struct ath_hw *ah)
1937 * state, BB would go hang. If RXSM is in 0xb state after 1938 * state, BB would go hang. If RXSM is in 0xb state after
1938 * first bb panic, ensure to disable the phy_restart. 1939 * first bb panic, ensure to disable the phy_restart.
1939 */ 1940 */
1940 if (!((MS(ah->bb_watchdog_last_status, 1941 result = MS(ah->bb_watchdog_last_status, AR_PHY_WATCHDOG_RX_OFDM_SM);
1941 AR_PHY_WATCHDOG_RX_OFDM_SM) == 0xb) ||
1942 ah->bb_hang_rx_ofdm))
1943 return;
1944
1945 ah->bb_hang_rx_ofdm = true;
1946 val = REG_READ(ah, AR_PHY_RESTART);
1947 val &= ~AR_PHY_RESTART_ENA;
1948 1942
1949 REG_WRITE(ah, AR_PHY_RESTART, val); 1943 if ((result == 0xb) || ah->bb_hang_rx_ofdm) {
1944 ah->bb_hang_rx_ofdm = true;
1945 val = REG_READ(ah, AR_PHY_RESTART);
1946 val &= ~AR_PHY_RESTART_ENA;
1947 REG_WRITE(ah, AR_PHY_RESTART, val);
1948 }
1950} 1949}
1951EXPORT_SYMBOL(ar9003_hw_disable_phy_restart); 1950EXPORT_SYMBOL(ar9003_hw_disable_phy_restart);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 708388063a6b..78ca41c0cf94 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1935,10 +1935,11 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
1935 ath9k_hw_loadnf(ah, chan); 1935 ath9k_hw_loadnf(ah, chan);
1936 ath9k_hw_start_nfcal(ah, true); 1936 ath9k_hw_start_nfcal(ah, true);
1937 1937
1938 if (AR_SREV_9300_20_OR_LATER(ah)) { 1938 if (AR_SREV_9300_20_OR_LATER(ah))
1939 ar9003_hw_bb_watchdog_config(ah); 1939 ar9003_hw_bb_watchdog_config(ah);
1940
1941 if (ah->config.hw_hang_checks & HW_PHYRESTART_CLC_WAR)
1940 ar9003_hw_disable_phy_restart(ah); 1942 ar9003_hw_disable_phy_restart(ah);
1941 }
1942 1943
1943 ath9k_hw_apply_gpio_override(ah); 1944 ath9k_hw_apply_gpio_override(ah);
1944 1945