aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/carl9170/debug.c
AgeCommit message (Collapse)AuthorFilesLines
2020-12-08carl9170: remove trailing semicolon in macro definitionTom Rix1-2/+2
The macro use will already have a semicolon. Signed-off-by: Tom Rix <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-03-12carl9170: Use scnprintf() for avoiding potential buffer overflowTakashi Iwai1-1/+1
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: Christian Lamparter <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-03-27wireless: Use octal not symbolic permissionsJoe Perches1-4/+4
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-09-21carl9170: fix debugfs crashesChristian Lamparter1-2/+4
Ben Greear reported: > I see lots of instability as soon as I load up the carl9710 NIC. > My application is going to be poking at it's debugfs files... > > BUG: KASAN: slab-out-of-bounds in carl9170_debugfs_read+0xd5/0x2a0 > [carl9170] at addr 0xffff8801bc1208b0 > Read of size 8 by task btserver/5888 > ======================================================================= > BUG kmalloc-256 (Tainted: G W ): kasan: bad access detected > ----------------------------------------------------------------------- > > INFO: Allocated in seq_open+0x50/0x100 age=2690 cpu=2 pid=772 >... This breakage was caused by the introduction of intermediate fops in debugfs by commit 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Thankfully, the original/real fops are still available in d_fsdata. Reported-by: Ben Greear <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Cc: stable <[email protected]> # 4.7+ Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-02-13wireless: use %*pb[l] to print bitmaps including cpumasks and nodemasksTejun Heo1-18/+6
printk and friends can now format bitmaps using '%*pb[l]'. cpumask and nodemask also provide cpumask_pr_args() and nodemask_pr_args() respectively which can be used to generate the two printf arguments necessary to format the specified cpu/nodemask. Signed-off-by: Tejun Heo <[email protected]> Cc: "John W. Linville" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-01-03wireless: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <[email protected]> Acked-by: Larry Finger <[email protected]> Acked-by: Christian Lamparter <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-04-10Merge branch 'for-john' of ↵John W. Linville1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/ath/carl9170/debug.c drivers/net/wireless/ath/carl9170/main.c net/mac80211/ieee80211_i.h
2013-03-27carl9170: remove fast channel change featureChristian Lamparter1-1/+1
Marco Fonseca reported a issue with his carl9170 device: "I'm seeing a problem with the carl driver. If I change channels repeatedly on the 2.4ghz band, monitoring (e.g. tcpdump) will eventually halt. I've seen this on various versions of the carl driver/firmware (both from 1.9.4 to 1.9.7)" <http://marc.info/?l=linux-wireless&m=136381302428113> The culprit was identified as "fast channel change feature" which according to Adrian Chadd is: "... notoriously unreliable and really only fully debugged on some very later chips." <http://marc.info/?l=linux-wireless&m=136416984531380> Therefore, this patch removes the fast channel change feature. The phy will now always have to go through a cold reset when changing channels, but it should no longer become deaf. Cc: Marco Fonseca <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-03-25mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chanKarl Beldan1-2/+3
Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <[email protected]> [fix kernel-doc] Signed-off-by: Johannes Berg <[email protected]>
2012-04-05simple_open: automatically convert to simple_open()Stephen Boyd1-6/+1
Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [[email protected]: checkpatch fixes] Signed-off-by: Stephen Boyd <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Al Viro <[email protected]> Cc: Julia Lawall <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-01-03switch debugfs to umode_tAl Viro1-1/+1
Signed-off-by: Al Viro <[email protected]>
2011-07-15carl9170: fix formatting issues found by checkpatchPavel Roskin1-1/+1
Signed-off-by: Pavel Roskin <[email protected]> Acked-By: christian Lamparter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-09-28carl9170: remove lost-frame workaroundChristian Lamparter1-4/+0
This patch removes some cruft, which survived the RFC review phase. Originally, carl9170_tx_ampdu_queue erroneously dropped a lot of frames. As a result the ampdu scheduler bogged down quite frequently and the affected BA session timed out. However this bug has been fixed and the WA and its debugfs counter is no longer useful. Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-09-21carl9170: don't load bogus nf of chain 1Christian Lamparter1-5/+3
According to Atheros, chain 1 is not connected. Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-09-14carl9170: firmware parser and debugfs codeChristian Lamparter1-0/+908
Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: John W. Linville <[email protected]>