ath: Rename ath_print to ath_debug
Subsystems (4)
PATCH 1/1 ath: Rename ath_print to ath_debug
Make the function name match the function purpose. ath_debug is a debug only facility.ath_print seems too generic a name for a debug only use.
Removed an unnecessary trailing space in htc_drv_main.c
--- drivers/net/wireless/ath/ath9k/ahb.c | 2 +- drivers/net/wireless/ath/ath9k/ani.c | 24 +++--- drivers/net/wireless/ath/ath9k/ar5008_phy.c | 46 ++++++------ drivers/net/wireless/ath/ath9k/ar9002_calib.c | 78 ++++++++++---------- drivers/net/wireless/ath/ath9k/ar9002_hw.c | 2 +- drivers/net/wireless/ath/ath9k/ar9002_mac.c | 10 ++-- drivers/net/wireless/ath/ath9k/ar9003_calib.c | 76 ++++++++++---------- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 68 +++++++++--------- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 6 +- drivers/net/wireless/ath/ath9k/ar9003_phy.c | 38 +++++----- drivers/net/wireless/ath/ath9k/beacon.c | 36 +++++----- drivers/net/wireless/ath/ath9k/calib.c | 18 +++--- drivers/net/wireless/ath/ath9k/common.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 24 +++--- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 18 +++--- drivers/net/wireless/ath/ath9k/eeprom_def.c | 24 +++--- drivers/net/wireless/ath/ath9k/gpio.c | 10 ++-- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 10 ++-- drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 8 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 28 ++++---- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 82 +++++++++++----------- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 16 ++-- drivers/net/wireless/ath/ath9k/hw.c | 78 ++++++++++---------- drivers/net/wireless/ath/ath9k/init.c | 12 ++-- drivers/net/wireless/ath/ath9k/mac.c | 58 ++++++++-------- drivers/net/wireless/ath/ath9k/main.c | 88 +++++++++++----------- drivers/net/wireless/ath/ath9k/pci.c | 2 +- drivers/net/wireless/ath/ath9k/rc.c | 8 +- drivers/net/wireless/ath/ath9k/recv.c | 24 +++--- drivers/net/wireless/ath/ath9k/virtual.c | 2 +- drivers/net/wireless/ath/ath9k/wmi.c | 6 +- drivers/net/wireless/ath/ath9k/xmit.c | 36 +++++----- drivers/net/wireless/ath/debug.c | 4 +- drivers/net/wireless/ath/debug.h | 4 +- drivers/net/wireless/ath/key.c | 16 ++-- 36 files changed, 483 insertions(+), 483 deletions(-)
drivers/net/wireless/ath/ath9k/ahb.c +1 -1
@@ -35,7 +35,7 @@ static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data) pdata = (struct ath9k_platform_data *) pdev->dev.platform_data;if (off >= (ARRAY_SIZE (pdata->eeprom_data))) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"%s: flash read failed, offset %08x " "is out of range\n" , __func__, off);
drivers/net/wireless/ath/ath9k/ani.c +12 -12
@@ -135,7 +135,7 @@ static void ath9k_ani_restart(struct ath_hw *ah) cck_base =AR_PHY_COUNTMAX - ah->config.cck_trig_high; } -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Writing ofdmbase=%u cckbase=%u\n" , ofdm_base, cck_base);ENABLE_REGWRITE_BUFFER (ah);
@@ -267,7 +267,7 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel) aniState->noiseFloor =BEACON_RSSI (ah); - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", aniState->ofdmNoiseImmunityLevel, immunityLevel, aniState->noiseFloor,
@@ -334,7 +334,7 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel)const struct ani_cck_level_entry *entry_cck; aniState->noiseFloor =BEACON_RSSI (ah); - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", aniState->cckNoiseImmunityLevel, immunityLevel, aniState->noiseFloor, aniState->rssiThrLow,
@@ -478,7 +478,7 @@ static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning)if (ah->opmode !=NL80211_IFTYPE_STATION && ah->opmode !=NL80211_IFTYPE_ADHOC ) { -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Reset ANI state opmode %u\n" , ah->opmode); ah->stats.ast_ani_reset++;
@@ -584,7 +584,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) ATH9K_ANI_OFDM_DEF_LEVEL || aniState->cckNoiseImmunityLevel != ATH9K_ANI_CCK_DEF_LEVEL) { - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "Restore defaults: opmode %u " "chan %d Mhz/0x%x is_scanning=%d " "ofdm:%d cck:%d\n",
@@ -602,7 +602,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)/* * restore historical levels for this channel */ - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "Restore history: opmode %u " "chan %d Mhz/0x%x is_scanning=%d " "ofdm:%d cck:%d\n",
@@ -666,7 +666,7 @@ static bool ath9k_hw_ani_read_counters(struct ath_hw *ah)if (!use_new_ani (ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {if (phyCnt1 < ofdm_base) { -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"phyCnt1 0x%x, resetting " "counter value to 0x%x\n" , phyCnt1, ofdm_base);
@@ -675,7 +675,7 @@ static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) AR_PHY_ERR_OFDM_TIMING); }if (phyCnt2 < cck_base) { -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"phyCnt2 0x%x, resetting " "counter value to 0x%x\n" , phyCnt2, cck_base);
@@ -719,7 +719,7 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan) cckPhyErrRate = aniState->cckPhyErrCount *1000 / aniState->listenTime; - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "listenTime=%d OFDM:%d errs=%d/s CCK:%d " "errs=%d/s ofdm_turn=%d\n", aniState->listenTime,
@@ -755,7 +755,7 @@ void ath9k_enable_mib_counters(struct ath_hw *ah) {struct ath_common *common =ath9k_hw_common (ah); -ath_print (common,ATH_DBG_ANI ,"Enable MIB counters\n" ); +ath_debug (common,ATH_DBG_ANI ,"Enable MIB counters\n" );ath9k_hw_update_mibstats (ah, &ah->ah_mibStats);
@@ -777,7 +777,7 @@ void ath9k_hw_disable_mib_counters(struct ath_hw *ah) {struct ath_common *common =ath9k_hw_common (ah); -ath_print (common,ATH_DBG_ANI ,"Disable MIB counters\n" ); +ath_debug (common,ATH_DBG_ANI ,"Disable MIB counters\n" );REG_WRITE (ah,AR_MIBC ,AR_MIBC_FMC );ath9k_hw_update_mibstats (ah, &ah->ah_mibStats);
@@ -852,7 +852,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah)struct ath_common *common =ath9k_hw_common (ah);int i; -ath_print (common,ATH_DBG_ANI ,"Initialize ANI\n" ); +ath_debug (common,ATH_DBG_ANI ,"Initialize ANI\n" );if (use_new_ani (ah)) { ah->config.ofdm_trig_high =ATH9K_ANI_OFDM_TRIG_HIGH_NEW ;
drivers/net/wireless/ath/ath9k/ar5008_phy.c +23 -23
172 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9002_calib.c +39 -39
244 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9002_hw.c +1 -1
@@ -494,7 +494,7 @@ int ar9002_hw_rf_claim(struct ath_hw *ah)case AR_RAD2122_SREV_MAJOR :break ;default : -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , +ath_debug (ath9k_hw_common (ah),ATH_DBG_FATAL ,"Radio Chip Rev 0x%02X not supported\n" , val &AR_RADIO_SREV_MAJOR );return -EOPNOTSUPP ;
drivers/net/wireless/ath/ath9k/ar9002_mac.c +5 -5
@@ -111,7 +111,7 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) }if (isr &AR_ISR_RXORN ) { -ath_print (common,ATH_DBG_INTERRUPT , +ath_debug (common,ATH_DBG_INTERRUPT ,"receive FIFO overrun interrupt\n" ); }
@@ -147,24 +147,24 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)if (fatal_int) {if (sync_cause &AR_INTR_SYNC_HOST1_FATAL ) { -ath_print (common,ATH_DBG_ANY , +ath_debug (common,ATH_DBG_ANY ,"received PCI FATAL interrupt\n" ); }if (sync_cause &AR_INTR_SYNC_HOST1_PERR ) { -ath_print (common,ATH_DBG_ANY , +ath_debug (common,ATH_DBG_ANY ,"received PCI PERR interrupt\n" ); } *masked |=ATH9K_INT_FATAL ; }if (sync_cause &AR_INTR_SYNC_RADM_CPL_TIMEOUT ) { -ath_print (common,ATH_DBG_INTERRUPT , +ath_debug (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 ) { -ath_print (common,ATH_DBG_INTERRUPT , +ath_debug (common,ATH_DBG_INTERRUPT ,"AR_INTR_SYNC_LOCAL_TIMEOUT\n" ); }
drivers/net/wireless/ath/ath9k/ar9003_calib.c +38 -38
271 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +34 -34
245 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9003_mac.c +3 -3
@@ -182,7 +182,7 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) }if (sync_cause &AR_INTR_SYNC_LOCAL_TIMEOUT ) -ath_print (common,ATH_DBG_INTERRUPT , +ath_debug (common,ATH_DBG_INTERRUPT ,"AR_INTR_SYNC_LOCAL_TIMEOUT\n" );REG_WRITE (ah,AR_INTR_SYNC_CAUSE_CLR , sync_cause);
@@ -249,7 +249,7 @@ static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds,if ((MS (ads->ds_info, AR_DescId) !=ATHEROS_VENDOR_ID ) || (MS (ads->ds_info, AR_TxRxDesc) !=1 )) { -ath_print (ath9k_hw_common (ah),ATH_DBG_XMIT , +ath_debug (ath9k_hw_common (ah),ATH_DBG_XMIT ,"Tx Descriptor error %x\n" , ads->ds_info);memset (ads,0 ,sizeof (*ads));return -EIO ;
@@ -658,7 +658,7 @@ void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah)memset ((void *) ah->ts_ring,0 , ah->ts_size *sizeof (struct ar9003_txs )); -ath_print (ath9k_hw_common (ah),ATH_DBG_XMIT , +ath_debug (ath9k_hw_common (ah),ATH_DBG_XMIT ,"TS Start 0x%x End 0x%x Virt %p, Size %d\n" , ah->ts_paddr_start, ah->ts_paddr_end, ah->ts_ring, ah->ts_size);
drivers/net/wireless/ath/ath9k/ar9003_phy.c +19 -19
@@ -820,7 +820,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);if (!on != aniState->ofdmWeakSigDetectOff) { - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "** ch %d: ofdm weak signal: %s=>%s\n", chan->channel, !aniState->ofdmWeakSigDetectOff ?
@@ -838,7 +838,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,u32 level = param;if (level >=ARRAY_SIZE (firstep_table)) { - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "ATH9K_ANI_FIRSTEP_LEVEL: level " "out of range (%u > %u)\n", level,
@@ -877,7 +877,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW, value2);if (level != aniState->firstepLevel) { - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "** ch %d: level %d=>%d[def:%d] " "firstep[level]=%d ini=%d\n", chan->channel,
@@ -886,7 +886,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,ATH9K_ANI_FIRSTEP_LVL_NEW , value, aniState->iniDef.firstep); - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "** ch %d: level %d=>%d[def:%d] " "firstep_low[level]=%d ini=%d\n", chan->channel,
@@ -907,7 +907,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,u32 level = param;if (level >=ARRAY_SIZE (cycpwrThr1_table)) { - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level " "out of range (%u > %u)\n", level,
@@ -945,7 +945,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, AR_PHY_EXT_CYCPWR_THR1, value2);if (level != aniState->spurImmunityLevel) { - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "** ch %d: level %d=>%d[def:%d] " "cycpwrThr1[level]=%d ini=%d\n", chan->channel,
@@ -954,7 +954,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,ATH9K_ANI_SPUR_IMMUNE_LVL_NEW , value, aniState->iniDef.cycpwrThr1); - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "** ch %d: level %d=>%d[def:%d] " "cycpwrThr1Ext[level]=%d ini=%d\n", chan->channel,
@@ -982,7 +982,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,REG_RMW_FIELD (ah,AR_PHY_MRC_CCK_CTRL ,AR_PHY_MRC_CCK_MUX_REG , is_on);if (!is_on != aniState->mrcCCKOff) { - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "** ch %d: MRC CCK: %s=>%s\n", chan->channel, !aniState->mrcCCKOff ? "on" : "off",
@@ -998,12 +998,12 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,case ATH9K_ANI_PRESENT :break ;default : -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"invalid cmd %u\n" , cmd);return false; } - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "ANI parameters: SI=%d, ofdmWS=%s FS=%d " "MRCcck=%s listenTime=%d " "ofdmErrs=%d cckErrs=%d\n",
@@ -1070,7 +1070,7 @@ static void ar9003_hw_ani_cache_ini_regs(struct ath_hw *ah) aniState = &ah->curchan->ani; iniDef = &aniState->iniDef; - ath_print(common, ATH_DBG_ANI, + ath_debug(common, ATH_DBG_ANI, "ver %d.%d opmode %u chan %d Mhz/0x%x\n", ah->hw_version.macVersion, ah->hw_version.macRev,
@@ -1212,7 +1212,7 @@ void ar9003_hw_bb_watchdog_config(struct ath_hw *ah) ~(AR_PHY_WATCHDOG_NON_IDLE_ENABLE | AR_PHY_WATCHDOG_IDLE_ENABLE)); -ath_print (common,ATH_DBG_RESET ,"Disabled BB Watchdog\n" ); +ath_debug (common,ATH_DBG_RESET ,"Disabled BB Watchdog\n" );return ; }
@@ -1248,7 +1248,7 @@ void ar9003_hw_bb_watchdog_config(struct ath_hw *ah)AR_PHY_WATCHDOG_IDLE_MASK | (AR_PHY_WATCHDOG_NON_IDLE_MASK & (idle_count << 2))); -ath_print (common,ATH_DBG_RESET , +ath_debug (common,ATH_DBG_RESET ,"Enabled BB Watchdog timeout (%u ms)\n" , idle_tmo_ms); }
@@ -1278,9 +1278,9 @@ void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah)return ; status = ah->bb_watchdog_last_status; -ath_print (common,ATH_DBG_RESET , +ath_debug (common,ATH_DBG_RESET ,"\n==== BB update: BB status=0x%08x ====\n" , status); - ath_print(common, ATH_DBG_RESET, + ath_debug(common, ATH_DBG_RESET, "** BB state: wd=%u det=%u rdar=%u rOFDM=%d " "rCCK=%u tOFDM=%u tCCK=%u agc=%u src=%u **\n", MS(status, AR_PHY_WATCHDOG_INFO),
@@ -1293,22 +1293,22 @@ void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah)MS (status,AR_PHY_WATCHDOG_AGC_SM ), MS(status,AR_PHY_WATCHDOG_SRCH_SM)); -ath_print (common,ATH_DBG_RESET , +ath_debug (common,ATH_DBG_RESET ,"** BB WD cntl: cntl1=0x%08x cntl2=0x%08x **\n" ,REG_READ (ah,AR_PHY_WATCHDOG_CTL_1 ),REG_READ (ah,AR_PHY_WATCHDOG_CTL_2 )); -ath_print (common,ATH_DBG_RESET , +ath_debug (common,ATH_DBG_RESET ,"** BB mode: BB_gen_controls=0x%08x **\n" ,REG_READ (ah,AR_PHY_GEN_CTRL ));#define PCT (_field) (common->cc_survey._field * 100 / common->cc_survey.cycles)if (common->cc_survey.cycles) -ath_print (common,ATH_DBG_RESET , +ath_debug (common,ATH_DBG_RESET ,"** BB busy times: rx_clear=%d%%, " "rx_frame=%d%%, tx_frame=%d%% **\n" ,PCT (rx_busy),PCT (rx_frame),PCT (tx_frame)); -ath_print (common,ATH_DBG_RESET , +ath_debug (common,ATH_DBG_RESET ,"==== BB update: done ====\n\n" ); }EXPORT_SYMBOL (ar9003_hw_bb_watchdog_dbg_info);
drivers/net/wireless/ath/ath9k/beacon.c +18 -18
@@ -46,7 +46,7 @@ int ath_beaconq_config(struct ath_softc *sc) }if (!ath9k_hw_set_txq_props (ah, sc->beacon.beaconq, &qi)) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to update h/w beacon queue parameters\n" );return 0 ; }else {
@@ -119,11 +119,11 @@ static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)memset (&txctl,0 ,sizeof (struct ath_tx_control )); txctl.txq = sc->beacon.cabq; -ath_print (common,ATH_DBG_XMIT , +ath_debug (common,ATH_DBG_XMIT ,"transmitting CABQ packet, skb: %p\n" , skb);if (ath_tx_start (hw, skb, &txctl) !=0 ) { -ath_print (common,ATH_DBG_XMIT ,"CABQ TX failed\n" ); +ath_debug (common,ATH_DBG_XMIT ,"CABQ TX failed\n" );dev_kfree_skb_any (skb); } }
@@ -188,7 +188,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,dev_kfree_skb_any (skb); bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"dma_mapping_error on beaconing\n" );return NULL ; }
@@ -209,7 +209,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,if (skb && cabq_depth) {if (sc->nvifs >1 ) { -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"Flushing previous cabq traffic\n" );ath_draintxq (sc, cabq, false); }
@@ -282,7 +282,7 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)/* NB: the beacon data buffer must be 32-bit aligned. */ skb =ieee80211_beacon_get (sc->hw, vif);if (skb ==NULL ) { -ath_print (common,ATH_DBG_BEACON ,"cannot get skb\n" ); +ath_debug (common,ATH_DBG_BEACON ,"cannot get skb\n" );return -ENOMEM ; }
@@ -306,7 +306,7 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) tsfadjust = intval * avp->av_bslot /ATH_BCBUF ; avp->tsf_adjust =cpu_to_le64 (TU_TO_USEC (tsfadjust)); -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"stagger beacons, bslot %d intval " "%u tsfadjust %llu\n" , avp->av_bslot, intval, (unsigned long long )tsfadjust);
@@ -323,7 +323,7 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)dev_kfree_skb_any (skb); bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"dma_mapping_error on beacon alloc\n" );return -ENOMEM ; }
@@ -381,12 +381,12 @@ void ath_beacon_tasklet(unsigned long data) sc->beacon.bmisscnt++;if (sc->beacon.bmisscnt <BSTUCK_THRESH ) { -ath_print (common,ATH_DBG_BSTUCK , +ath_debug (common,ATH_DBG_BSTUCK ,"missed %u consecutive beacons\n" , sc->beacon.bmisscnt);ath9k_hw_bstuck_nfcal (ah); }else if (sc->beacon.bmisscnt >=BSTUCK_THRESH ) { -ath_print (common,ATH_DBG_BSTUCK , +ath_debug (common,ATH_DBG_BSTUCK ,"beacon is officially stuck\n" ); sc->sc_flags |=SC_OP_TSF_RESET ;ath_reset (sc, true);
@@ -396,7 +396,7 @@ void ath_beacon_tasklet(unsigned long data) }if (sc->beacon.bmisscnt !=0 ) { -ath_print (common,ATH_DBG_BSTUCK , +ath_debug (common,ATH_DBG_BSTUCK ,"resume beacon xmit after %u misses\n" , sc->beacon.bmisscnt); sc->beacon.bmisscnt =0 ;
@@ -424,7 +424,7 @@ void ath_beacon_tasklet(unsigned long data) vif = sc->beacon.bslot[slot]; aphy = sc->beacon.bslot_aphy[slot]; -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"slot %d [tsf %llu tsftu %u intval %u] vif %p\n" , slot, tsf, tsftu, intval, vif);
@@ -468,7 +468,7 @@ void ath_beacon_tasklet(unsigned long data)* are still pending on the queue. */ if (!ath9k_hw_stoptxdma (ah, sc->beacon.beaconq)) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"beacon queue %u did not stop?\n" , sc->beacon.beaconq); }
@@ -555,7 +555,7 @@ static void ath_beacon_config_sta(struct ath_softc *sc,/* No need to configure beacon if we are not associated */ if (!common->curaid) { -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"STA is not yet associated..skipping beacon config\n" );return ; }
@@ -649,8 +649,8 @@ static void ath_beacon_config_sta(struct ath_softc *sc,/* TSF out of range threshold fixed at 1 second */ bs.bs_tsfoor_threshold =ATH9K_TSFOOR_THRESHOLD ; -ath_print (common,ATH_DBG_BEACON ,"tsf: %llu tsftu: %u\n" , tsf, tsftu); -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"tsf: %llu tsftu: %u\n" , tsf, tsftu); +ath_debug (common,ATH_DBG_BEACON ,"bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n" , bs.bs_bmissthreshold, bs.bs_sleepduration, bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext);
@@ -689,7 +689,7 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, nexttbtt += intval; }while (nexttbtt < tsftu); -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"IBSS nexttbtt %u intval %u (%u)\n" , nexttbtt, intval, conf->beacon_interval);
@@ -754,7 +754,7 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)ath_beacon_config_sta (sc, cur_conf);break ;default : -ath_print (common,ATH_DBG_CONFIG , +ath_debug (common,ATH_DBG_CONFIG ,"Unsupported beaconing mode\n" );return ; }
drivers/net/wireless/ath/ath9k/calib.c +9 -9
@@ -97,7 +97,7 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,if (h[i].privNF > limit->max) { high_nf_mid = true; - ath_print(common, ATH_DBG_CALIBRATE, + ath_debug(common, ATH_DBG_CALIBRATE, "NFmid[%d] (%d) > MAX (%d), %s\n", i, h[i].privNF, limit->max, (cal->nfcal_interference ?
@@ -180,7 +180,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah)return true;if (currCal->calState !=CAL_DONE ) { -ath_print (common,ATH_DBG_CALIBRATE , +ath_debug (common,ATH_DBG_CALIBRATE ,"Calibration state incorrect, %d\n" , currCal->calState);return true;
@@ -189,7 +189,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah)if (!(ah->supp_cals & currCal->calData->calType))return true; -ath_print (common,ATH_DBG_CALIBRATE , +ath_debug (common,ATH_DBG_CALIBRATE ,"Resetting Cal %d state for channel %u\n" , currCal->calData->calType, conf->channel->center_freq);
@@ -279,7 +279,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)* noisefloor until the next calibration timer. */ if (j ==1000 ) { -ath_print (common,ATH_DBG_ANY ,"Timeout while waiting for nf " +ath_debug (common,ATH_DBG_ANY ,"Timeout while waiting for nf " "to load: AR_PHY_AGC_CONTROL=0x%x\n" ,REG_READ (ah,AR_PHY_AGC_CONTROL ));return ;
@@ -318,17 +318,17 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf)if (!nf[i])continue ; -ath_print (common,ATH_DBG_CALIBRATE , +ath_debug (common,ATH_DBG_CALIBRATE ,"NF calibrated [%s] [chain %d] is %d\n" , (i >=3 ?"ext" :"ctl" ), i %3 , nf[i]);if (nf[i] >ATH9K_NF_TOO_HIGH ) { -ath_print (common,ATH_DBG_CALIBRATE , +ath_debug (common,ATH_DBG_CALIBRATE ,"NF[%d] (%d) > MAX (%d), correcting to MAX" , i, nf[i],ATH9K_NF_TOO_HIGH ); nf[i] = limit->max; }else if (nf[i] < limit->min) { -ath_print (common,ATH_DBG_CALIBRATE , +ath_debug (common,ATH_DBG_CALIBRATE ,"NF[%d] (%d) < MIN (%d), correcting to NOM" , i, nf[i], limit->min); nf[i] = limit->nominal;
@@ -347,7 +347,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) chan->channelFlags &= (~CHANNEL_CW_INT );if (REG_READ (ah,AR_PHY_AGC_CONTROL ) &AR_PHY_AGC_CONTROL_NF ) { -ath_print (common,ATH_DBG_CALIBRATE , +ath_debug (common,ATH_DBG_CALIBRATE ,"NF did not complete in calibration window\n" );return false; }
@@ -357,7 +357,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) nf = nfarray[0 ];if (ath9k_hw_get_nf_thresh (ah, c->band, &nfThresh) && nf > nfThresh) { -ath_print (common,ATH_DBG_CALIBRATE , +ath_debug (common,ATH_DBG_CALIBRATE ,"noise floor failed detected; " "detected %d, threshold %d\n" , nf, nfThresh);
drivers/net/wireless/ath/ath9k/common.c +1 -1
@@ -180,7 +180,7 @@ void ath9k_cmn_btcoex_bt_stomp(struct ath_common *common, AR_STOMP_NONE_WLAN_WGHT);break ;default : -ath_print (common,ATH_DBG_BTCOEX , +ath_debug (common,ATH_DBG_BTCOEX ,"Invalid Stomptype\n" );break ; }
drivers/net/wireless/ath/ath9k/eeprom.c +1 -1
@@ -273,7 +273,7 @@ void ath9k_hw_update_regulatory_maxpower(struct ath_hw *ah) regulatory->max_power_level +=INCREASE_MAXPOW_BY_THREE_CHAIN ;break ;default : -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Invalid chainmask configuration\n" );break ; }
drivers/net/wireless/ath/ath9k/eeprom_4k.c +12 -12
@@ -37,13 +37,13 @@ static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) eep_start_loc =64 ;if (!ath9k_hw_use_flash (ah)) { -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Reading from EEPROM, not flash\n" ); }for (addr =0 ; addr <SIZE_EEPROM_4K ; addr++) {if (!ath9k_hw_nvram_read (common, addr + eep_start_loc, eep_data)) { -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Unable to read eeprom region\n" );return false; }
@@ -69,12 +69,12 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)if (!ath9k_hw_use_flash (ah)) {if (!ath9k_hw_nvram_read (common,AR5416_EEPROM_MAGIC_OFFSET , &magic)) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Reading Magic # failed\n" );return false; } -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Read Magic = 0x%04X\n" , magic);if (magic !=AR5416_EEPROM_MAGIC ) {
@@ -90,7 +90,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) eepdata++; } }else { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Invalid EEPROM Magic. " "endianness mismatch.\n" );return -EINVAL ;
@@ -98,7 +98,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) } } -ath_print (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , +ath_debug (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , need_swap ?"True" :"False" );if (need_swap)
@@ -120,7 +120,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)u32 integer;u16 word; -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"EEPROM Endianness is not native.. Changing\n" ); word =swab16 (eep->baseEepHeader.length);
@@ -163,7 +163,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)if (sum !=0xffff || ah->eep_ops->get_eeprom_ver (ah) !=AR5416_EEP_VER || ah->eep_ops->get_eeprom_rev (ah) <AR5416_EEP_NO_BACK_VER ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , sum, ah->eep_ops->get_eeprom_ver (ah));return -EINVAL ;
@@ -488,11 +488,11 @@ static void ath9k_hw_set_4k_power_cal_table(struct ath_hw *ah, ((pdadcValues[4 * j +3 ] &0xFF ) <<24 );REG_WRITE (ah, regOffset, reg32); -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"PDADC (%d,%4x): %4.4x %8.8x\n" , i, regChainOffset, regOffset, reg32); -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"PDADC: Chain %d | " "PDADC %3d Value %3d | " "PDADC %3d Value %3d | "
@@ -1181,7 +1181,7 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)u16 spur_val =AR_NO_SPUR ; -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Getting spur idx %d is2Ghz. %d val %x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);
@@ -1190,7 +1190,7 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)break ;case SPUR_ENABLE_IOCTL : spur_val = ah->config.spurchans[i][is2GHz]; -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Getting spur val from new loc. %d\n" , spur_val);break ;case SPUR_ENABLE_EEPROM :
drivers/net/wireless/ath/ath9k/eeprom_9287.c +9 -9
@@ -43,14 +43,14 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) eep_start_loc =AR9287_HTC_EEP_START_LOC ;if (!ath9k_hw_use_flash (ah)) { -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Reading from EEPROM, not flash\n" ); }for (addr =0 ; addr <NUM_EEP_WORDS ; addr++) {if (!ath9k_hw_nvram_read (common, addr + eep_start_loc, eep_data)) { -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Unable to read eeprom region\n" );return false; }
@@ -72,12 +72,12 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)if (!ath9k_hw_use_flash (ah)) {if (!ath9k_hw_nvram_read (common,AR5416_EEPROM_MAGIC_OFFSET , &magic)) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Reading Magic # failed\n" );return false; } -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Read Magic = 0x%04X\n" , magic);if (magic !=AR5416_EEPROM_MAGIC ) {
@@ -93,7 +93,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) eepdata++; } }else { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Invalid EEPROM Magic. " "Endianness mismatch.\n" );return -EINVAL ;
@@ -101,7 +101,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) } } -ath_print (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , +ath_debug (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , need_swap ?"True" :"False" );if (need_swap)
@@ -160,7 +160,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)if (sum !=0xffff || ah->eep_ops->get_eeprom_ver (ah) !=AR9287_EEP_VER || ah->eep_ops->get_eeprom_rev (ah) <AR5416_EEP_NO_BACK_VER ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , sum, ah->eep_ops->get_eeprom_ver (ah));return -EINVAL ;
@@ -1152,7 +1152,7 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,struct ath_common *common =ath9k_hw_common (ah);u16 spur_val =AR_NO_SPUR ; -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Getting spur idx %d is2Ghz. %d val %x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);
@@ -1161,7 +1161,7 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,break ;case SPUR_ENABLE_IOCTL : spur_val = ah->config.spurchans[i][is2GHz]; -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Getting spur val from new loc. %d\n" , spur_val);break ;case SPUR_ENABLE_EEPROM :
drivers/net/wireless/ath/ath9k/eeprom_def.c +12 -12
@@ -96,7 +96,7 @@ static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah)for (addr =0 ; addr <SIZE_EEPROM_DEF ; addr++) {if (!ath9k_hw_nvram_read (common, addr + ar5416_eep_start_loc, eep_data)) { -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , +ath_debug (ath9k_hw_common (ah),ATH_DBG_FATAL ,"Unable to read eeprom region\n" );return false; }
@@ -117,12 +117,12 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)int i, addr, size;if (!ath9k_hw_nvram_read (common,AR5416_EEPROM_MAGIC_OFFSET , &magic)) { -ath_print (common,ATH_DBG_FATAL ,"Reading Magic # failed\n" ); +ath_debug (common,ATH_DBG_FATAL ,"Reading Magic # failed\n" );return false; }if (!ath9k_hw_use_flash (ah)) { -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"Read Magic = 0x%04X\n" , magic);if (magic !=AR5416_EEPROM_MAGIC ) {
@@ -139,7 +139,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) eepdata++; } }else { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Invalid EEPROM Magic. " "Endianness mismatch.\n" );return -EINVAL ;
@@ -147,7 +147,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) } } -ath_print (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , +ath_debug (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , need_swap ?"True" :"False" );if (need_swap)
@@ -169,7 +169,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)u32 integer, j;u16 word; -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"EEPROM Endianness is not native.. Changing.\n" ); word =swab16 (eep->baseEepHeader.length);
@@ -216,7 +216,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)if (sum !=0xffff || ah->eep_ops->get_eeprom_ver (ah) !=AR5416_EEP_VER || ah->eep_ops->get_eeprom_rev (ah) <AR5416_EEP_NO_BACK_VER ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , sum, ah->eep_ops->get_eeprom_ver (ah));return -EINVAL ;
@@ -965,11 +965,11 @@ static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah, ((pdadcValues[4 * j +3 ] &0xFF ) <<24 );REG_WRITE (ah, regOffset, reg32); -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"PDADC (%d,%4x): %4.4x %8.8x\n" , i, regChainOffset, regOffset, reg32); -ath_print (common,ATH_DBG_EEPROM , +ath_debug (common,ATH_DBG_EEPROM ,"PDADC: Chain %d | PDADC %3d " "Value %3d | PDADC %3d Value %3d | " "PDADC %3d Value %3d | PDADC %3d "
@@ -1318,7 +1318,7 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah, regulatory->max_power_level +=INCREASE_MAXPOW_BY_THREE_CHAIN ;break ;default : -ath_print (ath9k_hw_common (ah),ATH_DBG_EEPROM , +ath_debug (ath9k_hw_common (ah),ATH_DBG_EEPROM ,"Invalid chainmask configuration\n" );break ; }
@@ -1460,7 +1460,7 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)u16 spur_val =AR_NO_SPUR ; -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Getting spur idx %d is2Ghz. %d val %x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);
@@ -1469,7 +1469,7 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)break ;case SPUR_ENABLE_IOCTL : spur_val = ah->config.spurchans[i][is2GHz]; -ath_print (common,ATH_DBG_ANI , +ath_debug (common,ATH_DBG_ANI ,"Getting spur val from new loc. %d\n" , spur_val);break ;case SPUR_ENABLE_EEPROM :
drivers/net/wireless/ath/ath9k/gpio.c +5 -5
@@ -103,7 +103,7 @@ static int ath_register_led(struct ath_softc *sc, struct ath_led *led, ret =led_classdev_register (wiphy_dev (sc->hw->wiphy), &led->led_cdev);if (ret) -ath_print (ath9k_hw_common (sc->sc_ah),ATH_DBG_FATAL , +ath_debug (ath9k_hw_common (sc->sc_ah),ATH_DBG_FATAL ,"Failed to register led:%s" , led->name);else led->registered =1 ;
@@ -236,12 +236,12 @@ static void ath_detect_bt_priority(struct ath_softc *sc) sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED |SC_OP_BT_SCAN );/* Detect if colocated bt started scanning */ if (btcoex->bt_priority_cnt >=ATH_BT_CNT_SCAN_THRESHOLD ) { -ath_print (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX , +ath_debug (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX ,"BT scan detected" ); sc->sc_flags |= (SC_OP_BT_SCAN |SC_OP_BT_PRIORITY_DETECTED ); }else if (btcoex->bt_priority_cnt >=ATH_BT_CNT_THRESHOLD ) { -ath_print (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX , +ath_debug (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX ,"BT priority traffic detected" ); sc->sc_flags |=SC_OP_BT_PRIORITY_DETECTED ; }
@@ -331,7 +331,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)struct ath_common *common =ath9k_hw_common (ah);bool is_btscan = sc->sc_flags &SC_OP_BT_SCAN ; -ath_print (common,ATH_DBG_BTCOEX , +ath_debug (common,ATH_DBG_BTCOEX ,"no stomp timer running\n" );spin_lock_bh (&btcoex->btcoex_lock);
@@ -378,7 +378,7 @@ void ath9k_btcoex_timer_resume(struct ath_softc *sc)struct ath_btcoex *btcoex = &sc->btcoex;struct ath_hw *ah = sc->sc_ah; -ath_print (ath9k_hw_common (ah),ATH_DBG_BTCOEX , +ath_debug (ath9k_hw_common (ah),ATH_DBG_BTCOEX ,"Starting btcoex timers" );/* make sure duty cycle timer is also stopped when resuming */
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +5 -5
@@ -123,8 +123,8 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,/* TSF out of range threshold fixed at 1 second */ bs.bs_tsfoor_threshold =ATH9K_TSFOOR_THRESHOLD ; -ath_print (common,ATH_DBG_BEACON ,"tsf: %llu tsftu: %u\n" , tsf, tsftu); -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"tsf: %llu tsftu: %u\n" , tsf, tsftu); +ath_debug (common,ATH_DBG_BEACON ,"bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n" , bs.bs_bmissthreshold, bs.bs_sleepduration, bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext);
@@ -154,7 +154,7 @@ static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv,if (priv->op_flags &OP_ENABLE_BEACON ) imask |=ATH9K_INT_SWBA ; -ath_print (common,ATH_DBG_BEACON , +ath_debug (common,ATH_DBG_BEACON ,"IBSS Beacon config, intval: %d, imask: 0x%x\n" , bss_conf->beacon_interval, imask);
@@ -246,7 +246,7 @@ void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv) qi.tqi_cwmax = qi_be.tqi_cwmax;if (!ath9k_hw_set_txq_props (ah, priv->beaconq, &qi)) { -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , +ath_debug (ath9k_hw_common (ah),ATH_DBG_FATAL ,"Unable to update beacon queue %u!\n" , qnum); }else {ath9k_hw_resettxqueue (ah, priv->beaconq);
@@ -278,7 +278,7 @@ void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv,ath9k_htc_beacon_config_adhoc (priv, cur_conf);break ;default : -ath_print (common,ATH_DBG_CONFIG , +ath_debug (common,ATH_DBG_CONFIG ,"Unsupported beaconing mode\n" );return ; }
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +4 -4
@@ -20,12 +20,12 @@ static void ath_detect_bt_priority(struct ath9k_htc_priv *priv) priv->op_flags &= ~(OP_BT_PRIORITY_DETECTED |OP_BT_SCAN );/* Detect if colocated bt started scanning */ if (btcoex->bt_priority_cnt >=ATH_BT_CNT_SCAN_THRESHOLD ) { -ath_print (ath9k_hw_common (ah),ATH_DBG_BTCOEX , +ath_debug (ath9k_hw_common (ah),ATH_DBG_BTCOEX ,"BT scan detected" ); priv->op_flags |= (OP_BT_SCAN |OP_BT_PRIORITY_DETECTED ); }else if (btcoex->bt_priority_cnt >=ATH_BT_CNT_THRESHOLD ) { -ath_print (ath9k_hw_common (ah),ATH_DBG_BTCOEX , +ath_debug (ath9k_hw_common (ah),ATH_DBG_BTCOEX ,"BT priority traffic detected" ); priv->op_flags |=OP_BT_PRIORITY_DETECTED ; }
@@ -83,7 +83,7 @@ static void ath_btcoex_duty_cycle_work(struct work_struct *work)struct ath_common *common =ath9k_hw_common (ah);bool is_btscan = priv->op_flags &OP_BT_SCAN ; -ath_print (common,ATH_DBG_BTCOEX , +ath_debug (common,ATH_DBG_BTCOEX ,"time slice work for bt and wlan\n" );if (btcoex->bt_stomp_type ==ATH_BTCOEX_STOMP_LOW || is_btscan)
@@ -114,7 +114,7 @@ void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv)struct ath_btcoex *btcoex = &priv->btcoex;struct ath_hw *ah = priv->ah; -ath_print (ath9k_hw_common (ah),ATH_DBG_BTCOEX , +ath_debug (ath9k_hw_common (ah),ATH_DBG_BTCOEX ,"Starting btcoex work" ); btcoex->bt_priority_cnt =0 ;
drivers/net/wireless/ath/ath9k/htc_drv_init.c +14 -14
@@ -288,7 +288,7 @@ static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset) (u8 *) &val,sizeof (val), 100);if (unlikely (r)) { -ath_print (common,ATH_DBG_WMI , +ath_debug (common,ATH_DBG_WMI ,"REGISTER READ FAILED: (0x%04x, %d)\n" , reg_offset, r);return -EIO ;
@@ -313,7 +313,7 @@ static void ath9k_regwrite_single(void *hw_priv, u32 val, u32 reg_offset) (u8 *) &val,sizeof (val), 100);if (unlikely (r)) { -ath_print (common,ATH_DBG_WMI , +ath_debug (common,ATH_DBG_WMI ,"REGISTER WRITE FAILED:(0x%04x, %d)\n" , reg_offset, r); }
@@ -345,7 +345,7 @@ static void ath9k_regwrite_buffer(void *hw_priv, u32 val, u32 reg_offset) (u8 *) &rsp_status,sizeof (rsp_status), 100);if (unlikely (r)) { -ath_print (common,ATH_DBG_WMI , +ath_debug (common,ATH_DBG_WMI ,"REGISTER WRITE FAILED, multi len: %d\n" , priv->wmi->multi_write_idx); }
@@ -395,7 +395,7 @@ static void ath9k_regwrite_flush(void *hw_priv) (u8 *) &rsp_status,sizeof (rsp_status), 100);if (unlikely (r)) { -ath_print (common,ATH_DBG_WMI , +ath_debug (common,ATH_DBG_WMI ,"REGISTER WRITE FAILED, multi len: %d\n" , priv->wmi->multi_write_idx); }
@@ -469,7 +469,7 @@ static void setup_ht_cap(struct ath9k_htc_priv *priv, tx_streams =ath9k_cmn_count_streams (common->tx_chainmask,2 ); rx_streams =ath9k_cmn_count_streams (common->rx_chainmask,2 ); -ath_print (common,ATH_DBG_CONFIG , +ath_debug (common,ATH_DBG_CONFIG ,"TX streams %d, RX streams: %d\n" , tx_streams, rx_streams);
@@ -495,36 +495,36 @@ static int ath9k_init_queues(struct ath9k_htc_priv *priv) priv->beaconq =ath9k_hw_beaconq_setup (priv->ah);if (priv->beaconq ==-1 ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to setup BEACON xmit queue\n" ); goto err; } priv->cabq =ath9k_htc_cabq_setup (priv);if (priv->cabq ==-1 ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to setup CAB xmit queue\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_BE )) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to setup xmit queue for BE traffic\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_BK )) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to setup xmit queue for BK traffic\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_VI )) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to setup xmit queue for VI traffic\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_VO )) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to setup xmit queue for VO traffic\n" ); goto err; }
@@ -543,7 +543,7 @@ static void ath9k_init_crypto(struct ath9k_htc_priv *priv)/* Get the hardware key cache size. */ common->keymax = priv->ah->caps.keycache_size;if (common->keymax >ATH_KEYMAX ) { -ath_print (common,ATH_DBG_ANY , +ath_debug (common,ATH_DBG_ANY ,"Warning, using only %u entries in %u key cache\n" ,ATH_KEYMAX , common->keymax); common->keymax =ATH_KEYMAX ;
@@ -670,7 +670,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, ret =ath9k_hw_init (ah);if (ret) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to initialize hardware; " "initialization status: %d\n" , ret); goto err_hw;
@@ -678,7 +678,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, ret =ath9k_htc_init_debug (ah);if (ret) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to create debugfs files\n" ); goto err_debug; }
drivers/net/wireless/ath/ath9k/htc_drv_main.c +41 -41
317 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +8 -8
@@ -69,7 +69,7 @@ int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum, qi.tqi_readyTime = qinfo->tqi_readyTime;if (!ath9k_hw_set_txq_props (ah, qnum, &qi)) { -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , +ath_debug (ath9k_hw_common (ah),ATH_DBG_FATAL ,"Unable to update hardware queue %u!\n" , qnum); error = -EIO ; }else {
@@ -270,7 +270,7 @@ void ath9k_tx_tasklet(unsigned long data)if (priv->tx_queues_stop) { priv->tx_queues_stop = false;spin_unlock_bh (&priv->tx_lock); -ath_print (ath9k_hw_common (priv->ah),ATH_DBG_XMIT , +ath_debug (ath9k_hw_common (priv->ah),ATH_DBG_XMIT ,"Waking up TX queues\n" );ieee80211_wake_queues (priv->hw);return ;
@@ -296,7 +296,7 @@ void ath9k_htc_txep(void *drv_priv, struct sk_buff *skb, (ep_id == priv->data_vo_ep)) { skb_pull(skb, sizeof(struct tx_frame_hdr)); } else { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unsupported TX EPID: %d\n" , ep_id);dev_kfree_skb_any (skb);return ;
@@ -337,7 +337,7 @@ bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype)return false;if (qnum >=ARRAY_SIZE (priv->hwq_map)) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"qnum %u out of range, max %u!\n" , qnum, (unsigned int )ARRAY_SIZE (priv->hwq_map));ath9k_hw_releasetxqueue (ah, qnum);
@@ -490,7 +490,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,__le16 fc;if (skb->len <=HTC_RX_FRAME_HEADER_SIZE ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Corrupted RX frame, dropping\n" ); goto rx_next; }
@@ -499,7 +499,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,if (be16_to_cpu (rxstatus->rs_datalen) - (skb->len -HTC_RX_FRAME_HEADER_SIZE ) !=0 ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Corrupted RX data len, dropping " "(dlen: %d, skblen: %d)\n" , rxstatus->rs_datalen, skb->len);
@@ -685,7 +685,7 @@ void ath9k_htc_rxep(void *drv_priv, struct sk_buff *skb,spin_unlock (&priv->rx.rxbuflock);if (rxbuf ==NULL ) { -ath_print (common,ATH_DBG_ANY , +ath_debug (common,ATH_DBG_ANY ,"No free RX buffer\n" ); goto err; }
@@ -728,7 +728,7 @@ int ath9k_rx_init(struct ath9k_htc_priv *priv)for (i =0 ; i <ATH9K_HTC_RXBUF ; i++) { rxbuf =kzalloc (sizeof (struct ath9k_htc_rxbuf ),GFP_KERNEL );if (rxbuf ==NULL ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to allocate RX buffers\n" ); goto err; }
drivers/net/wireless/ath/ath9k/hw.c +39 -39
292 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/init.c +6 -6
@@ -225,7 +225,7 @@ static void setup_ht_cap(struct ath_softc *sc, tx_streams =ath9k_cmn_count_streams (common->tx_chainmask, max_streams); rx_streams =ath9k_cmn_count_streams (common->rx_chainmask, max_streams); -ath_print (common,ATH_DBG_CONFIG , +ath_debug (common,ATH_DBG_CONFIG ,"TX streams %d, RX streams: %d\n" , tx_streams, rx_streams);
@@ -270,7 +270,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,struct ath_buf *bf;int i, bsize, error, desc_len; -ath_print (common,ATH_DBG_CONFIG ,"%s DMA: %u buffers %u desc/buf\n" , +ath_debug (common,ATH_DBG_CONFIG ,"%s DMA: %u buffers %u desc/buf\n" , name, nbuf, ndesc);INIT_LIST_HEAD (head);
@@ -282,7 +282,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,/* ath_desc must be a multiple of DWORDs */ if ((desc_len %4 ) !=0 ) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"ath_desc not DWORD aligned\n" );BUG_ON ((desc_len %4 ) !=0 ); error = -ENOMEM ;
@@ -317,7 +317,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, goto fail; } ds = (u8 *) dd->dd_desc; -ath_print (common,ATH_DBG_CONFIG ,"%s DMA map: %p (%u) -> %llx (%u)\n" , +ath_debug (common,ATH_DBG_CONFIG ,"%s DMA map: %p (%u) -> %llx (%u)\n" , name, ds, (u32 ) dd->dd_desc_len,ito64 (dd->dd_desc_paddr),/*XXX*/ (u32 ) dd->dd_desc_len);
@@ -373,7 +373,7 @@ static void ath9k_init_crypto(struct ath_softc *sc)/* Get the hardware key cache size. */ common->keymax = sc->sc_ah->caps.keycache_size;if (common->keymax >ATH_KEYMAX ) { -ath_print (common,ATH_DBG_ANY , +ath_debug (common,ATH_DBG_ANY ,"Warning, using only %u entries in %u key cache\n" ,ATH_KEYMAX , common->keymax); common->keymax =ATH_KEYMAX ;
@@ -567,7 +567,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, ret =ath9k_init_debug (ah);if (ret) { -ath_print (common,ATH_DBG_FATAL , +ath_debug (common,ATH_DBG_FATAL ,"Unable to create debugfs files\n" ); goto err_debug; }
drivers/net/wireless/ath/ath9k/mac.c +29 -29
219 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/main.c +44 -44
141 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/recv.c +12 -12
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/ath9k/virtual.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/ath9k/xmit.c +18 -18
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.3.2.245.g03276.dirty
Part of the diff is not shown here. View the raw message.
Quoted 7 lines · Joe Perches
Make the function name match the function purpose.
ath_debugis a debug only facility.ath_printseems too generic a name for a debug only use.Removed an unnecessary trailing space in
htc_drv_main.cSigned-off-by Joe Perches <[email protected]>
Nack, I don't see the point.
Luis
Quoted 6 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
Make the function name match the function purpose.
ath_debugis a debug only facility.ath_printseems too generic a name for a debug only use.Nack, I don't see the point.
The point is to improve readability. I like the patch.
//Peter
Quoted 9 lines · Peter Stuge
Quoted 6 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
Make the function name match the function purpose.
ath_debugis a debug only facility.ath_printseems too generic a name for a debug only use.Nack, I don't see the point.
The point is to improve readability. I like the patch.
And how exactly does this improve readability? Don't get me wrong, I generally like to see more cleanups merged to the ath/ath9k drivers (they do need it, after all).
But in my opinion, simple renaming churn like this does nothing but annoy people who want to get other work done at the same time. Consider the large number of lines touched (and the potential merge conflicts with other code because of that), relative to the microscopic aesthetic gain (if any).
Instead I'd like to see more cleanups that go beyond trivial function renames.
- Felix
Quoted 14 lines · Felix Fietkau
Quoted 9 lines · Peter Stuge
Quoted 6 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
Make the function name match the function purpose.
ath_debugis a debug only facility.ath_printseems too generic a name for a debug only use.Nack, I don't see the point.
The point is to improve readability. I like the patch.
And how exactly does this improve readability? Don't get me wrong, I generally like to see more cleanups merged to the ath/ath9k drivers (they do need it, after all).
Quoted 8 lines
But in my opinion, simple renaming churn like this does nothing but annoy people who want to get other work done at the same time. Consider the large number of lines touched (and the potential merge conflicts with other code because of that), relative to the microscopic aesthetic gain (if any).
Instead I'd like to see more cleanups that go beyond trivial function renames.
Thanks for putting it so clearly. Agreed.
Luis
Quoted 6 lines · Felix Fietkau
Quoted 5 lines · Peter Stuge
Quoted 4 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
Make the function name match the function purpose.
ath_debugis a debug only facility.ath_printseems too generic a name for a debug only use.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Nack, I don't see the point.
The point is to improve readability. I like the patch.
And how exactly does this improve readability? Don't get me wrong, I generally like to see more cleanups merged to the ath/ath9k drivers (they do need it, after all).
It's considered polite to cc the patch author.
print is generic, debug is specific.
This function has a specific use for debugging not a generic use all for logging.
If it was ath_print(level, etc) with KERN_<level> passed as the first argument that'd be similar to other kernel calls. As is, it's not.
Quoted 2 lines
But in my opinion, simple renaming churn like this does nothing but annoy people who want to get other work done at the same time.
This sort of thing can be done when other changes have just been merged to minimize conflicts.
Quoted 6 lines
Consider the large number of lines touched (and the potential merge conflicts with other code because of that), relative to the microscopic aesthetic gain (if any).
Instead I'd like to see more cleanups that go beyond trivial function renames.
I gauge my willingness to spend time on subsystems on the maintainers willingness to merge things that improve readability and correctness.
cheers, Joe
Quoted 7 lines · Joe Perches
Quoted 6 lines · Felix Fietkau
Quoted 5 lines · Peter Stuge
Quoted 4 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
Make the function name match the function purpose.
ath_debugis a debug only facility.ath_printseems too generic a name for a debug only use.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Nack, I don't see the point.
The point is to improve readability. I like the patch.
And how exactly does this improve readability? Don't get me wrong, I generally like to see more cleanups merged to the ath/ath9k drivers (they do need it, after all).
It's considered polite to cc the patch author.
Sorry, I forgot to add you back. The Cc list was cleared somewhere in this thread and I added a few entries back, but apparently accidentally dropped some of them again.
Quoted 18 lines
print is generic, debug is specific.
This function has a specific use for debugging not a generic use all for logging.If it was
ath_print(level, etc)with KERN_<level> passed as the first argument that'd be similar to other kernel calls. As is, it's not.Quoted 2 lines
But in my opinion, simple renaming churn like this does nothing but annoy people who want to get other work done at the same time.
This sort of thing can be done when other changes have just been merged to minimize conflicts.
Quoted 4 lines
Consider the large number of lines touched (and the potential merge conflicts with other code because of that), relative to the microscopic aesthetic gain (if any).
Quoted 6 lines
Quoted 2 lines
Instead I'd like to see more cleanups that go beyond trivial function renames.
I gauge my willingness to spend time on subsystems on the maintainers willingness to merge things that improve readability and correctness.
I'm not trying to discourage you from spending time on improving this code, just doubting the usefulness of such simple function renames.
- Felix
Quoted 6 lines · Felix Fietkau
Quoted 3 lines · Joe Perches
I gauge my willingness to spend time on subsystems on the maintainers willingness to merge things that improve readability and correctness.
I'm not trying to discourage you from spending time on improving this code, just doubting the usefulness of such simple function renames.
Poor function naming is just that.
It reduces readability and the uses are counter expectation.
Quoted 10 lines · Joe Perches
Quoted 6 lines · Felix Fietkau
Quoted 3 lines · Joe Perches
I gauge my willingness to spend time on subsystems on the maintainers willingness to merge things that improve readability and correctness.
I'm not trying to discourage you from spending time on improving this code, just doubting the usefulness of such simple function renames.
Poor function naming is just that.
It reduces readability and the uses are counter expectation.
The name is perfect, we use it to print anything, even non-debugging stuff.
Luis
Quoted 6 lines · Luis R. Rodriguez
Quoted 5 lines · Joe Perches
Quoted 4 lines · Felix Fietkau
Quoted 3 lines · Joe Perches
I gauge my willingness to spend time on subsystems on the maintainers willingness to merge things that improve readability and correctness.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
I'm not trying to discourage you from spending time on improving this code, just doubting the usefulness of such simple function renames.
Poor function naming is just that.
It reduces readability and the uses are counter expectation.The name is perfect, we use it to print anything, even non-debugging stuff.
If you are writing trivial patches please be ready to accept trivial NACKs for them as well. IMHO its best if the large diffstat trivial patches had more purpose than just scratch a small tiny itch.
Luis
Quoted 4 lines · Luis R. Rodriguez
Quoted 2 lines · Joe Perches
Poor function naming is just that.
It reduces readability and the uses are counter expectation.The name is perfect, we use it to print anything, even non-debugging stuff.
'fraid not.
ath/debug.h
#ifdef CONFIG_ATH_DEBUG
void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)));
#else
static inline void __attribute__ ((format (printf, 3, 4))) ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...) {
}
#endif /* CONFIG_ATH_DEBUG */
Quoted 12 lines · Joe Perches
Quoted 4 lines · Luis R. Rodriguez
Quoted 2 lines · Joe Perches
Poor function naming is just that.
It reduces readability and the uses are counter expectation.The name is perfect, we use it to print anything, even non-debugging stuff.
'fraid not.
ath/debug.h#ifdef
CONFIG_ATH_DEBUG
voidath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
Quoted 7 lines
__attribute__ ((format (printf, 3, 4)));#else
static inline void__attribute__((format (printf, 3, 4)))ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...){
}
#endif /*CONFIG_ATH_DEBUG*/
Now we're getting closer to something worth fixing. IMHO we should change the code so that ath_print(common, ATH_DBG_FATAL, ...) prints something even with CONFIG_ATH_DEBUG unset. To get this done, some renaming would make sense here.
- Felix
Quoted 20 lines · Felix Fietkau
Quoted 12 lines · Joe Perches
Quoted 4 lines · Luis R. Rodriguez
Quoted 2 lines · Joe Perches
Poor function naming is just that.
It reduces readability and the uses are counter expectation.The name is perfect, we use it to print anything, even non-debugging stuff.
'fraid not.
ath/debug.h#ifdef
CONFIG_ATH_DEBUG
voidath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)Quoted 7 lines
__attribute__ ((format (printf, 3, 4)));#else
static inline void__attribute__((format (printf, 3, 4)))ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...){
}
#endif /*CONFIG_ATH_DEBUG*/
Quoted 4 lines
Now we're getting closer to something worth fixing. IMHO we should change the code so that
ath_print(common, ATH_DBG_FATAL, ...)prints something even withCONFIG_ATH_DEBUGunset. To get this done, some renaming would make sense here.
Perhaps the function name is bad after all if Luis believed it be be always active.
If there are going to be other non-debug uses, I suggest adding the more standard styles of ath_printk and ath_<level> similar to dev_printk and dev_<level> from device.h
Something like this for a start, then a more gradual rename of ath_print to ath_dbg (or ath_debug) as the original patch suggested.
This basically removes debug.h leaving only an #define ath_printk ath_dbg there and moving all the ATH_DBG_<foo> enums to ath.h
I do not think there's much purpose for struct ath_common * being passed to the ath_printk functions, but perhaps there might be.
---
drivers/net/wireless/ath/ath.h | 103 ++++++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/debug.c | 20 ------- drivers/net/wireless/ath/debug.h | 72 +-------------------------- drivers/net/wireless/ath/main.c | 20 +++++++ 4 files changed, 124 insertions(+), 91 deletions(-)
drivers/net/wireless/ath/ath.h +103 -0
@@ -186,4 +186,107 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry);void ath_hw_cycle_counters_update (struct ath_common *common);int32_t ath_hw_get_listen_time (struct ath_common *common); +extern __attribute__ ((format (printf,3 ,4 )))int +ath_printk (const char *level,struct ath_common *common,const char *fmt, ...); + +#define ath_emerg (common, fmt, ...) \ + ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS) +#define ath_alert (common, fmt, ...) \ + ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS) +#define ath_crit (common, fmt, ...) \ + ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS) +#define ath_err (common, fmt, ...) \ + ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS) +#define ath_warn (common, fmt, ...) \ + ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS) +#define ath_notice (common, fmt, ...) \ + ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS) +#define ath_info (common, fmt, ...) \ + ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS) + +/** +* enum ath_debug_level - atheros wireless debug level +* +* @ATH_DBG_RESET: reset processing +* @ATH_DBG_QUEUE: hardware queue management +* @ATH_DBG_EEPROM: eeprom processing +* @ATH_DBG_CALIBRATE: periodic calibration +* @ATH_DBG_INTERRUPT: interrupt processing +* @ATH_DBG_REGULATORY: regulatory processing +* @ATH_DBG_ANI: adaptive noise immunitive processing +* @ATH_DBG_XMIT: basic xmit operation +* @ATH_DBG_BEACON: beacon handling +* @ATH_DBG_CONFIG: configuration of the hardware +* @ATH_DBG_FATAL: fatal errors, this is the default, DBG_DEFAULT +* @ATH_DBG_PS: power save processing +* @ATH_DBG_HWTIMER: hardware timer handling +* @ATH_DBG_BTCOEX: bluetooth coexistance +* @ATH_DBG_BSTUCK: stuck beacons +* @ATH_DBG_ANY: enable all debugging +* +* The debug level is used to control the amount and type of debugging output +* we want to see. Each driver has its own method for enabling debugging and +* modifying debug level states -- but this is typically done through a +* module parameter 'debug' along with a respective 'debug' debugfs file +* entry. +*/ +enum ATH_DEBUG { +ATH_DBG_RESET =0x00000001 , +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_PS =0x00000800 , +ATH_DBG_HWTIMER =0x00001000 , +ATH_DBG_BTCOEX =0x00002000 , +ATH_DBG_WMI =0x00004000 , +ATH_DBG_BSTUCK =0x00008000 , +ATH_DBG_ANY =0xffffffff +}; + +#define ATH_DBG_DEFAULT (ATH_DBG_FATAL) + +#ifdef CONFIG_ATH_DEBUG + +#define ath_dbg (common, dbg_mask, fmt, ...) \ +({ \ + int rtn; \ + if ((common)->debug_mask & dbg_mask) \ + rtn = ath_printk(KERN_DEBUG, common, fmt, \ + ##__VA_ARGS__); \ + else \ + rtn = 0; \ + \ + rtn; \ +}) +#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg) + +#else + +static inline __attribute__ ((format (printf,3 ,4 )))int +ath_dbg (struct ath_common *common,enum ATH_DEBUG dbg_mask, +const char *fmt, ...) +{ +return 0 ; +} +#define ATH_DBG_WARN (foo, arg) do {} while (0) + +#endif /* CONFIG_ATH_DEBUG */ + +/** Returns string describing opmode, or NULL if unknown mode. */ +#ifdef CONFIG_ATH_DEBUG +const char *ath_opmode_to_string (enum nl80211_iftype opmode); +#else +static inline const char *ath_opmode_to_string (enum nl80211_iftype opmode) +{ +return "UNKNOWN" ; +} +#endif +#endif /* ATH_H */
drivers/net/wireless/ath/debug.c +0 -20
@@ -15,26 +15,6 @@*/ #include "ath.h" -#include "debug.h" - -void ath_print (struct ath_common *common,int dbg_mask,const char *fmt, ...) -{ -struct va_format vaf; -va_list args; - -if (likely (!(common->debug_mask & dbg_mask))) -return ; - -va_start (args, fmt); - - vaf.fmt = fmt; - vaf.va = &args; - -printk (KERN_DEBUG "ath: %pV" , &vaf); - -va_end (args); -} -EXPORT_SYMBOL (ath_print);const char *ath_opmode_to_string (enum nl80211_iftype opmode) {
drivers/net/wireless/ath/debug.h +1 -71
77 lines not on this page · raw message
drivers/net/wireless/ath/main.c +20 -0
@@ -56,3 +56,23 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,return skb; }EXPORT_SYMBOL (ath_rxbuf_alloc); + +int ath_printk (const char *level,struct ath_common *common, +const char *fmt, ...) +{ +struct va_format vaf; +va_list args; +int rtn; + +va_start (args, fmt); + + vaf.fmt = fmt; + vaf.va = &args; + + rtn =printk ("%sath: %pV" , level, &vaf); + +va_end (args); + +return rtn; +} +EXPORT_SYMBOL (ath_printk);
drivers/net/wireless/ath/ath.h bool ath_hw_keyreset(struct ath_common *common, u16 entry); · line 193
Quoted 2 lines
drivers/net/wireless/ath/ath.h +2
-0+#define ath_emerg (common, fmt, ...) \ + ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS)
Sorry, that patch is defective. (and an old version)
That's what I get for not using git format-patch to send it. I'll resend it appropriately.
PATCH 1/1 ath: Add and use ath_printk and ath_<level>
In reply to Felix FietkauAdd ath_printk and ath_<level> similar to dev_printk and dev_<level> from device.h
This allows a more gradual rename of ath_print to to ath_dbg or perhaps ath_debug.
This basically removes debug.h leaving only an #define ath_printk ath_dbg there and moving all the ATH_DBG_<foo> enums to ath.h
I do not think there's much purpose for struct ath_common * being passed to the ath_printk functions, but perhaps there might be.
--- drivers/net/wireless/ath/ath.h | 103 ++++++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/debug.c | 20 ------- drivers/net/wireless/ath/debug.h | 72 +-------------------------- drivers/net/wireless/ath/main.c | 20 +++++++ 4 files changed, 124 insertions(+), 91 deletions(-)
drivers/net/wireless/ath/ath.h +103 -0
@@ -186,4 +186,107 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry);void ath_hw_cycle_counters_update (struct ath_common *common);int32_t ath_hw_get_listen_time (struct ath_common *common); +extern __attribute__ ((format (printf,3 ,4 )))int +ath_printk (const char *level,struct ath_common *common,const char *fmt, ...); + +#define ath_emerg (common, fmt, ...) \ + ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS) +#define ath_alert (common, fmt, ...) \ + ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS) +#define ath_crit (common, fmt, ...) \ + ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS) +#define ath_err (common, fmt, ...) \ + ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS) +#define ath_warn (common, fmt, ...) \ + ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS) +#define ath_notice (common, fmt, ...) \ + ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS) +#define ath_info (common, fmt, ...) \ + ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS) + +/** +* enum ath_debug_level - atheros wireless debug level +* +* @ATH_DBG_RESET: reset processing +* @ATH_DBG_QUEUE: hardware queue management +* @ATH_DBG_EEPROM: eeprom processing +* @ATH_DBG_CALIBRATE: periodic calibration +* @ATH_DBG_INTERRUPT: interrupt processing +* @ATH_DBG_REGULATORY: regulatory processing +* @ATH_DBG_ANI: adaptive noise immunitive processing +* @ATH_DBG_XMIT: basic xmit operation +* @ATH_DBG_BEACON: beacon handling +* @ATH_DBG_CONFIG: configuration of the hardware +* @ATH_DBG_FATAL: fatal errors, this is the default, DBG_DEFAULT +* @ATH_DBG_PS: power save processing +* @ATH_DBG_HWTIMER: hardware timer handling +* @ATH_DBG_BTCOEX: bluetooth coexistance +* @ATH_DBG_BSTUCK: stuck beacons +* @ATH_DBG_ANY: enable all debugging +* +* The debug level is used to control the amount and type of debugging output +* we want to see. Each driver has its own method for enabling debugging and +* modifying debug level states -- but this is typically done through a +* module parameter 'debug' along with a respective 'debug' debugfs file +* entry. +*/ +enum ATH_DEBUG { +ATH_DBG_RESET =0x00000001 , +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_PS =0x00000800 , +ATH_DBG_HWTIMER =0x00001000 , +ATH_DBG_BTCOEX =0x00002000 , +ATH_DBG_WMI =0x00004000 , +ATH_DBG_BSTUCK =0x00008000 , +ATH_DBG_ANY =0xffffffff +}; + +#define ATH_DBG_DEFAULT (ATH_DBG_FATAL) + +#ifdef CONFIG_ATH_DEBUG + +#define ath_dbg (common, dbg_mask, fmt, ...) \ +({ \ + int rtn; \ + if ((common)->debug_mask & dbg_mask) \ + rtn = ath_printk(KERN_DEBUG, common, fmt, \ + ##__VA_ARGS__); \ + else \ + rtn = 0; \ + \ + rtn; \ +}) +#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg) + +#else + +static inline __attribute__ ((format (printf,3 ,4 )))int +ath_dbg (struct ath_common *common,enum ATH_DEBUG dbg_mask, +const char *fmt, ...) +{ +return 0 ; +} +#define ATH_DBG_WARN (foo, arg) do {} while (0) + +#endif /* CONFIG_ATH_DEBUG */ + +/** Returns string describing opmode, or NULL if unknown mode. */ +#ifdef CONFIG_ATH_DEBUG +const char *ath_opmode_to_string (enum nl80211_iftype opmode); +#else +static inline const char *ath_opmode_to_string (enum nl80211_iftype opmode) +{ +return "UNKNOWN" ; +} +#endif +#endif /* ATH_H */
drivers/net/wireless/ath/debug.c +0 -20
@@ -15,26 +15,6 @@*/ #include "ath.h" -#include "debug.h" - -void ath_print (struct ath_common *common,int dbg_mask,const char *fmt, ...) -{ -struct va_format vaf; -va_list args; - -if (likely (!(common->debug_mask & dbg_mask))) -return ; - -va_start (args, fmt); - - vaf.fmt = fmt; - vaf.va = &args; - -printk (KERN_DEBUG "ath: %pV" , &vaf); - -va_end (args); -} -EXPORT_SYMBOL (ath_print);const char *ath_opmode_to_string (enum nl80211_iftype opmode) {
drivers/net/wireless/ath/debug.h +1 -71
77 lines not on this page · raw message
drivers/net/wireless/ath/main.c +20 -0
@@ -56,3 +56,23 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,return skb; }EXPORT_SYMBOL (ath_rxbuf_alloc); + +int ath_printk (const char *level,struct ath_common *common, +const char *fmt, ...) +{ +struct va_format vaf; +va_list args; +int rtn; + +va_start (args, fmt); + + vaf.fmt = fmt; + vaf.va = &args; + + rtn =printk ("%sath: %pV" , level, &vaf); + +va_end (args); + +return rtn; +} +EXPORT_SYMBOL (ath_printk);
Signature · 1 line
1.7.3.2.245.g03276.dirty
PATCH v2 1/1 ath: Add and use ath_printk and ath_<level>
Add ath_printk and ath_<level> similar to dev_printk and dev_<level> from device.h
This allows a more gradual rename of ath_print to to ath_dbg or perhaps ath_debug.
This basically removes debug.h leaving only an #define ath_printk ath_dbg there and moving all the ATH_DBG_<foo> enums to ath.h
I do not think there's much purpose for struct ath_common * being passed to the ath_printk functions, but perhaps there might be.
---
V2:
Yes, Joe's an eedjot that must learn to use git commit --amend properly.
Compiled and built with and without CONFIG_ATH_DEBUG but otherwise untested.
drivers/net/wireless/ath/ath.h | 103 ++++++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/debug.c | 20 ------- drivers/net/wireless/ath/debug.h | 72 +-------------------------- drivers/net/wireless/ath/main.c | 20 +++++++ 4 files changed, 124 insertions(+), 91 deletions(-)
drivers/net/wireless/ath/ath.h +103 -0
@@ -186,4 +186,107 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry);void ath_hw_cycle_counters_update (struct ath_common *common);int32_t ath_hw_get_listen_time (struct ath_common *common); +extern __attribute__ ((format (printf,3 ,4 )))int +ath_printk (const char *level,struct ath_common *common,const char *fmt, ...); + +#define ath_emerg (common, fmt, ...) \ + ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__) +#define ath_alert (common, fmt, ...) \ + ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS__) +#define ath_crit (common, fmt, ...) \ + ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS__) +#define ath_err (common, fmt, ...) \ + ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS__) +#define ath_warn (common, fmt, ...) \ + ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS__) +#define ath_notice (common, fmt, ...) \ + ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS__) +#define ath_info (common, fmt, ...) \ + ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS__) + +/** +* enum ath_debug_level - atheros wireless debug level +* +* @ATH_DBG_RESET: reset processing +* @ATH_DBG_QUEUE: hardware queue management +* @ATH_DBG_EEPROM: eeprom processing +* @ATH_DBG_CALIBRATE: periodic calibration +* @ATH_DBG_INTERRUPT: interrupt processing +* @ATH_DBG_REGULATORY: regulatory processing +* @ATH_DBG_ANI: adaptive noise immunitive processing +* @ATH_DBG_XMIT: basic xmit operation +* @ATH_DBG_BEACON: beacon handling +* @ATH_DBG_CONFIG: configuration of the hardware +* @ATH_DBG_FATAL: fatal errors, this is the default, DBG_DEFAULT +* @ATH_DBG_PS: power save processing +* @ATH_DBG_HWTIMER: hardware timer handling +* @ATH_DBG_BTCOEX: bluetooth coexistance +* @ATH_DBG_BSTUCK: stuck beacons +* @ATH_DBG_ANY: enable all debugging +* +* The debug level is used to control the amount and type of debugging output +* we want to see. Each driver has its own method for enabling debugging and +* modifying debug level states -- but this is typically done through a +* module parameter 'debug' along with a respective 'debug' debugfs file +* entry. +*/ +enum ATH_DEBUG { +ATH_DBG_RESET =0x00000001 , +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_PS =0x00000800 , +ATH_DBG_HWTIMER =0x00001000 , +ATH_DBG_BTCOEX =0x00002000 , +ATH_DBG_WMI =0x00004000 , +ATH_DBG_BSTUCK =0x00008000 , +ATH_DBG_ANY =0xffffffff +}; + +#define ATH_DBG_DEFAULT (ATH_DBG_FATAL) + +#ifdef CONFIG_ATH_DEBUG + +#define ath_dbg (common, dbg_mask, fmt, ...) \ +({ \ + int rtn; \ + if ((common)->debug_mask & dbg_mask) \ + rtn = ath_printk(KERN_DEBUG, common, fmt, \ + ##__VA_ARGS__); \ + else \ + rtn = 0; \ + \ + rtn; \ +}) +#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg) + +#else + +static inline __attribute__ ((format (printf,3 ,4 )))int +ath_dbg (struct ath_common *common,enum ATH_DEBUG dbg_mask, +const char *fmt, ...) +{ +return 0 ; +} +#define ATH_DBG_WARN (foo, arg) do {} while (0) + +#endif /* CONFIG_ATH_DEBUG */ + +/** Returns string describing opmode, or NULL if unknown mode. */ +#ifdef CONFIG_ATH_DEBUG +const char *ath_opmode_to_string (enum nl80211_iftype opmode); +#else +static inline const char *ath_opmode_to_string (enum nl80211_iftype opmode) +{ +return "UNKNOWN" ; +} +#endif +#endif /* ATH_H */
drivers/net/wireless/ath/debug.c +0 -20
@@ -15,26 +15,6 @@*/ #include "ath.h" -#include "debug.h" - -void ath_print (struct ath_common *common,int dbg_mask,const char *fmt, ...) -{ -struct va_format vaf; -va_list args; - -if (likely (!(common->debug_mask & dbg_mask))) -return ; - -va_start (args, fmt); - - vaf.fmt = fmt; - vaf.va = &args; - -printk (KERN_DEBUG "ath: %pV" , &vaf); - -va_end (args); -} -EXPORT_SYMBOL (ath_print);const char *ath_opmode_to_string (enum nl80211_iftype opmode) {
drivers/net/wireless/ath/debug.h +1 -71
77 lines not on this page · raw message
drivers/net/wireless/ath/main.c +20 -0
@@ -56,3 +56,23 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,return skb; }EXPORT_SYMBOL (ath_rxbuf_alloc); + +int ath_printk (const char *level,struct ath_common *common, +const char *fmt, ...) +{ +struct va_format vaf; +va_list args; +int rtn; + +va_start (args, fmt); + + vaf.fmt = fmt; + vaf.va = &args; + + rtn =printk ("%sath: %pV" , level, &vaf); + +va_end (args); + +return rtn; +} +EXPORT_SYMBOL (ath_printk);
Signature · 1 line
1.7.3.2.245.g03276.dirty
PATCH 1/1 ath: Convert ath_print(.., ATH_DBG_FATAL to ath_err
In reply to Joe PerchesSo these errors are always emitted at KERN_ERR level.
--- drivers/net/wireless/ath/ath9k/ahb.c | 7 +- drivers/net/wireless/ath/ath9k/ar5008_phy.c | 12 +--- drivers/net/wireless/ath/ath9k/ar9002_hw.c | 6 +- drivers/net/wireless/ath/ath9k/beacon.c | 14 ++--- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 13 ++--- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 13 ++--- drivers/net/wireless/ath/ath9k/eeprom_def.c | 14 ++--- drivers/net/wireless/ath/ath9k/gpio.c | 4 +- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 4 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 27 +++----- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 59 ++++++++--------- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 25 +++----- drivers/net/wireless/ath/ath9k/hw.c | 78 ++++++++++------------- drivers/net/wireless/ath/ath9k/init.c | 6 +- drivers/net/wireless/ath/ath9k/mac.c | 31 ++++----- drivers/net/wireless/ath/ath9k/main.c | 56 +++++++---------- drivers/net/wireless/ath/ath9k/pci.c | 7 +- drivers/net/wireless/ath/ath9k/rc.c | 4 +- drivers/net/wireless/ath/ath9k/recv.c | 15 ++--- drivers/net/wireless/ath/ath9k/xmit.c | 30 ++++----- drivers/net/wireless/ath/key.c | 15 ++--- 21 files changed, 186 insertions(+), 254 deletions(-)
drivers/net/wireless/ath/ath9k/ahb.c +3 -4
@@ -35,10 +35,9 @@ static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data) pdata = (struct ath9k_platform_data *) pdev->dev.platform_data;if (off >= (ARRAY_SIZE (pdata->eeprom_data))) { -ath_print (common,ATH_DBG_FATAL , -"%s: flash read failed, offset %08x " -"is out of range\n" , - __func__, off); +ath_err (common, +"%s: flash read failed, offset %08x is out of range\n" , + __func__, off);return false; }
drivers/net/wireless/ath/ath9k/ar5008_phy.c +4 -8
@@ -173,8 +173,7 @@ static int ar5008_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) channelSel = ((freq -704 ) *2 -3040 ) /10 ; bModeSynth =1 ; }else { -ath_print (common,ATH_DBG_FATAL , -"Invalid channel %u MHz\n" , freq); +ath_err (common,"Invalid channel %u MHz\n" , freq);return -EINVAL ; }
@@ -206,8 +205,7 @@ static int ar5008_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 { -ath_print (common,ATH_DBG_FATAL , -"Invalid channel %u MHz\n" , freq); +ath_err (common,"Invalid channel %u MHz\n" , freq);return -EINVAL ; }
@@ -448,8 +446,7 @@ static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah)#define ATH_ALLOC_BANK (bank, size) do { \ bank = kzalloc((sizeof(u32) * size), GFP_KERNEL); \ if (!bank) { \ - ath_print(common, ATH_DBG_FATAL, \ - "Cannot allocate RF banks\n"); \ + ath_err(common, "Cannot allocate RF banks\n"); \ return -ENOMEM; \ } \ } while (0);
@@ -879,8 +876,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,/* Write analog registers */ if (!ath9k_hw_set_rf_regs (ah, chan, freqIndex)) { -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , -"ar5416SetRfRegs failed\n" ); +ath_err (ath9k_hw_common (ah),"ar5416SetRfRegs failed\n" );return -EIO ; }
drivers/net/wireless/ath/ath9k/ar9002_hw.c +3 -3
@@ -494,9 +494,9 @@ int ar9002_hw_rf_claim(struct ath_hw *ah)case AR_RAD2122_SREV_MAJOR :break ;default : -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , -"Radio Chip Rev 0x%02X not supported\n" , - val &AR_RADIO_SREV_MAJOR ); +ath_err (ath9k_hw_common (ah), +"Radio Chip Rev 0x%02X not supported\n" , + val &AR_RADIO_SREV_MAJOR );return -EOPNOTSUPP ; }
drivers/net/wireless/ath/ath9k/beacon.c +6 -8
@@ -46,8 +46,8 @@ int ath_beaconq_config(struct ath_softc *sc) }if (!ath9k_hw_set_txq_props (ah, sc->beacon.beaconq, &qi)) { -ath_print (common,ATH_DBG_FATAL , -"Unable to update h/w beacon queue parameters\n" ); +ath_err (common, +"Unable to update h/w beacon queue parameters\n" );return 0 ; }else {ath9k_hw_resettxqueue (ah, sc->beacon.beaconq);
@@ -188,8 +188,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,dev_kfree_skb_any (skb); bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (common,ATH_DBG_FATAL , -"dma_mapping_error on beaconing\n" ); +ath_err (common,"dma_mapping_error on beaconing\n" );return NULL ; }
@@ -323,8 +322,7 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)dev_kfree_skb_any (skb); bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (common,ATH_DBG_FATAL , -"dma_mapping_error on beacon alloc\n" ); +ath_err (common,"dma_mapping_error on beacon alloc\n" );return -ENOMEM ; }
@@ -468,8 +466,8 @@ void ath_beacon_tasklet(unsigned long data)* are still pending on the queue. */ if (!ath9k_hw_stoptxdma (ah, sc->beacon.beaconq)) { -ath_print (common,ATH_DBG_FATAL , -"beacon queue %u did not stop?\n" , sc->beacon.beaconq); +ath_err (common,"beacon queue %u did not stop?\n" , + sc->beacon.beaconq); }/* NB: cabq traffic should already be queued and primed */
drivers/net/wireless/ath/ath9k/eeprom_4k.c +5 -8
@@ -69,8 +69,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)if (!ath9k_hw_use_flash (ah)) {if (!ath9k_hw_nvram_read (common,AR5416_EEPROM_MAGIC_OFFSET , &magic)) { -ath_print (common,ATH_DBG_FATAL , -"Reading Magic # failed\n" ); +ath_err (common,"Reading Magic # failed\n" );return false; }
@@ -90,9 +89,8 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) eepdata++; } }else { -ath_print (common,ATH_DBG_FATAL , -"Invalid EEPROM Magic. " -"endianness mismatch.\n" ); +ath_err (common, +"Invalid EEPROM Magic. endianness mismatch.\n" );return -EINVAL ; } }
@@ -163,9 +161,8 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)if (sum !=0xffff || ah->eep_ops->get_eeprom_ver (ah) !=AR5416_EEP_VER || ah->eep_ops->get_eeprom_rev (ah) <AR5416_EEP_NO_BACK_VER ) { -ath_print (common,ATH_DBG_FATAL , -"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , - sum, ah->eep_ops->get_eeprom_ver (ah)); +ath_err (common,"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , + sum, ah->eep_ops->get_eeprom_ver (ah));return -EINVAL ; }
drivers/net/wireless/ath/ath9k/eeprom_9287.c +5 -8
@@ -72,8 +72,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)if (!ath9k_hw_use_flash (ah)) {if (!ath9k_hw_nvram_read (common,AR5416_EEPROM_MAGIC_OFFSET , &magic)) { -ath_print (common,ATH_DBG_FATAL , -"Reading Magic # failed\n" ); +ath_err (common,"Reading Magic # failed\n" );return false; }
@@ -93,9 +92,8 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) eepdata++; } }else { -ath_print (common,ATH_DBG_FATAL , -"Invalid EEPROM Magic. " -"Endianness mismatch.\n" ); +ath_err (common, +"Invalid EEPROM Magic. Endianness mismatch.\n" );return -EINVAL ; } }
@@ -160,9 +158,8 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)if (sum !=0xffff || ah->eep_ops->get_eeprom_ver (ah) !=AR9287_EEP_VER || ah->eep_ops->get_eeprom_rev (ah) <AR5416_EEP_NO_BACK_VER ) { -ath_print (common,ATH_DBG_FATAL , -"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , - sum, ah->eep_ops->get_eeprom_ver (ah)); +ath_err (common,"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , + sum, ah->eep_ops->get_eeprom_ver (ah));return -EINVAL ; }
drivers/net/wireless/ath/ath9k/eeprom_def.c +6 -8
@@ -96,8 +96,8 @@ static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah)for (addr =0 ; addr <SIZE_EEPROM_DEF ; addr++) {if (!ath9k_hw_nvram_read (common, addr + ar5416_eep_start_loc, eep_data)) { -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , -"Unable to read eeprom region\n" ); +ath_err (ath9k_hw_common (ah), +"Unable to read eeprom region\n" );return false; } eep_data++;
@@ -117,7 +117,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)int i, addr, size;if (!ath9k_hw_nvram_read (common,AR5416_EEPROM_MAGIC_OFFSET , &magic)) { -ath_print (common,ATH_DBG_FATAL ,"Reading Magic # failed\n" ); +ath_err (common,"Reading Magic # failed\n" );return false; }
@@ -139,9 +139,8 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) eepdata++; } }else { -ath_print (common,ATH_DBG_FATAL , -"Invalid EEPROM Magic. " -"Endianness mismatch.\n" ); +ath_err (common, +"Invalid EEPROM Magic. Endianness mismatch.\n" );return -EINVAL ; } }
@@ -216,8 +215,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)if (sum !=0xffff || ah->eep_ops->get_eeprom_ver (ah) !=AR5416_EEP_VER || ah->eep_ops->get_eeprom_rev (ah) <AR5416_EEP_NO_BACK_VER ) { -ath_print (common,ATH_DBG_FATAL , -"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , +ath_err (common,"Bad EEPROM checksum 0x%x or revision 0x%04x\n" , sum, ah->eep_ops->get_eeprom_ver (ah));return -EINVAL ; }
drivers/net/wireless/ath/ath9k/gpio.c +2 -2
@@ -103,8 +103,8 @@ static int ath_register_led(struct ath_softc *sc, struct ath_led *led, ret =led_classdev_register (wiphy_dev (sc->hw->wiphy), &led->led_cdev);if (ret) -ath_print (ath9k_hw_common (sc->sc_ah),ATH_DBG_FATAL , -"Failed to register led:%s" , led->name); +ath_err (ath9k_hw_common (sc->sc_ah), +"Failed to register led:%s" , led->name);else led->registered =1 ;return ret;
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +2 -2
@@ -246,8 +246,8 @@ void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv) qi.tqi_cwmax = qi_be.tqi_cwmax;if (!ath9k_hw_set_txq_props (ah, priv->beaconq, &qi)) { -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , -"Unable to update beacon queue %u!\n" , qnum); +ath_err (ath9k_hw_common (ah), +"Unable to update beacon queue %u!\n" , qnum); }else {ath9k_hw_resettxqueue (ah, priv->beaconq); }
drivers/net/wireless/ath/ath9k/htc_drv_init.c +10 -17
@@ -495,37 +495,31 @@ static int ath9k_init_queues(struct ath9k_htc_priv *priv) priv->beaconq =ath9k_hw_beaconq_setup (priv->ah);if (priv->beaconq ==-1 ) { -ath_print (common,ATH_DBG_FATAL , -"Unable to setup BEACON xmit queue\n" ); +ath_err (common,"Unable to setup BEACON xmit queue\n" ); goto err; } priv->cabq =ath9k_htc_cabq_setup (priv);if (priv->cabq ==-1 ) { -ath_print (common,ATH_DBG_FATAL , -"Unable to setup CAB xmit queue\n" ); +ath_err (common,"Unable to setup CAB xmit queue\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_BE )) { -ath_print (common,ATH_DBG_FATAL , -"Unable to setup xmit queue for BE traffic\n" ); +ath_err (common,"Unable to setup xmit queue for BE traffic\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_BK )) { -ath_print (common,ATH_DBG_FATAL , -"Unable to setup xmit queue for BK traffic\n" ); +ath_err (common,"Unable to setup xmit queue for BK traffic\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_VI )) { -ath_print (common,ATH_DBG_FATAL , -"Unable to setup xmit queue for VI traffic\n" ); +ath_err (common,"Unable to setup xmit queue for VI traffic\n" ); goto err; }if (!ath9k_htc_txq_setup (priv,WME_AC_VO )) { -ath_print (common,ATH_DBG_FATAL , -"Unable to setup xmit queue for VO traffic\n" ); +ath_err (common,"Unable to setup xmit queue for VO traffic\n" ); goto err; }
@@ -670,16 +664,15 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, ret =ath9k_hw_init (ah);if (ret) { -ath_print (common,ATH_DBG_FATAL , -"Unable to initialize hardware; " -"initialization status: %d\n" , ret); +ath_err (common, +"Unable to initialize hardware; initialization status: %d\n" , + ret); goto err_hw; } ret =ath9k_htc_init_debug (ah);if (ret) { -ath_print (common,ATH_DBG_FATAL , -"Unable to create debugfs files\n" ); +ath_err (common,"Unable to create debugfs files\n" ); goto err_debug; }
drivers/net/wireless/ath/ath9k/htc_drv_main.c +28 -31
143 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +10 -15
@@ -69,8 +69,8 @@ int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum, qi.tqi_readyTime = qinfo->tqi_readyTime;if (!ath9k_hw_set_txq_props (ah, qnum, &qi)) { -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , -"Unable to update hardware queue %u!\n" , qnum); +ath_err (ath9k_hw_common (ah), +"Unable to update hardware queue %u!\n" , qnum); error = -EIO ; }else {ath9k_hw_resettxqueue (ah, qnum);
@@ -296,8 +296,7 @@ void ath9k_htc_txep(void *drv_priv, struct sk_buff *skb, (ep_id == priv->data_vo_ep)) { skb_pull(skb, sizeof(struct tx_frame_hdr)); } else { -ath_print (common,ATH_DBG_FATAL , -"Unsupported TX EPID: %d\n" , ep_id); +ath_err (common,"Unsupported TX EPID: %d\n" , ep_id);dev_kfree_skb_any (skb);return ; }
@@ -337,9 +336,8 @@ bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype)return false;if (qnum >=ARRAY_SIZE (priv->hwq_map)) { -ath_print (common,ATH_DBG_FATAL , -"qnum %u out of range, max %u!\n" , - qnum, (unsigned int )ARRAY_SIZE (priv->hwq_map)); +ath_err (common,"qnum %u out of range, max %zu!\n" , + qnum,ARRAY_SIZE (priv->hwq_map));ath9k_hw_releasetxqueue (ah, qnum);return false; }
@@ -490,8 +488,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,__le16 fc;if (skb->len <=HTC_RX_FRAME_HEADER_SIZE ) { -ath_print (common,ATH_DBG_FATAL , -"Corrupted RX frame, dropping\n" ); +ath_err (common,"Corrupted RX frame, dropping\n" ); goto rx_next; }
@@ -499,10 +496,9 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,if (be16_to_cpu (rxstatus->rs_datalen) - (skb->len -HTC_RX_FRAME_HEADER_SIZE ) !=0 ) { -ath_print (common,ATH_DBG_FATAL , -"Corrupted RX data len, dropping " -"(dlen: %d, skblen: %d)\n" , - rxstatus->rs_datalen, skb->len); +ath_err (common, +"Corrupted RX data len, dropping (dlen: %d, skblen: %d)\n" , + rxstatus->rs_datalen, skb->len); goto rx_next; }
@@ -728,8 +724,7 @@ int ath9k_rx_init(struct ath9k_htc_priv *priv)for (i =0 ; i <ATH9K_HTC_RXBUF ; i++) { rxbuf =kzalloc (sizeof (struct ath9k_htc_rxbuf ),GFP_KERNEL );if (rxbuf ==NULL ) { -ath_print (common,ATH_DBG_FATAL , -"Unable to allocate RX buffers\n" ); +ath_err (common,"Unable to allocate RX buffers\n" ); goto err; }list_add_tail (&rxbuf->list, &priv->rx.rxbuf);
drivers/net/wireless/ath/ath9k/hw.c +33 -45
179 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/init.c +2 -4
@@ -283,8 +283,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,/* ath_desc must be a multiple of DWORDs */ if ((desc_len %4 ) !=0 ) { -ath_print (common,ATH_DBG_FATAL , -"ath_desc not DWORD aligned\n" ); +ath_err (common,"ath_desc not DWORD aligned\n" );BUG_ON ((desc_len %4 ) !=0 ); error = -ENOMEM ; goto fail;
@@ -569,8 +568,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, ret =ath9k_init_debug (ah);if (ret) { -ath_print (common,ATH_DBG_FATAL , -"Unable to create debugfs files\n" ); +ath_err (common,"Unable to create debugfs files\n" ); goto err_debug; }
drivers/net/wireless/ath/ath9k/mac.c +13 -18
@@ -204,9 +204,8 @@ bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q) wait = wait_time;while (ath9k_hw_numtxpending (ah, q)) {if ((--wait) ==0 ) { -ath_print (common,ATH_DBG_FATAL , -"Failed to stop TX DMA in 100 " -"msec after killing last frame\n" ); +ath_err (common, +"Failed to stop TX DMA in 100 msec after killing last frame\n" );break ; }udelay (ATH9K_TIME_QUANTUM );
@@ -368,14 +367,12 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, ATH9K_TX_QUEUE_INACTIVE)break ;if (q == pCap->total_queues) { -ath_print (common,ATH_DBG_FATAL , -"No available TX queue\n" ); +ath_err (common,"No available TX queue\n" );return -1 ; }break ;default : -ath_print (common,ATH_DBG_FATAL , -"Invalid TX queue type: %u\n" , type); +ath_err (common,"Invalid TX queue type: %u\n" , type);return -1 ; }
@@ -383,8 +380,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, qi = &ah->txq[q];if (qi->tqi_type !=ATH9K_TX_QUEUE_INACTIVE ) { -ath_print (common,ATH_DBG_FATAL , -"TX queue: %u already active\n" , q); +ath_err (common,"TX queue: %u already active\n" , q);return -1 ; }memset (qi,0 ,sizeof (struct ath9k_tx_queue_info ));
@@ -735,9 +731,9 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set) AR_DIAG_RX_ABORT)); reg =REG_READ (ah,AR_OBS_BUS_1 ); -ath_print (ath9k_hw_common (ah),ATH_DBG_FATAL , -"RX failed to go idle in 10 ms RXSM=0x%x\n" , - reg); +ath_err (ath9k_hw_common (ah), +"RX failed to go idle in 10 ms RXSM=0x%x\n" , + reg);return false; }
@@ -791,12 +787,11 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah) }if (i ==0 ) { -ath_print (common,ATH_DBG_FATAL , -"DMA failed to stop in %d ms " -"AR_CR=0x%08x AR_DIAG_SW=0x%08x\n" , -AH_RX_STOP_DMA_TIMEOUT /1000 , -REG_READ (ah,AR_CR ), -REG_READ (ah,AR_DIAG_SW )); +ath_err (common, +"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n" , +AH_RX_STOP_DMA_TIMEOUT /1000 , +REG_READ (ah,AR_CR ), +REG_READ (ah,AR_DIAG_SW ));return false; }else {return true;
drivers/net/wireless/ath/ath9k/main.c +23 -33
126 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/pci.c +3 -4
@@ -59,10 +59,9 @@ static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)if (pdata) {if (off >= (ARRAY_SIZE (pdata->eeprom_data))) { -ath_print (common,ATH_DBG_FATAL , -"%s: eeprom read failed, offset %08x " -"is out of range\n" , - __func__, off); +ath_err (common, +"%s: eeprom read failed, offset %08x is out of range\n" , + __func__, off); } *data = pdata->eeprom_data[off];
drivers/net/wireless/ath/ath9k/rc.c +2 -2
@@ -1576,8 +1576,8 @@ static void *ath_rate_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp rate_priv =kzalloc (sizeof (struct ath_rate_priv ), gfp);if (!rate_priv) { -ath_print (ath9k_hw_common (sc->sc_ah),ATH_DBG_FATAL , -"Unable to allocate private rc structure\n" ); +ath_err (ath9k_hw_common (sc->sc_ah), +"Unable to allocate private rc structure\n" );return NULL ; }
drivers/net/wireless/ath/ath9k/recv.c +7 -8
@@ -269,7 +269,7 @@ static int ath_rx_edma_init(struct ath_softc *sc, int nbufs)dev_kfree_skb_any (skb); bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (common,ATH_DBG_FATAL , +ath_err (common,"dma_mapping_error() on RX init\n" ); error = -ENOMEM ; goto rx_init_fail;
@@ -335,9 +335,9 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) error =ath_descdma_setup (sc, &sc->rx.rxdma, &sc->rx.rxbuf,"rx" , nbufs,1 ,0 );if (error !=0 ) { -ath_print (common,ATH_DBG_FATAL , -"failed to allocate rx descriptors: %d\n" , - error); +ath_err (common, +"failed to allocate rx descriptors: %d\n" , + error); goto err; }
@@ -358,8 +358,8 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)dev_kfree_skb_any (skb); bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (common,ATH_DBG_FATAL , -"dma_mapping_error() on RX init\n" ); +ath_err (common, +"dma_mapping_error() on RX init\n" ); error = -ENOMEM ; goto err; }
@@ -1725,8 +1725,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)dev_kfree_skb_any (requeue_skb); bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (common,ATH_DBG_FATAL , -"dma_mapping_error() on RX\n" ); +ath_err (common,"dma_mapping_error() on RX\n" );ath_rx_send_to_mac80211 (hw, sc, skb, rxs);break ; }
drivers/net/wireless/ath/ath9k/xmit.c +14 -16
@@ -985,9 +985,8 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype)return NULL ; }if (qnum >=ARRAY_SIZE (sc->tx.txq)) { -ath_print (common,ATH_DBG_FATAL , -"qnum %u out of range, max %u!\n" , - qnum, (unsigned int )ARRAY_SIZE (sc->tx.txq)); +ath_err (common,"qnum %u out of range, max %u!\n" , + qnum, (unsigned int )ARRAY_SIZE (sc->tx.txq));ath9k_hw_releasetxqueue (ah, qnum);return NULL ; }
@@ -1038,8 +1037,8 @@ int ath_txq_update(struct ath_softc *sc, int qnum, qi.tqi_readyTime = qinfo->tqi_readyTime;if (!ath9k_hw_set_txq_props (ah, qnum, &qi)) { -ath_print (ath9k_hw_common (sc->sc_ah),ATH_DBG_FATAL , -"Unable to update hardware queue %u!\n" , qnum); +ath_err (ath9k_hw_common (sc->sc_ah), +"Unable to update hardware queue %u!\n" , qnum); error = -EIO ; }else {ath9k_hw_resettxqueue (ah, qnum);
@@ -1197,14 +1196,13 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)if (npend) {int r; -ath_print (common,ATH_DBG_FATAL , -"Failed to stop TX DMA. Resetting hardware!\n" ); +ath_err (common,"Failed to stop TX DMA. Resetting hardware!\n" ); r =ath9k_hw_reset (ah, sc->sc_ah->curchan, ah->caldata, false);if (r) -ath_print (common,ATH_DBG_FATAL , -"Unable to reset hardware; reset status %d\n" , - r); +ath_err (common, +"Unable to reset hardware; reset status %d\n" , + r); }for (i =0 ; i <ATH9K_NUM_TX_QUEUES ; i++) {
@@ -1644,8 +1642,8 @@ static struct ath_buf *ath_tx_setup_buffer(struct ieee80211_hw *hw,if (unlikely (dma_mapping_error (sc->dev, bf->bf_buf_addr))) { bf->bf_mpdu =NULL ; bf->bf_buf_addr =0 ; -ath_print (ath9k_hw_common (sc->sc_ah),ATH_DBG_FATAL , -"dma_mapping_error() on TX\n" ); +ath_err (ath9k_hw_common (sc->sc_ah), +"dma_mapping_error() on TX\n" );ath_tx_return_buffer (sc, bf);return NULL ; }
@@ -2241,16 +2239,16 @@ int ath_tx_init(struct ath_softc *sc, int nbufs) error =ath_descdma_setup (sc, &sc->tx.txdma, &sc->tx.txbuf,"tx" , nbufs,1 ,1 );if (error !=0 ) { -ath_print (common,ATH_DBG_FATAL , -"Failed to allocate tx descriptors: %d\n" , error); +ath_err (common, +"Failed to allocate tx descriptors: %d\n" , error); goto err; } error =ath_descdma_setup (sc, &sc->beacon.bdma, &sc->beacon.bbuf,"beacon" ,ATH_BCBUF ,1 ,1 );if (error !=0 ) { -ath_print (common,ATH_DBG_FATAL , -"Failed to allocate beacon descriptors: %d\n" , error); +ath_err (common, +"Failed to allocate beacon descriptors: %d\n" , error); goto err; }
drivers/net/wireless/ath/key.c +5 -10
@@ -37,8 +37,7 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry)void *ah = common->ah;if (entry >= common->keymax) { -ath_print (common,ATH_DBG_FATAL , -"keychache entry %u out of range\n" , entry); +ath_err (common,"keycache entry %u out of range\n" , entry);return false; }
@@ -75,8 +74,7 @@ static bool ath_hw_keysetmac(struct ath_common *common,void *ah = common->ah;if (entry >= common->keymax) { -ath_print (common,ATH_DBG_FATAL , -"keychache entry %u out of range\n" , entry); +ath_err (common,"keycache entry %u out of range\n" , entry);return false; }
@@ -117,8 +115,7 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry,u32 keyType;if (entry >= common->keymax) { -ath_print (common,ATH_DBG_FATAL , -"keycache entry %u out of range\n" , entry); +ath_err (common,"keycache entry %u out of range\n" , entry);return false; }
@@ -159,8 +156,7 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry, keyType =AR_KEYTABLE_TYPE_CLR ;break ;default : -ath_print (common,ATH_DBG_FATAL , -"cipher %u not supported\n" , k->kv_type); +ath_err (common,"cipher %u not supported\n" , k->kv_type);return false; }
@@ -341,8 +337,7 @@ static int ath_setkey_tkip(struct ath_common *common, u16 keyix, const u8 *key,memcpy (hk->kv_mic, key_txmic,sizeof (hk->kv_mic));if (!ath_hw_set_keycache_entry (common, keyix, hk,NULL )) {/* TX MIC entry failed. No need to proceed further */ -ath_print (common,ATH_DBG_FATAL , -"Setting TX MIC Key Failed\n" ); +ath_err (common,"Setting TX MIC Key Failed\n" );return 0 ; }
Signature · 1 line
1.7.3.2.245.g03276.dirty
PATCH 1/1 MAINTAINERS: Add ATH GENERIC UTILITIES
In reply to Luis R. RodriguezThis file pattern is not currently shown as maintained by atheros. Perhaps it should be?
--- MAINTAINERS | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
MAINTAINERS +6 -0
@@ -1080,6 +1080,12 @@ S: Supported F: Documentation/aoe/ F: drivers/block/aoe/ +ATHEROS ATH GENERIC UTILITIES +M: "Luis R. Rodriguez" <[email protected]> +L: linux-wireless at vger.kernel.org +S: Supported +F: drivers/net/wireless/ath/* + ATHEROS ATH5K WIRELESS DRIVER M: Jiri Slaby <[email protected]> M: Nick Kossifidis <[email protected]>
Re: [PATCH wireless-next] MAINTAINERS: Add ATH GENERIC UTILITIES
Quoted 4 lines · Joe Perches
This file pattern is not currently shown as maintained by atheros. ?Perhaps it should be?
Signed-off-by Joe Perches <[email protected]>
Sure but its maintained by the community and Atheros hackers, not just me.
Luis
Re: [PATCH wireless-next] MAINTAINERS: Add ATH GENERIC UTILITIES
Quoted 5 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
This file pattern is not currently shown as maintained by atheros. Perhaps it should be?
Signed-off-by Joe Perches <[email protected]>Sure but its maintained by the community and Atheros hackers, not just me.
No doubt.
$ git log next-20101130 -- drivers/net/wireless/ath/*.[ch] | \
grep -P "(^Author)" | cut -f2- -d":" | sort | uniq -c | sort -rn | head
27 Luis R. Rodriguez <[email protected]>
6 Felix Fietkau <[email protected]>
4 Bruno Randolf <[email protected]>
3 Sujith <[email protected]>
3 John W. Linville <[email protected]>
3 Joe Perches <[email protected]>
3 Bob Copeland <[email protected]>
2 Pavel Roskin <[email protected]>
2 Johannes Berg <[email protected]>
2 David S. Miller <[email protected]>Without any sort of MAINTAINERS entry, the results for files in that directory are like this:
$ ./scripts/get_maintainer.pl -f --rolestats drivers/net/wireless/ath/main.c "John W. Linville" <[email protected]> (maintainer:NETWORKING [WIREL...) linux-wireless at vger.kernel.org (open list:NETWORKING [WIREL...) netdev at vger.kernel.org (open list:NETWORKING DRIVERS) linux-kernel at vger.kernel.org (open list)
Perhaps you want to be cc'd?
Perhaps there are atheros lists that should be cc'd? If cc'ing linux-wireless is good enough, that's good enough for me too.
cheers, Joe
Re: [PATCH wireless-next] MAINTAINERS: Add ATH GENERIC UTILITIES
Quoted 31 lines · Joe Perches
Quoted 5 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
This file pattern is not currently shown as maintained by atheros. ?Perhaps it should be?
Signed-off-by Joe Perches <[email protected]>Sure but its maintained by the community and Atheros hackers, not just me.
No doubt.
$ git log next-20101130 -- drivers/net/wireless/ath/*.[ch] | \ ? ? ? ?grep -P "(^Author)" | cut -f2- -d":" | sort | uniq -c | sort -rn | head ? ? 27 ?Luis R. Rodriguez <[email protected]> ? ? ?6 ?Felix Fietkau <[email protected]> ? ? ?4 ?Bruno Randolf <[email protected]> ? ? ?3 ?Sujith <[email protected]> ? ? ?3 ?John W. Linville <[email protected]> ? ? ?3 ?Joe Perches <[email protected]> ? ? ?3 ?Bob Copeland <[email protected]> ? ? ?2 ?Pavel Roskin <[email protected]> ? ? ?2 ?Johannes Berg <[email protected]> ? ? ?2 ?David S. Miller <[email protected]>Without any sort of
MAINTAINERSentry, the results for files in that directory are like this:$ ./scripts/get_maintainer.pl -f --rolestats drivers/net/wireless/ath/main.c "John W. Linville" <[email protected]> (maintainer:NETWORKING [WIREL...) linux-wireless at vger.kernel.org (open list:NETWORKING [WIREL...) netdev at vger.kernel.org (open list:NETWORKING DRIVERS) linux-kernel at vger.kernel.org (open list)
Quoted 4 lines
Perhaps you want to be cc'd?
Perhaps there are atheros lists that should be cc'd? If cc'ing linux-wireless is good enough, that's good enough for me too.
OK you're patch is fine then.
Luis
Re: [ath9k-devel] [PATCH wireless-next] MAINTAINERS: Add ATH GENERIC UTILITIES
Quoted 32 lines · Luis R. Rodriguez
Quoted 31 lines · Joe Perches
Quoted 5 lines · Luis R. Rodriguez
Quoted 3 lines · Joe Perches
This file pattern is not currently shown as maintained by atheros. ?Perhaps it should be?
Signed-off-by Joe Perches <[email protected]>Sure but its maintained by the community and Atheros hackers, not just me.
No doubt.
$ git log next-20101130 -- drivers/net/wireless/ath/*.[ch] | \ ? ? ? ?grep -P "(^Author)" | cut -f2- -d":" | sort | uniq -c | sort -rn | head ? ? 27 ?Luis R. Rodriguez <[email protected]> ? ? ?6 ?Felix Fietkau <[email protected]> ? ? ?4 ?Bruno Randolf <[email protected]> ? ? ?3 ?Sujith <[email protected]> ? ? ?3 ?John W. Linville <[email protected]> ? ? ?3 ?Joe Perches <[email protected]> ? ? ?3 ?Bob Copeland <[email protected]> ? ? ?2 ?Pavel Roskin <[email protected]> ? ? ?2 ?Johannes Berg <[email protected]> ? ? ?2 ?David S. Miller <[email protected]>Without any sort of
MAINTAINERSentry, the results for files in that directory are like this:$ ./scripts/get_maintainer.pl -f --rolestats drivers/net/wireless/ath/main.c "John W. Linville" <[email protected]> (maintainer:NETWORKING [WIREL...) linux-wireless at vger.kernel.org (open list:NETWORKING [WIREL...) netdev at vger.kernel.org (open list:NETWORKING DRIVERS) linux-kernel at vger.kernel.org (open list)
Quoted 6 lines
Quoted 4 lines
Perhaps you want to be cc'd?
Perhaps there are atheros lists that should be cc'd? If cc'ing linux-wireless is good enough, that's good enough for me too.OK you're patch is fine then.
But you sent it as part of an old thread, not sure if John will see it.
Luis
Re: [ath9k-devel] [PATCH wireless-next] MAINTAINERS: Add ATH GENERIC UTILITIES
Quoted 1 line · Luis R. Rodriguez
But you sent it as part of an old thread, not sure if John will see it.
He was on the To: list, I think he'll see it eventually.