ath9k: Fix RTC reset for AR5416
[safe/jmp/linux-2.6] / drivers / net / wireless / ath / ath9k / hw.c
index 0ad2598..0a3de3f 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/unaligned.h>
 
 #include "hw.h"
-#include "ath9k.h"
+#include "rc.h"
 #include "initvals.h"
 
 #define ATH9K_CLOCK_RATE_CCK           22
@@ -26,8 +26,7 @@
 #define ATH9K_CLOCK_RATE_2GHZ_OFDM     44
 
 static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type);
-static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan,
-                             enum ath9k_ht_macmode macmode);
+static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan);
 static u32 ath9k_hw_ini_fixup(struct ath_hw *ah,
                              struct ar5416_eeprom_def *pEepData,
                              u32 reg, u32 value);
@@ -40,7 +39,7 @@ static void ath9k_hw_spur_mitigate(struct ath_hw *ah, struct ath9k_channel *chan
 
 static u32 ath9k_hw_mac_usec(struct ath_hw *ah, u32 clks)
 {
-       struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
+       struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
 
        if (!ah->curchan) /* should really check for CCK instead */
                return clks / ATH9K_CLOCK_RATE_CCK;
@@ -52,7 +51,7 @@ static u32 ath9k_hw_mac_usec(struct ath_hw *ah, u32 clks)
 
 static u32 ath9k_hw_mac_to_usec(struct ath_hw *ah, u32 clks)
 {
-       struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
+       struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
 
        if (conf_is_ht40(conf))
                return ath9k_hw_mac_usec(ah, clks) / 2;
@@ -62,7 +61,7 @@ static u32 ath9k_hw_mac_to_usec(struct ath_hw *ah, u32 clks)
 
 static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs)
 {
-       struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
+       struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
 
        if (!ah->curchan) /* should really check for CCK instead */
                return usecs *ATH9K_CLOCK_RATE_CCK;
@@ -73,7 +72,7 @@ static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs)
 
 static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs)
 {
-       struct ieee80211_conf *conf = &ah->ah_sc->hw->conf;
+       struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
 
        if (conf_is_ht40(conf))
                return ath9k_hw_mac_clks(ah, usecs) * 2;
@@ -94,9 +93,9 @@ bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout)
                udelay(AH_TIME_QUANTUM);
        }
 
-       DPRINTF(ah, ATH_DBG_ANY,
-               "timeout (%d us) on reg 0x%x: 0x%08x & 0x%08x != 0x%08x\n",
-               timeout, reg, REG_READ(ah, reg), mask, val);
+       ath_print(ath9k_hw_common(ah), ATH_DBG_ANY,
+                 "timeout (%d us) on reg 0x%x: 0x%08x & 0x%08x != 0x%08x\n",
+                 timeout, reg, REG_READ(ah, reg), mask, val);
 
        return false;
 }
@@ -178,9 +177,9 @@ u16 ath9k_hw_computetxtime(struct ath_hw *ah,
                }
                break;
        default:
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "Unknown phy %u (rate ix %u)\n",
-                       rates->info[rateix].phy, rateix);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                         "Unknown phy %u (rate ix %u)\n",
+                         rates->info[rateix].phy, rateix);
                txTime = 0;
                break;
        }
@@ -213,10 +212,9 @@ void ath9k_hw_get_channel_centers(struct ath_hw *ah,
 
        centers->ctl_center =
                centers->synth_center - (extoff * HT40_CHANNEL_CENTER_SHIFT);
+       /* 25 MHz spacing is supported by hw but not on upper layers */
        centers->ext_center =
-               centers->synth_center + (extoff *
-                        ((ah->extprotspacing == ATH9K_HT_EXTPROTSPACING_20) ?
-                         HT40_CHANNEL_CENTER_SHIFT : 15));
+               centers->synth_center + (extoff * HT40_CHANNEL_CENTER_SHIFT);
 }
 
 /******************/
@@ -285,6 +283,7 @@ static void ath9k_hw_disablepcie(struct ath_hw *ah)
 
 static bool ath9k_hw_chip_test(struct ath_hw *ah)
 {
+       struct ath_common *common = ath9k_hw_common(ah);
        u32 regAddr[2] = { AR_STA_ID0, AR_PHY_BASE + (8 << 2) };
        u32 regHold[2];
        u32 patternData[4] = { 0x55555555,
@@ -303,10 +302,11 @@ static bool ath9k_hw_chip_test(struct ath_hw *ah)
                        REG_WRITE(ah, addr, wrData);
                        rdData = REG_READ(ah, addr);
                        if (rdData != wrData) {
-                               DPRINTF(ah, ATH_DBG_FATAL,
-                                       "address test failed "
-                                       "addr: 0x%08x - wr:0x%08x != rd:0x%08x\n",
-                                       addr, wrData, rdData);
+                               ath_print(common, ATH_DBG_FATAL,
+                                         "address test failed "
+                                         "addr: 0x%08x - wr:0x%08x != "
+                                         "rd:0x%08x\n",
+                                         addr, wrData, rdData);
                                return false;
                        }
                }
@@ -315,10 +315,11 @@ static bool ath9k_hw_chip_test(struct ath_hw *ah)
                        REG_WRITE(ah, addr, wrData);
                        rdData = REG_READ(ah, addr);
                        if (wrData != rdData) {
-                               DPRINTF(ah, ATH_DBG_FATAL,
-                                       "address test failed "
-                                       "addr: 0x%08x - wr:0x%08x != rd:0x%08x\n",
-                                       addr, wrData, rdData);
+                               ath_print(common, ATH_DBG_FATAL,
+                                         "address test failed "
+                                         "addr: 0x%08x - wr:0x%08x != "
+                                         "rd:0x%08x\n",
+                                         addr, wrData, rdData);
                                return false;
                        }
                }
