summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-04-29wifi: rtw89: disable HTC field in AP modeDian-Syuan Yang
Disable HE QoS HTC field when operating in AP mode to resolve interoperability issues with some stations. Signed-off-by: Dian-Syuan Yang <dian_syuan0116@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260424072552.59220-3-pkshih@realtek.com
2026-04-29wifi: rtw89: pci: no need to wait CLK ready for RTL8922DEPing-Ke Shih
The bit is to wait for CLK ready when entering PCIE L1SS. However, a certain host might not enable CLK for a situation, causing device state stuck and trigger PCIE SER. Unset this bit as default like earlier chips. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260424072552.59220-2-pkshih@realtek.com
2026-04-29wifi: rtw89: add bounds check on firmware mac_id in link lookupTristan Madani
The mac_id field in RX descriptors is 8 bits wide (0-255), but assoc_link_on_macid[] has only RTW89_MAX_MAC_ID_NUM (128) entries. While the driver currently assigns mac_id values below 128, the descriptor value comes from firmware and is not validated before use as an array index. Add a defensive bounds check in rtw89_assoc_link_rcu_dereference() to guard against out-of-range firmware values. Fixes: 144c6cd24b35 ("wifi: rtw89: 8922a: configure AP_LINK_PS if FW supports") Signed-off-by: Tristan Madani <tristan@talencesecurity.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260421111442.3395411-1-tristmd@gmail.com
2026-04-29wifi: rtw88: fix OOB read from firmware RX descriptor exceeding DMA bufferTristan Madani
In rtw_pci_rx_napi(), new_len is computed as the sum of pkt_len (14-bit descriptor field, max 16383) and pkt_offset (drv_info_sz + shift, both firmware-controlled). The result can exceed RTK_PCI_RX_BUF_SIZE (11478), causing an out-of-bounds read from the pre-allocated DMA buffer when skb_put_data copies new_len bytes. The USB transport already validates this (rtw_usb_rx_data_put checks against RTW_USB_MAX_RECVBUF_SZ); the PCIe path does not. Add a check that new_len does not exceed the DMA buffer size. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Tristan Madani <tristan@talencesecurity.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260421111434.3389674-1-tristmd@gmail.com
2026-04-29wifi: rtw89: 8922d: update RF calibration flow for MLDZong-Zhe Yang
RF calibration (RFK) will record the results in HW RFK tables. SW can select and configure the target HW RFK table to reuse the RFK result on the target channel. Though the above can work as before, when MLD runs eMLSR mode, a faster switching between links than SW is needed. So, introduce a new working flow for MLD. With the new settings, HW can easily switch RFK results between links during eMLSR mode. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-17-pkshih@realtek.com
2026-04-29wifi: rtw89: chan: introduce new helper to get entity current configurationZong-Zhe Yang
The original helper can only queries target channel, but cannot determine current role's status, e.g. is it MLD or not. These things should be a set. Adding more and more helpers to query them individually without synchronous doesn't seem right. Introduce a new helper to query current channel set and role status. Besides, when single channel, e.g. MLO_2_PLUS_0_1RF and MLO_0_PLUS_2_1RF, the target channel pointer will be duplicated to fill the returned channel set. So, some callers can save trivial things for these cases. The returned channels will be non-NULL, so callers don't need trivial NULL check either. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-16-pkshih@realtek.com
2026-04-29wifi: rtw89: suspend DIG when remain-on-channelChih-Kang Chang
The PD (Packet Detection) lower bound is set after the STA interface connects. When the P2P interface attempts to find peers, it enters the remain-on-channel flow to listen for probe requests. However, if the RSSI of the connected AP is too high, the P2P interface fails to receive it. To resolve this, suspend the DIG during the remain-on-channel period. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-15-pkshih@realtek.com
2026-04-29wifi: rtw89: check scan C2H event recv ack instead of C2H event done ackChih-Kang Chang
The original flow checks the scan offload C2H event done ack to increase the scan sequence. However, the scan offload response C2H event may be received earlier than the scan offload C2H event done ack, which causes these C2H event to be dropped by rtw89_fw_c2h_purge_obsoleted_scan_events() check because the scan sequence of the scan offload response C2H event is less than the scan offload C2H event done ack. Therefore, checking the scan offload C2H event recv ack instead of C2H event done ack to fix this issue. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-14-pkshih@realtek.com
2026-04-29wifi: rtw89: use struct to fill C2H recv ackChih-Kang Chang
This C2H packet is used to indicate that FW has received the corresponding H2C command. No logic is changed. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-13-pkshih@realtek.com
2026-04-29wifi: rtw89: 8832cu: Add ID 2c7c:8206 for RTL8832CUJohnson Tsai
This ID is used by RTL8832CU-based Quectel USB dongle devices. Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-12-pkshih@realtek.com
2026-04-29wifi: rtw89: use firmware offload for PHY and RF batch register writesEric Huang
Use firmware offload to perform batch register writes for PHY and RF. This reduces I/O operations, improves bus transfer efficiency, and decreases hardware initialization time. Performance improvement on USB 2.0 HCI: - rtw89_phy_init_bb_reg: 61 ms -> 5 ms - rtw89_phy_init_rf_reg: 587 ms -> 106 ms Use offload-aware delay functions (do_udelay and do_mdelay) for the delay calls in rtw89_phy_init_reg, rtw89_phy_config_rf_reg, and rtw89_phy_config_rf_reg_v1 to ensure compatibility with batch register writes. Signed-off-by: Eric Huang <echuang@realtek.com> Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-11-pkshih@realtek.com
2026-04-29wifi: rtw89: offload DMAC and CMAC init IO to firmwareChia-Yuan Li
During the initialization of DMAC and CMAC, the driver performs a large number of consecutive register writes. Sending these I/O requests individually over the host interface introduces significant latency and delays the device bring-up process. Optimize the initialization flow by wrapping the register write sequences in mac.c and mac_be.c with rtw89_io_pack() and rtw89_io_unpack(). This batches the operations and offloads them to the firmware via H2C commands, which significantly accelerates the overall initialization time. (8852C USB2.0 AMD B450 1379 ms -> 1273 ms) Signed-off-by: Chia-Yuan Li <leo.li@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-10-pkshih@realtek.com
2026-04-29wifi: rtw89: add IO offload support via firmwareChia-Yuan Li
Offload register write operations to the firmware to improve IO efficiency. Instead of the host performing direct bus access for every register, the operations are now encapsulated into firmware commands. This implementation allows the host to aggregate multiple register write actions into a single command buffer. By batching these operations, we reduce the number of individual transactions on the bus and minimize per-transfer overhead, leading to faster overall IO performance. Add a support_fw_cmd_ofld field to the chip_info structure to control whether firmware-offloaded batch writes are enabled. Enable it by default for RTL8832CU. Co-developed-by: Eric Huang <echuang@realtek.com> Signed-off-by: Eric Huang <echuang@realtek.com> Co-developed-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Chia-Yuan Li <leo.li@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-9-pkshih@realtek.com
2026-04-29wifi: rtw89: 8852bt: configure support_noise field explicitlyZong-Zhe Yang
RTL8852BT missed to configure support_noise field in chip_info. Although RTL8852BT doesn't support that, add the configuration to make things clear. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-8-pkshih@realtek.com
2026-04-29wifi: rtw89: Correct data type for scan index to avoid infinite loopShin-Yi Lin
A kernel soft lockup was observed during Wi-Fi scanning on the 6GHz band. The CPU becomes stuck in rtw89_hw_scan_add_chan_ax for over 20 seconds, leading to a system panic. RIP points to 0f b6 c3 (movzbl %bl, %eax), which zero-extends the low 8 bits of RBX into RAX. RBX (the counter i) has reached a huge value: 0x137466a1. watchdog: BUG: soft lockup - CPU#2 stuck for 26s! [kworker/u16:4:6124] Workqueue: events_unbound cfg80211_wiphy_work [cfg80211] RIP: 0010:rtw89_hw_scan_add_chan_ax+0xb3/0x6e0 [rtw89_core] Code: a0 48 89 45 a8 44 89 6d 9c 44 89 75 98 eb 29 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 83 c3 01 <0f> b6 c3 41 3b 44 24 74 0f 83 0b 02 00 00 0f b6 c3 48 8d 14 80 49 RSP: 0018:ffffcb48cbaa39f8 EFLAGS: 00000202 RAX: 0000000000000005 RBX: 00000000137466a1 RCX: 0000000000000000 RDX: ffff89ffc9d851a8 RSI: 0000000000004f0d RDI: 0000000096af0130 RBP: ffffcb48cbaa3a60 R08: 0000000000000000 R09: ffff8a00b7502080 R10: ffff8a00b75ff600 R11: 0000000000000000 R12: ffff89ffc7553870 R13: ffff8a00b7ac8f19 R14: ffff8a00b75020d8 R15: ffff89ffc3d54d80 FS: 0000000000000000(0000) GS:ffff8a014f962000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007558d7f9f4c4 CR3: 0000000178040001 CR4: 00000000001706f0 Call Trace: <TASK> rtw89_hw_scan_prep_chan_list_ax+0x8a/0x400 [rtw89_core] rtw89_hw_scan_start+0x546/0x8a0 [rtw89_core] ? rtw89_fw_h2c_default_cmac_tbl+0x13c/0x1f0 [rtw89_core] rtw89_ops_hw_scan+0xae/0x120 [rtw89_core] drv_hw_scan+0xbb/0x180 [mac80211] __ieee80211_start_scan+0x2fc/0x750 [mac80211] ieee80211_request_scan+0xe/0x20 [mac80211] ieee80211_scan+0x123/0x190 [mac80211] rdev_scan+0x40/0x110 [cfg80211] cfg80211_scan_6ghz+0x5a1/0xa30 [cfg80211] By objdump with source: for (i = 0; i < req->n_6ghz_params; i++) { 5fbc0: 83 c3 01 add $0x1,%ebx --> i++ 5fbc3: 0f b6 c3 movzbl %bl,%eax --> get counter fbc6: 41 3b 44 24 74 cmp 0x74(%r12),%eax * RBX: 00000000137466a1 -> %bl = a1 -> EAX = 000000a1 (161) Fixes: c6aa9a9c4725 ("wifi: rtw89: add RNR support for 6 GHz scan") Signed-off-by: Shin-Yi Lin <isaiah@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-7-pkshih@realtek.com
2026-04-29wifi: rtw89: phy: support static PD level settingEric Huang
PD (Packet Detection) threshold is a key parameter in the DIG (Dynamic Initial Gain) algorithm that determines the sensitivity of packet detection. Current implementation only supports dynamic PD adjustment based on environment. This patch adds support for static PD threshold via debugfs allowing users to set a fixed PD value for testing or specific scenarios. Signed-off-by: Eric Huang <echuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-6-pkshih@realtek.com
2026-04-29wifi: rtw89: debug: disable inactive power save to reduce bus overheadJohnson Tsai
This helps avoid excessive bus traffic and I/O overhead on slower HCIs (e.g., USB, SDIO) caused by frequent power state transitions. Add RTW89_DM_INACTIVE_PS to the disabled_dm bitmap via debugfs and check it in the rtw89_enter_ips path. When set, the driver skips entering inactive power save and returns immediately. Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-5-pkshih@realtek.com
2026-04-29wifi: rtw89: debug: disable hw_scan for latency-sensitive scenariosJohnson Tsai
This helps avoid scan-triggered off-channel activity during latency-sensitive scenarios. Add RTW89_DM_HW_SCAN to the disabled_dm bitmap via debugfs and check it in the hw_scan path. When set, the driver rejects hw_scan requests and returns -EBUSY. Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-4-pkshih@realtek.com
2026-04-29wifi: rtw89: 8852a: refine power save to lower latencyPo-Hao Huang
Improve user experience while using interactive applications. Adjust power saving decisions under different scenarios. Minimize latency for delay-sensitive connections by exiting power-save on packet bursts and maintain active until a period of inactivity is reached. For connections that are not that sensitive to delays, keep the current aggressive power save logic. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-3-pkshih@realtek.com
2026-04-29wifi: rtw89: 8922d: fix typo rx_freq_frome_iePing-Ke Shih
The commit 127ea8d0b068 ("wifi: rtw89: fix typo "frome" -> "from" in rx_freq_frome_ie") change the struct field to correct the typo, but miss to fix this for RTL8922D because it is submitting at the same time. As RTL8922D is not enabled yet, this build error doesn't appear. Fix it accordingly. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260420034051.17666-2-pkshih@realtek.com
2026-04-28clk: rk808: fix OF node reference imbalanceJohan Hovold
The driver reuses the OF node of the parent multi-function device but fails to take another reference to balance the one dropped by the platform bus code when unbinding the MFD and deregistering the child devices. Fix this by using the intended helper for reusing OF nodes. Fixes: 2dc51ca822e4 ("clk: RK808: Reduce 'struct rk808' usage") Cc: stable@vger.kernel.org # 6.5 Cc: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Brian Masney <bmasney@redhat.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-04-28MAINTAINERS: add myself as a reviewer for the clk subsystemBrian Masney
I've reviewed a lot clk patches for parts of the subsystem that typically doesn't get much review. Add myself as a reviewer so that I don't miss anything. Link: https://lore.kernel.org/linux-clk/?q=f%3Abmasney%40redhat.com Signed-off-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-04-28clk: hisilicon: Improve deallocation in error pathJ. Neuschäfer
Unmap 'base' if an error occurs after it has been mapped. Reported-by: Tao Lan <taolan@huawei.com> Closes: https://lore.kernel.org/lkml/ZNlSH+eWV8Sk3FYn@probook/ Signed-off-by: J. Neuschäfer <j.ne@posteo.net> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-04-28clk-lpc18xx-ccu: kzalloc + kcalloc to kzalloc_flexRosen Penev
Simplifies allocation by using a flexible array member. Also allows using __counted_by for extra runtime analysis. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-04-29wifi: rtw89: Enable the new rtw89_8922au moduleBitterblue Smith
Tested without MLO, mostly in station mode and a little in AP mode. It can reach 1.5 Gbps RX, 1 Gbps TX speed. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/c0bd60ba-4e2d-41cb-8b0c-38454a341d7a@gmail.com
2026-04-29wifi: rtw89: Add rtw8922au.cBitterblue Smith
This is the entry point of the new rtw89_8922au module. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/0d22cd72-4048-41ad-a4aa-511681e6ba51@gmail.com
2026-04-29wifi: rtw89: Add rtw8922a_dle_mem_usb{2,3}Bitterblue Smith
Add rtw8922a_dle_mem_usb2 and rtw8922a_dle_mem_usb3 and their various quotas and sizes in struct rtw89_mac_size_set. "dle" could be "Data Link Engine" or "Double Link Engine". These are some parameters needed for RTL8922AU. Also rename wde_size4_v1 to wde_size3_v1 because the name seemed incorrect. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/f9ac366b-ca8d-492e-83bf-440f8557c629@gmail.com
2026-04-29wifi: rtw89: Add rtw8922a_hfc_param_ini_usb{2,3}Bitterblue Smith
"hfc" means "hci fc" which is "Host Control Interface Flow Control". These are some parameters needed for RTL8922AU. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/474eb37a-a2e1-434a-b648-9e4b78e604d2@gmail.com
2026-04-29wifi: rtw89: Let hfc_param_ini have separate settings for USB 2/3Bitterblue Smith
RTL8912AU needs different settings for USB 2 and USB 3. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/588bf309-4b92-454f-bfd6-5e81248abee3@gmail.com
2026-04-29wifi: rtw89: Fix rtw8922a_pwr_{on,off}_func() for USBBitterblue Smith
There are a few differences in the power on/off functions between PCIE and USB. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/dccdb944-c31d-483f-8d1a-a51bcfe23916@gmail.com
2026-04-29wifi: rtw89: usb: Enable RX aggregation for RTL8922AUBitterblue Smith
It uses the same settings as RTL8852CU, but the register and bit names have "BE" instead of "AX". Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/bd9e444f-257c-48c8-8adb-f58432b2c5c2@gmail.com
2026-04-29wifi: rtw89: Fix rtw89_usb_ops_mac_post_init() for RTL8922AUBitterblue Smith
Skip most of the function because RTL8922AU only needs to configure the RX aggregation here. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/71329cd6-0249-4654-be1d-74c8823f4888@gmail.com
2026-04-29wifi: rtw89: Fix rtw89_usb_ops_mac_pre_init() for RTL8922AUBitterblue Smith
Return early because RTL8922AU doesn't need to do anything here. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/58bf4dc4-dd4d-4caa-b6c0-e90749769cea@gmail.com
2026-04-29wifi: rtw89: Fix rtw89_usb_ops_mac_lv1_rcvy() for RTL8922AUBitterblue Smith
RTL8922AU uses a different register and mask to reset TX/RX. Add them here. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/fd6ae7f6-0035-45d8-8832-49a053fd217d@gmail.com
2026-04-29wifi: rtw89: usb: Support 2 bulk in endpointsBitterblue Smith
RTL8912AU has 2 bulk in endpoints, not 1, so raise the limit. The second bulk-in is for USB interrupt mode for SER (system error recovery) flow. SER is not currently implemented for USB devices in rtw89. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/3d30c8d1-fa25-48d0-b27d-7d634c5aa005@gmail.com
2026-04-29wifi: rtlwifi: fix typos in comments in rtl8821ae_card_disable()Hugo Villeneuve
Fix typos in rtl8821ae_card_disable() comments. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260417200520.3919437-1-hugo@hugovil.com
2026-04-29wifi: rtw89: phy: increase RF calibration timeouts for USB transportLouis Kotze
USB transport adds significant latency to H2C/C2H round-trips used by RF calibration. The existing timeout values were designed for PCIe and are too tight for USB, causing "failed to wait RF DACK", "failed to wait RF TSSI" and similar errors on USB adapters. Apply a 4x timeout multiplier when the device uses USB transport. The multiplier is applied in rtw89_phy_rfk_report_wait() so all calibrations benefit without changing any call sites or PCIe timeout values. The 4x multiplier was chosen based on measured data from two independent testers (RTL8922AU, 6GHz MLO and 2.4/5GHz): Calibration PCIe timeout Max measured (USB) 4x timeout PRE_NTFY 5ms 1ms 20ms DACK 58ms 72ms 232ms RX_DCK 128ms 374ms 512ms TSSI normal 20ms 24ms 80ms TSSI scan 6ms 14ms 24ms TXGAPK 54ms 18ms 216ms IQK 84ms 53ms 336ms DPK 34ms 30ms 136ms Tested with RTL8922AU on 6GHz MLO (5GHz + 6GHz simultaneous): 25 connect/disconnect cycles with zero failures. The 4x multiplier was also verified under adverse host conditions on 5GHz. 5 cycles per scenario, stress-ng as the load generator, max observed time per calibration: Calibration PCIe 4x Baseline CPU stress Mem stress Combined PRE_NTFY 5 20 0 0 0 1 DACK 58 232 71 (!) 71 (!) 71 (!) 71 (!) RX_DCK 128 512 23 22 22 23 IQK 84 336 53 53 53 53 DPK 34 136 23 23 26 23 TSSI 20 80 6 9 14 9 TXGAPK 54 216 16 16 16 16 Legend: (!) = exceeds PCIe budget but within 4x budget. Two observations from that matrix: 1. DACK exceeds the stock PCIe budget (58ms) in baseline on 5GHz on this hardware. Without the 4x multiplier, DACK fails -ETIMEDOUT deterministically on every connect, no stress needed. This is the condition the patch addresses. 2. Calibration times appear dominated by USB transport round-trip latency rather than host load, though hardware and external component factors may also contribute. DACK stays at 71ms across all four scenarios. Host-side stress has essentially zero effect on observed calibration duration. Bumping the multiplier above 4x would not address a failure mode that this stress matrix produces. Reported-by: Devin Wittmayer <lucid_duck@justthetip.ca> Link: https://github.com/Lucid-Duck/rtw89-usb3-gap/tree/main/evidence/crash-2026-04-11 Signed-off-by: Louis Kotze <loukot@gmail.com> Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca> # RTL8922AU (BrosTrend BE6500) Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca> # RTL8852AU (D-Link DWA-X1850 A1) Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca> # RTL8852AU (D-Link DWA-X1850 B1) Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca> # RTL8852BU (BrosTrend AX4L) Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca> # RTL8852CU (EDUP AX5400) Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260416045536.817930-1-loukot@gmail.com
2026-04-29wifi: rtw88: Add NULL check for chip->edcca_th in rtw_fw_adaptivity_result()Panagiotis Petrakopoulos
It was recently reported that rtw_fw_adaptivity_result() in fw.c dereferences rtwdev->chip->edcca_th without a NULL check. The issue is that devices with the 8821CE chip don't define edcca_th in their chip info. As a result, when rtw_fw_adaptivity_result() tries to dereference it, the kernel triggers an oops. Add a NULL check for edcca_th before dereferencing it in rtw_fw_adaptivity_result() in fw.c. Placing the check at the function entry avoids logging any garbage values. This change does not address the root cause for this behavior, but it prevents the NULL dereference and the resulting oops while a more permanent solution is developed. Tested on a 8822CE chip which defines edcca_th, so this issue is not present on it, but it still uses this driver and I can verify there are no regressions. Suggested-by: Ping-Ke Shih <pkshih@realtek.com> Reported-by: Oleksandr Havrylov <goainwo@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221286 Signed-off-by: Panagiotis Petrakopoulos <npetrakopoulos2003@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Tested-by: Oleksandr Havrylov <goainwo@gmail.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260415052959.14844-1-npetrakopoulos2003@gmail.com
2026-04-29wifi: rtlwifi: validate action frame size before using in _rtl_pci_tx_isr()Ping-Ke Shih
Since TX action frames might be malformed, validate the size before using. Tested on RTL8723BE. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260414062229.21047-4-pkshih@realtek.com
2026-04-29wifi: rtlwifi: validate action frame size in rtl_action_proc()Ping-Ke Shih
Since action frames might be malformed from RX or injected TX, validate the size before using. More, use struct ieee80211_mgmt to access fields of action frames instead of counting barely. Tested with ping on RTL8723BE. The add BA request action frames of TX/RX can be handled properly. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260414062229.21047-3-pkshih@realtek.com
2026-04-29wifi: rtl8xxxu: validate action frame size before using in ↵Ping-Ke Shih
rtl8xxxu_dump_action() The rtl8xxxu_dump_action() is to print action frames when turning on debug mask. Validate the skb->len size to prevent potential broken in monitor mode injection. Compile tested only. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260414062229.21047-2-pkshih@realtek.com
2026-04-29wifi: rtw88: fix wrong pci_get_drvdata type in AER handlersChin-Yen Lee
rtw88 stores an ieee80211_hw pointer via pci_set_drvdata() at probe time, but io_error_detected() and io_resume() retrieve it as a net_device pointer. This causes netif_device_detach/attach to operate on an ieee80211_hw struct, reading and writing at wrong offsets. Use ieee80211_stop_queues/wake_queues instead, consistent with every other queue stop/start path in the driver. Fixes: cdb82c80b934 ("wifi: rtw88: pci: add PCI Express error handling") Signed-off-by: Chin-Yen Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260413065926.17027-1-pkshih@realtek.com
2026-04-29wifi: rtlwifi: rtl8821ae: Remove dead code in rtl8821ae_update_hal_rate_table()Chelsy Ratnawat
The variable 'mimo_ps' is initialized to IEEE80211_SMPS_OFF and never modified throughout the function. This makes the condition checking for IEEE80211_SMPS_STATIC always evaluate to false, rendering the entire if-branch unreachable dead code. The error was reported by Coverity Scan. Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260407123427.14612-1-chelsyratnawat2001@gmail.com
2026-04-29wifi: rtw89: fix wrong pci_get_drvdata type in AER handlersChristos Longros
rtw89 stores an ieee80211_hw pointer via pci_set_drvdata() at probe time, but io_error_detected() and io_resume() retrieve it as a net_device pointer. This causes netif_device_detach/attach to operate on an ieee80211_hw struct, reading and writing at wrong offsets. The adjacent io_slot_reset() already does it correctly. Use ieee80211_stop_queues/wake_queues instead, consistent with every other queue stop/start path in the driver. Tested on RTL8852CE by calling the handlers from a test module before and after the fix. Fixes: 16e3d93c6183 ("wifi: rtw89: pci: add PCI Express error handling") Signed-off-by: Christos Longros <chris.longros@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260329073857.113081-1-chris.longros@gmail.com
2026-04-29ASoC: spacemit: adjust FIFO trigger threshold to half FIFO sizeTroy Mitchell
Set both TX and RX FIFO trigger thresholds (TFT/RFT) to 0xF (half of the 32-entry FIFO) instead of 5. This provides better DMA efficiency by allowing more data to accumulate before triggering a DMA request, reducing the number of DMA transactions needed. Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Link: https://patch.msgid.link/20260429-k3-i2s-v1-3-2fe99db11ecb@linux.spacemit.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-29ASoC: spacemit: move hw constraints from hw_params to startupTroy Mitchell
Hardware constraints should be applied in the startup callback rather than hw_params, as hw_params may be called too late for the constraints to take effect properly. Move the channel count and format constraints for I2S and DSP_A/DSP_B modes into a new startup callback. This also tightens the I2S mode channel constraint from 1-2 to exactly 2, matching the actual hardware behavior. Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Link: https://patch.msgid.link/20260429-k3-i2s-v1-2-2fe99db11ecb@linux.spacemit.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-28clk: clk-axi-clkgen: Add support versal timingsNuno Sá
Add proper VCO and PFD limits for versal based platforms. For that we need to add new Technology and Speed grade defines. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-04-29ASoC: tegra: Add S8 PCM format support for MVCAnupama Kunkulagunta
Add handling for SNDRV_PCM_FORMAT_S8 in the MVC audio CIF configuration. This allows 8-bit PCM streams to be processed by setting the appropriate TEGRA_ACIF_BITS_8 format in the CIF configuration. Signed-off-by: Anupama Kunkulagunta <akunkulagunt@nvidia.com> Signed-off-by: Sheetal <sheetal@nvidia.com> Link: https://patch.msgid.link/20260428051216.2746030-1-sheetal@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-29ASoC: ti: j721e-evm: allocate dai_links with privRosen Penev
Use a flexible array member to combine allocations. Simplifies the code slightly. Remove open coding of of_device_get_match_data. Signed-off-by: Rosen Penev <rosenp@gmail.com> [Fixed up bitrotted commit message -- broonie] Link: https://patch.msgid.link/20260428204728.24103-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-04-29spi: microchip core-qspi cleanupMark Brown
Conor Dooley <conor@kernel.org> says: Here's the other two changes, that didn't conflict with the fixes.