diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index c9df99bc54fd..0110f78400de 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1571,8 +1571,7 @@ static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab) complete_all(&ar->thermal.wmi_sync); wake_up(&ar->dp.tx_empty_waitq); - idr_for_each(&ar->txmgmt_idr, - ath12k_mac_tx_mgmt_pending_free, ar); + ath12k_mac_tx_mgmt_pending_free(ar); idr_destroy(&ar->txmgmt_idr); wake_up(&ar->txmgmt_empty_waitq); diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index db6856ec6c14..56c3cc8506e1 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -9194,13 +9194,13 @@ static void ath12k_mac_tx_mgmt_free(struct ath12k *ar, int buf_id) ath12k_mgmt_over_wmi_tx_drop(ar, msdu); } -int ath12k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx) +void ath12k_mac_tx_mgmt_pending_free(struct ath12k *ar) { - struct ath12k *ar = ctx; + struct sk_buff *msdu; + int buf_id; - ath12k_mac_tx_mgmt_free(ar, buf_id); - - return 0; + idr_for_each_entry(&ar->txmgmt_idr, msdu, buf_id) + ath12k_mac_tx_mgmt_free(ar, buf_id); } static int ath12k_mac_vif_txmgmt_idr_remove(int buf_id, void *skb, void *ctx) @@ -14738,7 +14738,7 @@ static struct wiphy_iftype_ext_capab ath12k_iftypes_ext_capa[] = { static void ath12k_mac_cleanup_unregister(struct ath12k *ar) { - idr_for_each(&ar->txmgmt_idr, ath12k_mac_tx_mgmt_pending_free, ar); + ath12k_mac_tx_mgmt_pending_free(ar); idr_destroy(&ar->txmgmt_idr); kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); diff --git a/drivers/net/wireless/ath/ath12k/mac.h b/drivers/net/wireless/ath/ath12k/mac.h index aba98afd4365..ae44ebfd9bd9 100644 --- a/drivers/net/wireless/ath/ath12k/mac.h +++ b/drivers/net/wireless/ath/ath12k/mac.h @@ -173,7 +173,7 @@ struct ath12k *ath12k_mac_get_ar_by_pdev_id(struct ath12k_base *ab, u32 pdev_id) void ath12k_mac_drain_tx(struct ath12k *ar); void ath12k_mac_peer_cleanup_all(struct ath12k *ar); void ath12k_mac_dp_peer_cleanup(struct ath12k_hw *ah); -int ath12k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx); +void ath12k_mac_tx_mgmt_pending_free(struct ath12k *ar); enum rate_info_bw ath12k_mac_bw_to_mac80211_bw(enum ath12k_supported_bw bw); enum ath12k_supported_bw ath12k_mac_mac80211_bw_to_ath12k_bw(enum rate_info_bw bw); enum hal_encrypt_type ath12k_dp_tx_get_encrypt_type(u32 cipher);