linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath11k: add some missing __packed qualifiers
@ 2019-12-05  6:26 John Crispin
  2019-12-05  6:26 ` [PATCH 2/2] ath11k: explicitly cast wmi commands to their correct struct type John Crispin
  2019-12-18 17:45 ` [PATCH 1/2] ath11k: add some missing __packed qualifiers Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: John Crispin @ 2019-12-05  6:26 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless, John Crispin

A few of the WMI parameter structs were missing this.

Signed-off-by: John Crispin <john@phrozen.org>
---
 drivers/net/wireless/ath/ath11k/wmi.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 0d7caa1e4d75..7a1ed73d8b7b 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -4562,12 +4562,12 @@ struct wmi_twt_enable_params_cmd {
 	u32 mode_check_interval;
 	u32 add_sta_slot_interval;
 	u32 remove_sta_slot_interval;
-};
+} __packed;
 
 struct wmi_twt_disable_params_cmd {
 	u32 tlv_header;
 	u32 pdev_id;
-};
+} __packed;
 
 enum WMI_HOST_TWT_COMMAND {
 	WMI_HOST_TWT_COMMAND_REQUEST_TWT = 0,
@@ -4682,7 +4682,7 @@ struct wmi_obss_spatial_reuse_params_cmd {
 	s32 obss_min;
 	s32 obss_max;
 	u32 vdev_id;
-};
+} __packed;
 
 struct target_resource_config {
 	u32 num_vdevs;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ath11k: explicitly cast wmi commands to their correct struct type
  2019-12-05  6:26 [PATCH 1/2] ath11k: add some missing __packed qualifiers John Crispin
@ 2019-12-05  6:26 ` John Crispin
  2019-12-19 16:18   ` Kalle Valo
  2019-12-18 17:45 ` [PATCH 1/2] ath11k: add some missing __packed qualifiers Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: John Crispin @ 2019-12-05  6:26 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless, John Crispin

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>
---
 drivers/net/wireless/ath/ath11k/wmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index a2f03360e19f..0c1064a0aa39 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -2517,7 +2517,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;
@@ -2568,7 +2568,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;
@@ -2768,7 +2768,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);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ath11k: add some missing __packed qualifiers
  2019-12-05  6:26 [PATCH 1/2] ath11k: add some missing __packed qualifiers John Crispin
  2019-12-05  6:26 ` [PATCH 2/2] ath11k: explicitly cast wmi commands to their correct struct type John Crispin
@ 2019-12-18 17:45 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-12-18 17:45 UTC (permalink / raw)
  To: John Crispin; +Cc: ath11k, linux-wireless, John Crispin

John Crispin <john@phrozen.org> wrote:

> A few of the WMI parameter structs were missing this.
> 
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

20c3c4fd3967 ath11k: add some missing __packed qualifiers

-- 
https://patchwork.kernel.org/patch/11274223/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ath11k: explicitly cast wmi commands to their correct struct type
  2019-12-05  6:26 ` [PATCH 2/2] ath11k: explicitly cast wmi commands to their correct struct type John Crispin
@ 2019-12-19 16:18   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-12-19 16:18 UTC (permalink / raw)
  To: John Crispin; +Cc: ath11k, linux-wireless, John Crispin

John Crispin <john@phrozen.org> wrote:

> 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>

Patch applied to ath-next branch of ath.git, thanks.

77ea8b455ca1 ath11k: explicitly cast wmi commands to their correct struct type

-- 
https://patchwork.kernel.org/patch/11274221/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-19 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-05  6:26 [PATCH 1/2] ath11k: add some missing __packed qualifiers John Crispin
2019-12-05  6:26 ` [PATCH 2/2] ath11k: explicitly cast wmi commands to their correct struct type John Crispin
2019-12-19 16:18   ` Kalle Valo
2019-12-18 17:45 ` [PATCH 1/2] ath11k: add some missing __packed qualifiers Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).