<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/wireless, branch v5.10.239</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>wifi: carl9170: do not ping device which has failed to load firmware</title>
<updated>2025-06-27T10:04:22+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2025-06-16T18:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8a3734a6f4c05fd24605148f21fb2066690d61b3'/>
<id>8a3734a6f4c05fd24605148f21fb2066690d61b3</id>
<content type='text'>
[ Upstream commit 15d25307692312cec4b57052da73387f91a2e870 ]

Syzkaller reports [1, 2] crashes caused by an attempts to ping
the device which has failed to load firmware. Since such a device
doesn't pass 'ieee80211_register_hw()', an internal workqueue
managed by 'ieee80211_queue_work()' is not yet created and an
attempt to queue work on it causes null-ptr-deref.

[1] https://syzkaller.appspot.com/bug?extid=9a4aec827829942045ff
[2] https://syzkaller.appspot.com/bug?extid=0d8afba53e8fb2633217

Fixes: e4a668c59080 ("carl9170: fix spurious restart due to high latency")
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Acked-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Link: https://patch.msgid.link/20250616181205.38883-1-dmantipov@yandex.ru
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 15d25307692312cec4b57052da73387f91a2e870 ]

Syzkaller reports [1, 2] crashes caused by an attempts to ping
the device which has failed to load firmware. Since such a device
doesn't pass 'ieee80211_register_hw()', an internal workqueue
managed by 'ieee80211_queue_work()' is not yet created and an
attempt to queue work on it causes null-ptr-deref.

[1] https://syzkaller.appspot.com/bug?extid=9a4aec827829942045ff
[2] https://syzkaller.appspot.com/bug?extid=0d8afba53e8fb2633217

Fixes: e4a668c59080 ("carl9170: fix spurious restart due to high latency")
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Acked-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Link: https://patch.msgid.link/20250616181205.38883-1-dmantipov@yandex.ru
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: mt76: mt76x2: Add support for LiteOn WN4516R,WN4519R</title>
<updated>2025-06-27T10:04:17+00:00</updated>
<author>
<name>Henk Vergonet</name>
<email>henk.vergonet@gmail.com</email>
</author>
<published>2025-04-18T14:39:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=99eec40d34cdfaed67323eb87a1b99cb3593033b'/>
<id>99eec40d34cdfaed67323eb87a1b99cb3593033b</id>
<content type='text'>
[ Upstream commit 3c0e4f606d8693795a2c965d6f4987b1bfc31097 ]

Adds support for:
 - LiteOn WN4516R
 - LiteOn WN4519R
 Both use:
 - A nonstandard USB connector
 - Mediatek chipset MT7600U
 - ASIC revision: 76320044

Disabled VHT support on ASIC revision 76320044:

 This fixes the 5G connectibity issue on LiteOn WN4519R module
 see https://github.com/openwrt/mt76/issues/971

 And may also fix the 5G issues on the XBox One Wireless Adapter
 see https://github.com/openwrt/mt76/issues/200

 I have looked at the FCC info related to the MT7632U chip as mentioned in here:
 https://github.com/openwrt/mt76/issues/459
 These confirm the chipset does not support 'ac' mode and hence VHT should be turned of.

Signed-off-by: Henk Vergonet &lt;henk.vergonet@gmail.com&gt;
Acked-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://patch.msgid.link/20250418143914.31384-1-henk.vergonet@gmail.com
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 3c0e4f606d8693795a2c965d6f4987b1bfc31097 ]

Adds support for:
 - LiteOn WN4516R
 - LiteOn WN4519R
 Both use:
 - A nonstandard USB connector
 - Mediatek chipset MT7600U
 - ASIC revision: 76320044

Disabled VHT support on ASIC revision 76320044:

 This fixes the 5G connectibity issue on LiteOn WN4519R module
 see https://github.com/openwrt/mt76/issues/971

 And may also fix the 5G issues on the XBox One Wireless Adapter
 see https://github.com/openwrt/mt76/issues/200

 I have looked at the FCC info related to the MT7632U chip as mentioned in here:
 https://github.com/openwrt/mt76/issues/459
 These confirm the chipset does not support 'ac' mode and hence VHT should be turned of.

Signed-off-by: Henk Vergonet &lt;henk.vergonet@gmail.com&gt;
Acked-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://patch.msgid.link/20250418143914.31384-1-henk.vergonet@gmail.com
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtlwifi: disable ASPM for RTL8723BE with subsystem ID 11ad:1723</title>
<updated>2025-06-27T10:04:12+00:00</updated>
<author>
<name>Mingcong Bai</name>
<email>jeffbai@aosc.io</email>
</author>
<published>2025-04-22T06:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fed9fa9c90d87a79cdd25c31789ac7ec28902d3d'/>
<id>fed9fa9c90d87a79cdd25c31789ac7ec28902d3d</id>
<content type='text'>
commit 77a6407c6ab240527166fb19ee96e95f5be4d3cd upstream.

RTL8723BE found on some ASUSTek laptops, such as F441U and X555UQ with
subsystem ID 11ad:1723 are known to output large amounts of PCIe AER
errors during and after boot up, causing heavy lags and at times lock-ups:

  pcieport 0000:00:1c.5: AER: Correctable error message received from 0000:00:1c.5
  pcieport 0000:00:1c.5: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
  pcieport 0000:00:1c.5:   device [8086:9d15] error status/mask=00000001/00002000
  pcieport 0000:00:1c.5:    [ 0] RxErr

Disable ASPM on this combo as a quirk.

This patch is a revision of a previous patch (linked below) which
attempted to disable ASPM for RTL8723BE on all Intel Skylake and Kaby Lake
PCIe bridges. I take a more conservative approach as all known reports
point to ASUSTek laptops of these two generations with this particular
wireless card.

Please note, however, before the rtl8723be finishes probing, the AER
errors remained. After the module finishes probing, all AER errors would
indeed be eliminated, along with heavy lags, poor network throughput,
and/or occasional lock-ups.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: a619d1abe20c ("rtlwifi: rtl8723be: Add new driver")
Reported-by: Liangliang Zou &lt;rawdiamondmc@outlook.com&gt;
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218127
Link: https://lore.kernel.org/lkml/05390e0b-27fd-4190-971e-e70a498c8221@lwfinger.net/T/
Tested-by: Liangliang Zou &lt;rawdiamondmc@outlook.com&gt;
Signed-off-by: Mingcong Bai &lt;jeffbai@aosc.io&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250422061755.356535-1-jeffbai@aosc.io
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 77a6407c6ab240527166fb19ee96e95f5be4d3cd upstream.

