Commit Graph

13 Commits

Author SHA1 Message Date
Bitterblue Smith
5e9184ae72 wifi: rtw89: 8852bx: Accept USB devices and load their MAC address
Make __rtw8852bx_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/1f58d168-67a9-4d86-9e6a-73789c7a59f4@gmail.com
2025-07-06 13:11:29 +08:00
Zong-Zhe Yang
28b921020b wifi: rtw89: 8852bx: support different SAR configs by antenna
Calculate difference of SAR configs between RF path A and RF path B.
And then, based on the calculated result, set the TX power reference
CR (control register). Finally, declare to support SAR by antenna in
8852b/8852bt chip info.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250326020643.14487-13-pkshih@realtek.com
2025-03-31 14:29:52 +08:00
Kuan-Chung Chen
3df4583ae0 wifi: rtw89: add support for negative values of dBm to linear conversion
Enhanced the dBm to linear conversion function to accommodate negative
dBm values and improved the precision from 1 dBm to 0.25 dBm.

Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250306021144.12854-2-pkshih@realtek.com
2025-03-13 08:40:00 +08:00
Chih-Kang Chang
b6853ed2be wifi: rtw89: 8922a: use RSSI from PHY report in RX descriptor
The PPDU status of probe response will fail to parse the IE due to being
filtered by the to_self check. Therefore, we parse RSSI from PHY report in
RX descriptor.

Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241128055433.11851-5-pkshih@realtek.com
2024-12-05 14:26:05 +08:00
Kuan-Chung Chen
50191eace8 wifi: rtw89: handle different TX power between RF path
The dynamic antenna gain (DAG) may independently apply different TX
powers for each RF path. This can be accomplished by using the larger
TX power as the reference path and adjusting the TX power of the
other path based on the difference. Currently only 8852BE/8852BTE/
8852CE are supported.

Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241111065132.19587-4-pkshih@realtek.com
2024-11-18 10:12:45 +08:00
Chih-Kang Chang
927f19c8ef wifi: rtw89: 8852b: change RF mode to normal mode when set channel
Set the RF mode from 0xA(low power mode) to 0x3(Normal mode) to avoid
abnormal TX waveform in OFDM rate. Originally the RF mode will be changed
to normal mode by the firmware after entering LPS once. Therefore, this
change does not affect power saving.

Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241030091603.6073-1-pkshih@realtek.com
2024-11-06 14:22:26 +08:00
Eric Huang
c9ac071e30 wifi: rtw89: use frequency domain RSSI
To get more accurate RSSI, this commit includes frequency domain RSSI
info in RSSI calculation. Add correspond physts parsing and macro to
get frequency domain RSSI information for supported IC.

Signed-off-by: Eric Huang <echuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240828055217.10263-3-pkshih@realtek.com
2024-09-05 08:55:02 +08:00
Zong-Zhe Yang
50b3da25ab wifi: rtw89: 8852bx: use right chanctx whenever possible in RFK flow
No longer access chan with hard-code RTW89_CHANCTX_X whenever possible.
Instead, obtain the right chanctx from somewhere and use it in RTL8852BX
RFK (RF calibration) related code.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240819091724.33730-5-pkshih@realtek.com
2024-08-27 10:55:04 +08:00
Zong-Zhe Yang
583e998e20 wifi: rtw89: rename sub_entity to chanctx
Originally, we planed to fill MAC_0/1 indicators with chanctx and
use sub_entity_xxx for these things. However, there are some reasons
listed below which make us give up this plan after we know our Wi-Fi 7
HW design.
	1. one link is bound to one HW band during its life time
	   but, one link might change chanctx dynamically
	2. in concurrent mode, assume 1st vif is MLD
	   1st vif's 2nd link might use the same chanctx as 2nd vif
	   but, they are not on the same HW band
So, we let sub_entity_xxx stuffs deal with only chanctx now. And, to be
more readable, we rename sub_entity related words to chanctx.

No logic is changed.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240727080650.12195-4-pkshih@realtek.com
2024-08-02 09:34:09 +08:00
Ping-Ke Shih
52bc83ad2e wifi: rtw89: 8852bx: add extra handles of BTC for 8852BT in 8852b_common
For 8852BT, the initial settings of BT-coexistence is a little bit
different, so add the extra handles.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240701014619.7300-2-pkshih@realtek.com
2024-07-05 09:48:10 +08:00
Ping-Ke Shih
0e557c5c1a wifi: rtw89: 8852bx: move BTC common code from 8852b to 8852b_common
The BT coexistence part of 8852B and 8852BT are similar, so move shared
code into common module.

Don't change logic for existing RTL8852BE.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240701014619.7300-1-pkshih@realtek.com
2024-07-05 09:47:57 +08:00
Ping-Ke Shih
2ab298cf63 wifi: rtw89: 8852bx: add extra handles for 8852BT in 8852b_common
The channel configuration of 8852BT is very similar but a little different
to 8852B, so use chip ID as condition to add extra handles including
external loss compensation, ADC configurations, spur settings and so on.

Don't affect existing 8852BE.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240607070659.80263-3-pkshih@realtek.com
2024-06-17 10:17:23 +08:00
Ping-Ke Shih
5a72e198a6 wifi: rtw89: 8852bx: move common code from 8852b to 8852b_common
New upcoming chip is RTL8852BE-VT (or RTL8852BTE; 8852BT PCIE interface),
which is a variant of 8852B, and many codes excepting to RF calibration
can be shared, so move common code to an new kernel module named
rtw89_8852b_common.ko.

No logic change.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240607070659.80263-2-pkshih@realtek.com
2024-06-17 10:12:26 +08:00