@@ -440,8 +441,8 @@ static int ath9k_hw_rfattach(struct ath_hw *ah)
 
        rfStatus = ath9k_hw_init_rf(ah, &ecode);
        if (!rfStatus) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "RF setup failed, status: %u\n", ecode);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                         "RF setup failed, status: %u\n", ecode);
                return ecode;
        }
 
@@ -465,9 +466,9 @@ static int ath9k_hw_rf_claim(struct ath_hw *ah)
        case AR_RAD2122_SREV_MAJOR:
                break;
        default:
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "Radio Chip Rev 0x%02X not supported\n",
-                       val & AR_RADIO_SREV_MAJOR);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                         "Radio Chip Rev 0x%02X not supported\n",
+                         val & AR_RADIO_SREV_MAJOR);
                return -EOPNOTSUPP;
        }
 
@@ -559,8 +560,10 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
        if (ecode != 0)
                return ecode;
 
-       DPRINTF(ah, ATH_DBG_CONFIG, "Eeprom VER: %d, REV: %d\n",
-               ah->eep_ops->get_eeprom_ver(ah), ah->eep_ops->get_eeprom_rev(ah));
+       ath_print(ath9k_hw_common(ah), ATH_DBG_CONFIG,
+                 "Eeprom VER: %d, REV: %d\n",
+                 ah->eep_ops->get_eeprom_ver(ah),
+                 ah->eep_ops->get_eeprom_rev(ah));
 
        ecode = ath9k_hw_rfattach(ah);
        if (ecode != 0)
@@ -874,6 +877,7 @@ static void ath9k_hw_init_11a_eeprom_fix(struct ath_hw *ah)
 
 int ath9k_hw_init(struct ath_hw *ah)
 {
+       struct ath_common *common = ath9k_hw_common(ah);
        int r = 0;
 
        if (!ath9k_hw_devid_supported(ah->hw_version.devid))
@@ -883,12 +887,13 @@ int ath9k_hw_init(struct ath_hw *ah)
        ath9k_hw_init_config(ah);
 
        if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
-               DPRINTF(ah, ATH_DBG_FATAL, "Couldn't reset chip\n");
+               ath_print(common, ATH_DBG_FATAL,
+                         "Couldn't reset chip\n");
                return -EIO;
        }
 
        if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) {
-               DPRINTF(ah, ATH_DBG_FATAL, "Couldn't wakeup chip\n");
+               ath_print(common, ATH_DBG_FATAL, "Couldn't wakeup chip\n");
                return -EIO;
        }
 
@@ -903,14 +908,14 @@ int ath9k_hw_init(struct ath_hw *ah)
                }
        }
 
-       DPRINTF(ah, ATH_DBG_RESET, "serialize_regmode is %d\n",
+       ath_print(common, ATH_DBG_RESET, "serialize_regmode is %d\n",
                ah->config.serialize_regmode);
 
        if (!ath9k_hw_macversion_supported(ah->hw_version.macVersion)) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "Mac Chip Rev 0x%02x.%x is not supported by "
-                       "this driver\n", ah->hw_version.macVersion,
-                       ah->hw_version.macRev);
+               ath_print(common, ATH_DBG_FATAL,
+                         "Mac Chip Rev 0x%02x.%x is not supported by "
+                         "this driver\n", ah->hw_version.macVersion,
+                         ah->hw_version.macRev);
                return -EOPNOTSUPP;
        }
 
@@ -938,6 +943,16 @@ int ath9k_hw_init(struct ath_hw *ah)
        else
                ath9k_hw_disablepcie(ah);
 
+       /* Support for Japan ch.14 (2484) spread */
+       if (AR_SREV_9287_11_OR_LATER(ah)) {
+               INIT_INI_ARRAY(&ah->iniCckfirNormal,
+                      ar9287Common_normal_cck_fir_coeff_92871_1,
+                      ARRAY_SIZE(ar9287Common_normal_cck_fir_coeff_92871_1), 2);
+               INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
+                      ar9287Common_japan_2484_cck_fir_coeff_92871_1,
+                      ARRAY_SIZE(ar9287Common_japan_2484_cck_fir_coeff_92871_1), 2);
+       }
+
        r = ath9k_hw_post_init(ah);
        if (r)
                return r;
@@ -948,8 +963,8 @@ int ath9k_hw_init(struct ath_hw *ah)
 
        r = ath9k_hw_init_macaddr(ah);
        if (r) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "Failed to initialize MAC address\n");
+               ath_print(common, ATH_DBG_FATAL,
+                         "Failed to initialize MAC address\n");
                return r;
        }
 
