mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 03:31:04 -04:00
wifi: rtw89: rfk: concentrate parameter control while set_channel()
For future support on multiple channels, there will be settings of multiple sub-entities that we need to control. We don't want such settings to be scattered all over the place. So, we centrally manage controls of rtw89_phy_idx for RFK in set_channel(). Signed-off-by: Zong-Zhe Yang <kevin_yang@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/20220809104952.61355-7-pkshih@realtek.com
This commit is contained in:
committed by
Kalle Valo
parent
07ef5f2fa3
commit
010d0051f7
@@ -329,7 +329,7 @@ void rtw89_set_channel(struct rtw89_dev *rtwdev)
|
||||
|
||||
if (!entity_active || band_changed) {
|
||||
rtw89_btc_ntfy_switch_band(rtwdev, RTW89_PHY_0, chan.band_type);
|
||||
rtw89_chip_rfk_band_changed(rtwdev);
|
||||
rtw89_chip_rfk_band_changed(rtwdev, RTW89_PHY_0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2123,7 +2123,8 @@ struct rtw89_chip_ops {
|
||||
void (*fem_setup)(struct rtw89_dev *rtwdev);
|
||||
void (*rfk_init)(struct rtw89_dev *rtwdev);
|
||||
void (*rfk_channel)(struct rtw89_dev *rtwdev);
|
||||
void (*rfk_band_changed)(struct rtw89_dev *rtwdev);
|
||||
void (*rfk_band_changed)(struct rtw89_dev *rtwdev,
|
||||
enum rtw89_phy_idx phy_idx);
|
||||
void (*rfk_scan)(struct rtw89_dev *rtwdev, bool start);
|
||||
void (*rfk_track)(struct rtw89_dev *rtwdev);
|
||||
void (*power_trim)(struct rtw89_dev *rtwdev);
|
||||
@@ -3665,12 +3666,13 @@ static inline void rtw89_chip_rfk_channel(struct rtw89_dev *rtwdev)
|
||||
chip->ops->rfk_channel(rtwdev);
|
||||
}
|
||||
|
||||
static inline void rtw89_chip_rfk_band_changed(struct rtw89_dev *rtwdev)
|
||||
static inline void rtw89_chip_rfk_band_changed(struct rtw89_dev *rtwdev,
|
||||
enum rtw89_phy_idx phy_idx)
|
||||
{
|
||||
const struct rtw89_chip_info *chip = rtwdev->chip;
|
||||
|
||||
if (chip->ops->rfk_band_changed)
|
||||
chip->ops->rfk_band_changed(rtwdev);
|
||||
chip->ops->rfk_band_changed(rtwdev, phy_idx);
|
||||
}
|
||||
|
||||
static inline void rtw89_chip_rfk_scan(struct rtw89_dev *rtwdev, bool start)
|
||||
|
||||
@@ -1278,9 +1278,10 @@ static void rtw8852a_rfk_channel(struct rtw89_dev *rtwdev)
|
||||
rtw8852a_dpk(rtwdev, phy_idx);
|
||||
}
|
||||
|
||||
static void rtw8852a_rfk_band_changed(struct rtw89_dev *rtwdev)
|
||||
static void rtw8852a_rfk_band_changed(struct rtw89_dev *rtwdev,
|
||||
enum rtw89_phy_idx phy_idx)
|
||||
{
|
||||
rtw8852a_tssi_scan(rtwdev, RTW89_PHY_0);
|
||||
rtw8852a_tssi_scan(rtwdev, phy_idx);
|
||||
}
|
||||
|
||||
static void rtw8852a_rfk_scan(struct rtw89_dev *rtwdev, bool start)
|
||||
|
||||
@@ -1851,9 +1851,10 @@ static void rtw8852c_rfk_channel(struct rtw89_dev *rtwdev)
|
||||
rtw89_fw_h2c_rf_ntfy_mcc(rtwdev);
|
||||
}
|
||||
|
||||
static void rtw8852c_rfk_band_changed(struct rtw89_dev *rtwdev)
|
||||
static void rtw8852c_rfk_band_changed(struct rtw89_dev *rtwdev,
|
||||
enum rtw89_phy_idx phy_idx)
|
||||
{
|
||||
rtw8852c_tssi_scan(rtwdev, RTW89_PHY_0);
|
||||
rtw8852c_tssi_scan(rtwdev, phy_idx);
|
||||
}
|
||||
|
||||
static void rtw8852c_rfk_scan(struct rtw89_dev *rtwdev, bool start)
|
||||
|
||||
Reference in New Issue
Block a user