summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek
AgeCommit message (Collapse)Author
2025-07-04wifi: rtw89: Make hfc_param_ini in rtw89_chip_info an arrayBitterblue Smith
USB and SDIO will need different sets of values, so make hfc_param_ini in struct rtw89_chip_info an array. Also make param_ini a pointer instead of copying the struct. 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/1356f901-9ebf-451e-827f-50dd3efda534@gmail.com
2025-07-04wifi: rtw89: Make dle_mem in rtw89_chip_info an arrayBitterblue Smith
USB 2, USB 3, and SDIO will need different sets of values compared to PCIe. Add a new dle_type member in struct rtw89_hci_info and make dle_mem in struct rtw89_chip_info an array to hold the four different sets of values. 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/c9152735-dbc4-4473-ae29-a79625cfbf78@gmail.com
2025-07-04wifi: rtw89: 8851b: Accept USB devices and load their MAC addressBitterblue Smith
Make rtw8851b_read_efuse() accept USB devices and load the MAC address from the correct offset. 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/6b2a1382-3be4-4038-8005-cf96922e4332@gmail.com
2025-07-04wifi: rtw89: 8851b: rfk: update IQK to 0x14Ping-Ke Shih
Update IQK along with TX/RX clock to 960MHz and 1920MHz to improve performance. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250627035338.16637-1-pkshih@realtek.com
2025-07-04wifi: rtw89: 8851b: rfk: update DPK to 0x11Ping-Ke Shih
Update DPK with TX/RX clock to 960MHz and 1920MHz, which improve performance on certain chips. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250627035328.16577-1-pkshih@realtek.com
2025-07-04wifi: rtw89: 8851b: update NCTL 0xBPing-Ke Shih
To support new commands in DPK 0x11, update NCTL to version 0xB. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250627035201.16416-5-pkshih@realtek.com
2025-07-04wifi: rtw89: 8851b: adjust ADC setting for RF calibrationPing-Ke Shih
To get expected result of RF calibration at runtime, adjust ADC setting ahead for coming changes of RF calibration. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250627035201.16416-4-pkshih@realtek.com
2025-07-04wifi: rtw89: 8851b: set ADC bandwidth select according to calibration valuePing-Ke Shih
To handle hardware characteristic of ADC, calibrate the function and add a efuse field to record result, which driver uses it to set proper value accordingly. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250627035201.16416-3-pkshih@realtek.com
2025-07-04wifi: rtw89: 8851b: rfk: extend DPK path_ok type to u8Ping-Ke Shih
Originally the type of path_ok is bool to denote that DPK is ready on certain path and can be enabled. For RTL8851B, hardware design can support more than one calibration set, so use type u8 instead to record the hardware set in current use. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250627035201.16416-2-pkshih@realtek.com
2025-07-04wifi: rtw88: coex: Use bitwise instead of arithmetic operator for flagsPei Xiao
This silences the following coccinelle warning: WARNING: sum of probable bitmasks, consider | Compile tested only. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/c68a8642c325f626ac34ccee71d9d9aa69f0c92c.1750733428.git.xiaopei01@kylinos.cn
2025-06-25Merge tag 'rtw-next-2025-06-25' of https://github.com/pkshih/rtwJohannes Berg
Ping-Ke Shih says: ================== rtw-next patches for v6.17 Regular development, refinement and minor fixes. Some notable changes are: rtw88: * enable AP/ad-hoc modes for SDIO devices rtw89: * implement BT-coexistence for WiFi MLO * ongoing to develop STA+P2P MCC ================== Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-06-24wifi: cfg80211/mac80211: Add support to get radio indexRoopni Devanathan
Currently, per-radio attributes are set on per-phy basis, i.e., all the radios present in a wiphy will take attributes values sent from user. But each radio in a wiphy can get different values from userspace based on its requirement. To extend support to set per-radio attributes, add support to get radio index from userspace. Add an NL attribute - NL80211_ATTR_WIPHY_RADIO_INDEX, to get user specified radio index for which attributes should be changed. Pass this to individual drivers, so that the drivers can use this radio index to change per-radio attributes when necessary. Currently, per-radio attributes identified are: NL80211_ATTR_WIPHY_TX_POWER_LEVEL NL80211_ATTR_WIPHY_ANTENNA_TX NL80211_ATTR_WIPHY_ANTENNA_RX NL80211_ATTR_WIPHY_RETRY_SHORT NL80211_ATTR_WIPHY_RETRY_LONG NL80211_ATTR_WIPHY_FRAG_THRESHOLD NL80211_ATTR_WIPHY_RTS_THRESHOLD NL80211_ATTR_WIPHY_COVERAGE_CLASS NL80211_ATTR_TXQ_LIMIT NL80211_ATTR_TXQ_MEMORY_LIMIT NL80211_ATTR_TXQ_QUANTUM By default, the radio index is set to -1. This means the attribute should be treated as a global configuration. If the user has not specified any index, then the radio index passed to individual drivers would be -1. This would indicate that the attribute applies to all radios in that wiphy. Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com> Link: https://patch.msgid.link/20250615082312.619639-2-quic_rdevanat@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-06-24wifi: rtl818x: Kill URBs before clearing tx status queueDaniil Dulov
In rtl8187_stop() move the call of usb_kill_anchored_urbs() before clearing b_tx_status.queue. This change prevents callbacks from using already freed skb due to anchor was not killed before freeing such skb. BUG: kernel NULL pointer dereference, address: 0000000000000080 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 7 UID: 0 PID: 0 Comm: swapper/7 Not tainted 6.15.0 #8 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 RIP: 0010:ieee80211_tx_status_irqsafe+0x21/0xc0 [mac80211] Call Trace: <IRQ> rtl8187_tx_cb+0x116/0x150 [rtl8187] __usb_hcd_giveback_urb+0x9d/0x120 usb_giveback_urb_bh+0xbb/0x140 process_one_work+0x19b/0x3c0 bh_worker+0x1a7/0x210 tasklet_action+0x10/0x30 handle_softirqs+0xf0/0x340 __irq_exit_rcu+0xcd/0xf0 common_interrupt+0x85/0xa0 </IRQ> Tested on RTL8187BvE device. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c1db52b9d27e ("rtl8187: Use usb anchor facilities to manage urbs") Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250617135634.21760-1-d.dulov@aladdin.ru
2025-06-24wifi: rtlwifi: fix possible skb memory leak in `_rtl_pci_rx_interrupt()`.Thomas Fourier
The function `_rtl_pci_init_one_rxdesc()` can fail even when the new `skb` is passed because of a DMA mapping error. If it fails, the `skb` is not saved in the rx ringbuffer and thus lost. Compile tested only Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616105631.444309-4-fourier.thomas@gmail.com
2025-06-24wifi: rtw89: report boottime of receiving beacon and probe responseZong-Zhe Yang
Userspace tools will parse NL80211_BSS_LAST_SEEN_BOOTTIME (if any) for a more accurate timing when a BSS was seen. For example, iw, wpa_supplicant. For beacon and probe response, fill RX boottime_ns in ieee80211_rx_status. And for certain, it shouldn't count the waiting time for the PPDU status, i.e. the possible buffering time of a frame in driver. Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250618124649.11436-6-pkshih@realtek.com
2025-06-24wifi: rtw89: avoid NULL dereference when RX problematic packet on ↵Zong-Zhe Yang
unsupported 6 GHz band With a quite rare chance, RX report might be problematic to make SW think a packet is received on 6 GHz band even if the chip does not support 6 GHz band actually. Since SW won't initialize stuffs for unsupported bands, NULL dereference will happen then in the sequence, rtw89_vif_rx_stats_iter() -> rtw89_core_cancel_6ghz_probe_tx(). So, add a check to avoid it. The following is a crash log for this case. BUG: kernel NULL pointer dereference, address: 0000000000000032 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 1907 Comm: irq/131-rtw89_p Tainted: G U 6.6.56-05896-g89f5fb0eb30b #1 (HASH:1400 4) Hardware name: Google Telith/Telith, BIOS Google_Telith.15217.747.0 11/12/2024 RIP: 0010:rtw89_vif_rx_stats_iter+0xd2/0x310 [rtw89_core] Code: 4c 89 7d c8 48 89 55 c0 49 8d 44 24 02 48 89 45 b8 45 31 ff eb 11 41 c6 45 3a 01 41 b7 01 4d 8b 6d 00 4d 39 f5 74 42 8b 43 10 <41> 33 45 32 0f b7 4b 14 66 41 33 4d 36 0f b7 c9 09 c1 74 d8 4d 85 RSP: 0018:ffff9f3080138ca0 EFLAGS: 00010246 RAX: 00000000b8bf5770 RBX: ffff91b5e8c639c0 RCX: 0000000000000011 RDX: ffff91b582de1be8 RSI: 0000000000000000 RDI: ffff91b5e8c639e6 RBP: ffff9f3080138d00 R08: 0000000000000000 R09: 0000000000000000 R10: ffff91b59de70000 R11: ffffffffc069be50 R12: ffff91b5e8c639e4 R13: 0000000000000000 R14: ffff91b5828020b8 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff91b8efa40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000032 CR3: 00000002bf838000 CR4: 0000000000750ee0 PKRU: 55555554 Call Trace: <IRQ> ? __die_body+0x68/0xb0 ? page_fault_oops+0x379/0x3e0 ? exc_page_fault+0x4f/0xa0 ? asm_exc_page_fault+0x22/0x30 ? __pfx_rtw89_vif_rx_stats_iter+0x10/0x10 [rtw89_core (HASH:1400 5)] ? rtw89_vif_rx_stats_iter+0xd2/0x310 [rtw89_core (HASH:1400 5)] __iterate_interfaces+0x59/0x110 [mac80211 (HASH:1400 6)] ? __pfx_rtw89_vif_rx_stats_iter+0x10/0x10 [rtw89_core (HASH:1400 5)] ? __pfx_rtw89_vif_rx_stats_iter+0x10/0x10 [rtw89_core (HASH:1400 5)] ieee80211_iterate_active_interfaces_atomic+0x36/0x50 [mac80211 (HASH:1400 6)] rtw89_core_rx_to_mac80211+0xfd/0x1b0 [rtw89_core (HASH:1400 5)] rtw89_core_rx+0x43a/0x980 [rtw89_core (HASH:1400 5)] Fixes: c6aa9a9c4725 ("wifi: rtw89: add RNR support for 6 GHz scan") Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250618124649.11436-5-pkshih@realtek.com
2025-06-24wifi: rtw89: correct length for IE18/19 PHY report and IE parserEric Huang
Correct the length when parsing with 2nd IE header and the length of IE18/19 PHY status report. These two IE contain PHY OFDM signal information and can be used for debug. Signed-off-by: Eric Huang <echuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250618124649.11436-4-pkshih@realtek.com
2025-06-24wifi: rtw89: update EDCCA report for subband 40M/80M/sub-20MEric Huang
EDCCA report is obtained from the hardware to display OBSS interference and their respective power levels for each subband. Modify the query settings to improve resolution for debugging purposes. Signed-off-by: Eric Huang <echuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250618124649.11436-3-pkshih@realtek.com
2025-06-24wifi: rtw89: mac: differentiate mem_page_size by chip generationKuan-Chung Chen
When debugging or recovering system error recovery (SER), it's necessary to dump internal memory to perform status inspection. Since the memory page size differs between WiFi 6 and 7 chips, define them accordingly. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250618124649.11436-2-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Update Wi-Fi/Bluetooth coexistence version to 9.0.0Ching-Te Ku
The version 9 support the WiFi7 related functions. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-12-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: RTL8852B coexistence Wi-Fi firmware support for v0.29.122.0Ching-Te Ku
Add format version of Wi-Fi firmware commands/events for firmware version v0.29.122.0. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-11-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Update Bluetooth slot length when Wi-Fi is scanningChing-Te Ku
If Wi-Fi isn't connected to AP, the firmware scan will not switch to operation channel. Bluetooth may not have enough time to TX data. This patch extend the slot to let Bluetooth can TX more to avoid audio lag. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-10-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Not to set slot duration to zero to avoid firmware issueChing-Te Ku
If the duration set to zero, Wi-Fi firmware will trigger some unexpected issue when firmware try to enable timer. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-9-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Assign priority table before entering power saveChing-Te Ku
When Wi-Fi firmware scan, it will update the priority tables, and if stay at these priority tables then enter power saving will trigger Bluetooth issues. So update the priority before entering power saving. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-8-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Update scoreboard to avoid Bluetooth re-link failChing-Te Ku
When platform resume, there will have fail rate when Bluetooth try to re-link. And when Bluetooth is booting up, it will run the ROM code first, then load the firmware code from file. Catch this change and set the mechanism for Bluetooth re-link. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-7-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Get Bluetooth desired version by WiFi firmware versionChing-Te Ku
Because when Wi-Fi/Bluetooth want to communicate with each other, their contact window are their firmware. So the desired version code is more reasonable to change with firmware version. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-6-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: RTL8922A add Wi-Fi firmware support for v0.35.71.0Ching-Te Ku
The latest Wi-Fi firmware no feature update with Wi-Fi/Bluetooth coexistence. The patch describe the features support version. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-5-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Query Bluetooth TX power when firmware supportChing-Te Ku
Add firmware report to monitor Bluetooth TX power/gain settings, so that we can check it works as expected or not. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-4-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Enable outsource info H2C commandChing-Te Ku
The before several patches collect driver information, then this patch packet these information as outsource info and update to firmware by H2C command. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-3-pkshih@realtek.com
2025-06-24wifi: rtw89: coex: Add v1 Bluetooth AFH handshake for WiFi 7Ching-Te Ku
WiFi 7 generation has dual MAC, Coexistence need to find out the 2GHz WiFi connection in the connected links. And assign its channel to Bluetooth to make Bluetooth not to hop into WiFi channel. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250616090252.51098-2-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: Add PTA grant signal setting offload to firmware featureChing-Te Ku
In the before experience there are many issue occurred because of the grant control signal can not be set in time especially WiFi power save enter/leave. To control the signal more accuracy, offload the control to firmware. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-11-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: Update hardware PTA resource binding logicChing-Te Ku
WiFi 7 generation has 2 MAC, the PTA should bind the input/output to correct MAC to do the packet arbitration as expected. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-10-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: Update BTG control for WiFi 7Ching-Te Ku
BTG means a path work for Bluetooth & Wi-Fi 2.4GHz. To earn a better coexistence performance, need to do some RF setting for BTG path. WiFi 7 generation offload the feature to firmware, to get a more accuracy control. And decrease driver I/O. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-9-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: Update Pre-AGC logic for WiFi 7Ching-Te Ku
Pre-AGC is Wi-Fi auto Rx gain control. The mechanism need to switching very fast, especially while Wi-Fi is under 2GHz/5GHz multi-port scenario. To earn a more accuracy & sensitive gain control, in the WiFi 7 later firmware, Pre-AGC mechanism has offloaded to firmware. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-8-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: Add H2C command to collect driver outsource information ↵Ching-Te Ku
to firmware In order to reduce driver I/O & some detail instant hardware control, some of the necessary API offload to Wi-Fi firmware. Collect the reference parameters to let firmware do decisions. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-7-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: refine debug log with format version and readable stringChing-Te Ku
Fix unexpected line warp. Collect firmware report format version and driver support report format version code to check unexpected C2H report exception. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-6-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: Update Wi-Fi status logic for WiFi 7Ching-Te Ku
Because WiFi 7 generation has dual MAC, logic need to assign & save the information to correct index. Update the related logic. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-5-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: Implement Wi-Fi MLO related logicChing-Te Ku
To make the logic can work well with WiFi 7 & before generations, extend & add logic for WiFi 7. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-4-pkshih@realtek.com
2025-06-16wifi: rtw89: coex: RTL8922A add Wi-Fi firmware support for v0.35.63.0Ching-Te Ku
There were some driver API offloaded to firmware, and to recognize the feature add a version tag for it. Signed-off-by: Ching-Te Ku <ku920601@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-3-pkshih@realtek.com
2025-06-16wifi: rtw89: introduce rtw89_query_mr_chanctx_info() for multi-role chanctx infoZong-Zhe Yang
Add Wi-Fi 7 MLO related multi-role (MR) chanctx descriptors and query function. They are designed for other components, e.g. coex, which are interested in the following info. * whether a MLD exists and how many active link * the number of AP mode and station mode respectively * how many chanctx and the number of 2/5/6 GHz respectively Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250611035523.36432-2-pkshih@realtek.com
2025-06-16wifi: rtw89: scan abort when assign/unassign_vifChih-Kang Chang
If scan happen during start_ap, the register which control TX might be turned off during scan. Additionally, if set_channel occurs during scan will backup this register and set to firmware after set_channel done. When scan complete, firmware will also set TX by this register, causing TX to be disabled and beacon can't be TX. Therefore, in assign/unassign_vif call scan abort before set_channel to avoid scan racing with set_channel. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-13-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: enlarge TX retry count when GC authChih-Kang Chang
The auth retry only continue 40ms, but the GO might switch to STA role 50ms when MCC. Therefore, enlarge the TX retry count from 32 to 60 to let GC TX time overlapping with GO timeslot. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-12-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: use anchor pattern when bcn offset less than min of tobChih-Kang Chang
When the beacon offset is less than minimum of auxiliary tob (aux->duration - aux->limit.max_toa), the upper bound of the reference toa might be negative and lower than the lower bound, which causes the auxiliary result to exceed the NoA limit. Therefore, in this case, the anchor pattern is used for calculation. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-11-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: clear normal flow NoA when MCC startChih-Kang Chang
Clear NoA setting before MCC starts. Otherwise, nulldata will be blocked to TX because firmware use the normal flow NoA to calculate timing. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-10-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: enlarge scan time of GC when GO in MCCChih-Kang Chang
In original scan, the scan time only 45ms. The GO in MCC mode only stay 50ms and switch to STA role 50ms, which might cause GC can't scan GO. Therefore, enlarge scan time to 105ms to ensure GC have time overlapping with GO. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-9-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: adjust TX nulldata early time from 3ms to 7msChih-Kang Chang
Adjust TX nulldata early time to let nulldata have more contention time to TX. Otherwise, AP is hard to receive nulldata 1, which causes the throughput test failed due to packet drops. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-8-pkshih@realtek.com
2025-06-16wifi: rtw89: TX nulldata 0 after scan completeChih-Kang Chang
HW scan leak to TX nulldata 0 to AP after scan completed, which allowed AP start to TX packet to us. Therefore, driver TX nulldata 0 after scan completed. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-7-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: stop TX during MCC prepareChih-Kang Chang
Stop TX during the MCC configuration period to prevent packet leakage. The stop time is defined as 'start_tsf - tsf', which means the duration from when MCC configuration begins until MCC starts. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-6-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: adjust beacon filter when MCC and detect connectionChih-Kang Chang
MCC needs to wait at most 300ms to start. Additionally, if scanning happens before MCC starts, it will miss some beacons, which might cause beacon loss. Therefore, we reset beacon filter when MCC start to let hardware reset beacon loss counter. Additionally, GO is forbid to enter courtesy mode might cause STA beacon loss. Therefore, disable beacon filter when GO+STA. However, In WiFi 7 chip, even when GC+STA enable courtesy mode, the beacon might loss because switching to courtesy timeslot will disable TX/RX. If the TOB(time offset behind) or TOA(time offset ahead) is too close to the edge of timeslot, the beacon might not be received. Therefore, disable beacon filter when GC+STA in WiFi 7 chip. Because disabling the beacon filter might prevent disconnection when the AP power-off without sending a deauth. Therefore, driver TX QOS nulldata periodically to detect the AP status, and the connection is terminated if no ACK is received for 6 seconds. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-5-pkshih@realtek.com
2025-06-16wifi: rtw89: mcc: correct frequency when MCCChih-Kang Chang
The frequency get from PPDU status set as center channel during MCC, but we need to report to mac80211 as primary channel. Therefore, we use the chanctx information in software to instead it. Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250610130034.14692-4-pkshih@realtek.com