RTL8723BE found on some ASUSTek laptops, such as F441U and X555UQ with
subsystem ID 11ad:1723 are known to output large amounts of PCIe AER
errors during and after boot up, causing heavy lags and at times lock-ups:

  pcieport 0000:00:1c.5: AER: Correctable error message received from 0000:00:1c.5
  pcieport 0000:00:1c.5: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
  pcieport 0000:00:1c.5:   device [8086:9d15] error status/mask=00000001/00002000
  pcieport 0000:00:1c.5:    [ 0] RxErr

Disable ASPM on this combo as a quirk.

This patch is a revision of a previous patch (linked below) which
attempted to disable ASPM for RTL8723BE on all Intel Skylake and Kaby Lake
PCIe bridges. I take a more conservative approach as all known reports
point to ASUSTek laptops of these two generations with this particular
wireless card.

Please note, however, before the rtl8723be finishes probing, the AER
errors remained. After the module finishes probing, all AER errors would
indeed be eliminated, along with heavy lags, poor network throughput,
and/or occasional lock-ups.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: a619d1abe20c ("rtlwifi: rtl8723be: Add new driver")
Reported-by: Liangliang Zou &lt;rawdiamondmc@outlook.com&gt;
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218127
Link: https://lore.kernel.org/lkml/05390e0b-27fd-4190-971e-e70a498c8221@lwfinger.net/T/
Tested-by: Liangliang Zou &lt;rawdiamondmc@outlook.com&gt;
Signed-off-by: Mingcong Bai &lt;jeffbai@aosc.io&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250422061755.356535-1-jeffbai@aosc.io
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback()</title>
<updated>2025-06-27T10:04:11+00:00</updated>
<author>
<name>Christian Lamparter</name>
<email>chunkeey@gmail.com</email>
</author>
<published>2025-05-16T18:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9701f842031b825e2fd5f22d064166f8f13f6e4d'/>
<id>9701f842031b825e2fd5f22d064166f8f13f6e4d</id>
<content type='text'>
commit da1b9a55ff116cb040528ef664c70a4eec03ae99 upstream.

Robert Morris reported:

