diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2012-05-15 05:54:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-05 15:23:20 -0400 |
commit | d25360b19008e59585defb16823804c40d4723ab (patch) | |
tree | bc8781c9f103fa6fe10253cbcafc3b32f6e78171 /drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |
parent | 1dacd1980d5ba732de1b69999fd8995b3b2b724b (diff) |
ath9k: Fix modal EEPROM dump
we provide excess buffer size for 'simple_read_from_buffer'
for modal EEPROM dump. This results in trailing NULL bytes
at the end of EEPROM dump, fix this.
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Reported-by: Holger Schurig <holgerschurig@googlemail.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Tested-by: Holger Schurig <holgerschurig@gogglemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_eeprom.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index dfb0441f406c..f794828c08e2 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -3412,11 +3412,11 @@ static u32 ath9k_hw_ar9003_dump_eeprom(struct ath_hw *ah, bool dump_base_hdr, | |||
3412 | if (!dump_base_hdr) { | 3412 | if (!dump_base_hdr) { |
3413 | len += snprintf(buf + len, size - len, | 3413 | len += snprintf(buf + len, size - len, |
3414 | "%20s :\n", "2GHz modal Header"); | 3414 | "%20s :\n", "2GHz modal Header"); |
3415 | len += ar9003_dump_modal_eeprom(buf, len, size, | 3415 | len = ar9003_dump_modal_eeprom(buf, len, size, |
3416 | &eep->modalHeader2G); | 3416 | &eep->modalHeader2G); |
3417 | len += snprintf(buf + len, size - len, | 3417 | len += snprintf(buf + len, size - len, |
3418 | "%20s :\n", "5GHz modal Header"); | 3418 | "%20s :\n", "5GHz modal Header"); |
3419 | len += ar9003_dump_modal_eeprom(buf, len, size, | 3419 | len = ar9003_dump_modal_eeprom(buf, len, size, |
3420 | &eep->modalHeader5G); | 3420 | &eep->modalHeader5G); |
3421 | goto out; | 3421 | goto out; |
3422 | } | 3422 | } |