@@ -1133,7 +1148,8 @@ static void ath9k_hw_init_interrupt_masks(struct ath_hw *ah,
 static bool ath9k_hw_set_ack_timeout(struct ath_hw *ah, u32 us)
 {
        if (us > ath9k_hw_mac_to_usec(ah, MS(0xffffffff, AR_TIME_OUT_ACK))) {
-               DPRINTF(ah, ATH_DBG_RESET, "bad ack timeout %u\n", us);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+                         "bad ack timeout %u\n", us);
                ah->acktimeout = (u32) -1;
                return false;
        } else {
@@ -1147,7 +1163,8 @@ static bool ath9k_hw_set_ack_timeout(struct ath_hw *ah, u32 us)
 static bool ath9k_hw_set_cts_timeout(struct ath_hw *ah, u32 us)
 {
        if (us > ath9k_hw_mac_to_usec(ah, MS(0xffffffff, AR_TIME_OUT_CTS))) {
-               DPRINTF(ah, ATH_DBG_RESET, "bad cts timeout %u\n", us);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+                         "bad cts timeout %u\n", us);
                ah->ctstimeout = (u32) -1;
                return false;
        } else {
@@ -1161,8 +1178,8 @@ static bool ath9k_hw_set_cts_timeout(struct ath_hw *ah, u32 us)
 static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu)
 {
        if (tu > 0xFFFF) {
-               DPRINTF(ah, ATH_DBG_XMIT,
-                       "bad global tx timeout %u\n", tu);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_XMIT,
+                         "bad global tx timeout %u\n", tu);
                ah->globaltxtimeout = (u32) -1;
                return false;
        } else {
@@ -1174,8 +1191,8 @@ static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu)
 
 static void ath9k_hw_init_user_settings(struct ath_hw *ah)
 {
-       DPRINTF(ah, ATH_DBG_RESET, "ah->misc_mode 0x%x\n",
-               ah->misc_mode);
+       ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n",
+                 ah->misc_mode);
 
        if (ah->misc_mode != 0)
                REG_WRITE(ah, AR_PCU_MISC,
@@ -1267,28 +1284,29 @@ static u32 ath9k_hw_def_ini_fixup(struct ath_hw *ah,
                              u32 reg, u32 value)
 {
        struct base_eep_header *pBase = &(pEepData->baseEepHeader);
+       struct ath_common *common = ath9k_hw_common(ah);
 
        switch (ah->hw_version.devid) {
        case AR9280_DEVID_PCI:
                if (reg == 0x7894) {
-                       DPRINTF(ah, ATH_DBG_EEPROM,
+                       ath_print(common, ATH_DBG_EEPROM,
                                "ini VAL: %x  EEPROM: %x\n", value,
                                (pBase->version & 0xff));
 
                        if ((pBase->version & 0xff) > 0x0a) {
-                               DPRINTF(ah, ATH_DBG_EEPROM,
-                                       "PWDCLKIND: %d\n",
-                                       pBase->pwdclkind);
+                               ath_print(common, ATH_DBG_EEPROM,
+                                         "PWDCLKIND: %d\n",
+                                         pBase->pwdclkind);
                                value &= ~AR_AN_TOP2_PWDCLKIND;
                                value |= AR_AN_TOP2_PWDCLKIND &
                                        (pBase->pwdclkind << AR_AN_TOP2_PWDCLKIND_S);
                        } else {
-                               DPRINTF(ah, ATH_DBG_EEPROM,
-                                       "PWDCLKIND Earlier Rev\n");
+                               ath_print(common, ATH_DBG_EEPROM,
+                                         "PWDCLKIND Earlier Rev\n");
                        }
 
-                       DPRINTF(ah, ATH_DBG_EEPROM,
-                               "final ini VAL: %x\n", value);
+                       ath_print(common, ATH_DBG_EEPROM,
+                                 "final ini VAL: %x\n", value);
                }
                break;
        }
@@ -1343,8 +1361,7 @@ static u32 ath9k_regd_get_ctl(struct ath_regulatory *reg,
 }
 
 static int ath9k_hw_process_ini(struct ath_hw *ah,
-                               struct ath9k_channel *chan,
-                               enum ath9k_ht_macmode macmode)
+                               struct ath9k_channel *chan)
 {
        struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
        int i, regWrites = 0;
@@ -1446,7 +1463,7 @@ static int ath9k_hw_process_ini(struct ath_hw *ah,
        }
 
        ath9k_hw_override_ini(ah, chan);
-       ath9k_hw_set_regs(ah, chan, macmode);
+       ath9k_hw_set_regs(ah, chan);
        ath9k_hw_init_chain_masks(ah);
 
        if (OLC_FOR_AR9280_20_LATER)
@@ -1460,8 +1477,8 @@ static int ath9k_hw_process_ini(struct ath_hw *ah,
                                 (u32) regulatory->power_limit));
 
        if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "ar5416SetRfRegs failed\n");
+               ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                         "ar5416SetRfRegs failed\n");
                return -EIO;
        }
 
@@ -1666,8 +1683,8 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
 
        REG_WRITE(ah, AR_RTC_RC, 0);
        if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) {
-               DPRINTF(ah, ATH_DBG_RESET,
-                       "RTC stuck in MAC reset\n");
+               ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+                         "RTC stuck in MAC reset\n");
                return false;
        }
 
@@ -1703,7 +1720,8 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah)
                           AR_RTC_STATUS_M,
                           AR_RTC_STATUS_ON,
                           AH_WAIT_TIMEOUT)) {
-               DPRINTF(ah, ATH_DBG_RESET, "RTC not waking up\n");
+               ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+                         "RTC not waking up\n");
                return false;
        }
 
