Skip to content

Commit

Permalink
wifi: ath12k: Refactor ath12k_hw set helper function argument
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Karthikeyan Periyasamy authored and Jeff Johnson committed Jan 14, 2025
1 parent a72eaa1 commit 21261e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath12k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath12k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -11443,7 +11443,7 @@ int ath12k_mac_allocate(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);
}

return ret;
Expand Down

0 comments on commit 21261e4

Please sign in to comment.