linux_dsm_epyc7002/drivers/net/wireless/ath/ath9k
Dan Carpenter 2b87f3aac0 ath9k/debug: improve the snprintf() handling
The snprintf() function returns the number of bytes that *would* have
been written (not counting the NULL terminator) and that can potentally
be more than the size of the buffer.

In this patch if there were one liners where string clearly fits into
the buffer, then I changed snprintf to sprintf().  It's confusing to use
the return value of snprintf() as a limitter without verifying that it's
smaller than size.  This is what initially caught my attention here.
If we use the return value of sprintf() instead future code auditors will
assume we've verified that it fits already.

Also I did find some places where it made sense to use the return value
after we've verified that it is smaller than the buffer size.

Finally the read_file_rcstat() function added an explicit NULL terminator
before calling snprintf().  That's unnecessary because snprintf() will
add the null terminator automatically.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-02 16:13:07 -04:00
..
ahb.c ath: Add a bus type field 2010-04-06 16:55:09 -04:00
ani.c ath9k_hw: Remove pointless ANI deinit 2010-04-26 14:21:18 -04:00
ani.h ath9k_hw: Remove pointless ANI deinit 2010-04-26 14:21:18 -04:00
ar5008_initvals.h ath9k: Avoid corrupt frames being forwarded to mac80211. 2010-04-27 16:09:22 -04:00
ar5008_phy.c ath9k_hw: fix fast clock handling for 5GHz channels 2010-04-27 16:09:18 -04:00
ar9001_initvals.h ath9k_hw: make two initvals consto for the AR9001 family 2010-04-21 14:15:18 -04:00
ar9002_calib.c ath9k_hw: Use buffered register writes 2010-04-16 15:47:09 -04:00
ar9002_hw.c ath9k_htc: Use multiple register writes 2010-04-26 14:21:17 -04:00
ar9002_initvals.h ath9k: Avoid corrupt frames being forwarded to mac80211. 2010-04-27 16:09:22 -04:00
ar9002_mac.c ath9k_hw: move AR9002 mac ops to its own file 2010-04-16 15:43:45 -04:00
ar9002_phy.c ath9k_hw: fix fast clock handling for 5GHz channels 2010-04-27 16:09:18 -04:00
ar9002_phy.h ath9k_hw: add OFDM spur mitigation for AR9003 2010-04-16 15:43:38 -04:00
ar9003_2p0_initvals.h ath9k_hw: rename the ar9003_initvals.h to ar9003_2p0_initvals.h 2010-06-02 16:02:54 -04:00
ar9003_2p2_initvals.h ath9k_hw: add support for the AR9003 2.2 2010-06-02 16:02:54 -04:00
ar9003_calib.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
ar9003_eeprom.c ath9k_hw: clean up EEPROM endian handling on AR9003 2010-05-12 16:39:07 -04:00
ar9003_eeprom.h ath9k_hw: clean up EEPROM endian handling on AR9003 2010-05-12 16:39:07 -04:00
ar9003_hw.c ath9k_hw: rename the ar9003_initvals.h to ar9003_2p0_initvals.h 2010-06-02 16:02:54 -04:00
ar9003_mac.c ath9k_hw: add support for the AR9003 baseband watchdog 2010-06-02 16:13:00 -04:00
ar9003_mac.h ath9k_hw: add support for the AR9003 baseband watchdog 2010-06-02 16:13:00 -04:00
ar9003_phy.c ath9k_hw: add support for the AR9003 baseband watchdog 2010-06-02 16:13:00 -04:00
ar9003_phy.h ath9k_hw: add support for the AR9003 baseband watchdog 2010-06-02 16:13:00 -04:00
ath9k.h ath9k: Add Tx EDMA support 2010-04-16 15:43:48 -04:00
beacon.c ath9k: remove VEOL support for ad-hoc 2010-05-25 11:12:54 -04:00
btcoex.c
btcoex.h ath9k: Fix wifi disconnection when collocated bt scan is active 2010-01-22 16:11:32 -05:00
calib.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
calib.h ath9k_hw: fill in the callbacks for calibration for AR9003 2010-04-16 15:43:35 -04:00
common.c ath9k_common: drop incomming frames with an invalid hardware rate 2010-05-07 14:57:16 -04:00
common.h ath9k: Make bf_desc of ath_buf opaque 2010-04-16 15:43:26 -04:00
debug.c ath9k/debug: improve the snprintf() handling 2010-06-02 16:13:07 -04:00
debug.h ath9k: enable the baseband watchdog events for AR9003 2010-06-02 16:13:00 -04:00
eeprom_4k.c ath9k_hw: Use buffered register writes 2010-04-16 15:47:09 -04:00
eeprom_9287.c ath9k_hw: restore mac address reading logic 2010-04-16 15:43:36 -04:00
eeprom_def.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
eeprom.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
eeprom.h ath9k_hw: update EEPROM data structure for AR9280 2010-04-27 16:09:17 -04:00
gpio.c wireless/ath: remove trailing space in messages 2010-04-08 15:20:44 -04:00
hif_usb.c ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs() 2010-05-24 15:07:42 -04:00
hif_usb.h ath9k_htc: Simplify TX URB management 2010-04-26 14:21:16 -04:00
htc_drv_beacon.c ath9k_htc: Fix beaconing in IBSS mode 2010-05-07 14:55:52 -04:00
htc_drv_init.c ath9k_htc: Initialize beacon/CAB queues 2010-06-02 16:13:03 -04:00
htc_drv_main.c ath9k_htc: Add queue statistics to xmit debugfs file 2010-06-02 16:13:02 -04:00
htc_drv_txrx.c ath9k_htc: Remove HW queue translation 2010-06-02 16:13:03 -04:00
htc_hst.c ath9k_htc: Increase credit size 2010-06-02 16:13:04 -04:00
htc_hst.h ath9k_htc: Fix array overflow 2010-05-12 16:39:06 -04:00
htc.h ath9k_htc: Initialize beacon/CAB queues 2010-06-02 16:13:03 -04:00
hw-ops.h ath9k_hw: Define abstraction for tx desc access 2010-04-16 15:43:44 -04:00
hw.c ath9k: Enable Short GI in 20 Mhz for ar9287 and later chips 2010-06-02 16:13:01 -04:00
hw.h ath9k: Enable Short GI in 20 Mhz for ar9287 and later chips 2010-06-02 16:13:01 -04:00
init.c ath9k: Enable Short GI in 20 Mhz for ar9287 and later chips 2010-06-02 16:13:01 -04:00
Kconfig ath9k_htc: Support for AR9271 chipset. 2010-03-23 16:50:17 -04:00
mac.c ath9k_hw: Fix TX interrupt mitigation settings 2010-04-27 16:09:20 -04:00
mac.h ath9k: add support for Tx and Rx STBC 2010-04-20 11:52:36 -04:00
main.c ath9k: enable the baseband watchdog events for AR9003 2010-06-02 16:13:00 -04:00
Makefile ath9k_hw: move AR9002 mac ops to its own file 2010-04-16 15:43:45 -04:00
pci.c ath9k: remove AR9003 from PCI IDs for now 2010-05-21 14:40:00 -04:00
phy.h ath9k_hw: add OFDM spur mitigation for AR9003 2010-04-16 15:43:38 -04:00
rc.c ath9k: Enable Short GI in 20 Mhz for ar9287 and later chips 2010-06-02 16:13:01 -04:00
rc.h ath9k: rename symbols in enum ath9k_internal_frame_type to avoid confusion 2010-04-06 16:55:08 -04:00
recv.c ath9k: fix dma direction for map/unmap in ath_rx_tasklet 2010-06-02 16:13:07 -04:00
reg.h ath9k_hw: add support for the AR9003 baseband watchdog 2010-06-02 16:13:00 -04:00
virtual.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-04-15 16:21:34 -04:00
wmi.c ath9k_htc: Fix WMI command race 2010-04-26 14:21:21 -04:00
wmi.h ath9k_htc: Increase WMI timeout value 2010-04-26 14:21:20 -04:00
xmit.c ath9k: Fix bug in the way "bf_tx_aborted" of struct ath_buf is used 2010-05-28 13:40:22 -04:00