ath9k: Cleanup debug messages
PATCH 3/17 ath9k: Cleanup debug messages
Clean debug messages to use appropriate levels,
remove useless messages, and trim the number of
debug levels.
--- drivers/net/wireless/ath9k/ani.c | 8 +-- drivers/net/wireless/ath9k/beacon.c | 7 +-- drivers/net/wireless/ath9k/debug.h | 24 ++++----- drivers/net/wireless/ath9k/eeprom.c | 24 ++++---- drivers/net/wireless/ath9k/hw.c | 101 +++++++++++++++-------------------- drivers/net/wireless/ath9k/mac.c | 63 +++++++++++++--------- drivers/net/wireless/ath9k/main.c | 6 +- drivers/net/wireless/ath9k/phy.c | 4 +- drivers/net/wireless/ath9k/phy.h | 3 - drivers/net/wireless/ath9k/recv.c | 4 +- 10 files changed, 115 insertions(+), 129 deletions(-)
drivers/net/wireless/ath9k/ani.c +3 -5
@@ -569,8 +569,7 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah,DPRINTF (ah->ah_sc,ATH_DBG_ANI ,"phyCnt1 0x%x, resetting " "counter value to 0x%x\n" , - phyCnt1, - aniState->ofdmPhyErrBase); + phyCnt1, aniState->ofdmPhyErrBase);REG_WRITE (ah,AR_PHY_ERR_1 , aniState->ofdmPhyErrBase); REG_WRITE(ah, AR_PHY_ERR_MASK_1,
@@ -580,8 +579,7 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah,DPRINTF (ah->ah_sc,ATH_DBG_ANI ,"phyCnt2 0x%x, resetting " "counter value to 0x%x\n" , - phyCnt2, - aniState->cckPhyErrBase); + phyCnt2, aniState->cckPhyErrBase);REG_WRITE (ah,AR_PHY_ERR_2 , aniState->cckPhyErrBase); REG_WRITE(ah, AR_PHY_ERR_MASK_2,
@@ -667,7 +665,7 @@ u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah,u32 cc =REG_READ (ah,AR_CCCNT );if (cycles ==0 || cycles > cc) { -DPRINTF (ah->ah_sc,ATH_DBG_CHANNEL , +DPRINTF (ah->ah_sc,ATH_DBG_ANI ,"cycle counter wrap. ExtBusy = 0\n" ); good =0 ; }else {
drivers/net/wireless/ath9k/beacon.c +2 -5
@@ -43,7 +43,7 @@ static int ath_beaconq_config(struct ath_softc *sc)if (!ath9k_hw_set_txq_props (ah, sc->beacon.beaconq, &qi)) {DPRINTF (sc,ATH_DBG_FATAL , -"unable to update h/w beacon queue parameters\n" ); +"Unable to update h/w beacon queue parameters\n" );return 0 ; }else {ath9k_hw_resettxqueue (ah, sc->beacon.beaconq);
@@ -132,11 +132,8 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, avp = (void *)vif->drv_priv; cabq = sc->beacon.cabq; -if (avp->av_bcbuf ==NULL ) { -DPRINTF (sc,ATH_DBG_BEACON ,"avp=%p av_bcbuf=%p\n" , - avp, avp->av_bcbuf); +if (avp->av_bcbuf ==NULL )return NULL ; - }/* Release the old beacon first */
drivers/net/wireless/ath9k/debug.h +10 -14
@@ -19,20 +19,16 @@enum ATH_DEBUG {ATH_DBG_RESET =0x00000001 , -ATH_DBG_REG_IO =0x00000002 , -ATH_DBG_QUEUE =0x00000004 , -ATH_DBG_EEPROM =0x00000008 , -ATH_DBG_CALIBRATE =0x00000010 , -ATH_DBG_CHANNEL =0x00000020 , -ATH_DBG_INTERRUPT =0x00000040 , -ATH_DBG_REGULATORY =0x00000080 , -ATH_DBG_ANI =0x00000100 , -ATH_DBG_POWER_MGMT =0x00000200 , -ATH_DBG_XMIT =0x00000400 , -ATH_DBG_BEACON =0x00001000 , -ATH_DBG_CONFIG =0x00002000 , -ATH_DBG_KEYCACHE =0x00004000 , -ATH_DBG_FATAL =0x00008000 , +ATH_DBG_QUEUE =0x00000002 , +ATH_DBG_EEPROM =0x00000004 , +ATH_DBG_CALIBRATE =0x00000008 , +ATH_DBG_INTERRUPT =0x00000010 , +ATH_DBG_REGULATORY =0x00000020 , +ATH_DBG_ANI =0x00000040 , +ATH_DBG_XMIT =0x00000080 , +ATH_DBG_BEACON =0x00000100 , +ATH_DBG_CONFIG =0x00000200 , +ATH_DBG_FATAL =0x00000400 ,ATH_DBG_ANY =0xffffffff };
drivers/net/wireless/ath9k/eeprom.c +12 -12
@@ -783,11 +783,11 @@ static bool ath9k_hw_set_4k_power_cal_table(struct ath_hw *ah, ((pdadcValues[4 * j +3 ] &0xFF ) <<24 );REG_WRITE (ah, regOffset, reg32); -DPRINTF (ah->ah_sc,ATH_DBG_REG_IO , +DPRINTF (ah->ah_sc,ATH_DBG_EEPROM ,"PDADC (%d,%4x): %4.4x %8.8x\n" , i, regChainOffset, regOffset, reg32); -DPRINTF (ah->ah_sc,ATH_DBG_REG_IO , +DPRINTF (ah->ah_sc,ATH_DBG_EEPROM ,"PDADC: Chain %d | " "PDADC %3d Value %3d | " "PDADC %3d Value %3d | "
@@ -910,7 +910,7 @@ static bool ath9k_hw_set_4k_power_per_rate_table(struct ath_hw *ah, ah->eep_ops->get_eeprom_rev(ah) <= 2) twiceMaxEdgePower =AR5416_MAX_RATE_POWER ; - DPRINTF(ah->ah_sc, ATH_DBG_POWER_MGMT, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, "LOOP-Mode ctlMode %d < %d, isHt40CtlMode %d, " "EXT_ADDITIVE %d\n", ctlMode, numCtlModes, isHt40CtlMode,
@@ -918,7 +918,7 @@ static bool ath9k_hw_set_4k_power_per_rate_table(struct ath_hw *ah,for (i =0 ; (i <AR5416_NUM_CTLS ) && pEepData->ctlIndex[i]; i++) { - DPRINTF(ah->ah_sc, ATH_DBG_POWER_MGMT, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, " LOOP-Ctlidx %d: cfgCtl 0x%2.2x " "pCtlMode 0x%2.2x ctlIndex 0x%2.2x " "chan %d\n",
@@ -941,7 +941,7 @@ static bool ath9k_hw_set_4k_power_per_rate_table(struct ath_hw *ah,IS_CHAN_2GHZ (chan), AR5416_EEP4K_NUM_BAND_EDGES); - DPRINTF(ah->ah_sc, ATH_DBG_POWER_MGMT, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, " MATCH-EE_IDX %d: ch %d is2 %d " "2xMinEdge %d chainmask %d chains %d\n", i, freq, IS_CHAN_2GHZ(chan),
@@ -961,7 +961,7 @@ static bool ath9k_hw_set_4k_power_per_rate_table(struct ath_hw *ah, minCtlPower = (u8 )min (twiceMaxEdgePower, scaledPower); - DPRINTF(ah->ah_sc, ATH_DBG_POWER_MGMT, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, " SEL-Min ctlMode %d pCtlMode %d " "2xMaxEdge %d sP %d minCtlPwr %d\n", ctlMode, pCtlMode[ctlMode], twiceMaxEdgePower,
@@ -2234,11 +2234,11 @@ static bool ath9k_hw_set_def_power_cal_table(struct ath_hw *ah, ((pdadcValues[4 * j +3 ] &0xFF ) <<24 );REG_WRITE (ah, regOffset, reg32); -DPRINTF (ah->ah_sc,ATH_DBG_REG_IO , +DPRINTF (ah->ah_sc,ATH_DBG_EEPROM ,"PDADC (%d,%4x): %4.4x %8.8x\n" , i, regChainOffset, regOffset, reg32); -DPRINTF (ah->ah_sc,ATH_DBG_REG_IO , +DPRINTF (ah->ah_sc,ATH_DBG_EEPROM ,"PDADC: Chain %d | PDADC %3d " "Value %3d | PDADC %3d Value %3d | " "PDADC %3d Value %3d | PDADC %3d "
@@ -2415,14 +2415,14 @@ static bool ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah, ah->eep_ops->get_eeprom_rev(ah) <= 2) twiceMaxEdgePower =AR5416_MAX_RATE_POWER ; -DPRINTF (ah->ah_sc,ATH_DBG_POWER_MGMT , +DPRINTF (ah->ah_sc,ATH_DBG_EEPROM ,"LOOP-Mode ctlMode %d < %d, isHt40CtlMode %d, " "EXT_ADDITIVE %d\n" , ctlMode, numCtlModes, isHt40CtlMode, (pCtlMode[ctlMode] &EXT_ADDITIVE ));for (i =0 ; (i <AR5416_NUM_CTLS ) && pEepData->ctlIndex[i]; i++) { - DPRINTF(ah->ah_sc, ATH_DBG_POWER_MGMT, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, " LOOP-Ctlidx %d: cfgCtl 0x%2.2x " "pCtlMode 0x%2.2x ctlIndex 0x%2.2x " "chan %d\n",
@@ -2441,7 +2441,7 @@ static bool ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah, rep->ctlEdges[ar5416_get_ntxchains (tx_chainmask) -1 ], IS_CHAN_2GHZ(chan), AR5416_NUM_BAND_EDGES); - DPRINTF(ah->ah_sc, ATH_DBG_POWER_MGMT, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, " MATCH-EE_IDX %d: ch %d is2 %d " "2xMinEdge %d chainmask %d chains %d\n", i, freq, IS_CHAN_2GHZ(chan),
@@ -2460,7 +2460,7 @@ static bool ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah, minCtlPower =min (twiceMaxEdgePower, scaledPower); - DPRINTF(ah->ah_sc, ATH_DBG_POWER_MGMT, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, " SEL-Min ctlMode %d pCtlMode %d " "2xMaxEdge %d sP %d minCtlPwr %d\n", ctlMode, pCtlMode[ctlMode], twiceMaxEdgePower,
drivers/net/wireless/ath9k/hw.c +44 -57
297 lines not on this page · raw message
drivers/net/wireless/ath9k/mac.c +37 -26
172 lines not on this page · raw message
drivers/net/wireless/ath9k/main.c +3 -3
@@ -674,7 +674,7 @@ static int ath_setkey_tkip(struct ath_softc *sc, u16 keyix, const u8 *key,memcpy (hk->kv_mic, key_txmic,sizeof (hk->kv_mic));if (!ath9k_hw_set_keycache_entry (sc->sc_ah, keyix, hk,NULL )) {/* TX MIC entry failed. No need to proceed further */ -DPRINTF (sc,ATH_DBG_KEYCACHE , +DPRINTF (sc,ATH_DBG_FATAL ,"Setting TX MIC Key Failed\n" );return 0 ; }
@@ -1401,7 +1401,7 @@ static int ath_init(u16 devid, struct ath_softc *sc)/* Get the hardware key cache size. */ sc->keymax = ah->caps.keycache_size;if (sc->keymax >ATH_KEYMAX ) { -DPRINTF (sc,ATH_DBG_KEYCACHE , +DPRINTF (sc,ATH_DBG_ANY ,"Warning, using only %u entries in %u key cache\n" ,ATH_KEYMAX , sc->keymax); sc->keymax =ATH_KEYMAX ;
@@ -2603,7 +2603,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw,mutex_lock (&sc->mutex);ath9k_ps_wakeup (sc); -DPRINTF (sc,ATH_DBG_KEYCACHE ,"Set HW Key\n" ); +DPRINTF (sc,ATH_DBG_CONFIG ,"Set HW Key\n" );switch (cmd) {case SET_KEY :
drivers/net/wireless/ath9k/phy.c +2 -2
@@ -46,7 +46,7 @@ ath9k_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) channelSel = ((freq -704 ) *2 -3040 ) /10 ; bModeSynth =1 ; }else { -DPRINTF (ah->ah_sc,ATH_DBG_CHANNEL , +DPRINTF (ah->ah_sc,ATH_DBG_FATAL ,"Invalid channel %u MHz\n" , freq);return false; }
@@ -79,7 +79,7 @@ ath9k_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) channelSel =ath9k_hw_reverse_bits ((freq -4800 ) /5 ,8 ); aModeRefSel =ath9k_hw_reverse_bits (1 ,2 ); }else { -DPRINTF (ah->ah_sc,ATH_DBG_CHANNEL , +DPRINTF (ah->ah_sc,ATH_DBG_FATAL ,"Invalid channel %u MHz\n" , freq);return false; }
drivers/net/wireless/ath9k/phy.h +0 -3
@@ -556,9 +556,6 @@ bool ath9k_hw_init_rf(struct ath_hw *ah,int r; \for (r =0 ; r < ((iniarray)->ia_rows); r++) { \REG_WRITE (ah,INI_RA ((iniarray), r,0 ), (regData)[r]); \ -DPRINTF (ah->ah_sc,ATH_DBG_CHANNEL , \ -"RF 0x%x V 0x%x\n" , \ -INI_RA ((iniarray), r,0 ), (regData)[r]); \DO_DELAY (regWr); \ } \ }while (0 )
drivers/net/wireless/ath9k/recv.c +2 -2
@@ -320,7 +320,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) bf->bf_buf_addr))) {dev_kfree_skb_any (skb); bf->bf_mpdu =NULL ; -DPRINTF (sc,ATH_DBG_CONFIG , +DPRINTF (sc,ATH_DBG_FATAL ,"dma_mapping_error() on RX init\n" ); error = -ENOMEM ;break ;
@@ -673,7 +673,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) bf->bf_buf_addr))) {dev_kfree_skb_any (requeue_skb); bf->bf_mpdu =NULL ; -DPRINTF (sc,ATH_DBG_CONFIG , +DPRINTF (sc,ATH_DBG_FATAL ,"dma_mapping_error() on RX\n" );break ; }
Signature · 1 line
1.6.2.1