diff options
author | Zong-Zhe Yang <kevin_yang@realtek.com> | 2024-07-02 15:44:52 +0300 |
---|---|---|
committer | Ping-Ke Shih <pkshih@realtek.com> | 2024-07-05 04:51:34 +0300 |
commit | 8095364696d38092f34bbd3989b1a73b180a3aaf (patch) | |
tree | 286add7dbeab78f9a939ec72e5a7bdc8d8957f99 /drivers/net/wireless/realtek/rtw89/phy.h | |
parent | 1e71be6a344628d3a6041dfcf26220ad5d66e699 (diff) | |
download | linux-8095364696d38092f34bbd3989b1a73b180a3aaf.tar.xz |
wifi: rtw89: unify the selection logic of RFK table when MCC
Driver will notify FW the target index of RFK table to use at some
moments. When MCC (multi-channel concurrent), the correctness of the
notification is especially important.
We now unify the selection logic of RFK table as below among chips.
1. check each table if it matches target channel
2. check all tables if any is idle by iterating active channels
3. replace the first table if all are busy unexpectedly
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240702124452.18747-2-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw89/phy.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/phy.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/phy.h b/drivers/net/wireless/realtek/rtw89/phy.h index 6e53ac9140fb..d8df553b9cb0 100644 --- a/drivers/net/wireless/realtek/rtw89/phy.h +++ b/drivers/net/wireless/realtek/rtw89/phy.h @@ -715,6 +715,19 @@ enum rtw89_phy_gain_band_be rtw89_subband_to_gain_band_be(enum rtw89_subband sub } } +struct rtw89_rfk_chan_desc { + /* desc is valid iff ch is non-zero */ + u8 ch; + + /* To avoid us from extending old chip code every time, each new + * field must be defined along with a bool flag in positivte way. + */ + bool has_band; + u8 band; + bool has_bw; + u8 bw; +}; + enum rtw89_rfk_flag { RTW89_RFK_F_WRF = 0, RTW89_RFK_F_WM = 1, @@ -950,5 +963,8 @@ enum rtw89_rf_path_bit rtw89_phy_get_kpath(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx); enum rtw89_rf_path rtw89_phy_get_syn_sel(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx); +u8 rtw89_rfk_chan_lookup(struct rtw89_dev *rtwdev, + const struct rtw89_rfk_chan_desc *desc, u8 desc_nr, + const struct rtw89_chan *target_chan); #endif |