<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/ath/ath9k/debug.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-02-26T23:01:05Z</updated>
<entry>
<title>wifi: ath9k: debug.h: fix kernel-doc bad lines and struct ath_tx_stats</title>
<updated>2026-02-26T23:01:05Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2025-11-17T02:03:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=737812b31a6bb3000add3baa11f315ae39195f95'/>
<id>urn:sha1:737812b31a6bb3000add3baa11f315ae39195f95</id>
<content type='text'>
[ Upstream commit c6131765a2c0052b2c5a2310ff92191ff33aec8b ]

Repair "bad line" warnings by starting each line with " *".
Add or correct kernel-doc entries for missing struct members in
struct ath_tx_stats.

Warning: ../drivers/net/wireless/ath/ath9k/debug.h:144 bad line:
  may have had errors.
Warning: ../drivers/net/wireless/ath/ath9k/debug.h:146 bad line:
  may have had errors.
Warning: ../drivers/net/wireless/ath/ath9k/debug.h:156 bad line:
  Valid only for:
Warning: ../drivers/net/wireless/ath/ath9k/debug.h:157 bad line:
  - non-aggregate condition.
Warning: ../drivers/net/wireless/ath/ath9k/debug.h:158 bad line:
  - first packet of aggregate.
Warning: drivers/net/wireless/ath/ath9k/debug.h:191 struct member
 'xretries' not described in 'ath_tx_stats'
Warning: drivers/net/wireless/ath/ath9k/debug.h:191 struct member
 'data_underrun' not described in 'ath_tx_stats'
Warning: drivers/net/wireless/ath/ath9k/debug.h:191 struct member
 'delim_underrun' not described in 'ath_tx_stats'

Fixes: 99c15bf575b1 ("ath9k: Report total tx/rx bytes and packets in debugfs.")
Fixes: fec247c0d5bf ("ath9k: Add debug counters for TX")
Fixes: 5a6f78afdabe ("ath9k: show excessive-retry MPDUs in debugfs")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
Link: https://patch.msgid.link/20251117020304.448687-1-rdunlap@infradead.org
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: ath9k: Add RX inactivity detection and reset chip when it occurs</title>
<updated>2024-11-19T15:32:16Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@toke.dk</email>
</author>
<published>2024-11-06T12:41:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b5f871ab4913b2403a7cdcbcde16d39d0b071fb3'/>
<id>urn:sha1:b5f871ab4913b2403a7cdcbcde16d39d0b071fb3</id>
<content type='text'>
Some ath9k chips can, seemingly at random, end up in a state which can
be described as "deaf". No or nearly no interrupts are generated anymore
for incoming packets. Existing links either break down after a while and
new links will not be established.