|If a malicious USB device pretends to be an Intersil p54 wifi
|interface and generates an eeprom_readback message with a large
|eeprom-&gt;v1.len, p54_rx_eeprom_readback() will copy data from the
|message beyond the end of priv-&gt;eeprom.
|
|static void p54_rx_eeprom_readback(struct p54_common *priv,
|                                   struct sk_buff *skb)
|{
|        struct p54_hdr *hdr = (struct p54_hdr *) skb-&gt;data;
|        struct p54_eeprom_lm86 *eeprom = (struct p54_eeprom_lm86 *) hdr-&gt;data;
|
|        if (priv-&gt;fw_var &gt;= 0x509) {
|                memcpy(priv-&gt;eeprom, eeprom-&gt;v2.data,
|                       le16_to_cpu(eeprom-&gt;v2.len));
|        } else {
|                memcpy(priv-&gt;eeprom, eeprom-&gt;v1.data,
|                       le16_to_cpu(eeprom-&gt;v1.len));
|        }
| [...]

The eeprom-&gt;v{1,2}.len is set by the driver in p54_download_eeprom().
The device is supposed to provide the same length back to the driver.
But yes, it's possible (like shown in the report) to alter the value
to something that causes a crash/panic due to overrun.

This patch addresses the issue by adding the size to the common device
context, so p54_rx_eeprom_readback no longer relies on possibly tampered
values... That said, it also checks if the "firmware" altered the value
and no longer copies them.

The one, small saving grace is: Before the driver tries to read the eeprom,
it needs to upload &gt;a&lt; firmware. the vendor firmware has a proprietary
license and as a reason, it is not present on most distributions by
default.

Cc: &lt;stable@kernel.org&gt;
Reported-by: Robert Morris &lt;rtm@mit.edu&gt;
Closes: https://lore.kernel.org/linux-wireless/28782.1747258414@localhost/
Fixes: 7cb770729ba8 ("p54: move eeprom code into common library")
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Link: https://patch.msgid.link/20250516184107.47794-1-chunkeey@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit da1b9a55ff116cb040528ef664c70a4eec03ae99 upstream.

Robert Morris reported:

|If a malicious USB device pretends to be an Intersil p54 wifi
|interface and generates an eeprom_readback message with a large
|eeprom-&gt;v1.len, p54_rx_eeprom_readback() will copy data from the
|message beyond the end of priv-&gt;eeprom.
|
|static void p54_rx_eeprom_readback(struct p54_common *priv,
|                                   struct sk_buff *skb)
|{
|        struct p54_hdr *hdr = (struct p54_hdr *) skb-&gt;data;
|        struct p54_eeprom_lm86 *eeprom = (struct p54_eeprom_lm86 *) hdr-&gt;data;
|
|        if (priv-&gt;fw_var &gt;= 0x509) {
|                memcpy(priv-&gt;eeprom, eeprom-&gt;v2.data,
|                       le16_to_cpu(eeprom-&gt;v2.len));
|        } else {
|                memcpy(priv-&gt;eeprom, eeprom-&gt;v1.data,
|                       le16_to_cpu(eeprom-&gt;v1.len));
|        }
| [...]

The eeprom-&gt;v{1,2}.len is set by the driver in p54_download_eeprom().
The device is supposed to provide the same length back to the driver.
But yes, it's possible (like shown in the report) to alter the value
to something that causes a crash/panic due to overrun.

This patch addresses the issue by adding the size to the common device
context, so p54_rx_eeprom_readback no longer relies on possibly tampered
values... That said, it also checks if the "firmware" altered the value
and no longer copies them.

The one, small saving grace is: Before the driver tries to read the eeprom,
it needs to upload &gt;a&lt; firmware. the vendor firmware has a proprietary
license and as a reason, it is not present on most distributions by
default.

Cc: &lt;stable@kernel.org&gt;
Reported-by: Robert Morris &lt;rtm@mit.edu&gt;
Closes: https://lore.kernel.org/linux-wireless/28782.1747258414@localhost/
Fixes: 7cb770729ba8 ("p54: move eeprom code into common library")
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Link: https://patch.msgid.link/20250516184107.47794-1-chunkeey@gmail.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath10k: snoc: fix unbalanced IRQ enable in crash recovery</title>
<updated>2025-06-27T10:04:08+00:00</updated>
<author>
<name>Caleb Connolly</name>
<email>caleb.connolly@linaro.org</email>
</author>
<published>2025-03-18T20:50:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5f87b6f8d8a3577a5178f9f8ba8dd2a110f6ae31'/>
<id>5f87b6f8d8a3577a5178f9f8ba8dd2a110f6ae31</id>
<content type='text'>
[ Upstream commit 1650d32b92b01db03a1a95d69ee74fcbc34d4b00 ]

In ath10k_snoc_hif_stop() we skip disabling the IRQs in the crash
recovery flow, but we still unconditionally call enable again in
ath10k_snoc_hif_start().

We can't check the ATH10K_FLAG_CRASH_FLUSH bit since it is cleared
before hif_start() is called, so instead check the
ATH10K_SNOC_FLAG_RECOVERY flag and skip enabling the IRQs during crash
recovery.

This fixes unbalanced IRQ enable splats that happen after recovering from
a crash.

Fixes: 0e622f67e041 ("ath10k: add support for WCN3990 firmware crash recovery")
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
Tested-by: Loic Poulain &lt;loic.poulain@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20250318205043.1043148-1-caleb.connolly@linaro.org
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 1650d32b92b01db03a1a95d69ee74fcbc34d4b00 ]

In ath10k_snoc_hif_stop() we skip disabling the IRQs in the crash
recovery flow, but we still unconditionally call enable again in
ath10k_snoc_hif_start().

We can't check the ATH10K_FLAG_CRASH_FLUSH bit since it is cleared
before hif_start() is called, so instead check the
ATH10K_SNOC_FLAG_RECOVERY flag and skip enabling the IRQs during crash
recovery.

This fixes unbalanced IRQ enable splats that happen after recovering from
a crash.

Fixes: 0e622f67e041 ("ath10k: add support for WCN3990 firmware crash recovery")
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
Tested-by: Loic Poulain &lt;loic.poulain@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20250318205043.1043148-1-caleb.connolly@linaro.org
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath10k: prevent deinitializing NAPI twice</title>
<updated>2025-06-27T10:04:08+00:00</updated>
<author>
<name>Wen Gong</name>
<email>wgong@codeaurora.org</email>
</author>
<published>2020-12-15T06:35:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9977994824756d00a774ec23c2fb22c871273970'/>
<id>9977994824756d00a774ec23c2fb22c871273970</id>
<content type='text'>
[ Upstream commit e2f8b74e58cb1560c1399ba94a470b770e858259 ]

It happened "Kernel panic - not syncing: hung_task: blocked tasks" when
test simulate crash and ifconfig down/rmmod meanwhile.

Test steps:

1.Test commands, either can reproduce the hang for PCIe, SDIO and SNOC.
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;sleep 0.05;ifconfig wlan0 down
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_sdio
echo hw-restart &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_pci

2. dmesg:
[ 5622.548630] ath10k_sdio mmc1:0001:1: simulating soft firmware crash
[ 5622.655995] ieee80211 phy0: Hardware restart was requested
[ 5776.355164] INFO: task shill:1572 blocked for more than 122 seconds.
[ 5776.355687] INFO: task kworker/1:2:24437 blocked for more than 122 seconds.
[ 5776.359812] Kernel panic - not syncing: hung_task: blocked tasks
[ 5776.359836] CPU: 1 PID: 55 Comm: khungtaskd Tainted: G        W         4.19.86 #137
[ 5776.359846] Hardware name: MediaTek krane sku176 board (DT)
[ 5776.359855] Call trace:
[ 5776.359868]  dump_backtrace+0x0/0x170
[ 5776.359881]  show_stack+0x20/0x2c
[ 5776.359896]  dump_stack+0xd4/0x10c
[ 5776.359916]  panic+0x12c/0x29c
[ 5776.359937]  hung_task_panic+0x0/0x50
[ 5776.359953]  kthread+0x120/0x130
[ 5776.359965]  ret_from_fork+0x10/0x18
[ 5776.359986] SMP: stopping secondary CPUs
[ 5776.360012] Kernel Offset: 0x141ea00000 from 0xffffff8008000000
[ 5776.360026] CPU features: 0x0,2188200c
[ 5776.360035] Memory Limit: none

command "ifconfig wlan0 down" or "rmmod ath10k_sdio" will be blocked
callstack of ifconfig:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x24c/0x294 [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] __dev_change_flags+0xe0/0x1d0
[&lt;0&gt;] dev_change_flags+0x30/0x6c
[&lt;0&gt;] devinet_ioctl+0x370/0x564
[&lt;0&gt;] inet_ioctl+0xdc/0x304
[&lt;0&gt;] sock_do_ioctl+0x50/0x288
[&lt;0&gt;] compat_sock_ioctl+0x1b4/0x1aac
[&lt;0&gt;] __se_compat_sys_ioctl+0x100/0x26fc
[&lt;0&gt;] __arm64_compat_sys_ioctl+0x20/0x2c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

callstack of rmmod:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x294/0x31c [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] dev_close_many+0x70/0x100
[&lt;0&gt;] dev_close+0x4c/0x80
[&lt;0&gt;] cfg80211_shutdown_all_interfaces+0x50/0xcc [cfg80211]
[&lt;0&gt;] ieee80211_remove_interfaces+0x58/0x1a0 [mac80211]
[&lt;0&gt;] ieee80211_unregister_hw+0x40/0x100 [mac80211]
[&lt;0&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[&lt;0&gt;] ath10k_core_unregister+0x38/0x7c [ath10k_core]
[&lt;0&gt;] ath10k_sdio_remove+0x8c/0xd0 [ath10k_sdio]
[&lt;0&gt;] sdio_bus_remove+0x48/0x108
[&lt;0&gt;] device_release_driver_internal+0x138/0x1ec
[&lt;0&gt;] driver_detach+0x6c/0xa8
[&lt;0&gt;] bus_remove_driver+0x78/0xa8
[&lt;0&gt;] driver_unregister+0x30/0x50
[&lt;0&gt;] sdio_unregister_driver+0x28/0x34
[&lt;0&gt;] cleanup_module+0x14/0x6bc [ath10k_sdio]
[&lt;0&gt;] __arm64_sys_delete_module+0x1e0/0x22c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

SNOC:
[  647.156863] Call trace:
[  647.162166] [&lt;ffffff80080855a4&gt;] __switch_to+0x120/0x13c
[  647.164512] [&lt;ffffff800899d8b8&gt;] __schedule+0x5ec/0x798
[  647.170062] [&lt;ffffff800899dad8&gt;] schedule+0x74/0x94
[  647.175050] [&lt;ffffff80089a0848&gt;] schedule_timeout+0x314/0x42c
[  647.179874] [&lt;ffffff80089a0a14&gt;] schedule_timeout_uninterruptible+0x34/0x40
[  647.185780] [&lt;ffffff80082a494&gt;] msleep+0x28/0x38
[  647.192546] [&lt;ffffff800117ec4c&gt;] ath10k_snoc_hif_stop+0x4c/0x1e0 [ath10k_snoc]
[  647.197439] [&lt;ffffff80010dfbd8&gt;] ath10k_core_stop+0x50/0x7c [ath10k_core]
[  647.204652] [&lt;ffffff80010c8f48&gt;] ath10k_halt+0x114/0x16c [ath10k_core]
[  647.211420] [&lt;ffffff80010cad68&gt;] ath10k_stop+0x4c/0x88 [ath10k_core]
[  647.217865] [&lt;ffffff8000fdbf54&gt;] drv_stop+0x110/0x244 [mac80211]
[  647.224367] [&lt;ffffff80010147ac&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[  647.230359] [&lt;ffffff8000ff3eec&gt;] ieee80211_do_stop+0x6a4/0x73c [mac80211]
[  647.237033] [&lt;ffffff8000ff4500&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[  647.243942] [&lt;ffffff80087e39b8&gt;] __dev_close_many+0xa0/0xfc
[  647.250435] [&lt;ffffff80087e3888&gt;] dev_close_many+0x70/0x100
[  647.255651] [&lt;ffffff80087e3a60&gt;] dev_close+0x4c/0x80
[  647.261244] [&lt;ffffff8000f1ba54&gt;] cfg80211_shutdown_all_interfaces+0x44/0xcc [cfg80211]
[  647.266383] [&lt;ffffff8000ff3fdc&gt;] ieee80211_remove_interfaces+0x58/0x1b4 [mac80211]
[  647.274128] [&lt;ffffff8000fda540&gt;] ieee80211_unregister_hw+0x50/0x120 [mac80211]
[  647.281659] [&lt;ffffff80010ca314&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[  647.288839] [&lt;ffffff80010dfc94&gt;] ath10k_core_unregister+0x48/0x90 [ath10k_core]
[  647.296027] [&lt;ffffff800117e598&gt;] ath10k_snoc_remove+0x5c/0x150 [ath10k_snoc]
[  647.303229] [&lt;ffffff80085625fc&gt;] platform_drv_remove+0x28/0x50
[  647.310517] [&lt;ffffff80085601a4&gt;] device_release_driver_internal+0x114/0x1b8
[  647.316257] [&lt;ffffff80085602e4&gt;] driver_detach+0x6c/0xa8
[  647.323021] [&lt;ffffff800855e5b8&gt;] bus_remove_driver+0x78/0xa8
[  647.328571] [&lt;ffffff800856107c&gt;] driver_unregister+0x30/0x50
[  647.334213] [&lt;ffffff8008562674&gt;] platform_driver_unregister+0x1c/0x28
[  647.339876] [&lt;ffffff800117fefc&gt;] cleanup_module+0x1c/0x120 [ath10k_snoc]
[  647.346196] [&lt;ffffff8008143ab8&gt;] SyS_delete_module+0x1dc/0x22c

PCIe:
[  615.392770] rmmod           D    0  3523   3458 0x00000080
[  615.392777] Call Trace:
[  615.392784]  __schedule+0x617/0x7d3
[  615.392791]  ? __mod_timer+0x263/0x35c
[  615.392797]  schedule+0x62/0x72
[  615.392803]  schedule_timeout+0x8d/0xf3
[  615.392809]  ? run_local_timers+0x6b/0x6b
[  615.392814]  msleep+0x1b/0x22
[  615.392824]  ath10k_pci_hif_stop+0x68/0xd6 [ath10k_pci]
[  615.392844]  ath10k_core_stop+0x44/0x67 [ath10k_core]
[  615.392859]  ath10k_halt+0x102/0x153 [ath10k_core]
[  615.392873]  ath10k_stop+0x38/0x75 [ath10k_core]
[  615.392893]  drv_stop+0x9a/0x13c [mac80211]
[  615.392915]  ieee80211_do_stop+0x772/0x7cd [mac80211]
[  615.392937]  ieee80211_stop+0x1a/0x1e [mac80211]
[  615.392945]  __dev_close_many+0x9e/0xf0
[  615.392952]  dev_close_many+0x62/0xe8
[  615.392958]  dev_close+0x54/0x7d
[  615.392975]  cfg80211_shutdown_all_interfaces+0x6e/0xa5 [cfg80211]
[  615.393021]  ieee80211_remove_interfaces+0x52/0x1aa [mac80211]
[  615.393049]  ieee80211_unregister_hw+0x54/0x136 [mac80211]
[  615.393068]  ath10k_mac_unregister+0x19/0x4a [ath10k_core]
[  615.393091]  ath10k_core_unregister+0x39/0x7e [ath10k_core]
[  615.393104]  ath10k_pci_remove+0x3d/0x7f [ath10k_pci]
[  615.393117]  pci_device_remove+0x41/0xa6
[  615.393129]  device_release_driver_internal+0x123/0x1ec
[  615.393140]  driver_detach+0x60/0x90
[  615.393152]  bus_remove_driver+0x72/0x9f
[  615.393164]  pci_unregister_driver+0x1e/0x87
[  615.393177]  SyS_delete_module+0x1d7/0x277
[  615.393188]  do_syscall_64+0x6b/0xf7
[  615.393199]  entry_SYSCALL_64_after_hwframe+0x41/0xa6

The test command run simulate_fw_crash firstly and it call into
ath10k_sdio_hif_stop from ath10k_core_restart, then napi_disable
is called and bit NAPI_STATE_SCHED is set. After that, function
ath10k_sdio_hif_stop is called again from ath10k_stop by command
"ifconfig wlan0 down" or "rmmod ath10k_sdio", then command blocked.

It is blocked by napi_synchronize, napi_disable will set bit with
NAPI_STATE_SCHED, and then napi_synchronize will enter dead loop
becuase bit NAPI_STATE_SCHED is set by napi_disable.

function of napi_synchronize
static inline void napi_synchronize(const struct napi_struct *n)
{
	if (IS_ENABLED(CONFIG_SMP))
		while (test_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
			msleep(1);
	else
		barrier();
}

function of napi_disable
void napi_disable(struct napi_struct *n)
{
	might_sleep();
	set_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);

	while (test_and_set_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
		msleep(1);
	while (test_and_set_bit(NAPI_STATE_NPSVC, &amp;n-&gt;state))
		msleep(1);

	hrtimer_cancel(&amp;n-&gt;timer);

	clear_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);
}

Add flag for it avoid the hang and crash.

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049
Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1
Tested-on: WCN3990 hw1.0 SNOC hw1.0 WLAN.HL.3.1-01307.1-QCAHLSWMTPL-2

Signed-off-by: Wen Gong &lt;wgong@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1598617348-2325-1-git-send-email-wgong@codeaurora.org
Stable-dep-of: 1650d32b92b0 ("ath10k: snoc: fix unbalanced IRQ enable in crash recovery")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit e2f8b74e58cb1560c1399ba94a470b770e858259 ]

It happened "Kernel panic - not syncing: hung_task: blocked tasks" when
test simulate crash and ifconfig down/rmmod meanwhile.

Test steps:

1.Test commands, either can reproduce the hang for PCIe, SDIO and SNOC.
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;sleep 0.05;ifconfig wlan0 down
echo soft &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_sdio
echo hw-restart &gt; /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash;rmmod ath10k_pci

2. dmesg:
[ 5622.548630] ath10k_sdio mmc1:0001:1: simulating soft firmware crash
[ 5622.655995] ieee80211 phy0: Hardware restart was requested
[ 5776.355164] INFO: task shill:1572 blocked for more than 122 seconds.
[ 5776.355687] INFO: task kworker/1:2:24437 blocked for more than 122 seconds.
[ 5776.359812] Kernel panic - not syncing: hung_task: blocked tasks
[ 5776.359836] CPU: 1 PID: 55 Comm: khungtaskd Tainted: G        W         4.19.86 #137
[ 5776.359846] Hardware name: MediaTek krane sku176 board (DT)
[ 5776.359855] Call trace:
[ 5776.359868]  dump_backtrace+0x0/0x170
[ 5776.359881]  show_stack+0x20/0x2c
[ 5776.359896]  dump_stack+0xd4/0x10c
[ 5776.359916]  panic+0x12c/0x29c
[ 5776.359937]  hung_task_panic+0x0/0x50
[ 5776.359953]  kthread+0x120/0x130
[ 5776.359965]  ret_from_fork+0x10/0x18
[ 5776.359986] SMP: stopping secondary CPUs
[ 5776.360012] Kernel Offset: 0x141ea00000 from 0xffffff8008000000
[ 5776.360026] CPU features: 0x0,2188200c
[ 5776.360035] Memory Limit: none

command "ifconfig wlan0 down" or "rmmod ath10k_sdio" will be blocked
callstack of ifconfig:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x24c/0x294 [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] __dev_change_flags+0xe0/0x1d0
[&lt;0&gt;] dev_change_flags+0x30/0x6c
[&lt;0&gt;] devinet_ioctl+0x370/0x564
[&lt;0&gt;] inet_ioctl+0xdc/0x304
[&lt;0&gt;] sock_do_ioctl+0x50/0x288
[&lt;0&gt;] compat_sock_ioctl+0x1b4/0x1aac
[&lt;0&gt;] __se_compat_sys_ioctl+0x100/0x26fc
[&lt;0&gt;] __arm64_compat_sys_ioctl+0x20/0x2c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

callstack of rmmod:
[&lt;0&gt;] __switch_to+0x120/0x13c
[&lt;0&gt;] msleep+0x28/0x38
[&lt;0&gt;] ath10k_sdio_hif_stop+0x294/0x31c [ath10k_sdio]
[&lt;0&gt;] ath10k_core_stop+0x50/0x78 [ath10k_core]
[&lt;0&gt;] ath10k_halt+0x120/0x178 [ath10k_core]
[&lt;0&gt;] ath10k_stop+0x4c/0x8c [ath10k_core]
[&lt;0&gt;] drv_stop+0xe0/0x1e4 [mac80211]
[&lt;0&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[&lt;0&gt;] ieee80211_do_stop+0x678/0x6f8 [mac80211]
[&lt;0&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[&lt;0&gt;] __dev_close_many+0xb8/0x11c
[&lt;0&gt;] dev_close_many+0x70/0x100
[&lt;0&gt;] dev_close+0x4c/0x80
[&lt;0&gt;] cfg80211_shutdown_all_interfaces+0x50/0xcc [cfg80211]
[&lt;0&gt;] ieee80211_remove_interfaces+0x58/0x1a0 [mac80211]
[&lt;0&gt;] ieee80211_unregister_hw+0x40/0x100 [mac80211]
[&lt;0&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[&lt;0&gt;] ath10k_core_unregister+0x38/0x7c [ath10k_core]
[&lt;0&gt;] ath10k_sdio_remove+0x8c/0xd0 [ath10k_sdio]
[&lt;0&gt;] sdio_bus_remove+0x48/0x108
[&lt;0&gt;] device_release_driver_internal+0x138/0x1ec
[&lt;0&gt;] driver_detach+0x6c/0xa8
[&lt;0&gt;] bus_remove_driver+0x78/0xa8
[&lt;0&gt;] driver_unregister+0x30/0x50
[&lt;0&gt;] sdio_unregister_driver+0x28/0x34
[&lt;0&gt;] cleanup_module+0x14/0x6bc [ath10k_sdio]
[&lt;0&gt;] __arm64_sys_delete_module+0x1e0/0x22c
[&lt;0&gt;] el0_svc_common+0xa4/0x154
[&lt;0&gt;] el0_svc_compat_handler+0x2c/0x38
[&lt;0&gt;] el0_svc_compat+0x8/0x18
[&lt;0&gt;] 0xffffffffffffffff

SNOC:
[  647.156863] Call trace:
[  647.162166] [&lt;ffffff80080855a4&gt;] __switch_to+0x120/0x13c
[  647.164512] [&lt;ffffff800899d8b8&gt;] __schedule+0x5ec/0x798
[  647.170062] [&lt;ffffff800899dad8&gt;] schedule+0x74/0x94
[  647.175050] [&lt;ffffff80089a0848&gt;] schedule_timeout+0x314/0x42c
[  647.179874] [&lt;ffffff80089a0a14&gt;] schedule_timeout_uninterruptible+0x34/0x40
[  647.185780] [&lt;ffffff80082a494&gt;] msleep+0x28/0x38
[  647.192546] [&lt;ffffff800117ec4c&gt;] ath10k_snoc_hif_stop+0x4c/0x1e0 [ath10k_snoc]
[  647.197439] [&lt;ffffff80010dfbd8&gt;] ath10k_core_stop+0x50/0x7c [ath10k_core]
[  647.204652] [&lt;ffffff80010c8f48&gt;] ath10k_halt+0x114/0x16c [ath10k_core]
[  647.211420] [&lt;ffffff80010cad68&gt;] ath10k_stop+0x4c/0x88 [ath10k_core]
[  647.217865] [&lt;ffffff8000fdbf54&gt;] drv_stop+0x110/0x244 [mac80211]
[  647.224367] [&lt;ffffff80010147ac&gt;] ieee80211_stop_device+0x48/0x54 [mac80211]
[  647.230359] [&lt;ffffff8000ff3eec&gt;] ieee80211_do_stop+0x6a4/0x73c [mac80211]
[  647.237033] [&lt;ffffff8000ff4500&gt;] ieee80211_stop+0x20/0x30 [mac80211]
[  647.243942] [&lt;ffffff80087e39b8&gt;] __dev_close_many+0xa0/0xfc
[  647.250435] [&lt;ffffff80087e3888&gt;] dev_close_many+0x70/0x100
[  647.255651] [&lt;ffffff80087e3a60&gt;] dev_close+0x4c/0x80
[  647.261244] [&lt;ffffff8000f1ba54&gt;] cfg80211_shutdown_all_interfaces+0x44/0xcc [cfg80211]
[  647.266383] [&lt;ffffff8000ff3fdc&gt;] ieee80211_remove_interfaces+0x58/0x1b4 [mac80211]
[  647.274128] [&lt;ffffff8000fda540&gt;] ieee80211_unregister_hw+0x50/0x120 [mac80211]
[  647.281659] [&lt;ffffff80010ca314&gt;] ath10k_mac_unregister+0x1c/0x44 [ath10k_core]
[  647.288839] [&lt;ffffff80010dfc94&gt;] ath10k_core_unregister+0x48/0x90 [ath10k_core]
[  647.296027] [&lt;ffffff800117e598&gt;] ath10k_snoc_remove+0x5c/0x150 [ath10k_snoc]
[  647.303229] [&lt;ffffff80085625fc&gt;] platform_drv_remove+0x28/0x50
[  647.310517] [&lt;ffffff80085601a4&gt;] device_release_driver_internal+0x114/0x1b8
[  647.316257] [&lt;ffffff80085602e4&gt;] driver_detach+0x6c/0xa8
[  647.323021] [&lt;ffffff800855e5b8&gt;] bus_remove_driver+0x78/0xa8
[  647.328571] [&lt;ffffff800856107c&gt;] driver_unregister+0x30/0x50
[  647.334213] [&lt;ffffff8008562674&gt;] platform_driver_unregister+0x1c/0x28
[  647.339876] [&lt;ffffff800117fefc&gt;] cleanup_module+0x1c/0x120 [ath10k_snoc]
[  647.346196] [&lt;ffffff8008143ab8&gt;] SyS_delete_module+0x1dc/0x22c

PCIe:
[  615.392770] rmmod           D    0  3523   3458 0x00000080
[  615.392777] Call Trace:
[  615.392784]  __schedule+0x617/0x7d3
[  615.392791]  ? __mod_timer+0x263/0x35c
[  615.392797]  schedule+0x62/0x72
[  615.392803]  schedule_timeout+0x8d/0xf3
[  615.392809]  ? run_local_timers+0x6b/0x6b
[  615.392814]  msleep+0x1b/0x22
[  615.392824]  ath10k_pci_hif_stop+0x68/0xd6 [ath10k_pci]
[  615.392844]  ath10k_core_stop+0x44/0x67 [ath10k_core]
[  615.392859]  ath10k_halt+0x102/0x153 [ath10k_core]
[  615.392873]  ath10k_stop+0x38/0x75 [ath10k_core]
[  615.392893]  drv_stop+0x9a/0x13c [mac80211]
[  615.392915]  ieee80211_do_stop+0x772/0x7cd [mac80211]
[  615.392937]  ieee80211_stop+0x1a/0x1e [mac80211]
[  615.392945]  __dev_close_many+0x9e/0xf0
[  615.392952]  dev_close_many+0x62/0xe8
[  615.392958]  dev_close+0x54/0x7d
[  615.392975]  cfg80211_shutdown_all_interfaces+0x6e/0xa5 [cfg80211]
[  615.393021]  ieee80211_remove_interfaces+0x52/0x1aa [mac80211]
[  615.393049]  ieee80211_unregister_hw+0x54/0x136 [mac80211]
[  615.393068]  ath10k_mac_unregister+0x19/0x4a [ath10k_core]
[  615.393091]  ath10k_core_unregister+0x39/0x7e [ath10k_core]
[  615.393104]  ath10k_pci_remove+0x3d/0x7f [ath10k_pci]
[  615.393117]  pci_device_remove+0x41/0xa6
[  615.393129]  device_release_driver_internal+0x123/0x1ec
[  615.393140]  driver_detach+0x60/0x90
[  615.393152]  bus_remove_driver+0x72/0x9f
[  615.393164]  pci_unregister_driver+0x1e/0x87
[  615.393177]  SyS_delete_module+0x1d7/0x277
[  615.393188]  do_syscall_64+0x6b/0xf7
[  615.393199]  entry_SYSCALL_64_after_hwframe+0x41/0xa6

The test command run simulate_fw_crash firstly and it call into
ath10k_sdio_hif_stop from ath10k_core_restart, then napi_disable
is called and bit NAPI_STATE_SCHED is set. After that, function
ath10k_sdio_hif_stop is called again from ath10k_stop by command
"ifconfig wlan0 down" or "rmmod ath10k_sdio", then command blocked.

It is blocked by napi_synchronize, napi_disable will set bit with
NAPI_STATE_SCHED, and then napi_synchronize will enter dead loop
becuase bit NAPI_STATE_SCHED is set by napi_disable.

function of napi_synchronize
static inline void napi_synchronize(const struct napi_struct *n)
{
	if (IS_ENABLED(CONFIG_SMP))
		while (test_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
			msleep(1);
	else
		barrier();
}

function of napi_disable
void napi_disable(struct napi_struct *n)
{
	might_sleep();
	set_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);

	while (test_and_set_bit(NAPI_STATE_SCHED, &amp;n-&gt;state))
		msleep(1);
	while (test_and_set_bit(NAPI_STATE_NPSVC, &amp;n-&gt;state))
		msleep(1);

	hrtimer_cancel(&amp;n-&gt;timer);

	clear_bit(NAPI_STATE_DISABLE, &amp;n-&gt;state);
}

Add flag for it avoid the hang and crash.

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049
Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1
Tested-on: WCN3990 hw1.0 SNOC hw1.0 WLAN.HL.3.1-01307.1-QCAHLSWMTPL-2

Signed-off-by: Wen Gong &lt;wgong@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1598617348-2325-1-git-send-email-wgong@codeaurora.org
Stable-dep-of: 1650d32b92b0 ("ath10k: snoc: fix unbalanced IRQ enable in crash recovery")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath10k: add atomic protection for device recovery</title>
<updated>2025-06-27T10:04:08+00:00</updated>
<author>
<name>Wen Gong</name>
<email>wgong@codeaurora.org</email>
</author>
<published>2020-09-08T04:13:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b021241ca3ed6315a625e3d68d2a35be7f4a112f'/>
<id>b021241ca3ed6315a625e3d68d2a35be7f4a112f</id>
<content type='text'>
[ Upstream commit 5dadbe4e3718fb2214199b6dc7af1077fe14bf32 ]

When it has more than one restart_work queued meanwhile, the 2nd
restart_work is very easy to break the 1st restart work and lead
recovery fail.

Add a flag to allow only one restart work running untill
device successfully recovered.

It already has flag ATH10K_FLAG_CRASH_FLUSH, but it can not use this
flag again, because it is clear in ath10k_core_start. The function
ieee80211_reconfig(called by ieee80211_restart_work) of mac80211 do
many things and drv_start(call to ath10k_core_start) is 1st thing,
when drv_start complete, it does not mean restart complete. So it
add new flag and clear it in ath10k_reconfig_complete, because it
is the last thing called from drv_reconfig_complete of function
ieee80211_reconfig, after it, the restart process finished.

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049

Signed-off-by: Wen Gong &lt;wgong@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/010101746bead6a0-d5e97c66-dedd-4b92-810e-c2e4840fafc9-000000@us-west-2.amazonses.com
Stable-dep-of: 1650d32b92b0 ("ath10k: snoc: fix unbalanced IRQ enable in crash recovery")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 5dadbe4e3718fb2214199b6dc7af1077fe14bf32 ]

When it has more than one restart_work queued meanwhile, the 2nd
restart_work is very easy to break the 1st restart work and lead
recovery fail.

Add a flag to allow only one restart work running untill
device successfully recovered.

It already has flag ATH10K_FLAG_CRASH_FLUSH, but it can not use this
flag again, because it is clear in ath10k_core_start. The function
ieee80211_reconfig(called by ieee80211_restart_work) of mac80211 do
many things and drv_start(call to ath10k_core_start) is 1st thing,
when drv_start complete, it does not mean restart complete. So it
add new flag and clear it in ath10k_reconfig_complete, because it
is the last thing called from drv_reconfig_complete of function
ieee80211_reconfig, after it, the restart process finished.

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049

Signed-off-by: Wen Gong &lt;wgong@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/010101746bead6a0-d5e97c66-dedd-4b92-810e-c2e4840fafc9-000000@us-west-2.amazonses.com
Stable-dep-of: 1650d32b92b0 ("ath10k: snoc: fix unbalanced IRQ enable in crash recovery")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: ath9k_htc: Abort software beacon handling if disabled</title>
<updated>2025-06-27T10:04:03+00:00</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@toke.dk</email>
</author>
<published>2025-04-02T11:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0281c19074976ec48f0078d50530b406ddae75bc'/>
<id>0281c19074976ec48f0078d50530b406ddae75bc</id>
<content type='text'>
[ Upstream commit ac4e317a95a1092b5da5b9918b7118759342641c ]

A malicious USB device can send a WMI_SWBA_EVENTID event from an
ath9k_htc-managed device before beaconing has been enabled. This causes
a device-by-zero error in the driver, leading to either a crash or an
out of bounds read.

Prevent this by aborting the handling in ath9k_htc_swba() if beacons are
not enabled.

Reported-by: Robert Morris &lt;rtm@csail.mit.edu&gt;
Closes: https://lore.kernel.org/r/88967.1743099372@localhost
Fixes: 832f6a18fc2a ("ath9k_htc: Add beacon slots")
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
Link: https://patch.msgid.link/20250402112217.58533-1-toke@toke.dk
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ac4e317a95a1092b5da5b9918b7118759342641c ]

A malicious USB device can send a WMI_SWBA_EVENTID event from an
ath9k_htc-managed device before beaconing has been enabled. This causes
a device-by-zero error in the driver, leading to either a crash or an
out of bounds read.

Prevent this by aborting the handling in ath9k_htc_swba() if beacons are
not enabled.

Reported-by: Robert Morris &lt;rtm@csail.mit.edu&gt;
Closes: https://lore.kernel.org/r/88967.1743099372@localhost
Fixes: 832f6a18fc2a ("ath9k_htc: Add beacon slots")
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt;
Link: https://patch.msgid.link/20250402112217.58533-1-toke@toke.dk
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: rtw88: do not ignore hardware read error during DPK</title>
<updated>2025-06-27T10:04:03+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2025-04-15T09:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bda3cab4785748d2431d020bc7857b8f0896c9c2'/>
<id>bda3cab4785748d2431d020bc7857b8f0896c9c2</id>
<content type='text'>
[ Upstream commit 20d3c19bd8f9b498173c198eadf54580c8caa336 ]

In 'rtw8822c_dpk_cal_coef1()', do not ignore error returned
by 'check_hw_ready()' but issue a warning to denote possible
DPK issue. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support")
Suggested-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250415090720.194048-1-dmantipov@yandex.ru
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 20d3c19bd8f9b498173c198eadf54580c8caa336 ]

In 'rtw8822c_dpk_cal_coef1()', do not ignore error returned
by 'check_hw_ready()' but issue a warning to denote possible
DPK issue. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support")
Suggested-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Signed-off-by: Ping-Ke Shih &lt;pkshih@realtek.com&gt;
Link: https://patch.msgid.link/20250415090720.194048-1-dmantipov@yandex.ru
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: ath11k: fix node corruption in ar-&gt;arvifs list</title>
<updated>2025-06-27T10:04:02+00:00</updated>
<author>
<name>Stone Zhang</name>
<email>quic_stonez@quicinc.com</email>
</author>
<published>2025-03-20T05:31:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6c139015b597e570dd5962934e9f9a2f4cc8ef48'/>
<id>6c139015b597e570dd5962934e9f9a2f4cc8ef48</id>
<content type='text'>
[ Upstream commit 31e98e277ae47f56632e4d663b1d4fd12ba33ea8 ]

In current WLAN recovery code flow, ath11k_core_halt() only
reinitializes the "arvifs" list head. This will cause the
list node immediately following the list head to become an
invalid list node. Because the prev of that node still points
to the list head "arvifs", but the next of the list head "arvifs"
no longer points to that list node.

When a WLAN recovery occurs during the execution of a vif
removal, and it happens before the spin_lock_bh(&amp;ar-&gt;data_lock)
in ath11k_mac_op_remove_interface(), list_del() will detect the
previously mentioned situation, thereby triggering a kernel panic.

The fix is to remove and reinitialize all vif list nodes from the
list head "arvifs" during WLAN halt. The reinitialization is to make
the list nodes valid, ensuring that the list_del() in
ath11k_mac_op_remove_interface() can execute normally.

Call trace:
__list_del_entry_valid_or_report+0xb8/0xd0
ath11k_mac_op_remove_interface+0xb0/0x27c [ath11k]
drv_remove_interface+0x48/0x194 [mac80211]
ieee80211_do_stop+0x6e0/0x844 [mac80211]
ieee80211_stop+0x44/0x17c [mac80211]
__dev_close_many+0xac/0x150
__dev_change_flags+0x194/0x234
dev_change_flags+0x24/0x6c
devinet_ioctl+0x3a0/0x670
inet_ioctl+0x200/0x248
sock_do_ioctl+0x60/0x118
sock_ioctl+0x274/0x35c
__arm64_sys_ioctl+0xac/0xf0
invoke_syscall+0x48/0x114
...

Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04591-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Stone Zhang &lt;quic_stonez@quicinc.com&gt;
Link: https://patch.msgid.link/20250320053145.3445187-1-quic_stonez@quicinc.com
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 31e98e277ae47f56632e4d663b1d4fd12ba33ea8 ]

In current WLAN recovery code flow, ath11k_core_halt() only
reinitializes the "arvifs" list head. This will cause the
list node immediately following the list head to become an
invalid list node. Because the prev of that node still points
to the list head "arvifs", but the next of the list head "arvifs"
no longer points to that list node.

When a WLAN recovery occurs during the execution of a vif
removal, and it happens before the spin_lock_bh(&amp;ar-&gt;data_lock)
in ath11k_mac_op_remove_interface(), list_del() will detect the
previously mentioned situation, thereby triggering a kernel panic.

The fix is to remove and reinitialize all vif list nodes from the
list head "arvifs" during WLAN halt. The reinitialization is to make
the list nodes valid, ensuring that the list_del() in
ath11k_mac_op_remove_interface() can execute normally.

Call trace:
__list_del_entry_valid_or_report+0xb8/0xd0
ath11k_mac_op_remove_interface+0xb0/0x27c [ath11k]
drv_remove_interface+0x48/0x194 [mac80211]
ieee80211_do_stop+0x6e0/0x844 [mac80211]
ieee80211_stop+0x44/0x17c [mac80211]
__dev_close_many+0xac/0x150
__dev_change_flags+0x194/0x234
dev_change_flags+0x24/0x6c
devinet_ioctl+0x3a0/0x670
inet_ioctl+0x200/0x248
sock_do_ioctl+0x60/0x118
sock_ioctl+0x274/0x35c
__arm64_sys_ioctl+0xac/0xf0
invoke_syscall+0x48/0x114
...

Tested-on: QCA6698AQ hw2.1 PCI WLAN.HSP.1.1-04591-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Stone Zhang &lt;quic_stonez@quicinc.com&gt;
Link: https://patch.msgid.link/20250320053145.3445187-1-quic_stonez@quicinc.com
Signed-off-by: Jeff Johnson &lt;jeff.johnson@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