@@ -1728,8 +1746,7 @@ static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type)
        }
 }
 
-static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan,
-                             enum ath9k_ht_macmode macmode)
+static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan)
 {
        u32 phymode;
        u32 enableDacFifo = 0;
@@ -1748,12 +1765,10 @@ static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan,
                    (chan->chanmode == CHANNEL_G_HT40PLUS))
                        phymode |= AR_PHY_FC_DYN2040_PRI_CH;
 
-               if (ah->extprotspacing == ATH9K_HT_EXTPROTSPACING_25)
-                       phymode |= AR_PHY_FC_DYN2040_EXT_CH;
        }
        REG_WRITE(ah, AR_PHY_TURBO, phymode);
 
-       ath9k_hw_set11nmac2040(ah, macmode);
+       ath9k_hw_set11nmac2040(ah);
 
        REG_WRITE(ah, AR_GTXTO, 25 << AR_GTXTO_TIMEOUT_LIMIT_S);
        REG_WRITE(ah, AR_CST, 0xF << AR_CST_TIMEOUT_LIMIT_S);
@@ -1779,17 +1794,18 @@ static bool ath9k_hw_chip_reset(struct ath_hw *ah,
 }
 
 static bool ath9k_hw_channel_change(struct ath_hw *ah,
-                                   struct ath9k_channel *chan,
-                                   enum ath9k_ht_macmode macmode)
+                                   struct ath9k_channel *chan)
 {
        struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
+       struct ath_common *common = ath9k_hw_common(ah);
        struct ieee80211_channel *channel = chan->chan;
        u32 synthDelay, qnum;
 
        for (qnum = 0; qnum < AR_NUM_QCU; qnum++) {
                if (ath9k_hw_numtxpending(ah, qnum)) {
-                       DPRINTF(ah, ATH_DBG_QUEUE,
-                               "Transmit frames pending on queue %d\n", qnum);
+                       ath_print(common, ATH_DBG_QUEUE,
+                                 "Transmit frames pending on "
+                                 "queue %d\n", qnum);
                        return false;
                }
        }
@@ -1797,19 +1813,19 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
        REG_WRITE(ah, AR_PHY_RFBUS_REQ, AR_PHY_RFBUS_REQ_EN);
        if (!ath9k_hw_wait(ah, AR_PHY_RFBUS_GRANT, AR_PHY_RFBUS_GRANT_EN,
                           AR_PHY_RFBUS_GRANT_EN, AH_WAIT_TIMEOUT)) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "Could not kill baseband RX\n");
+               ath_print(common, ATH_DBG_FATAL,
+                         "Could not kill baseband RX\n");
                return false;
        }
 
-       ath9k_hw_set_regs(ah, chan, macmode);
+       ath9k_hw_set_regs(ah, chan);
 
        if (AR_SREV_9280_10_OR_LATER(ah)) {
                ath9k_hw_ar9280_set_channel(ah, chan);
        } else {
                if (!(ath9k_hw_set_channel(ah, chan))) {
-                       DPRINTF(ah, ATH_DBG_FATAL,
-                               "Failed to set channel\n");
+                       ath_print(common, ATH_DBG_FATAL,
+                                 "Failed to set channel\n");
                        return false;
                }
        }
@@ -2313,16 +2329,14 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
 {
        struct ath_common *common = ath9k_hw_common(ah);
        u32 saveLedState;
-       struct ath_softc *sc = ah->ah_sc;
        struct ath9k_channel *curchan = ah->curchan;
        u32 saveDefAntenna;
        u32 macStaId1;
        u64 tsf = 0;
        int i, rx_chainmask, r;
 
-       ah->extprotspacing = sc->ht_extprotspacing;
-       ah->txchainmask = sc->tx_chainmask;
-       ah->rxchainmask = sc->rx_chainmask;
+       ah->txchainmask = common->tx_chainmask;
+       ah->rxchainmask = common->rx_chainmask;
 
        if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
                return -EIO;
@@ -2339,7 +2353,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
             !(AR_SREV_9280(ah) || IS_CHAN_A_5MHZ_SPACED(chan) ||
             IS_CHAN_A_5MHZ_SPACED(ah->curchan))) {
 
-               if (ath9k_hw_channel_change(ah, chan, sc->tx_chan_width)) {
+               if (ath9k_hw_channel_change(ah, chan)) {
                        ath9k_hw_loadnf(ah, ah->curchan);
                        ath9k_hw_start_nfcal(ah);
                        return 0;
@@ -2370,7 +2384,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
        }
 
        if (!ath9k_hw_chip_reset(ah, chan)) {
-               DPRINTF(ah, ATH_DBG_FATAL, "Chip reset failed\n");
+               ath_print(common, ATH_DBG_FATAL, "Chip reset failed\n");
                return -EINVAL;
        }
 
@@ -2399,7 +2413,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                REG_SET_BIT(ah, AR_MAC_PCU_ASYNC_FIFO_REG3,
                                AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET);
        }
-       r = ath9k_hw_process_ini(ah, chan, sc->tx_chan_width);
+       r = ath9k_hw_process_ini(ah, chan);
        if (r)
                return r;
 
@@ -2441,7 +2455,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                  | ah->sta_id1_defaults);
        ath9k_hw_set_operating_mode(ah, ah->opmode);
 
