#
5eb02701 |
| 22-Apr-2024 |
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> |
wifi: rtw89: Remove the redundant else branch in the function rtw89_phy_get_kpath
The assignment of the else and if branches is the same in the "case: MLO_2_PLUS_0_1RF" branch of the function rtw89_
wifi: rtw89: Remove the redundant else branch in the function rtw89_phy_get_kpath
The assignment of the else and if branches is the same in the "case: MLO_2_PLUS_0_1RF" branch of the function rtw89_phy_get_kpath, so we remove it and add comments here to make the code easier to understand.
./drivers/net/wireless/realtek/rtw89/phy.c:6406:2-4: WARNING: possible condition with no effect (if == else).
Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8812 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://msgid.link/20240422072922.50940-1-jiapeng.chong@linux.alibaba.com
show more ...
|
#
f1dfcee2 |
| 05-Mar-2024 |
Dian-Syuan Yang <dian_syuan0116@realtek.com> |
wifi: rtw89: Correct EHT TX rate on 20MHz connection
We used EHT capability of 20MHz-only as rate mask to RA (rate adaptive) H2C command when connecting with AP set EHT 20MHz. It would get the wrong
wifi: rtw89: Correct EHT TX rate on 20MHz connection
We used EHT capability of 20MHz-only as rate mask to RA (rate adaptive) H2C command when connecting with AP set EHT 20MHz. It would get the wrong rate mask and the MCS rate can only reach MCS11.
According to the description of 802.11be spec, if all supported channel bandwidth field of HE PHY capabilities are zero, then the EHT capability of 20MHz-only is valid. As a result, we adjust the code to set correct rate mask based on HE PHY bandwidth capability.
Signed-off-by: Dian-Syuan Yang <dian_syuan0116@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240305004502.6655-1-pkshih@realtek.com
show more ...
|
#
2c681cbf |
| 15-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: 8922a: add set_channel RF part
Configure RF registers according to band, channel, bandwidth. Since this chip will support MLO, it needs check the operating mode to decide paths we are g
wifi: rtw89: 8922a: add set_channel RF part
Configure RF registers according to band, channel, bandwidth. Since this chip will support MLO, it needs check the operating mode to decide paths we are going to configure.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240215055741.14148-4-pkshih@realtek.com
show more ...
|
#
ca1e1163 |
| 15-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: 8922a: add set_channel MAC part
To set channel, add a function to get TXSB (TX subband) that is hardware index to indicate primary channel. Then, configure band, channel, bandwidth and
wifi: rtw89: 8922a: add set_channel MAC part
To set channel, add a function to get TXSB (TX subband) that is hardware index to indicate primary channel. Then, configure band, channel, bandwidth and TXSB via registers.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240215055741.14148-2-pkshih@realtek.com
show more ...
|
#
e10cd2dd |
| 09-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: load BB parameters to PHY-1
We are going to support MLO/DBCC, so need to load parameter table to PHY-1 as well.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Va
wifi: rtw89: load BB parameters to PHY-1
We are going to support MLO/DBCC, so need to load parameter table to PHY-1 as well.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240209065229.34515-3-pkshih@realtek.com
show more ...
|
#
db84b758 |
| 09-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: correct PHY register offset for PHY-1
PHY-1 can be seen as a copy of PHY-0, and the difference is their base register address, so add a function to get offset to access PHY-1.
Signed-o
wifi: rtw89: correct PHY register offset for PHY-1
PHY-1 can be seen as a copy of PHY-0, and the difference is their base register address, so add a function to get offset to access PHY-1.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240209065229.34515-2-pkshih@realtek.com
show more ...
|
#
4dbd964f |
| 02-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: 8922a: add chip_ops::rfk_hw_init
Add a chip_ops for WiFi 7 chips to set additional RF configurations including MLO and PLL settings.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Si
wifi: rtw89: 8922a: add chip_ops::rfk_hw_init
Add a chip_ops for WiFi 7 chips to set additional RF configurations including MLO and PLL settings.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240202030642.108385-12-pkshih@realtek.com
show more ...
|
#
ff146ec2 |
| 02-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: 8922a: rfk: implement chip_ops to call RF calibrations
Calling RF calibrations when interface up, connection, switching bands and going to scan.
For 8922AE, RF calibrations are moved t
wifi: rtw89: 8922a: rfk: implement chip_ops to call RF calibrations
Calling RF calibrations when interface up, connection, switching bands and going to scan.
For 8922AE, RF calibrations are moved to firmware, so use H2C commands to trigger RF calibrations and wait for a C2H event to indicate completion. Then, do next RF calibration.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240202030642.108385-10-pkshih@realtek.com
show more ...
|
#
bd6f5f27 |
| 02-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: rfk: add H2C command to trigger TSSI
TSSI is short for transmitter signal strength indication, which is a close-loop hardware circuit to feedback actual transmitting power as a referenc
wifi: rtw89: rfk: add H2C command to trigger TSSI
TSSI is short for transmitter signal strength indication, which is a close-loop hardware circuit to feedback actual transmitting power as a reference to adjust power for next transmission.
When connecting and switching bands or channels, do TSSI calibration and reset hardware status to output expected power.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240202030642.108385-9-pkshih@realtek.com
show more ...
|
#
ad1c86e9 |
| 02-Feb-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: rfk: add a completion to wait RF calibration report from C2H event
The RF calibrations should be executed one by one, so add a completion to ensure one is finish before next. The report
wifi: rtw89: rfk: add a completion to wait RF calibration report from C2H event
The RF calibrations should be executed one by one, so add a completion to ensure one is finish before next. The report from C2H event contains state and optional version, and we only check the state for now. We also care about the time a RF calibration takes, so record start time before asking firmware to do calibration and get the delta time when receiving report.
Consider SER recovery, we can't receive C2H event, use half of argument 'ms' as fixed delay that is 2 times of measured maximum time of calibrations.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240202030642.108385-2-pkshih@realtek.com
show more ...
|
#
88d1f9b2 |
| 24-Jan-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: 8922a: add RF read/write v2
Implement indirect interface v2 to read/write RF registers via PHY registers for 8922A.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kall
wifi: rtw89: 8922a: add RF read/write v2
Implement indirect interface v2 to read/write RF registers via PHY registers for 8922A.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240124033637.12330-5-pkshih@realtek.com
show more ...
|
#
10af1627 |
| 20-Jan-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: 8922a: add chip_ops related to BB init
The chip_ops::bb_preinit and ::bb_postinit are called before and after loading BB parameters from tables of firmware file. The ::bb_reset is used
wifi: rtw89: 8922a: add chip_ops related to BB init
The chip_ops::bb_preinit and ::bb_postinit are called before and after loading BB parameters from tables of firmware file. The ::bb_reset is used to reset hardware state, and currently it is not needed by 8922AE so leave it as empty. The ::bb_sethw is to implement conditional parameters.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240120003831.7014-4-pkshih@realtek.com
show more ...
|
#
6bd23219 |
| 05-Jan-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: phy: set channel_info for WiFi 7 chips
The channel_info is hardware settings to reflect operational status, such as scale factor, report unit, buffer matrix size, RU size and so on. The
wifi: rtw89: phy: set channel_info for WiFi 7 chips
The channel_info is hardware settings to reflect operational status, such as scale factor, report unit, buffer matrix size, RU size and so on. Then, we can get desired reports to do further tuning.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105064440.36926-1-pkshih@realtek.com
show more ...
|
#
ce84ecbd |
| 05-Jan-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: phy: add BB wrapper of TX power for WiFi 7 chips
TX power is controlled by BB layer basically, but it should interact with MAC layer, so these registers are put on MAC register domain a
wifi: rtw89: phy: add BB wrapper of TX power for WiFi 7 chips
TX power is controlled by BB layer basically, but it should interact with MAC layer, so these registers are put on MAC register domain and called BB wrapper, which contains TX power for each MAC ID, OFDMA RU power, and consideration of power type table.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105064433.36870-1-pkshih@realtek.com
show more ...
|
#
c207e14d |
| 05-Jan-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: 8922a: add NCTL pre-settings for WiFi 7 chips
NCTL standing for nano-controller is used to assist RF calibration. Basically, we write settings from a table, but format of the table can'
wifi: rtw89: 8922a: add NCTL pre-settings for WiFi 7 chips
NCTL standing for nano-controller is used to assist RF calibration. Basically, we write settings from a table, but format of the table can't describe register mask and additional conditions, so add a function to set this kind of settings.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105064422.36812-1-pkshih@realtek.com
show more ...
|
#
0377e2a7 |
| 05-Jan-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: phy: ignore special data from BB parameter file
BB parameter file is a list of tuple {addr, val} with conditional hardware version. However, tuples within a condition can't be empty, so
wifi: rtw89: phy: ignore special data from BB parameter file
BB parameter file is a list of tuple {addr, val} with conditional hardware version. However, tuples within a condition can't be empty, so insert a special dummy tuple for this case. Then, ignore this tuple when writing.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105064407.36750-1-pkshih@realtek.com
show more ...
|
#
d16f34b0 |
| 05-Jan-2024 |
Cheng-Chieh Hsieh <cj.hsieh@realtek.com> |
wifi: rtw89: 8922a: update the register used in DIG and the DIG flow
DIG standing for dynamic initial gain that is used to adjust RX coverage, and PD lower threshold is packet detection power level
wifi: rtw89: 8922a: update the register used in DIG and the DIG flow
DIG standing for dynamic initial gain that is used to adjust RX coverage, and PD lower threshold is packet detection power level by received signal strength to avoid false detection of the WiFi packet.
Because of the hardware is different between WiFi 7 and 6 ICs, we adjust flow and add register definition for 8922A.
Signed-off-by: Cheng-Chieh Hsieh <cj.hsieh@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105064228.36580-5-pkshih@realtek.com
show more ...
|
#
0edcdd82 |
| 05-Jan-2024 |
Chung-Hsuan Hung <hsuan8331@realtek.com> |
wifi: rtw89: phy: add parser to support RX gain dynamic setting flow
Add RX gain offset dynamic setting flow according to different bands and bandwidths. RX gain offset values will be different acco
wifi: rtw89: phy: add parser to support RX gain dynamic setting flow
Add RX gain offset dynamic setting flow according to different bands and bandwidths. RX gain offset values will be different according to different channel bands, therefore, this dynamic mechanism is needed while channel is changed. Add this to parse data from the element of firmware file, and then we can use them easier at runtime.
Signed-off-by: Chung-Hsuan Hung <hsuan8331@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105064228.36580-3-pkshih@realtek.com
show more ...
|
#
9225b973 |
| 05-Jan-2024 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: phy: move bb_gain_info used by WiFi 6 chips to union
WiFi 7 chips use different bb_gain_info struct, so move existing struct to a union in advance. This doesn't change logic at all.
Si
wifi: rtw89: phy: move bb_gain_info used by WiFi 6 chips to union
WiFi 7 chips use different bb_gain_info struct, so move existing struct to a union in advance. This doesn't change logic at all.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105064228.36580-2-pkshih@realtek.com
show more ...
|
#
f0536b0d |
| 13-Dec-2023 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: phy: print out RFK log with formatted string
With formatted string loaded from firmware file, we can use the formatted string ID and get corresponding string, and then use regular rtw89
wifi: rtw89: phy: print out RFK log with formatted string
With formatted string loaded from firmware file, we can use the formatted string ID and get corresponding string, and then use regular rtw89_debug() to show the message if debug mask of RFK is enabled.
If the string ID doesn't present, fallback to print plain hexadecimal.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231213005054.10568-7-pkshih@realtek.com
show more ...
|
#
edd77bb0 |
| 13-Dec-2023 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: parse and print out RFK log from C2H events
RFK log events contains two types. One called RUN log is to reflect state during RFK is running, and it replies on formatted string loaded fr
wifi: rtw89: parse and print out RFK log from C2H events
RFK log events contains two types. One called RUN log is to reflect state during RFK is running, and it replies on formatted string loaded from firmware file, but print this type as plain hexadecimal only in this patch. The other is REPORT log that reflects the final result of a RFK, and each calibration has its own struct to carry many specific information.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231213005054.10568-6-pkshih@realtek.com
show more ...
|
#
178b8e7d |
| 13-Dec-2023 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: add C2H event handlers of RFK log and report
Trigger a RFK (RF calibration) in firmware by a H2C command, and in progress it reports log and a result finally by C2H events. Firstly, add
wifi: rtw89: add C2H event handlers of RFK log and report
Trigger a RFK (RF calibration) in firmware by a H2C command, and in progress it reports log and a result finally by C2H events. Firstly, add prototype of the C2H event handlers to have a simple picture of framework.
The callers who trigger H2C will wait until a C2H event is received, so we must process these C2H events in receiving process. Thus, mark this kind of C2H events as atomic. Also, timestamp is also useful for debugging, mark C2H events carrying RFK log as atomic as well.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231213005054.10568-5-pkshih@realtek.com
show more ...
|
#
d371c3aa |
| 22-Nov-2023 |
Ping-Ke Shih <pkshih@realtek.com> |
wifi: rtw89: debug: add debugfs entry to disable dynamic mechanism
A dynamic mechanism is usually an algorithm to adjust registers to adapt to different environment every two seconds. In field, it c
wifi: rtw89: debug: add debugfs entry to disable dynamic mechanism
A dynamic mechanism is usually an algorithm to adjust registers to adapt to different environment every two seconds. In field, it could get unexpected result, so we need to stop it and adjust registers manually, and then fine tune the algorithm.
To stop mechanisms to assist debugging, add a debugfs entry shown as
Disabled DM: 0x1 [0] DYNAMIC_EDCCA: X
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231122060458.30878-4-pkshih@realtek.com
show more ...
|
#
0bb18525 |
| 22-Nov-2023 |
Yi-Chen Chen <jamie_chen@realtek.com> |
wifi: rtw89: phy: dynamically adjust EDCCA threshold
Add dynamic mechanism EDCCA (Energy Detection Clear Channel Assessment) in track work. Using a fixed-value threshold will make EDCCA particularly
wifi: rtw89: phy: dynamically adjust EDCCA threshold
Add dynamic mechanism EDCCA (Energy Detection Clear Channel Assessment) in track work. Using a fixed-value threshold will make EDCCA particularly sensitive and cause failure to transmit under certain circumstances. Therefore, the threshold is dynamically adjusted to make EDCCA suitable for any situation.
However, in some cases, we will adjust the EDCCA threshold to the highest level so that urgent transmissions can be performed successfully, such as scanning.
Finally, in order to observe the EDCCA report in time, add the EDCCA perIC register macro and EDCCA HW report analysis. EDCCA logs can be displayed by using the EDCCA debug mask.
Signed-off-by: Yi-Chen Chen <jamie_chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231122060458.30878-3-pkshih@realtek.com
show more ...
|
#
388df379 |
| 16-Oct-2023 |
Cheng-Chieh Hsieh <cj.hsieh@realtek.com> |
wifi: rtw89: move software DCFO compensation setting to proper position
We need this register setting only for the software DCFO(digital carrier frequency offset) compensation so we move it to the p
wifi: rtw89: move software DCFO compensation setting to proper position
We need this register setting only for the software DCFO(digital carrier frequency offset) compensation so we move it to the proper position to prevent the incorrect setting.
Signed-off-by: Cheng-Chieh Hsieh <cj.hsieh@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231016065115.751662-6-pkshih@realtek.com
show more ...
|