Skip to contentSkip to conversation

ath11k/dp_tx: Remove endian conversion in HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG

PATCH In review Vasanthakumar Thiagarajan 2 participants 2 messages Jun 3, 2019 – Jun 6, 2019 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath11k/dp_tx: Remove endian conversion in HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG

With copyengine performing byte-swap when host target endian is different, driver should not do any endian conversion over the messages going through any of the copyengines. Remove the endian conversion while sending HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG, this also fixes the below sparse warnings.

drivers/net/wireless/ath/ath11k/dp_tx.c:837:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:837:33: expected unsigned int [usertype] pkt_type_en_flags0
drivers/net/wireless/ath/ath11k/dp_tx.c:837:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:838:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:838:33: expected unsigned int [usertype] pkt_type_en_flags1
drivers/net/wireless/ath/ath11k/dp_tx.c:838:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:839:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:839:33: expected unsigned int [usertype] pkt_type_en_flags2
drivers/net/wireless/ath/ath11k/dp_tx.c:839:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:840:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:840:33: expected unsigned int [usertype] pkt_type_en_flags3
drivers/net/wireless/ath/ath11k/dp_tx.c:840:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:841:28: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:841:28: expected unsigned int [usertype] rx_filter_tlv
drivers/net/wireless/ath/ath11k/dp_tx.c:841:28: got restricted __le32 [usertype]

---
 drivers/net/wireless/ath/ath11k/dp_tx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/wireless/ath/ath11k/dp_tx.c +5 -5
index 2a15ca3..5670796 100644
@@ -834,11 +834,11 @@ int ath11k_dp_htt_rx_filter_setup(struct ath11k_base *ab, u32 ring_id,
 
 	cmd->info1 = FIELD_PREP(HTT_RX_RING_SELECTION_CFG_CMD_INFO1_BUF_SIZE,
 				rx_buf_size);
-	cmd->pkt_type_en_flags0 = __cpu_to_le32(tlv_filter->pkt_filter_flags0);
-	cmd->pkt_type_en_flags1 = __cpu_to_le32(tlv_filter->pkt_filter_flags1);
-	cmd->pkt_type_en_flags2 = __cpu_to_le32(tlv_filter->pkt_filter_flags2);
-	cmd->pkt_type_en_flags3 = __cpu_to_le32(tlv_filter->pkt_filter_flags3);
-	cmd->rx_filter_tlv = __cpu_to_le32(tlv_filter->rx_filter);
+	cmd->pkt_type_en_flags0 = tlv_filter->pkt_filter_flags0;
+	cmd->pkt_type_en_flags1 = tlv_filter->pkt_filter_flags1;
+	cmd->pkt_type_en_flags2 = tlv_filter->pkt_filter_flags2;
+	cmd->pkt_type_en_flags3 = tlv_filter->pkt_filter_flags3;
+	cmd->rx_filter_tlv = tlv_filter->rx_filter;
 
 	ret = ath11k_htc_send(&ab->htc, ab->dp.eid, skb);
 	if (ret)
Signature · 7 lines
1.9.1


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#1 lore raw
Quoted 22 lines · Vasanthakumar Thiagarajan

With copyengine performing byte-swap when host target endian is different, driver should not do any endian conversion over the messages going through any of the copyengines. Remove the endian conversion while sending HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG, this also fixes the below sparse warnings.

drivers/net/wireless/ath/ath11k/dp_tx.c:837:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:837:33: expected unsigned int [usertype] pkt_type_en_flags0
drivers/net/wireless/ath/ath11k/dp_tx.c:837:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:838:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:838:33: expected unsigned int [usertype] pkt_type_en_flags1
drivers/net/wireless/ath/ath11k/dp_tx.c:838:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:839:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:839:33: expected unsigned int [usertype] pkt_type_en_flags2
drivers/net/wireless/ath/ath11k/dp_tx.c:839:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:840:33: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:840:33: expected unsigned int [usertype] pkt_type_en_flags3
drivers/net/wireless/ath/ath11k/dp_tx.c:840:33: got restricted __le32 [usertype]
drivers/net/wireless/ath/ath11k/dp_tx.c:841:28: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath11k/dp_tx.c:841:28: expected unsigned int [usertype] rx_filter_tlv
drivers/net/wireless/ath/ath11k/dp_tx.c:841:28: got restricted __le32 [usertype]

Quoted 1 line

Patch applied to ath.git, thanks.

3191e61b1618 ath11k/dp_tx: Remove endian conversion in HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG

Signature · 9 lines
https://patchwork.kernel.org/patch/10972749/

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


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k