-       ath9k_hw_setbssidmask(ah);
+       ath_hw_setbssidmask(common);
 
        REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna);
 
@@ -2525,13 +2539,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                u32 mask;
                mask = REG_READ(ah, AR_CFG);
                if (mask & (AR_CFG_SWRB | AR_CFG_SWTB | AR_CFG_SWRG)) {
-                       DPRINTF(ah, ATH_DBG_RESET,
+                       ath_print(common, ATH_DBG_RESET,
                                "CFG Byte Swap Set 0x%x\n", mask);
                } else {
                        mask =
                                INIT_CONFIG_STATUS | AR_CFG_SWRB | AR_CFG_SWTB;
                        REG_WRITE(ah, AR_CFG, mask);
-                       DPRINTF(ah, ATH_DBG_RESET,
+                       ath_print(common, ATH_DBG_RESET,
                                "Setting CFG 0x%x\n", REG_READ(ah, AR_CFG));
                }
        } else {
@@ -2559,8 +2573,8 @@ bool ath9k_hw_keyreset(struct ath_hw *ah, u16 entry)
        u32 keyType;
 
        if (entry >= ah->caps.keycache_size) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "keychache entry %u out of range\n", entry);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                         "keychache entry %u out of range\n", entry);
                return false;
        }
 
@@ -2593,8 +2607,8 @@ bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac)
        u32 macHi, macLo;
 
        if (entry >= ah->caps.keycache_size) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "keychache entry %u out of range\n", entry);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                         "keychache entry %u out of range\n", entry);
                return false;
        }
 
@@ -2621,12 +2635,13 @@ bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
                                 const u8 *mac)
 {
        const struct ath9k_hw_capabilities *pCap = &ah->caps;
+       struct ath_common *common = ath9k_hw_common(ah);
        u32 key0, key1, key2, key3, key4;
        u32 keyType;
 
        if (entry >= pCap->keycache_size) {
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "keycache entry %u out of range\n", entry);
+               ath_print(common, ATH_DBG_FATAL,
+                         "keycache entry %u out of range\n", entry);
                return false;
        }
 
@@ -2636,9 +2651,9 @@ bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
                break;
        case ATH9K_CIPHER_AES_CCM:
                if (!(pCap->hw_caps & ATH9K_HW_CAP_CIPHER_AESCCM)) {
-                       DPRINTF(ah, ATH_DBG_ANY,
-                               "AES-CCM not supported by mac rev 0x%x\n",
-                               ah->hw_version.macRev);
+                       ath_print(common, ATH_DBG_ANY,
+                                 "AES-CCM not supported by mac rev 0x%x\n",
+                                 ah->hw_version.macRev);
                        return false;
                }
                keyType = AR_KEYTABLE_TYPE_CCM;
@@ -2647,15 +2662,15 @@ bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
                keyType = AR_KEYTABLE_TYPE_TKIP;
                if (ATH9K_IS_MIC_ENABLED(ah)
                    && entry + 64 >= pCap->keycache_size) {
-                       DPRINTF(ah, ATH_DBG_ANY,
-                               "entry %u inappropriate for TKIP\n", entry);
+                       ath_print(common, ATH_DBG_ANY,
+                                 "entry %u inappropriate for TKIP\n", entry);
                        return false;
                }
                break;
        case ATH9K_CIPHER_WEP:
                if (k->kv_len < WLAN_KEY_LEN_WEP40) {
-                       DPRINTF(ah, ATH_DBG_ANY,
-                               "WEP key length %u too small\n", k->kv_len);
+                       ath_print(common, ATH_DBG_ANY,
+                                 "WEP key length %u too small\n", k->kv_len);
                        return false;
                }
                if (k->kv_len <= WLAN_KEY_LEN_WEP40)
@@ -2669,8 +2684,8 @@ bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
                keyType = AR_KEYTABLE_TYPE_CLR;
                break;
        default:
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "cipher %u not supported\n", k->kv_type);
+               ath_print(common, ATH_DBG_FATAL,
+                         "cipher %u not supported\n", k->kv_type);
                return false;
        }
 
@@ -2836,8 +2851,9 @@ static void ath9k_set_power_sleep(struct ath_hw *ah, int setChip)
                if (!AR_SREV_9100(ah))
                        REG_WRITE(ah, AR_RC, AR_RC_AHB | AR_RC_HOSTIF);
 
-               REG_CLR_BIT(ah, (AR_RTC_RESET),
-                           AR_RTC_RESET_EN);
+               if(!AR_SREV_5416(ah))
+                       REG_CLR_BIT(ah, (AR_RTC_RESET),
+                                   AR_RTC_RESET_EN);
        }
 }
 
@@ -2887,8 +2903,9 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip)
                                    AR_RTC_FORCE_WAKE_EN);
                }
                if (i == 0) {
-                       DPRINTF(ah, ATH_DBG_FATAL,
-                               "Failed to wakeup in %uus\n", POWER_UP_TIME / 20);
+                       ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                                 "Failed to wakeup in %uus\n",
+                                 POWER_UP_TIME / 20);
                        return false;
                }
        }
