diff options
author | Karthikeyan Periyasamy <quic_periyasa@quicinc.com> | 2024-01-14 18:02:40 +0300 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2024-01-16 15:21:35 +0300 |
commit | 3bbc9c7429ff9e9c79c36add3742f7292d135b98 (patch) | |
tree | ae82b4119f02a036438a7c7f792d179856d209dc /drivers/net/wireless/ath | |
parent | e1e275a699061fba965b5653a8f03d550bb5fe6e (diff) | |
download | linux-3bbc9c7429ff9e9c79c36add3742f7292d135b98.tar.xz |
wifi: ath12k: refactor ath12k_mac_op_stop()
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback stop(). This way, the callback can be
extended to handle multiple link/radio in the future.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240103063731.3356060-6-quic_periyasa@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath12k/mac.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index d48161b43a4a..b6ee5527f350 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -5276,14 +5276,11 @@ int ath12k_mac_rfkill_enable_radio(struct ath12k *ar, bool enable) return 0; } -static void ath12k_mac_op_stop(struct ieee80211_hw *hw) +static void ath12k_mac_stop(struct ath12k *ar) { - struct ath12k *ar = hw->priv; struct htt_ppdu_stats_info *ppdu_stats, *tmp; int ret; - ath12k_mac_drain_tx(ar); - mutex_lock(&ar->conf_mutex); ret = ath12k_mac_config_mon_status_default(ar, false); if (ret && (ret != -ENOTSUPP)) @@ -5312,6 +5309,15 @@ static void ath12k_mac_op_stop(struct ieee80211_hw *hw) atomic_set(&ar->num_pending_mgmt_tx, 0); } +static void ath12k_mac_op_stop(struct ieee80211_hw *hw) +{ + struct ath12k *ar = hw->priv; + + ath12k_mac_drain_tx(ar); + + ath12k_mac_stop(ar); +} + static u8 ath12k_mac_get_vdev_stats_id(struct ath12k_vif *arvif) { |