aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-10-05ath9k: add option to reset the wifi chip via debugfsLinus Lüssing1-4/+53
Sometimes, in yet unknown cases the wifi chip stops working. To allow a watchdog in userspace to easily and quickly reset the wifi chip, add the according functionality to userspace. A reset can then be triggered via: $ echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/reset The number of user resets can further be tracked in the row "User reset" in the same file. So far people usually used "iw scan" to fix ath9k chip hangs from userspace. Which triggers the ath9k_queue_reset(), too. The reset file however has the advantage of less overhead, which makes debugging bugs within ath9k_queue_reset() easier. Signed-off-by: Linus Lüssing <ll@simonwunderlich.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210914192515.9273-2-linus.luessing@c0d3.blue
2021-02-11ath9k: fix data bus crash when setting nf_override via debugfsLinus Lüssing1-1/+4
When trying to set the noise floor via debugfs, a "data bus error" crash like the following can happen: [ 88.433133] Data bus error, epc == 80221c28, ra == 83314e60 [ 88.438895] Oops[#1]: [ 88.441246] CPU: 0 PID: 7263 Comm: sh Not tainted 4.14.195 #0 [ 88.447174] task: 838a1c20 task.stack: 82d5e000 [ 88.451847] $ 0 : 00000000 00000030 deadc0de 83141de4 [ 88.457248] $ 4 : b810a2c4 0000a2c4 83230fd4 00000000 [ 88.462652] $ 8 : 0000000a 00000000 00000001 00000000 [ 88.468055] $12 : 7f8ef318 00000000 00000000 77f802a0 [ 88.473457] $16 : 83230080 00000002 0000001b 83230080 [ 88.478861] $20 : 83a1c3f8 00841000 77f7adb0 ffffff92 [ 88.484263] $24 : 00000fa4 77edd860 [ 88.489665] $28 : 82d5e000 82d5fda8 00000000 83314e60 [ 88.495070] Hi : 00000000 [ 88.498044] Lo : 00000000 [ 88.501040] epc : 80221c28 ioread32+0x8/0x10 [ 88.505671] ra : 83314e60 ath9k_hw_loadnf+0x88/0x520 [ath9k_hw] [ 88.512049] Status: 1000fc03 KERNEL EXL IE [ 88.516369] Cause : 5080801c (ExcCode 07) [ 88.520508] PrId : 00019374 (MIPS 24Kc) [ 88.524556] Modules linked in: ath9k ath9k_common pppoe ppp_async l2tp_ppp cdc_mbim batman_adv ath9k_hw ath sr9700 smsc95xx sierra_net rndis_host qmi_wwan pppox ppp_generic pl2303 nf_conntrack_ipv6 mcs7830 mac80211 kalmia iptable_nat ipt_REJECT ipt_MASQUERADE huawei_cdc_ncm ftdi_sio dm9601 cfg80211 cdc_subset cdc_ncm cdc_ether cdc_eem ax88179_178a asix xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_ecn xt_dscp xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_NETMAP xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CLASSIFY usbserial usbnet usbhid slhc rtl8150 r8152 pegasus nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack [ 88.597894] libcrc32c kaweth iptable_mangle iptable_filter ipt_ECN ipheth ip_tables hso hid_generic crc_ccitt compat cdc_wdm cdc_acm br_netfilter hid evdev input_core nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 l2tp_netlink l2tp_core udp_tunnel ip6_udp_tunnel xfrm6_mode_tunnel xfrm6_mode_transport xfrm6_mode_beet ipcomp6 xfrm6_tunnel esp6 ah6 xfrm4_tunnel xfrm4_mode_tunnel xfrm4_mode_transport xfrm4_mode_beet ipcomp esp4 ah4 tunnel6 tunnel4 tun xfrm_user xfrm_ipcomp af_key xfrm_algo sha256_generic sha1_generic jitterentropy_rng drbg md5 hmac echainiv des_generic deflate zlib_inflate zlib_deflate cbc authenc crypto_acompress ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common crc16 mii aead crypto_null cryptomgr crc32c_generic [ 88.671671] crypto_hash [ 88.674292] Process sh (pid: 7263, threadinfo=82d5e000, task=838a1c20, tls=77f81efc) [ 88.682279] Stack : 00008060 00000008 00000200 00000000 00000000 00000000 00000000 00000002 [ 88.690916] 80500000 83230080 82d5fe22 00841000 77f7adb0 00000000 00000000 83156858 [ 88.699553] 00000000 8352fa00 83ad62b0 835302a8 00000000 300a00f8 00000003 82d5fe38 [ 88.708190] 82d5fef4 00000001 77f54dc4 77f80000 77f7adb0 c79fe901 00000000 00000000 [ 88.716828] 80510000 00000002 00841000 77f54dc4 77f80000 801ce4cc 0000000b 41824292 [ 88.725465] ... [ 88.727994] Call Trace: [ 88.730532] [<80221c28>] ioread32+0x8/0x10 [ 88.734765] Code: 00000000 8c820000 0000000f <03e00008> 00000000 08088708 00000000 aca40000 03e00008 [ 88.744846] [ 88.746464] ---[ end trace db226b2de1b69b9e ]--- [ 88.753477] Kernel panic - not syncing: Fatal exception [ 88.759981] Rebooting in 3 seconds.. The "REG_READ(ah, AR_PHY_AGC_CONTROL)" in ath9k_hw_loadnf() does not like being called when the hardware is asleep, leading to this crash. The easiest way to reproduce this is trying to set nf_override while the hardware is down: $ ip link set down dev wlan0 $ echo "-85" > /sys/kernel/debug/ieee80211/phy0/ath9k/nf_override Fixing this crash by waking the hardware up before trying to set the noise floor. Similar to what other ath9k debugfs files do. Tested on a Lima board from 8devices, which has a QCA 4531 chipset. Fixes: b90189759a7f ("ath9k: add noise floor override option") Cc: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Linus Lüssing <ll@simonwunderlich.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210209184352.4272-1-linus.luessing@c0d3.blue
2020-11-11ath9k: remove WDS codeJohannes Berg1-2/+2
The ability to reach this code was hidden behind CONFIG_WIRELESS_WDS, which was just removed. Clean up the driver accordingly. Link: https://lore.kernel.org/r/20201109105103.e1d48ee20b0a.I89f8af0d50a02ce16a922fa790d6c1908f31a496@changeid Acked-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-02-26ath9k: debugfs: Fix SPUR-DOWN fieldAndrea Greco1-1/+1
SPUR DOWN field returns spurup instead of spurdown. Signed-off-by: Andrea Greco <a.greco@4sigma.it> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-02-12ath9k: Switch to mac80211 TXQ scheduling and airtime APIsToke Høiland-Jørgensen1-3/+0
This moves the ath9k driver to use the mac80211 TXQ scheduling and airtime accounting APIs, removing the corresponding state tracking inside the driver. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> [rmanohar@codeaurora.org: fixed checkpatch error and warnings] Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-10-13ath9k: fix RX_STAT_INC() etc macrosArnd Bergmann1-12/+12
A couple of macros that deal with statistics in ath9k rely on the declaration of the 'sc' variable, which they dereference. However, when the statistics are disabled, the new instance in ath_cmn_process_fft() causes a warning for an unused variable: drivers/net/wireless/ath/ath9k/common-spectral.c: In function 'ath_cmn_process_fft': drivers/net/wireless/ath/ath9k/common-spectral.c:474:20: error: unused variable 'sc' [-Werror=unused-variable] It's better if those macros only operate on their arguments instead of known variable names, and adding a cast to (void) kills off that warning. Fixes: 03224678c013 ("ath9k: add counters for good and errorneous FFT/spectral frames") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-10-01ath9k: debug: remove set but not used variable 'fops_dump_nfcal'YueHaibing1-13/+0
'fops_dump_nfcal' is not used since commit 4447d815fd0f ("ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-06-14ath9k: debug: fix spelling mistake "WATHDOG" -> "WATCHDOG"Colin Ian King1-1/+1
Trivial fix to spelling mistake in PR_IS message text. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-03-27wireless: Use octal not symbolic permissionsJoe Perches1-21/+19
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 <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-10-27ath9k: debug: Remove redundant checkChristos Gkekas1-1/+1
Variable val is unsigned, so checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas <chris.gekas@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-10-04ath9k: make const array reg_hole_list static, reduces object code sizeColin Ian King1-1/+1
Don't populate the read-only array reg_hole_list on the stack, instead make it static. Makes the object code smaller by over 200 bytes: Before: text data bss dec hex filename 57518 15248 0 72766 11c3e debug.o After: text data bss dec hex filename 57218 15344 0 72562 11b72 debug.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-08-03ath9k: fix debugfs file permissionChristoph Fritz1-1/+1
This patch fixes a trivial debugfs file permission issue. Debugfs file ack_to has no write function, so S_IWUSR gets purged. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-04-19ath9k: add noise floor override optionSimon Wunderlich1-0/+62
Introduce a debugfs option to manually override the noise floor, ignoring the automatically tuned noise floor of the driver/hw. In my tests with a AR9580 based module and a tx99 5 MHz interferer, I could tune the noisefloor to -95 dBm or above to allow communication again. The automatic noise floor calibration sometimes could adapt to the situation as well, but not reliably and permanently. I would consider this "feature" experimental and interesting for people debugging the noise floor calibration or other effects of the hardware. Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fit.fraunhofer.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-12-15ath9k: Introduce airtime fairness scheduling between stationsToke Høiland-Jørgensen1-0/+3
This reworks the ath9k driver to schedule transmissions to connected stations in a way that enforces airtime fairness between them. It accomplishes this by measuring the time spent transmitting to or receiving from a station at TX and RX completion, and accounting this to a per-station, per-QoS level airtime deficit. Then, an FQ-CoDel based deficit scheduler is employed at packet dequeue time, to control which station gets the next transmission opportunity. Airtime fairness can significantly improve the efficiency of the network when station rates vary. The following throughput values are from a simple three-station test scenario, where two stations operate at the highest HT20 rate, and one station at the lowest, and the scheduler is employed at the access point: Before / After Fast station 1: 19.17 / 25.09 Mbps Fast station 2: 19.83 / 25.21 Mbps Slow station: 2.58 / 1.77 Mbps Total: 41.58 / 52.07 Mbps The benefit of airtime fairness goes up the more stations are present. In a 30-station test with one station artificially limited to 1 Mbps, we have seen aggregate throughput go from 2.14 to 17.76 Mbps. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-11-15ath9k: Switch to using mac80211 intermediate software queues.Toke Høiland-Jørgensen1-13/+1
This switches ath9k over to using the mac80211 intermediate software queueing mechanism for data packets. It removes the queueing inside the driver, except for the retry queue, and instead pulls from mac80211 when a packet is needed. The retry queue is used to store a packet that was pulled but can't be sent immediately. The old code path in ath_tx_start that would queue packets has been removed completely, as has the qlen limit tunables (since there's no longer a queue in the driver to limit). The mac80211 intermediate software queues offer significant latency reductions, and this patch allows ath9k to realise them. The exact gains from this varies with the test scenario, but in an access point scenario we have seen latency reductions ranging from 1/3 to as much as an order of magnitude. We also achieve slightly better aggregation. Median latency (ping) figures with this patch applied at the access point, with two high-rate stations and one low-rate station (HT20 5Ghz), running a Flent rtt_fair_var_up test with one TCP flow and one ping flow going to each station: Fast station Slow station Default pfifo_fast qdisc: 430.4 ms 638.7 ms fq_codel qdisc on iface: 35.5 ms 211.8 ms This patch set: 22.4 ms 38.2 ms Median aggregation sizes over the same test: Default pfifo_fast qdisc: 9.5 pkts 1.9 pkts fq_codel qdisc on iface: 11.2 pkts 1.9 pkts This patch set: 13.9 pkts 1.9 pkts This patch is based on Tim's original patch set, but reworked quite thoroughly. Cc: Tim Shepard <shep@alum.mit.edu> Cc: Felix Fietkau <nbd@nbd.name> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-03-11ath9k: fix reg dump data bus errorMiaoqing Pan1-3/+21
Changes: - restrict only dump MAC registers - skip the register memory holes Data bus error, epc == 831d4040, ra == 831d403c Oops[#1]: CPU: 0 PID: 1536 Comm: cat Not tainted 3.14.0 #3 task: 82f87840 ti: 82f88000 task.ti: 82f88000 $ 0 : 00000000 00000001 deadc0de 1000fc03 $ 4 : b8100200 00000200 831e0000 80218788 $ 8 : 00000030 00000003 00000001 09524547 $12 : 00000000 810594f4 00000000 3a206d61 $16 : 831dd3c0 00000081 00000a00 c05ff000 $20 : 00005af6 00000200 00071b39 00071139 $24 : 00000001 80217760 $28 : 82f88000 82f89c60 c05ffa00 831d403c Hi : 00000000 Lo : 453c0000 epc : 831d4040 ath_ahb_exit+0x2198/0x2904 [ath9k] Not tainted ra : 831d403c ath_ahb_exit+0x2194/0x2904 [ath9k] Status: 1000fc03 KERNEL EXL IE Cause : 4080801c PrId : 00019374 (MIPS 24Kc) Stack : 00000001 00000000 0000000e 80475c60 0000000e 800a8ebc 00000000 00000000 00000001 00000007 00000000 800a9678 00000000 00000004 00000002 00000010 00000000 00000000 00000000 00000000 80475c60 0000000e 000009ec c05ff000 831dd3c0 00000080 00000a00 c05ff000 00005af6 00000200 00071b39 0007114d c05ff9ec 800a9904 831dd3c0 82f89d10 00000001 81082194 831d8f0c 82f89d14 ... Call Trace: [<831d4040>] ath_ahb_exit+0x2198/0x2904 [ath9k] [<831d403c>] ath_ahb_exit+0x2194/0x2904 [ath9k] Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-09-29ath9k: Add support for OCB modeJan Kaisrlik1-2/+2
The patch adds support for "outside the context of a BSS"(OCB) mode to ath9k driver and extends debugfs files by OCB ralated information. This patch was tested on AR9380-AL1A cards. Signed-off-by: Jan Kaisrlik <kaisrja1@fel.cvut.cz> Cc: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-07-21ath9k: make DMA stop related messages debug-onlyFelix Fietkau1-0/+2
A long time ago, ath9k had issues during reset where the DMA engine would stay active and could potentially corrupt memory. To debug those issues, the driver would print warnings whenever they occur. Nowadays, these issues are gone and the primary cause of these messages is if the MAC is stuck during reset or busy processing a long transmission. This is fairly harmless, yet these messages continue to worry users. To reduce the number of bogus bug reports, turn these messages into debug messages and count their occurence in the "reset" debugfs file. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03ath9k: add per-vif TX power capabilityLorenzo Bianconi1-1/+4
Configure the HW with highest TX power among all vif when HW TPC has been enabled in order to add support to per-vif TX power capability. Use lowest configured power among all interfaces when TPC is disabled Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-03ath9k: Add a debugfs file for WOWSujith Manoharan1-0/+68
This can be used to force WOW for cards that are not present in the supported PCI ID list. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-15ath9k: enable per-packet TPC on AR9002 based chipsLorenzo Bianconi1-5/+0
Enable per-packet TPC on AR9002 based chips by default Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-15ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entriesArend van Spriel1-100/+29
Use the helper to get rid of the file operations per debugfs file. The device driver data contains struct ieee80211_hw pointer and the struct ath9k_softc pointer is assigned to ieee80211_hw::priv so it can be accessed in the seq_file read operation. Cc: ath9k-devel@lists.ath9k.org Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2014-12-24ath9k: add debugfs support for hw TPCLorenzo Bianconi1-0/+71
Add tpc entry to ath9k debugfs in order to enable/disable hw TPC Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2014-12-14Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds1-244/+171
Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-06Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"Greg Kroah-Hartman1-22/+100
This reverts commit d32394fae95741d733b174ec1446f27765f80233. It has been reported to cause problems, Jeremiah writes: On an Acer C720 laptop if a suspend is performed the screen freezes, the machine locks up, and according to the indicator lights it does not enter suspend. A hard reset is required to get it running again. Reported-by: Jeremiah Mahler <jmmahler@gmail.com> Cc: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entriesArend van Spriel1-100/+22
Use the helper to get rid of the file operations per debugfs file. The struct ath9k_softc pointer is set as device driver data to be obtained in the seq_file read operation. Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26ath: use seq_file api for ath9k debugfs filesArend van Spriel1-268/+187
The debugfs files that are defined in debug.c which are read-only and using a simple_open as .open file operation have been modified to use the single_open seq_file API. This simplifies the read functions defining the file contents. Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-19Merge commit '4e6ce4dc7ce71d0886908d55129d5d6482a27ff9' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-1/+1
2014-11-17ath9k: fix misc debugfs when not using chan contextBen Greear1-3/+4
When channel-context is not enabled, all vifs belong to the first context, but it is not configured as 'assigned'. Fix misc debugfs file to print out info for non-assigned contexts, and also print whether ctx is assigned or not. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-11ath9k: move spectral.* to common-spectral.*Oleksij Rempel1-2/+2
and rename exports from ath9k_spectral_* to ath9k_cmn_spectral_* Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-11ath9k: remove all struct ath_softc dependencies from spectral codeOleksij Rempel1-2/+2
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-11ath9k: use struct dentry by ath9k_spectral_init_debugOleksij Rempel1-1/+1
this will alow us to make ath_softc independent code. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-30ath9k: fix some debugfs outputDan Carpenter1-1/+1
The right shift operation has higher precedence than the mask so we left shift by "(i * 3)" and then immediately right shift by "(i * 3)" then we mask. It should be left shift, mask, and then right shift. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-27ath9k: restart hardware after noise floor calibration failureFelix Fietkau1-0/+1
When NF calibration fails, the radio often becomes deaf. The usual hardware hang checks do not detect this, so it's better to issue a reset when that happens. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-27ath9k: clean up debugfs print of reset causesFelix Fietkau1-27/+21
Reduce code duplication Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-16ath9k: add debugfs support for dynackLorenzo Bianconi1-0/+28
Add ack_to entry to debugfs in order to dump current ACK timeout value Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09ath9k: Fix interface accountingSujith Manoharan1-1/+1
Currently, the interface count is maintained globally, but this causes problems in RX filter calculation. Make the interface count a per-channel-context variable to fix this. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-18ath9k: drop negativity checks for unsigned values coming from kstrtoul()Andrey Utkin1-1/+1
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80471 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80481 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Summarize hw state per channel contextRajkumar Manoharan1-10/+16
Group and set hw state (opmode, primary_sta, beacon conf) per channel context instead of whole list of vifs. This would allow each channel context to run in different mode (STA/AP). Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Move caldata into channel contextFelix Fietkau1-1/+1
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-13ath9k: move phy_err to ath9k_cmn_debug_phy_errOleksij Rempel1-63/+1
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-13ath9k: move recv to ath9k_cmn_debug_recvOleksij Rempel1-57/+3
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-13ath9k & ath9k_htc: move ath_rx_stats to cmnOleksij Rempel1-25/+1
and use it. This move need changes in both drivers. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-13ath9k: move base_eeprom debug code to ath9k_cmn_debug_base_eepromOleksij Rempel1-30/+1
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-13ath9k-common: create common-debug and move modal_eeprom to cmnOleksij Rempel1-30/+3
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17ath9k: move sc_flags to ath_commonOleksij Rempel1-1/+1
we will need it for ath9k_htc, may be other drivers too Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-14ath9k: clean up and enhance ANI debugfs fileFelix Fietkau1-30/+28
Unify scnprintf calls and include the current OFDM/CCK immunity level. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-24ath9k: Use static constJoe Perches1-8/+12
Trivially reduces text size too. $ size drivers/net/wireless/ath/ath9k/debug.o* text data bss dec hex filename 34436 2528 5128 42092 a46c drivers/net/wireless/ath/ath9k/debug.o.new 34464 2528 5128 42120 a488 drivers/net/wireless/ath/ath9k/debug.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-24ath9k: list more reset causes in debugfsFelix Fietkau1-0/+6
Number of MAC hangs and stuck beacons were missing Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-13ath9k: Use a separate debugfs file for PHY errorsSujith Manoharan1-43/+74
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>