@@ -2900,6 +2917,7 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip)
 
 bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
 {
+       struct ath_common *common = ath9k_hw_common(ah);
        int status = true, setChip = true;
        static const char *modes[] = {
                "AWAKE",
@@ -2911,8 +2929,8 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
        if (ah->power_mode == mode)
                return status;
 
-       DPRINTF(ah, ATH_DBG_RESET, "%s -> %s\n",
-               modes[ah->power_mode], modes[mode]);
+       ath_print(common, ATH_DBG_RESET, "%s -> %s\n",
+                 modes[ah->power_mode], modes[mode]);
 
        switch (mode) {
        case ATH9K_PM_AWAKE:
@@ -2926,8 +2944,8 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
                ath9k_set_power_network_sleep(ah, setChip);
                break;
        default:
-               DPRINTF(ah, ATH_DBG_FATAL,
-                       "Unknown power mode %u\n", mode);
+               ath_print(common, ATH_DBG_FATAL,
+                         "Unknown power mode %u\n", mode);
                return false;
        }
        ah->power_mode = mode;
@@ -3097,6 +3115,7 @@ bool ath9k_hw_getisr(struct ath_hw *ah, enum ath9k_int *masked)
        struct ath9k_hw_capabilities *pCap = &ah->caps;
        u32 sync_cause = 0;
        bool fatal_int = false;
+       struct ath_common *common = ath9k_hw_common(ah);
 
        if (!AR_SREV_9100(ah)) {
                if (REG_READ(ah, AR_INTR_ASYNC_CAUSE) & AR_INTR_MAC_IRQ) {
@@ -3170,8 +3189,8 @@ bool ath9k_hw_getisr(struct ath_hw *ah, enum ath9k_int *masked)
                }
 
                if (isr & AR_ISR_RXORN) {
-                       DPRINTF(ah, ATH_DBG_INTERRUPT,
-                               "receive FIFO overrun interrupt\n");
+                       ath_print(common, ATH_DBG_INTERRUPT,
+                                 "receive FIFO overrun interrupt\n");
                }
 
                if (!AR_SREV_9100(ah)) {
@@ -3213,25 +3232,25 @@ bool ath9k_hw_getisr(struct ath_hw *ah, enum ath9k_int *masked)
 
                if (fatal_int) {
                        if (sync_cause & AR_INTR_SYNC_HOST1_FATAL) {
-                               DPRINTF(ah, ATH_DBG_ANY,
-                                       "received PCI FATAL interrupt\n");
+                               ath_print(common, ATH_DBG_ANY,
+                                         "received PCI FATAL interrupt\n");
                        }
                        if (sync_cause & AR_INTR_SYNC_HOST1_PERR) {
-                               DPRINTF(ah, ATH_DBG_ANY,
-                                       "received PCI PERR interrupt\n");
+                               ath_print(common, ATH_DBG_ANY,
+                                         "received PCI PERR interrupt\n");
                        }
                        *masked |= ATH9K_INT_FATAL;
                }
                if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) {
-                       DPRINTF(ah, ATH_DBG_INTERRUPT,
-                               "AR_INTR_SYNC_RADM_CPL_TIMEOUT\n");
+                       ath_print(common, ATH_DBG_INTERRUPT,
+                                 "AR_INTR_SYNC_RADM_CPL_TIMEOUT\n");
                        REG_WRITE(ah, AR_RC, AR_RC_HOSTIF);
                        REG_WRITE(ah, AR_RC, 0);
                        *masked |= ATH9K_INT_FATAL;
                }
                if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT) {
-                       DPRINTF(ah, ATH_DBG_INTERRUPT,
-                               "AR_INTR_SYNC_LOCAL_TIMEOUT\n");
+                       ath_print(common, ATH_DBG_INTERRUPT,
+                                 "AR_INTR_SYNC_LOCAL_TIMEOUT\n");
                }
 
                REG_WRITE(ah, AR_INTR_SYNC_CAUSE_CLR, sync_cause);
@@ -3246,11 +3265,12 @@ enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
        u32 omask = ah->mask_reg;
        u32 mask, mask2;
        struct ath9k_hw_capabilities *pCap = &ah->caps;
+       struct ath_common *common = ath9k_hw_common(ah);
 
-       DPRINTF(ah, ATH_DBG_INTERRUPT, "0x%x => 0x%x\n", omask, ints);
+       ath_print(common, ATH_DBG_INTERRUPT, "0x%x => 0x%x\n", omask, ints);
 
        if (omask & ATH9K_INT_GLOBAL) {
-               DPRINTF(ah, ATH_DBG_INTERRUPT, "disable IER\n");
+               ath_print(common, ATH_DBG_INTERRUPT, "disable IER\n");
                REG_WRITE(ah, AR_IER, AR_IER_DISABLE);
                (void) REG_READ(ah, AR_IER);
                if (!AR_SREV_9100(ah)) {
@@ -3307,7 +3327,7 @@ enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
                        mask2 |= AR_IMR_S2_CST;
        }
 
-       DPRINTF(ah, ATH_DBG_INTERRUPT, "new IMR 0x%x\n", mask);
+       ath_print(common, ATH_DBG_INTERRUPT, "new IMR 0x%x\n", mask);
        REG_WRITE(ah, AR_IMR, mask);
        mask = REG_READ(ah, AR_IMR_S2) & ~(AR_IMR_S2_TIM |
                                           AR_IMR_S2_DTIM |
@@ -3327,7 +3347,7 @@ enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
        }
 
        if (ints & ATH9K_INT_GLOBAL) {
-               DPRINTF(ah, ATH_DBG_INTERRUPT, "enable IER\n");
+               ath_print(common, ATH_DBG_INTERRUPT, "enable IER\n");
                REG_WRITE(ah, AR_IER, AR_IER_ENABLE);
                if (!AR_SREV_9100(ah)) {
                        REG_WRITE(ah, AR_INTR_ASYNC_ENABLE,
@@ -3340,8 +3360,8 @@ enum ath9k_int ath9k_hw_set_interrupts(struct ath_hw *ah, enum ath9k_int ints)
                        REG_WRITE(ah, AR_INTR_SYNC_MASK,
                                  AR_INTR_SYNC_DEFAULT);
                }
-               DPRINTF(ah, ATH_DBG_INTERRUPT, "AR_IMR 0x%x IER 0x%x\n",
-                        REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER));
+               ath_print(common, ATH_DBG_INTERRUPT, "AR_IMR 0x%x IER 0x%x\n",
+                         REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER));
        }
 
        return omask;
@@ -3388,9 +3408,9 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
                        AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN;
                break;
        default:
-               DPRINTF(ah, ATH_DBG_BEACON,
-                       "%s: unsupported opmode: %d\n",
-                       __func__, ah->opmode);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON,
+                         "%s: unsupported opmode: %d\n",
+                         __func__, ah->opmode);
                return;
                break;
        }
