]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Refactor ath12k_hw set helper function argument
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Sun, 12 Jan 2025 07:16:27 +0000 (12:46 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 14 Jan 2025 20:53:01 +0000 (12:53 -0800)
Currently, ath12k_hw is placed inside the ath12k_hw_group. However, the
ath12k_hw set helper function takes the device handle and the index as
parameters. Here, the index parameter is specific to the group handle.
Therefore, change this helper function argument from the device handle to
the group handle.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20250112071630.4059410-2-quic_periyasa@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/mac.c

index 3dd01ad100c56d2b9330d9a963acba021e4d571b..9eb4eb410af26546a062bc24202fb4bf6452b4f4 100644 (file)
@@ -1199,10 +1199,10 @@ static inline struct ath12k_hw *ath12k_ab_to_ah(struct ath12k_base *ab, int idx)
        return ab->ag->ah[idx];
 }
 
-static inline void ath12k_ab_set_ah(struct ath12k_base *ab, int idx,
+static inline void ath12k_ag_set_ah(struct ath12k_hw_group *ag, int idx,
                                    struct ath12k_hw *ah)
 {
-       ab->ag->ah[idx] = ah;
+       ag->ah[idx] = ah;
 }
 
 static inline int ath12k_get_num_hw(struct ath12k_base *ab)
index 48d110e2a7ded61c4094b0ce7e5bbb50b94d5cd4..6a7a01c35f0282700f9a2f04c14524059ec0b733 100644 (file)
@@ -11362,7 +11362,7 @@ void ath12k_mac_destroy(struct ath12k_hw_group *ag)
                        continue;
 
                ath12k_mac_hw_destroy(ah);
-               ath12k_ab_set_ah(ab, i, NULL);
+               ath12k_ag_set_ah(ag, i, NULL);
        }
 }
 
@@ -11443,7 +11443,7 @@ err:
                        continue;
 
                ath12k_mac_hw_destroy(ah);
-               ath12k_ab_set_ah(ab, i, NULL);
+               ath12k_ag_set_ah(ag, i, NULL);
        }
 
        return ret;