The circumstances leading to this "deafness" is still unclear, but some
particular chips (especially 2-stream 11n SoCs, but also others) can go
'deaf' when running AP or mesh (or both) after some time. It's probably
a hardware issue, and doing a channel scan to trigger a chip
reset (which one normally can't do on an AP interface) recovers the
hardware.

The only way the driver can detect this state, is by detecting if there
has been no RX activity for a while. In this case we can proactively
reset the chip (which only takes a small number of milliseconds, so
shouldn't interrupt things too much if it has been idle for several
seconds), which functions as a workaround.

OpenWrt, and various derivatives, have been carrying versions of this
workaround for years, that were never upstreamed. One version[0],
written by Felix Fietkau, used a simple counter and only reset if there
was precisely zero RX activity for a long period of time. This had the
problem that in some cases a small number of interrupts would appear
even if the device was otherwise not responsive. For this reason,
another version[1], written by Simon Wunderlich and Sven Eckelmann, used
a time-based approach to calculate the average number of RX interrupts
over a longer (four-second) interval, and reset the chip when seeing
less than one interrupt per second over this period. However, that
version relied on debugfs counters to keep track of the number of
interrupts, which means it didn't work at all if debugfs was not
enabled.

This patch unifies the two versions: it uses the same approach as Felix'
patch to count the number of RX handler invocations, but uses the same
time-based windowing approach as Simon and Sven's patch to still handle
the case where occasional interrupts appear but the device is otherwise
deaf.

Since this is based on ideas by all three people, but not actually
directly derived from any of the patches, I'm including Suggested-by
tags from Simon, Sven and Felix below, which should hopefully serve as
proper credit.

[0] https://patchwork.kernel.org/project/linux-wireless/patch/20170125163654.66431-3-nbd@nbd.name/
[1] https://patchwork.kernel.org/project/linux-wireless/patch/20161117083614.19188-2-sven.eckelmann@open-mesh.com/

Suggested-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
Suggested-by: Sven Eckelmann &lt;se@simonwunderlich.de&gt;
Suggested-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
Tested-by: Sven Eckelmann &lt;se@simonwunderlich.de&gt;
Reviewed-by: Sven Eckelmann &lt;se@simonwunderlich.de&gt;
Tested-by: Issam Hamdi &lt;ih@simonwunderlich.de&gt;
Acked-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
Link: https://patch.msgid.link/20241106-ath9k-deaf-detection-v1-1-736a150d2425@redhat.com
Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
</content>
</entry>
<entry>
<title>ath9k: add option to reset the wifi chip via debugfs</title>
<updated>2021-10-05T14:27:31Z</updated>
<author>
<name>Linus Lüssing</name>
<email>ll@simonwunderlich.de</email>
</author>
<published>2021-10-05T13:55:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=053f9852b95e7721cf3b615539d701bae3e17ddb'/>
<id>urn:sha1:053f9852b95e7721cf3b615539d701bae3e17ddb</id>
<content type='text'>
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 &gt; /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 &lt;ll@simonwunderlich.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210914192515.9273-2-linus.luessing@c0d3.blue
</content>
</entry>
<entry>
<title>ath9k: Switch to mac80211 TXQ scheduling and airtime APIs</title>
<updated>2019-02-12T18:44:41Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@toke.dk</email>
</author>
<published>2019-02-11T16:47:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=89cea7493a3463f1eb3846940870a229d0713e27'/>
<id>urn:sha1:89cea7493a3463f1eb3846940870a229d0713e27</id>
<content type='text'>
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 &lt;toke@toke.dk&gt;
[rmanohar@codeaurora.org: fixed checkpatch error and warnings]
Signed-off-by: Rajkumar Manoharan &lt;rmanohar@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>ath9k: fix RX_STAT_INC() etc macros</title>
<updated>2018-10-13T17:27:35Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-10-09T16:03:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=72569b7be461ad563c8118c50f26692e53a189bc'/>
<id>urn:sha1:72569b7be461ad563c8118c50f26692e53a189bc</id>
<content type='text'>
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 &lt;arnd@arndb.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>ath9k: Introduce airtime fairness scheduling between stations</title>
<updated>2016-12-15T08:43:05Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@toke.dk</email>
</author>
<published>2016-12-05T11:27:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=63fefa050477b0974ab34f650e21a7cfc3b02d96'/>
<id>urn:sha1:63fefa050477b0974ab34f650e21a7cfc3b02d96</id>
<content type='text'>
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 &lt;toke@toke.dk&gt;
Signed-off-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>ath9k: Switch to using mac80211 intermediate software queues.</title>
<updated>2016-11-15T15:00:04Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@toke.dk</email>
</author>
<published>2016-11-09T11:31:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=50f08edf98096a68f01ff4566b605a25bf8e42ce'/>
<id>urn:sha1:50f08edf98096a68f01ff4566b605a25bf8e42ce</id>
<content type='text'>
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 &lt;shep@alum.mit.edu&gt;
Cc: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
Signed-off-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>ath9k: make DMA stop related messages debug-only</title>
<updated>2015-07-21T13:56:41Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@openwrt.org</email>
</author>
<published>2015-07-02T11:40:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e60ac9c7a4c8776b2503892dfd01f1b4d651245d'/>
<id>urn:sha1:e60ac9c7a4c8776b2503892dfd01f1b4d651245d</id>
<content type='text'>
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 &lt;nbd@openwrt.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2014-12-15T00:10:09Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-12-15T00:10:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e6b5be2be4e30037eb551e0ed09dd97bd00d85d3'/>
<id>urn:sha1:e6b5be2be4e30037eb551e0ed09dd97bd00d85d3</id>
<content type='text'>
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_&lt;level&gt;_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
  ...
</content>
</entry>
<entry>
<title>ath: use seq_file api for ath9k debugfs files</title>
<updated>2014-11-27T03:38:37Z</updated>
<author>
<name>Arend van Spriel</name>
<email>arend@broadcom.com</email>
</author>
<published>2014-11-09T10:31:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=631bee257bd506ad6622aac16dfeedce09034ade'/>
<id>urn:sha1:631bee257bd506ad6622aac16dfeedce09034ade</id>
<content type='text'>
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 &lt;arend@broadcom.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