@@ -3414,6 +3434,7 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
 {
        u32 nextTbtt, beaconintval, dtimperiod, beacontimeout;
        struct ath9k_hw_capabilities *pCap = &ah->caps;
+       struct ath_common *common = ath9k_hw_common(ah);
 
        REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(bs->bs_nexttbtt));
 
@@ -3439,10 +3460,10 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
        else
                nextTbtt = bs->bs_nexttbtt;
 
-       DPRINTF(ah, ATH_DBG_BEACON, "next DTIM %d\n", bs->bs_nextdtim);
-       DPRINTF(ah, ATH_DBG_BEACON, "next beacon %d\n", nextTbtt);
-       DPRINTF(ah, ATH_DBG_BEACON, "beacon period %d\n", beaconintval);
-       DPRINTF(ah, ATH_DBG_BEACON, "DTIM period %d\n", dtimperiod);
+       ath_print(common, ATH_DBG_BEACON, "next DTIM %d\n", bs->bs_nextdtim);
+       ath_print(common, ATH_DBG_BEACON, "next beacon %d\n", nextTbtt);
+       ath_print(common, ATH_DBG_BEACON, "beacon period %d\n", beaconintval);
+       ath_print(common, ATH_DBG_BEACON, "DTIM period %d\n", dtimperiod);
 
        REG_WRITE(ah, AR_NEXT_DTIM,
                  TU_TO_USEC(bs->bs_nextdtim - SLEEP_SLOP));
@@ -3479,6 +3500,7 @@ void ath9k_hw_fill_cap_info(struct ath_hw *ah)
 {
        struct ath9k_hw_capabilities *pCap = &ah->caps;
        struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
+       struct ath_common *common = ath9k_hw_common(ah);
        struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
 
        u16 capField = 0, eeval;
@@ -3500,8 +3522,8 @@ void ath9k_hw_fill_cap_info(struct ath_hw *ah)
                        regulatory->current_rd += 5;
                else if (regulatory->current_rd == 0x41)
                        regulatory->current_rd = 0x43;
-               DPRINTF(ah, ATH_DBG_REGULATORY,
-                       "regdomain mapped to 0x%x\n", regulatory->current_rd);
+               ath_print(common, ATH_DBG_REGULATORY,
+                         "regdomain mapped to 0x%x\n", regulatory->current_rd);
        }
 
        eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
@@ -3803,7 +3825,7 @@ void ath9k_hw_cfg_gpio_input(struct ath_hw *ah, u32 gpio)
 {
        u32 gpio_shift;
 
-       ASSERT(gpio < ah->caps.num_gpio_pins);
+       BUG_ON(gpio >= ah->caps.num_gpio_pins);
 
        gpio_shift = gpio << 1;
 
@@ -3990,14 +4012,6 @@ void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1)
        REG_WRITE(ah, AR_MCAST_FIL1, filter1);
 }
 
-void ath9k_hw_setbssidmask(struct ath_hw *ah)
-{
-       struct ath_common *common = ath9k_hw_common(ah);
-
-       REG_WRITE(ah, AR_BSSMSKL, get_unaligned_le32(common->bssidmask));
-       REG_WRITE(ah, AR_BSSMSKU, get_unaligned_le16(common->bssidmask + 4));
-}
-
 void ath9k_hw_write_associd(struct ath_hw *ah)
 {
        struct ath_common *common = ath9k_hw_common(ah);
@@ -4027,8 +4041,8 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah)
 {
        if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0,
                           AH_TSF_WRITE_TIMEOUT))
-               DPRINTF(ah, ATH_DBG_RESET,
-                       "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n");
+               ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+                         "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n");
 
        REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE);
 }
@@ -4044,7 +4058,8 @@ void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting)
 bool ath9k_hw_setslottime(struct ath_hw *ah, u32 us)
 {
        if (us < ATH9K_SLOT_TIME_9 || us > ath9k_hw_mac_to_usec(ah, 0xffff)) {
-               DPRINTF(ah, ATH_DBG_RESET, "bad slot time %u\n", us);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+                         "bad slot time %u\n", us);
                ah->slottime = (u32) -1;
                return false;
        } else {
@@ -4054,12 +4069,12 @@ bool ath9k_hw_setslottime(struct ath_hw *ah, u32 us)
        }
 }
 
