Message ID | 20240814103423.3980958-2-quic_periyasa@quicinc.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: ath12k: Add multi radio iface combination support | expand |
On 8/14/2024 3:34 AM, Karthikeyan Periyasamy wrote: > Introduce a cleanup helper function to avoid redundant code for iface > combination cleanup. Remove the cleanup code from > ath12k_mac_hw_unregister() and ath12k_mac_hw_register() and replace it > with new cleanup helper function. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00183-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 > > Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote: > Introduce a cleanup helper function to avoid redundant code for iface > combination cleanup. Remove the cleanup code from > ath12k_mac_hw_unregister() and ath12k_mac_hw_register() and replace it > with new cleanup helper function. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00183-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 > > 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> I'll drop this patchset because of MLO cleanup. 3 patches set to Changes Requested. 13763255 [1/3] wifi: ath12k: Introduce iface combination cleanup helper 13763256 [2/3] wifi: ath12k: Refactor radio freq low and high information 13763257 [3/3] wifi: ath12k: Advertise multi device iface combination
On 8/22/2024 10:23 PM, Kalle Valo wrote: > Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote: > >> Introduce a cleanup helper function to avoid redundant code for iface >> combination cleanup. Remove the cleanup code from >> ath12k_mac_hw_unregister() and ath12k_mac_hw_register() and replace it >> with new cleanup helper function. >> >> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 >> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00183-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 >> >> 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> > > I'll drop this patchset because of MLO cleanup. This change not related to MLO dependency. Its a basic to group multiple radio under a wiphy. > > 3 patches set to Changes Requested. > > 13763255 [1/3] wifi: ath12k: Introduce iface combination cleanup helper > 13763256 [2/3] wifi: ath12k: Refactor radio freq low and high information > 13763257 [3/3] wifi: ath12k: Advertise multi device iface combination >
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes: > On 8/22/2024 10:23 PM, Kalle Valo wrote: >> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote: >> >>> Introduce a cleanup helper function to avoid redundant code for iface >>> combination cleanup. Remove the cleanup code from >>> ath12k_mac_hw_unregister() and ath12k_mac_hw_register() and replace it >>> with new cleanup helper function. >>> >>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 >>> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00183-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 >>> >>> 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> >> I'll drop this patchset because of MLO cleanup. > > This change not related to MLO dependency. Its a basic to group > multiple radio under a wiphy. Ok, but it's still good to look at this together with rest of the MLO patches.
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index a3248d977532..69f50c1a52d6 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8865,6 +8865,14 @@ static bool ath12k_mac_is_iface_mode_enable(struct ath12k_hw *ah, return is_enable; } +static void ath12k_mac_cleanup_iface_combinations(struct ath12k_hw *ah) +{ + struct wiphy *wiphy = ah->hw->wiphy; + + kfree(wiphy->iface_combinations[0].limits); + kfree(wiphy->iface_combinations); +} + static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah) { struct wiphy *wiphy = ah->hw->wiphy; @@ -8993,7 +9001,6 @@ static void ath12k_mac_cleanup_unregister(struct ath12k *ar) static void ath12k_mac_hw_unregister(struct ath12k_hw *ah) { struct ieee80211_hw *hw = ah->hw; - struct wiphy *wiphy = hw->wiphy; struct ath12k *ar; int i; @@ -9007,8 +9014,7 @@ static void ath12k_mac_hw_unregister(struct ath12k_hw *ah) for_each_ar(ah, ar, i) ath12k_mac_cleanup_unregister(ar); - kfree(wiphy->iface_combinations[0].limits); - kfree(wiphy->iface_combinations); + ath12k_mac_cleanup_iface_combinations(ah); SET_IEEE80211_DEV(hw, NULL); } @@ -9238,13 +9244,13 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah) ret = ath12k_wow_init(ar); if (ret) { ath12k_warn(ar->ab, "failed to init wow: %d\n", ret); - goto err_free_if_combs; + goto err_cleanup_if_combs; } ret = ieee80211_register_hw(hw); if (ret) { ath12k_err(ab, "ieee80211 registration failed: %d\n", ret); - goto err_free_if_combs; + goto err_cleanup_if_combs; } if (is_monitor_disable) @@ -9274,9 +9280,8 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah) ieee80211_unregister_hw(hw); -err_free_if_combs: - kfree(wiphy->iface_combinations[0].limits); - kfree(wiphy->iface_combinations); +err_cleanup_if_combs: + ath12k_mac_cleanup_iface_combinations(ah); err_complete_cleanup_unregister: i = ah->num_radio;
Introduce a cleanup helper function to avoid redundant code for iface combination cleanup. Remove the cleanup code from ath12k_mac_hw_unregister() and ath12k_mac_hw_register() and replace it with new cleanup helper function. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00183-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> --- drivers/net/wireless/ath/ath12k/mac.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)