diff options
author | Jeff Johnson <quic_jjohnson@quicinc.com> | 2023-08-21 17:13:36 +0300 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2023-08-23 17:04:29 +0300 |
commit | 9476cda44c136089f14f8951ae5197d63e91735c (patch) | |
tree | f988ff8cf4f5fffdbbc0ebe8ecd47779646a696a /drivers/net/wireless/ath/ath11k/testmode.c | |
parent | 29d15589f084d71a4ea8c544039c5839db0236e2 (diff) | |
download | linux-9476cda44c136089f14f8951ae5197d63e91735c.tar.xz |
wifi: ath11k: Consistently use ath11k_vif_to_arvif()
Helper function ath11k_vif_to_arvif() exists to retrieve a struct
ath11k_vif from a struct ieee80211_vif. However, in multiple places
this logic is open-coded with inline typecasting. Since the
typecasting prevents the compiler from type-checking the source and
destination, update the driver to consistently use the helper
function.
No functional changes, compile tested only.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230821-ath11k_vif_to_arvif-v1-1-fa2c3b60b5cf@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/testmode.c')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/testmode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath11k/testmode.c b/drivers/net/wireless/ath/ath11k/testmode.c index 8fc5cddb28bd..43bb23265d34 100644 --- a/drivers/net/wireless/ath/ath11k/testmode.c +++ b/drivers/net/wireless/ath/ath11k/testmode.c @@ -350,7 +350,7 @@ static int ath11k_tm_cmd_wmi(struct ath11k *ar, struct nlattr *tb[], if (ar->ab->fw_mode != ATH11K_FIRMWARE_MODE_FTM && (tag == WMI_TAG_VDEV_SET_PARAM_CMD || tag == WMI_TAG_UNIT_TEST_CMD)) { if (vif) { - arvif = (struct ath11k_vif *)vif->drv_priv; + arvif = ath11k_vif_to_arvif(vif); *ptr = arvif->vdev_id; } else { ret = -EINVAL; |