-void ath9k_hw_set11nmac2040(struct ath_hw *ah, enum ath9k_ht_macmode mode)
+void ath9k_hw_set11nmac2040(struct ath_hw *ah)
 {
+       struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
        u32 macmode;
 
-       if (mode == ATH9K_HT_MACMODE_2040 &&
-           !ah->config.cwm_ignore_extcca)
+       if (conf_is_ht40(conf) && !ah->config.cwm_ignore_extcca)
                macmode = AR_2040_JOINED_RX_CLEAR;
        else
                macmode = 0;
@@ -4129,8 +4144,9 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
        timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL);
 
        if (timer == NULL) {
-               printk(KERN_DEBUG "Failed to allocate memory"
-                      "for hw timer[%d]\n", timer_index);
+               ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
+                         "Failed to allocate memory"
+                         "for hw timer[%d]\n", timer_index);
                return NULL;
        }
 
@@ -4144,9 +4160,10 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
        return timer;
 }
 
-void ath_gen_timer_start(struct ath_hw *ah,
-                        struct ath_gen_timer *timer,
-                        u32 timer_next, u32 timer_period)
+void ath9k_hw_gen_timer_start(struct ath_hw *ah,
+                             struct ath_gen_timer *timer,
+                             u32 timer_next,
+                             u32 timer_period)
 {
        struct ath_gen_timer_table *timer_table = &ah->hw_gen_timers;
        u32 tsf;
@@ -4157,8 +4174,9 @@ void ath_gen_timer_start(struct ath_hw *ah,
 
        tsf = ath9k_hw_gettsf32(ah);
 
-       DPRINTF(ah, ATH_DBG_HWTIMER, "curent tsf %x period %x"
-               "timer_next %x\n", tsf, timer_period, timer_next);
+       ath_print(ath9k_hw_common(ah), ATH_DBG_HWTIMER,
+                 "curent tsf %x period %x"
+                 "timer_next %x\n", tsf, timer_period, timer_next);
 
        /*
         * Pull timer_next forward if the current TSF already passed it
@@ -4181,15 +4199,9 @@ void ath_gen_timer_start(struct ath_hw *ah,
        REG_SET_BIT(ah, AR_IMR_S5,
                (SM(AR_GENTMR_BIT(timer->index), AR_IMR_S5_GENTIMER_THRESH) |
                SM(AR_GENTMR_BIT(timer->index), AR_IMR_S5_GENTIMER_TRIG)));
-
-       if ((ah->ah_sc->imask & ATH9K_INT_GENTIMER) == 0) {
-               ath9k_hw_set_interrupts(ah, 0);
-               ah->ah_sc->imask |= ATH9K_INT_GENTIMER;
-               ath9k_hw_set_interrupts(ah, ah->ah_sc->imask);
-       }
 }
 
-void ath_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer)
+void ath9k_hw_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer)
 {
        struct ath_gen_timer_table *timer_table = &ah->hw_gen_timers;
 
@@ -4208,13 +4220,6 @@ void ath_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer)
                SM(AR_GENTMR_BIT(timer->index), AR_IMR_S5_GENTIMER_TRIG)));
 
        clear_bit(timer->index, &timer_table->timer_mask.timer_bits);
-
-       /* if no timer is enabled, turn off interrupt mask */
-       if (timer_table->timer_mask.val == 0) {
-               ath9k_hw_set_interrupts(ah, 0);
-               ah->ah_sc->imask &= ~ATH9K_INT_GENTIMER;
-               ath9k_hw_set_interrupts(ah, ah->ah_sc->imask);
-       }
 }
 
 void ath_gen_timer_free(struct ath_hw *ah, struct ath_gen_timer *timer)
@@ -4233,6 +4238,7 @@ void ath_gen_timer_isr(struct ath_hw *ah)
 {
        struct ath_gen_timer_table *timer_table = &ah->hw_gen_timers;
        struct ath_gen_timer *timer;
+       struct ath_common *common = ath9k_hw_common(ah);
        u32 trigger_mask, thresh_mask, index;
 
        /* get hardware generic timer interrupt status */
@@ -4247,8 +4253,8 @@ void ath_gen_timer_isr(struct ath_hw *ah)
                index = rightmost_index(timer_table, &thresh_mask);
                timer = timer_table->timers[index];
                BUG_ON(!timer);
-               DPRINTF(ah, ATH_DBG_HWTIMER,
-                       "TSF overflow for Gen timer %d\n", index);
+               ath_print(common, ATH_DBG_HWTIMER,
+                         "TSF overflow for Gen timer %d\n", index);
                timer->overflow(timer->arg);
        }
 
@@ -4256,8 +4262,8 @@ void ath_gen_timer_isr(struct ath_hw *ah)
                index = rightmost_index(timer_table, &trigger_mask);
                timer = timer_table->timers[index];
                BUG_ON(!timer);
-               DPRINTF(ah, ATH_DBG_HWTIMER,
-                       "Gen timer[%d] trigger\n", index);
+               ath_print(common, ATH_DBG_HWTIMER,
+                         "Gen timer[%d] trigger\n", index);
                timer->trigger(timer->arg);
        }
 }