diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2022-04-07 17:58:57 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2022-04-12 16:52:06 +0300 |
commit | f5207c122102cac22c78f438610d937a924aee3a (patch) | |
tree | f335dbc05f895a2141601647a7c3c63e07e8eb4c /drivers/net/wireless/realtek/rtw88/mac80211.c | |
parent | f1c4dabfe68df7321cba0a07a30b2776a303abb2 (diff) |
rtw88: do PHY calibration while starting AP
Calling calibration to yield expected PHY performance. We do this in STA
mode, so do this in AP mode as well.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220407095858.46807-6-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/mac80211.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/mac80211.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c index 1ee41dfda5e1..30903c567cd9 100644 --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c @@ -429,6 +429,18 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw, mutex_unlock(&rtwdev->mutex); } +static int rtw_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + struct rtw_dev *rtwdev = hw->priv; + struct rtw_chip_info *chip = rtwdev->chip; + + mutex_lock(&rtwdev->mutex); + chip->ops->phy_calibration(rtwdev); + mutex_unlock(&rtwdev->mutex); + + return 0; +} + static int rtw_ops_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 ac, const struct ieee80211_tx_queue_params *params) @@ -886,6 +898,7 @@ const struct ieee80211_ops rtw_ops = { .change_interface = rtw_ops_change_interface, .configure_filter = rtw_ops_configure_filter, .bss_info_changed = rtw_ops_bss_info_changed, + .start_ap = rtw_ops_start_ap, .conf_tx = rtw_ops_conf_tx, .sta_add = rtw_ops_sta_add, .sta_remove = rtw_ops_sta_remove, |