ath: Fix ath_dbg uses missing newlines and access beyond array bound
Subsystems (5)
PATCH 1/2 ath: Fix ath_dbg uses missing newlines and access beyond array bound
Add missing newlines to ath_dbg uses
ar9300RateSize is not a power of 4, fix to print array line by line.
--- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 29 ++--------------------- drivers/net/wireless/ath/ath9k/calib.c | 4 +- drivers/net/wireless/ath/ath9k/gpio.c | 6 ++-- drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 7 ++--- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- 5 files changed, 12 insertions(+), 36 deletions(-)
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +3 -26
@@ -3342,7 +3342,7 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, goto fail; found: -ath_dbg (common,ATH_DBG_EEPROM ,"Found valid EEPROM data" ); +ath_dbg (common,ATH_DBG_EEPROM ,"Found valid EEPROM data\n" );for (it =0 ; it <MSTATE ; it++) {if (!read (ah, cptr, word,COMP_HDR_LEN ))
@@ -4084,22 +4084,9 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq,ar9003_hw_eeprom_get_ht40_tgt_pwr (ah,HT_TARGET_RATE_23 , freq, is2GHz) + ht40PowerIncForPdadc; -while (i < ar9300RateSize) { -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - +for (i =0 ; i < ar9300RateSize; i++) {ath_dbg (common,ATH_DBG_EEPROM ,"TPC[%02d] 0x%08x\n" , i, targetPowerValT2[i]); - i++; } }
@@ -4687,17 +4674,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,for (i =0 ; i < ar9300RateSize; i++) {ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x\n\n" , i, targetPowerValT2[i]); - i++; +"TPC[%02d] 0x%08x\n" , i, targetPowerValT2[i]); }/*
drivers/net/wireless/ath/ath9k/calib.c +2 -2
@@ -324,12 +324,12 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf)if (nf[i] >ATH9K_NF_TOO_HIGH ) {ath_dbg (common,ATH_DBG_CALIBRATE , -"NF[%d] (%d) > MAX (%d), correcting to MAX" , +"NF[%d] (%d) > MAX (%d), correcting to MAX\n" , i, nf[i],ATH9K_NF_TOO_HIGH ); nf[i] = limit->max; }else if (nf[i] < limit->min) {ath_dbg (common,ATH_DBG_CALIBRATE , -"NF[%d] (%d) < MIN (%d), correcting to NOM" , +"NF[%d] (%d) < MIN (%d), correcting to NOM\n" , i, nf[i], limit->min); nf[i] = limit->nominal; }
drivers/net/wireless/ath/ath9k/gpio.c +3 -3
@@ -237,12 +237,12 @@ static void ath_detect_bt_priority(struct ath_softc *sc)/* Detect if colocated bt started scanning */ if (btcoex->bt_priority_cnt >=ATH_BT_CNT_SCAN_THRESHOLD ) {ath_dbg (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX , -"BT scan detected" ); +"BT scan detected\n" ); sc->sc_flags |= (SC_OP_BT_SCAN |SC_OP_BT_PRIORITY_DETECTED ); }else if (btcoex->bt_priority_cnt >=ATH_BT_CNT_THRESHOLD ) {ath_dbg (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX , -"BT priority traffic detected" ); +"BT priority traffic detected\n" ); sc->sc_flags |=SC_OP_BT_PRIORITY_DETECTED ; }
@@ -379,7 +379,7 @@ void ath9k_btcoex_timer_resume(struct ath_softc *sc)struct ath_hw *ah = sc->sc_ah;ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX , -"Starting btcoex timers" ); +"Starting btcoex timers\n" );/* make sure duty cycle timer is also stopped when resuming */ if (btcoex->hw_timer_enabled)
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +3 -4
@@ -21,12 +21,12 @@ static void ath_detect_bt_priority(struct ath9k_htc_priv *priv)/* Detect if colocated bt started scanning */ if (btcoex->bt_priority_cnt >=ATH_BT_CNT_SCAN_THRESHOLD ) {ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX , -"BT scan detected" ); +"BT scan detected\n" ); priv->op_flags |= (OP_BT_SCAN |OP_BT_PRIORITY_DETECTED ); }else if (btcoex->bt_priority_cnt >=ATH_BT_CNT_THRESHOLD ) {ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX , -"BT priority traffic detected" ); +"BT priority traffic detected\n" ); priv->op_flags |=OP_BT_PRIORITY_DETECTED ; }
@@ -114,8 +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_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX , -"Starting btcoex work" ); +ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX ,"Starting btcoex work\n" ); btcoex->bt_priority_cnt =0 ; btcoex->bt_priority_time = jiffies;
drivers/net/wireless/ath/ath9k/htc_drv_main.c +1 -1
@@ -1133,7 +1133,7 @@ static int ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)spin_unlock_bh (&priv->tx_lock); }else {ath_dbg (ath9k_hw_common (priv->ah),ATH_DBG_XMIT , -"Tx failed" ); +"Tx failed\n" ); } goto fail_tx; }
Signature · 1 line
1.7.3.2.245.g03276.dirty
PATCH 2/2 ath: Fix logging message typos
Fix immunity misspelling.
Standardize strings from multiple modules.
Add spaces between words of concatenated strings.
--- drivers/net/wireless/ath/ath5k/ani.c | 2 +- drivers/net/wireless/ath/ath9k/ar9002_calib.c | 4 ++-- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 4 ++-- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 +- drivers/net/wireless/ath/ath9k/htc_hst.c | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-)
drivers/net/wireless/ath/ath5k/ani.c +1 -1
@@ -74,7 +74,7 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level)static const s8 fr[] = {-78 ,-80 };#endif if (level <0 || level >=ARRAY_SIZE (sz)) { -ATH5K_ERR (ah->ah_sc,"noise immuniy level %d out of range" , +ATH5K_ERR (ah->ah_sc,"noise immunity level %d out of range" , level);return ; }
drivers/net/wireless/ath/ath9k/ar9002_calib.c +2 -2
@@ -720,7 +720,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan)if (!ath9k_hw_wait (ah,AR_PHY_AGC_CONTROL ,AR_PHY_AGC_CONTROL_CAL ,0 ,AH_WAIT_TIMEOUT )) {ath_dbg (common,ATH_DBG_CALIBRATE , -"offset calibration failed to complete in 1ms; noisy ??\n" ); +"offset calibration failed to complete in 1ms; noisy environment?\n" );return false; }REG_CLR_BIT (ah,AR_PHY_TURBO ,AR_PHY_FC_DYN2040_EN );
@@ -734,7 +734,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan)if (!ath9k_hw_wait (ah,AR_PHY_AGC_CONTROL ,AR_PHY_AGC_CONTROL_CAL ,0 ,AH_WAIT_TIMEOUT )) {ath_dbg (common,ATH_DBG_CALIBRATE , -"offset calibration failed to complete in 1ms; noisy ??\n" ); +"offset calibration failed to complete in 1ms; noisy enfironment?\n" );return false; }
drivers/net/wireless/ath/ath9k/eeprom_4k.c +2 -2
@@ -90,7 +90,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) } }else {ath_err (common, -"Invalid EEPROM Magic. endianness mismatch.\n" ); +"Invalid EEPROM Magic. Endianness mismatch.\n" );return -EINVAL ; } }
@@ -1178,7 +1178,7 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)u16 spur_val =AR_NO_SPUR ;ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);switch (ah->config.spurmode) {
drivers/net/wireless/ath/ath9k/eeprom_9287.c +1 -1
@@ -1150,7 +1150,7 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,u16 spur_val =AR_NO_SPUR ;ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);switch (ah->config.spurmode) {
drivers/net/wireless/ath/ath9k/eeprom_def.c +1 -1
@@ -1458,7 +1458,7 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)u16 spur_val =AR_NO_SPUR ;ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);switch (ah->config.spurmode) {
drivers/net/wireless/ath/ath9k/htc_hst.c +3 -3
@@ -239,7 +239,7 @@ int htc_connect_service(struct htc_target *target,/* Find an available endpoint */ endpoint =get_next_avail_ep (target->endpoint);if (!endpoint) { -dev_err (target->dev,"Endpoint is not available for" +dev_err (target->dev,"Endpoint is not available for " "service %d\n" , service_connreq->service_id);return -EINVAL ; }
@@ -253,7 +253,7 @@ int htc_connect_service(struct htc_target *target, skb =alloc_skb (sizeof (struct htc_conn_svc_msg ) +sizeof (struct htc_frame_hdr ),GFP_ATOMIC );if (!skb) { -dev_err (target->dev,"Failed to allocate buf to send" +dev_err (target->dev,"Failed to allocate buf to send " "service connect req\n" );return -ENOMEM ; }
@@ -434,7 +434,7 @@ struct htc_target *ath9k_htc_hw_alloc(void *hif_handle, target =kzalloc (sizeof (struct htc_target ),GFP_KERNEL );if (!target) { -printk (KERN_ERR "Unable to allocate memory for" +printk (KERN_ERR "Unable to allocate memory for " "target device\n" );return NULL ; }
Signature · 1 line
1.7.3.2.245.g03276.dirty
Re: [ath9k-devel] [PATCH 2/2] ath: Fix logging message typos
Quoted 1 line · Joe Perches
+++
b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
..
drivers/net/wireless/ath/ath9k/ar9002_calib.c static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan) · line 737
Quoted 6 lines
drivers/net/wireless/ath/ath9k/ar9002_calib.c +1
-1@@ -734,7 +734,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan)if (!ath9k_hw_wait (ah,AR_PHY_AGC_CONTROL ,AR_PHY_AGC_CONTROL_CAL ,0 ,AH_WAIT_TIMEOUT )) {ath_dbg (common,ATH_DBG_CALIBRATE , -"offset calibration failed to complete in 1ms; noisy ??\n" ); +"offset calibration failed to complete in 1ms; noisy enfironment?\n" );
enfironment? :)
Quoted 1 line
(quoted diff) +1
-0+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
..
drivers/net/wireless/ath/ath9k/eeprom_4k.c static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) · line 1182
Quoted 7 lines
drivers/net/wireless/ath/ath9k/eeprom_4k.c +1
-1@@ -1178,7 +1178,7 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)u16 spur_val =AR_NO_SPUR ;ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);
Is this short for "spurious" ?
//Peter
Re: [ath9k-devel] [PATCH 2/2] ath: Fix logging message typos
Quoted 11 lines · Peter Stuge
Quoted 1 line · Joe Perches
+++
b/drivers/net/wireless/ath/ath9k/ar9002_calib.c..
drivers/net/wireless/ath/ath9k/ar9002_calib.c static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan) · line 737
Quoted 6 lines
drivers/net/wireless/ath/ath9k/ar9002_calib.c +1
-1@@ -734,7 +734,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan)if (!ath9k_hw_wait (ah,AR_PHY_AGC_CONTROL ,AR_PHY_AGC_CONTROL_CAL ,0 ,AH_WAIT_TIMEOUT )) {ath_dbg (common,ATH_DBG_CALIBRATE , -"offset calibration failed to complete in 1ms; noisy ??\n" ); +"offset calibration failed to complete in 1ms; noisy enfironment?\n" );enfironment? :)
Umm, what's a typo fix patch without more typos?
Correct? How dull...
Quoted 6 lines
drivers/net/wireless/ath/ath9k/eeprom_4k.c static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) · line 1182
Quoted 4 lines
drivers/net/wireless/ath/ath9k/eeprom_4k.c +1
-1ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);Is this short for "spurious" ?
Likely. Anyone want to change it to a whole word?
Nick Kossifidis
maintainerRe: [ath9k-devel] [PATCH 2/2] ath: Fix logging message typos
2010/12/2 Joe Perches <[email protected]>:
Quoted 16 lines · Peter Stuge
Quoted 11 lines
Quoted 1 line · Joe Perches
+++
b/drivers/net/wireless/ath/ath9k/ar9002_calib.c..
Review static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan) · line 737
Quoted 6 lines
(quoted diff) +1
-1@@ -734,7 +734,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan) ? ? if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL, ? ? ? ? ? ? ? ? ? ? ? 0, AH_WAIT_TIMEOUT)) { ? ? ? ? ? ? ath_dbg(common, ATH_DBG_CALIBRATE, - ? ? ? ? ? ? ? ? ? "offset calibration failed to complete in 1ms; noisy ??\n"); + ? ? ? ? ? ? ? ? ? "offset calibration failed to complete in 1ms; noisy enfironment?\n");enfironment? :)
Umm, what's a typo fix patch without more typos?
Correct? ?How dull...
Quoted 10 lines
Quoted 6 lines
Review static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan) · line 740
Quoted 4 lines
(quoted diff) +1
-1? ? ath_dbg(common, ATH_DBG_ANI, - ? ? ? ? ? "Getting spur idx %d is2Ghz. %d val %x\n", + ? ? ? ? ? "Getting spur idx:%d is2Ghz:%d val:%x\n", ? ? ? ? ? ? i, is2GHz, ah->config.spurchans[i][is2GHz]);Is this short for "spurious" ?
Likely. ?Anyone want to change it to a whole word?
Nope it stands for spur noise (harmonics)
http://www.patentgenius.com/patent/7835456.html
(I have to add that link to the comments, it's new ;-))
Signature · 3 lines
GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick
PATCH v2 2/2 ath: Fix logging message typos
In reply to Joe PerchesFix immunity misspelling.
Standardize strings from multiple modules.
Add spaces between words of concatenated strings.
---
V2: Fix a newly introduced tyop...
drivers/net/wireless/ath/ath5k/ani.c | 2 +- drivers/net/wireless/ath/ath9k/ar9002_calib.c | 4 ++-- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 4 ++-- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 +- drivers/net/wireless/ath/ath9k/htc_hst.c | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-)
drivers/net/wireless/ath/ath5k/ani.c +1 -1
@@ -74,7 +74,7 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level)static const s8 fr[] = {-78 ,-80 };#endif if (level <0 || level >=ARRAY_SIZE (sz)) { -ATH5K_ERR (ah->ah_sc,"noise immuniy level %d out of range" , +ATH5K_ERR (ah->ah_sc,"noise immunity level %d out of range" , level);return ; }
drivers/net/wireless/ath/ath9k/ar9002_calib.c +2 -2
@@ -720,7 +720,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan)if (!ath9k_hw_wait (ah,AR_PHY_AGC_CONTROL ,AR_PHY_AGC_CONTROL_CAL ,0 ,AH_WAIT_TIMEOUT )) {ath_dbg (common,ATH_DBG_CALIBRATE , -"offset calibration failed to complete in 1ms; noisy ??\n" ); +"offset calibration failed to complete in 1ms; noisy environment?\n" );return false; }REG_CLR_BIT (ah,AR_PHY_TURBO ,AR_PHY_FC_DYN2040_EN );
@@ -734,7 +734,7 @@ static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan)if (!ath9k_hw_wait (ah,AR_PHY_AGC_CONTROL ,AR_PHY_AGC_CONTROL_CAL ,0 ,AH_WAIT_TIMEOUT )) {ath_dbg (common,ATH_DBG_CALIBRATE , -"offset calibration failed to complete in 1ms; noisy ??\n" ); +"offset calibration failed to complete in 1ms; noisy environment?\n" );return false; }
drivers/net/wireless/ath/ath9k/eeprom_4k.c +2 -2
@@ -90,7 +90,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) } }else {ath_err (common, -"Invalid EEPROM Magic. endianness mismatch.\n" ); +"Invalid EEPROM Magic. Endianness mismatch.\n" );return -EINVAL ; } }
@@ -1178,7 +1178,7 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)u16 spur_val =AR_NO_SPUR ;ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);switch (ah->config.spurmode) {
drivers/net/wireless/ath/ath9k/eeprom_9287.c +1 -1
@@ -1150,7 +1150,7 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,u16 spur_val =AR_NO_SPUR ;ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);switch (ah->config.spurmode) {
drivers/net/wireless/ath/ath9k/eeprom_def.c +1 -1
@@ -1458,7 +1458,7 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)u16 spur_val =AR_NO_SPUR ;ath_dbg (common,ATH_DBG_ANI , -"Getting spur idx %d is2Ghz. %d val %x\n" , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , i, is2GHz, ah->config.spurchans[i][is2GHz]);switch (ah->config.spurmode) {
drivers/net/wireless/ath/ath9k/htc_hst.c +3 -3
@@ -239,7 +239,7 @@ int htc_connect_service(struct htc_target *target,/* Find an available endpoint */ endpoint =get_next_avail_ep (target->endpoint);if (!endpoint) { -dev_err (target->dev,"Endpoint is not available for" +dev_err (target->dev,"Endpoint is not available for " "service %d\n" , service_connreq->service_id);return -EINVAL ; }
@@ -253,7 +253,7 @@ int htc_connect_service(struct htc_target *target, skb =alloc_skb (sizeof (struct htc_conn_svc_msg ) +sizeof (struct htc_frame_hdr ),GFP_ATOMIC );if (!skb) { -dev_err (target->dev,"Failed to allocate buf to send" +dev_err (target->dev,"Failed to allocate buf to send " "service connect req\n" );return -ENOMEM ; }
@@ -434,7 +434,7 @@ struct htc_target *ath9k_htc_hw_alloc(void *hif_handle, target =kzalloc (sizeof (struct htc_target ),GFP_KERNEL );if (!target) { -printk (KERN_ERR "Unable to allocate memory for" +printk (KERN_ERR "Unable to allocate memory for " "target device\n" );return NULL ; }
Signature · 1 line
1.7.3.2.245.g03276.dirty
Quoted 38 lines · Joe Perches
Add missing newlines to
ath_dbguses
ar9300RateSize is not a power of 4, fix to print array line by line.Signed-off-by Joe Perches <[email protected]>--- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 29 ++--------------------- drivers/net/wireless/ath/ath9k/calib.c | 4 +- drivers/net/wireless/ath/ath9k/gpio.c | 6 ++-- drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 7 ++--- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- 5 files changed, 12 insertions(+), 36 deletions(-)drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +1
-10@@ -3342,7 +3342,7 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, goto fail; found: -ath_dbg (common,ATH_DBG_EEPROM ,"Found valid EEPROM data" ); +ath_dbg (common,ATH_DBG_EEPROM ,"Found valid EEPROM data\n" );for (it =0 ; it <MSTATE ; it++) {if (!read (ah, cptr, word,COMP_HDR_LEN ))@@ -4084,22 +4084,9 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq,ar9003_hw_eeprom_get_ht40_tgt_pwr (ah,HT_TARGET_RATE_23 , freq, is2GHz) + ht40PowerIncForPdadc; -while (i < ar9300RateSize) { -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; -
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq, · line 4091
Quoted 10 lines
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +1
-5-ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - +for (i =0 ; i < ar9300RateSize; i++) {ath_dbg (common,ATH_DBG_EEPROM ,"TPC[%02d] 0x%08x\n" , i, targetPowerValT2[i]); - i++; } }
Please send this hunk on a separate patch.
Luis
cover ath: logging message conversion
ath_print is misleading as it's only used with CONFIG_ATH_DEBUG.
Add and use the more normal <subsystem>_printk and <subsystem>_<level> printk equivalents. (ath_printk and ath_<level>)
Fix various defects in the current uses of ath_print formats and arguments: Unnecessary casts, missing newlines, multiple prints, and 1 loop which can exceed array bounds.
Bundled and integrated the individual patches into a single patch series.
Joe Perches (4):
ath: Add and use ath_printk and ath_<level>
ath: Convert ath_print(.., ATH_DBG_FATAL to ath_err
ath: Convert ath_print to ath_dbg
ath: Fix ath_dbg access beyond array bound
drivers/net/wireless/ath/ath.h | 103 +++++++++++ drivers/net/wireless/ath/ath5k/base.c | 1 - drivers/net/wireless/ath/ath5k/debug.c | 1 - drivers/net/wireless/ath/ath9k/ahb.c | 7 +- drivers/net/wireless/ath/ath9k/ani.c | 97 +++++------ drivers/net/wireless/ath/ath9k/ar5008_phy.c | 199 +++++++++------------ drivers/net/wireless/ath/ath9k/ar9002_calib.c | 220 +++++++++++------------ drivers/net/wireless/ath/ath9k/ar9002_hw.c | 6 +- drivers/net/wireless/ath/ath9k/ar9002_mac.c | 20 +- drivers/net/wireless/ath/ath9k/ar9003_calib.c | 217 +++++++++++----------- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 174 ++++++++----------- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 16 +- drivers/net/wireless/ath/ath9k/ar9003_phy.c | 205 ++++++++++----------- drivers/net/wireless/ath/ath9k/beacon.c | 79 ++++----- drivers/net/wireless/ath/ath9k/calib.c | 59 +++--- drivers/net/wireless/ath/ath9k/common.c | 4 +- drivers/net/wireless/ath/ath9k/common.h | 1 - drivers/net/wireless/ath/ath9k/eeprom.c | 4 +- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 72 ++++---- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 39 ++--- drivers/net/wireless/ath/ath9k/eeprom_def.c | 67 ++++---- drivers/net/wireless/ath/ath9k/gpio.c | 20 +- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 24 ++-- drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 15 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 63 +++---- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 192 ++++++++++---------- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 33 ++-- drivers/net/wireless/ath/ath9k/hw.c | 161 ++++++++--------- drivers/net/wireless/ath/ath9k/hw.h | 1 - drivers/net/wireless/ath/ath9k/init.c | 28 ++-- drivers/net/wireless/ath/ath9k/mac.c | 117 ++++++------- drivers/net/wireless/ath/ath9k/main.c | 185 +++++++++---------- drivers/net/wireless/ath/ath9k/pci.c | 7 +- drivers/net/wireless/ath/ath9k/rc.c | 18 +- drivers/net/wireless/ath/ath9k/recv.c | 48 +++--- drivers/net/wireless/ath/ath9k/virtual.c | 7 +- drivers/net/wireless/ath/ath9k/wmi.c | 12 +- drivers/net/wireless/ath/ath9k/xmit.c | 84 ++++----- drivers/net/wireless/ath/debug.c | 20 -- drivers/net/wireless/ath/debug.h | 92 ---------- drivers/net/wireless/ath/key.c | 28 ++-- drivers/net/wireless/ath/main.c | 20 ++ 42 files changed, 1306 insertions(+), 1460 deletions(-) delete mode 100644 drivers/net/wireless/ath/debug.h
Signature · 1 line
1.7.3.2.245.g03276.dirty
Re: [PATCH 0/4] ath: logging message conversion
Quoted 9 lines · Joe Perches
ath_printis misleading as it's only used withCONFIG_ATH_DEBUG.Add and use the more normal <subsystem>_printk and <subsystem>_<level> printk equivalents. (
ath_printkand ath_<level>)Fix various defects in the current uses of
ath_printformats and arguments: Unnecessary casts, missing newlines, multiple prints, and 1 loop which can exceed array bounds.
Quoted 7 lines
Bundled and integrated the individual patches into a single patch series.
Joe Perches (4):
ath: Add and useath_printkand ath_<level>
ath: Convert ath_print(..,ATH_DBG_FATALtoath_err
ath: Convertath_printtoath_dbg
ath: Fixath_dbgaccess beyond array bound
Is the Atheros crew happy with this series? They didn't seem to like the original patches very much...
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you linville at tuxdriver.com might be all we have. Be ready.
Re: [PATCH 0/4] ath: logging message conversion
Quoted 12 lines · John W. Linville
Quoted 11 lines · Joe Perches
ath_printis misleading as it's only used withCONFIG_ATH_DEBUG.Add and use the more normal <subsystem>_printk and <subsystem>_<level> printk equivalents. (
ath_printkand ath_<level>)Fix various defects in the current uses of
ath_printformats and arguments: Unnecessary casts, missing newlines, multiple prints, and 1 loop which can exceed array bounds.Bundled and integrated the individual patches into a single patch series.
Quoted 8 lines
Quoted 5 lines
Joe Perches (4):
ath: Add and useath_printkand ath_<level>
ath: Convert ath_print(..,ATH_DBG_FATALtoath_err
ath: Convertath_printtoath_dbg
ath: Fixath_dbgaccess beyond array boundIs the Atheros crew happy with this series? They didn't seem to like the original patches very much...
Its fine now that Joe has addressed some more important items. But I'd like for the patches to be applied last of all pending patches :)
Luis
PATCH 1/4 ath: Add and use ath_printk and ath_<level>
In reply to Luis R. RodriguezAdd 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
Re: [PATCH 1/4] ath: Add and use ath_printk and ath_<level>
Quoted 18 lines · Joe Perches
Add
ath_printkand ath_<level> similar todev_printkand dev_<level> fromdevice.hThis allows a more gradual rename of
ath_printto toath_dbgor perhapsath_debug.This basically removes
debug.hleaving only an #defineath_printkath_dbgthere and moving all the ATH_DBG_<foo> enums toath.hI do not think there's much purpose for struct
ath_common* being passed to theath_printkfunctions, but perhaps there might be.Signed-off-by Joe Perches <[email protected]>drivers/net/wireless/ath/ath.h +1
-0+#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg)
drivers/net/wireless/ath/ath.h bool ath_hw_keyreset(struct ath_common *common, u16 entry); · line 278
Quoted 10 lines
drivers/net/wireless/ath/ath.h +10
-0+ +#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)
Missing the "..." after "arg" -- I fixed it up...
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
PATCH 2/4 ath: Convert ath_print(.., ATH_DBG_FATAL to ath_err
In reply to Luis R. RodriguezSo these errors are always emitted at KERN_ERR level. Remove ARRAY_SIZE casts, use printf type %zu
--- 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);
@@ -189,8 +189,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 ; }
@@ -324,8 +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 , -"dma_mapping_error on beacon alloc\n" ); +ath_err (common,"dma_mapping_error on beacon alloc\n" );return -ENOMEM ; }
@@ -469,8 +467,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 ));
@@ -734,9 +730,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; }
@@ -790,12 +786,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; }
@@ -1727,8 +1727,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 %zu!\n" , + qnum,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++) {
@@ -1663,8 +1661,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 ; }
@@ -2260,16 +2258,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 3/4 ath: Convert ath_print to ath_dbg
In reply to Luis R. RodriguezRemove ath/debug.h and the includes of these files.
Coalesce long formats.
Correct a few misspellings and missing "\n"s from these logging messages. Remove unnecessary trailing space before a newline.
Remove ARRAY_SIZE casts, use printf type %zu
--- drivers/net/wireless/ath/ath5k/base.c | 1 - drivers/net/wireless/ath/ath5k/debug.c | 1 - drivers/net/wireless/ath/ath9k/ani.c | 97 +++++------ drivers/net/wireless/ath/ath9k/ar5008_phy.c | 187 +++++++++----------- drivers/net/wireless/ath/ath9k/ar9002_calib.c | 220 +++++++++++------------ drivers/net/wireless/ath/ath9k/ar9002_mac.c | 20 +- drivers/net/wireless/ath/ath9k/ar9003_calib.c | 217 +++++++++++----------- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 173 +++++++++--------- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 16 +- drivers/net/wireless/ath/ath9k/ar9003_phy.c | 205 ++++++++++----------- drivers/net/wireless/ath/ath9k/beacon.c | 65 ++++---- drivers/net/wireless/ath/ath9k/calib.c | 59 +++--- drivers/net/wireless/ath/ath9k/common.c | 4 +- drivers/net/wireless/ath/ath9k/common.h | 1 - drivers/net/wireless/ath/ath9k/eeprom.c | 4 +- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 61 +++---- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 26 ++-- drivers/net/wireless/ath/ath9k/eeprom_def.c | 53 +++--- drivers/net/wireless/ath/ath9k/gpio.c | 16 +- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 20 +- drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 15 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 36 ++-- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 133 +++++++------- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 8 +- drivers/net/wireless/ath/ath9k/hw.c | 83 +++++----- drivers/net/wireless/ath/ath9k/hw.h | 1 - drivers/net/wireless/ath/ath9k/init.c | 22 ++-- drivers/net/wireless/ath/ath9k/mac.c | 86 +++++----- drivers/net/wireless/ath/ath9k/main.c | 129 +++++++------- drivers/net/wireless/ath/ath9k/rc.c | 14 +- drivers/net/wireless/ath/ath9k/recv.c | 33 ++-- drivers/net/wireless/ath/ath9k/virtual.c | 7 +- drivers/net/wireless/ath/ath9k/wmi.c | 12 +- drivers/net/wireless/ath/ath9k/xmit.c | 54 +++--- drivers/net/wireless/ath/debug.h | 22 --- drivers/net/wireless/ath/key.c | 13 +- 36 files changed, 1009 insertions(+), 1105 deletions(-) delete mode 100644 drivers/net/wireless/ath/debug.h
drivers/net/wireless/ath/ath5k/base.c +0 -1
@@ -62,7 +62,6 @@#include "reg.h" #include "debug.h" #include "ani.h" -#include "../debug.h" static int modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );
drivers/net/wireless/ath/ath5k/debug.c +0 -1
@@ -60,7 +60,6 @@#include "base.h" #include "debug.h" -#include "../debug.h" static unsigned int ath5k_debug;module_param_named (debug, ath5k_debug, uint,0 );
drivers/net/wireless/ath/ath9k/ani.c +45 -52
168 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar5008_phy.c +84 -103
265 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9002_calib.c +108 -112
356 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9002_mac.c +10 -10
@@ -111,8 +111,8 @@ 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 , -"receive FIFO overrun interrupt\n" ); +ath_dbg (common,ATH_DBG_INTERRUPT , +"receive FIFO overrun interrupt\n" ); } *masked |= mask2;
@@ -147,25 +147,25 @@ 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 , -"received PCI FATAL interrupt\n" ); +ath_dbg (common,ATH_DBG_ANY , +"received PCI FATAL interrupt\n" ); }if (sync_cause &AR_INTR_SYNC_HOST1_PERR ) { -ath_print (common,ATH_DBG_ANY , -"received PCI PERR interrupt\n" ); +ath_dbg (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 , -"AR_INTR_SYNC_RADM_CPL_TIMEOUT\n" ); +ath_dbg (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 , -"AR_INTR_SYNC_LOCAL_TIMEOUT\n" ); +ath_dbg (common,ATH_DBG_INTERRUPT , +"AR_INTR_SYNC_LOCAL_TIMEOUT\n" ); }REG_WRITE (ah,AR_INTR_SYNC_CAUSE_CLR , sync_cause);
drivers/net/wireless/ath/ath9k/ar9003_calib.c +107 -110
383 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +83 -90
330 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9003_mac.c +8 -8
@@ -182,8 +182,8 @@ 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 , -"AR_INTR_SYNC_LOCAL_TIMEOUT\n" ); +ath_dbg (common,ATH_DBG_INTERRUPT , +"AR_INTR_SYNC_LOCAL_TIMEOUT\n" );REG_WRITE (ah,AR_INTR_SYNC_CAUSE_CLR , sync_cause); (void )REG_READ (ah,AR_INTR_SYNC_CAUSE_CLR );
@@ -249,8 +249,8 @@ 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 , -"Tx Descriptor error %x\n" , ads->ds_info); +ath_dbg (ath9k_hw_common (ah),ATH_DBG_XMIT , +"Tx Descriptor error %x\n" , ads->ds_info);memset (ads,0 ,sizeof (*ads));return -EIO ; }
@@ -658,10 +658,10 @@ 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 , -"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); +ath_dbg (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);REG_WRITE (ah,AR_Q_STATUS_RING_START , ah->ts_paddr_start);REG_WRITE (ah,AR_Q_STATUS_RING_END , ah->ts_paddr_end);
drivers/net/wireless/ath/ath9k/ar9003_phy.c +96 -109
277 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/beacon.c +32 -33
135 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/calib.c +29 -30
105 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/common.c +2 -2
@@ -180,8 +180,8 @@ void ath9k_cmn_btcoex_bt_stomp(struct ath_common *common, AR_STOMP_NONE_WLAN_WGHT);break ;default : -ath_print (common,ATH_DBG_BTCOEX , -"Invalid Stomptype\n" ); +ath_dbg (common,ATH_DBG_BTCOEX , +"Invalid Stomptype\n" );break ; }
drivers/net/wireless/ath/ath9k/common.h +0 -1
@@ -17,7 +17,6 @@#include <net/mac80211.h> #include "../ath.h" -#include "../debug.h" #include "hw.h" #include "hw-ops.h"
drivers/net/wireless/ath/ath9k/eeprom.c +2 -2
@@ -273,8 +273,8 @@ 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 , -"Invalid chainmask configuration\n" ); +ath_dbg (common,ATH_DBG_EEPROM , +"Invalid chainmask configuration\n" );break ; } }
drivers/net/wireless/ath/ath9k/eeprom_4k.c +30 -31
112 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/eeprom_9287.c +13 -13
@@ -43,15 +43,15 @@ 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 , -"Reading from EEPROM, not flash\n" ); +ath_dbg (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 , -"Unable to read eeprom region\n" ); +ath_dbg (common,ATH_DBG_EEPROM , +"Unable to read eeprom region\n" );return false; } eep_data++;
@@ -76,8 +76,8 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)return false; } -ath_print (common,ATH_DBG_EEPROM , -"Read Magic = 0x%04X\n" , magic); +ath_dbg (common,ATH_DBG_EEPROM , +"Read Magic = 0x%04X\n" , magic);if (magic !=AR5416_EEPROM_MAGIC ) { magic2 =swab16 (magic);
@@ -99,8 +99,8 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) } } -ath_print (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , - need_swap ?"True" :"False" ); +ath_dbg (common,ATH_DBG_EEPROM ,"need_swap = %s.\n" , + need_swap ?"True" :"False" );if (need_swap) el =swab16 (ah->eeprom.map9287.baseEepHeader.length);
@@ -1149,17 +1149,17 @@ 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 , -"Getting spur idx %d is2Ghz. %d val %x\n" , - i, is2GHz, ah->config.spurchans[i][is2GHz]); +ath_dbg (common,ATH_DBG_ANI , +"Getting spur idx:%d is2Ghz:%d val:%x\n" , + i, is2GHz, ah->config.spurchans[i][is2GHz]);switch (ah->config.spurmode) {case SPUR_DISABLE :break ;case SPUR_ENABLE_IOCTL : spur_val = ah->config.spurchans[i][is2GHz]; -ath_print (common,ATH_DBG_ANI , -"Getting spur val from new loc. %d\n" , spur_val); +ath_dbg (common,ATH_DBG_ANI , +"Getting spur val from new loc. %d\n" , spur_val);break ;case SPUR_ENABLE_EEPROM : spur_val =EEP_MAP9287_SPURCHAN ;
drivers/net/wireless/ath/ath9k/eeprom_def.c +26 -27
95 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/gpio.c +8 -8
@@ -236,13 +236,13 @@ 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 , -"BT scan detected" ); +ath_dbg (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX , +"BT scan detected\n" ); 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 , -"BT priority traffic detected" ); +ath_dbg (ath9k_hw_common (sc->sc_ah),ATH_DBG_BTCOEX , +"BT priority traffic detected\n" ); sc->sc_flags |=SC_OP_BT_PRIORITY_DETECTED ; }
@@ -331,8 +331,8 @@ 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 , -"no stomp timer running\n" ); +ath_dbg (common,ATH_DBG_BTCOEX , +"no stomp timer running\n" );spin_lock_bh (&btcoex->btcoex_lock);
@@ -378,8 +378,8 @@ 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 , -"Starting btcoex timers" ); +ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX , +"Starting btcoex timers\n" );/* make sure duty cycle timer is also stopped when resuming */ if (btcoex->hw_timer_enabled)
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +10 -10
@@ -123,11 +123,11 @@ 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 , -"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); +ath_dbg (common,ATH_DBG_BEACON ,"tsf: %llu tsftu: %u\n" , tsf, tsftu); +ath_dbg (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);/* Set the computed STA beacon timers */
@@ -154,9 +154,9 @@ 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 , -"IBSS Beacon config, intval: %d, imask: 0x%x\n" , - bss_conf->beacon_interval, imask); +ath_dbg (common,ATH_DBG_BEACON , +"IBSS Beacon config, intval: %d, imask: 0x%x\n" , + bss_conf->beacon_interval, imask);WMI_CMD (WMI_DISABLE_INTR_CMDID );ath9k_hw_beaconinit (priv->ah, nexttbtt, intval);
@@ -278,8 +278,8 @@ 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 , -"Unsupported beaconing mode\n" ); +ath_dbg (common,ATH_DBG_CONFIG , +"Unsupported beaconing mode\n" );return ; } }
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +7 -8
@@ -20,13 +20,13 @@ 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 , -"BT scan detected" ); +ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX , +"BT scan detected\n" ); 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 , -"BT priority traffic detected" ); +ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX , +"BT priority traffic detected\n" ); priv->op_flags |=OP_BT_PRIORITY_DETECTED ; }
@@ -83,8 +83,8 @@ 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 , -"time slice work for bt and wlan\n" ); +ath_dbg (common,ATH_DBG_BTCOEX , +"time slice work for bt and wlan\n" );if (btcoex->bt_stomp_type ==ATH_BTCOEX_STOMP_LOW || is_btscan)ath9k_cmn_btcoex_bt_stomp (common,ATH_BTCOEX_STOMP_NONE );
@@ -114,8 +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 , -"Starting btcoex work" ); +ath_dbg (ath9k_hw_common (ah),ATH_DBG_BTCOEX ,"Starting btcoex work\n" ); btcoex->bt_priority_cnt =0 ; btcoex->bt_priority_time = jiffies;
drivers/net/wireless/ath/ath9k/htc_drv_init.c +18 -18
@@ -288,9 +288,9 @@ 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 , -"REGISTER READ FAILED: (0x%04x, %d)\n" , - reg_offset, r); +ath_dbg (common,ATH_DBG_WMI , +"REGISTER READ FAILED: (0x%04x, %d)\n" , + reg_offset, r);return -EIO ; }
@@ -313,9 +313,9 @@ 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 , -"REGISTER WRITE FAILED:(0x%04x, %d)\n" , - reg_offset, r); +ath_dbg (common,ATH_DBG_WMI , +"REGISTER WRITE FAILED:(0x%04x, %d)\n" , + reg_offset, r); } }
@@ -345,9 +345,9 @@ 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 , -"REGISTER WRITE FAILED, multi len: %d\n" , - priv->wmi->multi_write_idx); +ath_dbg (common,ATH_DBG_WMI , +"REGISTER WRITE FAILED, multi len: %d\n" , + priv->wmi->multi_write_idx); } priv->wmi->multi_write_idx =0 ; }
@@ -395,9 +395,9 @@ static void ath9k_regwrite_flush(void *hw_priv) (u8 *) &rsp_status,sizeof (rsp_status), 100);if (unlikely (r)) { -ath_print (common,ATH_DBG_WMI , -"REGISTER WRITE FAILED, multi len: %d\n" , - priv->wmi->multi_write_idx); +ath_dbg (common,ATH_DBG_WMI , +"REGISTER WRITE FAILED, multi len: %d\n" , + priv->wmi->multi_write_idx); } priv->wmi->multi_write_idx =0 ; }
@@ -469,9 +469,9 @@ 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 , -"TX streams %d, RX streams: %d\n" , - tx_streams, rx_streams); +ath_dbg (common,ATH_DBG_CONFIG , +"TX streams %d, RX streams: %d\n" , + tx_streams, rx_streams);if (tx_streams != rx_streams) { ht_info->mcs.tx_params |=IEEE80211_HT_MCS_TX_RX_DIFF ;
@@ -537,9 +537,9 @@ 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 , -"Warning, using only %u entries in %u key cache\n" , -ATH_KEYMAX , common->keymax); +ath_dbg (common,ATH_DBG_ANY , +"Warning, using only %u entries in %u key cache\n" , +ATH_KEYMAX , common->keymax); common->keymax =ATH_KEYMAX ; }
drivers/net/wireless/ath/ath9k/htc_drv_main.c +66 -67
301 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +4 -4
@@ -270,8 +270,8 @@ 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 , -"Waking up TX queues\n" ); +ath_dbg (ath9k_hw_common (priv->ah),ATH_DBG_XMIT , +"Waking up TX queues\n" );ieee80211_wake_queues (priv->hw);return ; }
@@ -681,8 +681,8 @@ 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 , -"No free RX buffer\n" ); +ath_dbg (common,ATH_DBG_ANY , +"No free RX buffer\n" ); goto err; }
drivers/net/wireless/ath/ath9k/hw.c +41 -42
91 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/init.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/ath9k/mac.c +43 -43
86 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/main.c +63 -66
129 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/recv.c +16 -17
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/ath9k/virtual.c +3 -4
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/ath9k/xmit.c +25 -29
54 lines not on this page · raw message
drivers/net/wireless/ath/debug.h deleted +0 -22
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.
PATCH 4/4 ath: Fix ath_dbg access beyond array bound
In reply to Luis R. Rodriguezar9300RateSize is not necessarily a power of 4.
Change ar9003_hw_set_target_power_eeprom
to print the targetPowerValT2 array one per line.
ath9k_hw_ar9300_set_txpower repeated the output 4 times per line, change it to print the targetPowerValT2 value one per line.
--- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 27 +---------------------- 1 files changed, 2 insertions(+), 25 deletions(-)
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +2 -25
@@ -4086,22 +4086,9 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq,ar9003_hw_eeprom_get_ht40_tgt_pwr (ah,HT_TARGET_RATE_23 , freq, is2GHz) + ht40PowerIncForPdadc; -while (i < ar9300RateSize) { -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; - +for (i =0 ; i < ar9300RateSize; i++) {ath_dbg (common,ATH_DBG_EEPROM ,"TPC[%02d] 0x%08x\n" , i, targetPowerValT2[i]); - i++; } }
@@ -4689,17 +4676,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,for (i =0 ; i < ar9300RateSize; i++) {ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x " , i, targetPowerValT2[i]); - i++; -ath_dbg (common,ATH_DBG_EEPROM , -"TPC[%02d] 0x%08x\n\n" , i, targetPowerValT2[i]); - i++; +"TPC[%02d] 0x%08x\n" , i, targetPowerValT2[i]); }/*
Signature · 1 line
1.7.3.2.245.g03276.dirty