aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9003_phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_phy.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index b0203318e50c..9b1494cc0e2b 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1814,6 +1814,68 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
1814 memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs)); 1814 memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs));
1815} 1815}
1816 1816
1817/*
1818 * Baseband Watchdog signatures:
1819 *
1820 * 0x04000539: BB hang when operating in HT40 DFS Channel.
1821 * Full chip reset is not required, but a recovery
1822 * mechanism is needed.
1823 *
1824 * 0x1300000a: Related to CAC deafness.
1825 * Chip reset is not required.
1826 *
1827 * 0x0400000a: Related to CAC deafness.
1828 * Full chip reset is required.
1829 *
1830 * 0x04000b09: RX state machine gets into an illegal state
1831 * when a packet with unsupported rate is received.
1832 * Full chip reset is required and PHY_RESTART has
1833 * to be disabled.
1834 *
1835 * 0x04000409: Packet stuck on receive.
1836 * Full chip reset is required for all chips except AR9340.
1837 */
1838
1839/*
1840 * ar9003_hw_bb_watchdog_check(): Returns true if a chip reset is required.
1841 */
1842bool ar9003_hw_bb_watchdog_check(struct ath_hw *ah)
1843{
1844 u32 val;
1845
1846 switch(ah->bb_watchdog_last_status) {
1847 case 0x04000539:
1848 val = REG_READ(ah, AR_PHY_RADAR_0);
1849 val &= (~AR_PHY_RADAR_0_FIRPWR);
1850 val |= SM(0x7f, AR_PHY_RADAR_0_FIRPWR);
1851 REG_WRITE(ah, AR_PHY_RADAR_0, val);
1852 udelay(1);
1853 val = REG_READ(ah, AR_PHY_RADAR_0);
1854 val &= ~AR_PHY_RADAR_0_FIRPWR;
1855 val |= SM(AR9300_DFS_FIRPWR, AR_PHY_RADAR_0_FIRPWR);
1856 REG_WRITE(ah, AR_PHY_RADAR_0, val);
1857
1858 return false;
1859 case 0x1300000a:
1860 return false;
1861 case 0x0400000a:
1862 case 0x04000b09:
1863 return true;
1864 case 0x04000409:
1865 if (AR_SREV_9340(ah))
1866 return false;
1867 else
1868 return true;
1869 default:
1870 /*
1871 * For any other unknown signatures, do a
1872 * full chip reset.
1873 */
1874 return true;
1875 }
1876}
1877EXPORT_SYMBOL(ar9003_hw_bb_watchdog_check);
1878
1817void ar9003_hw_bb_watchdog_config(struct ath_hw *ah) 1879void ar9003_hw_bb_watchdog_config(struct ath_hw *ah)
1818{ 1880{
1819 struct ath_common *common = ath9k_hw_common(ah); 1881 struct ath_common *common = ath9k_hw_common(ah);