summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath11k/wmi.c
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2019-12-05 07:26:45 +0100
committerKalle Valo <kvalo@codeaurora.org>2019-12-19 18:17:41 +0200
commit77ea8b455ca1d93221bad979a59271233ecb757e (patch)
treedb3367dabb3dfbd11e9dd4d5379ab39ae96a3edb /drivers/net/wireless/ath/ath11k/wmi.c
parent4315a74a482f86750a1e78ac536c5baeb05ff6b1 (diff)
ath11k: explicitly cast wmi commands to their correct struct type
Three of the WMI command handlers were not casting to the right data type. Lets make the code consistent with the other handlers. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/wmi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 0cc58d55b308..a9b301ceb24b 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -2515,7 +2515,7 @@ ath11k_wmi_send_twt_enable_cmd(struct ath11k *ar, u32 pdev_id)
if (!skb)
return -ENOMEM;
- cmd = (void *)skb->data;
+ cmd = (struct wmi_twt_enable_params_cmd *)skb->data;
cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_TWT_ENABLE_CMD) |
FIELD_PREP(WMI_TLV_LEN, len - TLV_HDR_SIZE);
cmd->pdev_id = pdev_id;
@@ -2566,7 +2566,7 @@ ath11k_wmi_send_twt_disable_cmd(struct ath11k *ar, u32 pdev_id)
if (!skb)
return -ENOMEM;
- cmd = (void *)skb->data;
+ cmd = (struct wmi_twt_disable_params_cmd *)skb->data;
cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_TWT_DISABLE_CMD) |
FIELD_PREP(WMI_TLV_LEN, len - TLV_HDR_SIZE);
cmd->pdev_id = pdev_id;
@@ -2596,7 +2596,7 @@ ath11k_wmi_send_obss_spr_cmd(struct ath11k *ar, u32 vdev_id,
if (!skb)
return -ENOMEM;
- cmd = (void *)skb->data;
+ cmd = (struct wmi_obss_spatial_reuse_params_cmd *)skb->data;
cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG,
WMI_TAG_OBSS_SPATIAL_REUSE_SET_CMD) |
FIELD_PREP(WMI_TLV_LEN, len - TLV_HDR_SIZE);