All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: Enable hw checksum for wcn3990
@ 2018-04-06  5:45 ` pillair
  0 siblings, 0 replies; 6+ messages in thread
From: pillair @ 2018-04-06  5:45 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Rakesh Pillai

From: Rakesh Pillai <pillair@codeaurora.org>

By default ath10k driver enables the support for HW_CHECKSUM
(NETIF_F_HW_CSUM). Since the TCP/UDP checksum calculation is not enabled
in the wcn3990 firmware the checksum is incorrect in the TCP/UDP packets
and all patckets are dropped. But due note that wcn3990 support in
ath10k is still incomplete so this isn't a critical fix (yet).

Enable hw checksum calculations in wcn3990 hardware by
setting the proper flags in msdu descriptor tso flags.

Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/htt.h    | 13 +++++++++++++
 drivers/net/wireless/ath/ath10k/htt_tx.c |  6 ++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index 8cc2a8b..11f52df 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -127,6 +127,19 @@ struct htt_msdu_ext_desc_64 {
 				 | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV4_CSUM_ENABLE \
 				 | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV6_CSUM_ENABLE)
 
+#define HTT_MSDU_EXT_DESC_FLAG_IPV4_CSUM_ENABLE_64		BIT(16)
+#define HTT_MSDU_EXT_DESC_FLAG_UDP_IPV4_CSUM_ENABLE_64		BIT(17)
+#define HTT_MSDU_EXT_DESC_FLAG_UDP_IPV6_CSUM_ENABLE_64		BIT(18)
+#define HTT_MSDU_EXT_DESC_FLAG_TCP_IPV4_CSUM_ENABLE_64		BIT(19)
+#define HTT_MSDU_EXT_DESC_FLAG_TCP_IPV6_CSUM_ENABLE_64		BIT(20)
+#define HTT_MSDU_EXT_DESC_FLAG_PARTIAL_CSUM_ENABLE_64		BIT(21)
+
+#define HTT_MSDU_CHECKSUM_ENABLE_64  (HTT_MSDU_EXT_DESC_FLAG_IPV4_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_UDP_IPV4_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_UDP_IPV6_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV4_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV6_CSUM_ENABLE_64)
+
 enum htt_data_tx_desc_flags0 {
 	HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT = 1 << 0,
 	HTT_DATA_TX_DESC_FLAGS0_NO_AGGR         = 1 << 1,
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index d334b7b..d97ef72 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -1475,8 +1475,10 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
 	    !test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
 		flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L3_OFFLOAD;
 		flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L4_OFFLOAD;
-		if (ar->hw_params.continuous_frag_desc)
-			ext_desc->flags |= HTT_MSDU_CHECKSUM_ENABLE;
+		if (ar->hw_params.continuous_frag_desc) {
+			memset(ext_desc->tso_flag, 0, sizeof(ext_desc->tso_flag));
+			ext_desc->tso_flag[3] |= HTT_MSDU_CHECKSUM_ENABLE_64;
+		}
 	}
 
 	/* Prevent firmware from sending up tx inspection requests. There's
-- 
1.9.1

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

* [PATCH] ath10k: Enable hw checksum for wcn3990
@ 2018-04-06  5:45 ` pillair
  0 siblings, 0 replies; 6+ messages in thread
From: pillair @ 2018-04-06  5:45 UTC (permalink / raw)
  To: ath10k; +Cc: Rakesh Pillai, linux-wireless

From: Rakesh Pillai <pillair@codeaurora.org>

By default ath10k driver enables the support for HW_CHECKSUM
(NETIF_F_HW_CSUM). Since the TCP/UDP checksum calculation is not enabled
in the wcn3990 firmware the checksum is incorrect in the TCP/UDP packets
and all patckets are dropped. But due note that wcn3990 support in
ath10k is still incomplete so this isn't a critical fix (yet).

Enable hw checksum calculations in wcn3990 hardware by
setting the proper flags in msdu descriptor tso flags.

Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/htt.h    | 13 +++++++++++++
 drivers/net/wireless/ath/ath10k/htt_tx.c |  6 ++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
index 8cc2a8b..11f52df 100644
--- a/drivers/net/wireless/ath/ath10k/htt.h
+++ b/drivers/net/wireless/ath/ath10k/htt.h
@@ -127,6 +127,19 @@ struct htt_msdu_ext_desc_64 {
 				 | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV4_CSUM_ENABLE \
 				 | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV6_CSUM_ENABLE)
 
+#define HTT_MSDU_EXT_DESC_FLAG_IPV4_CSUM_ENABLE_64		BIT(16)
+#define HTT_MSDU_EXT_DESC_FLAG_UDP_IPV4_CSUM_ENABLE_64		BIT(17)
+#define HTT_MSDU_EXT_DESC_FLAG_UDP_IPV6_CSUM_ENABLE_64		BIT(18)
+#define HTT_MSDU_EXT_DESC_FLAG_TCP_IPV4_CSUM_ENABLE_64		BIT(19)
+#define HTT_MSDU_EXT_DESC_FLAG_TCP_IPV6_CSUM_ENABLE_64		BIT(20)
+#define HTT_MSDU_EXT_DESC_FLAG_PARTIAL_CSUM_ENABLE_64		BIT(21)
+
+#define HTT_MSDU_CHECKSUM_ENABLE_64  (HTT_MSDU_EXT_DESC_FLAG_IPV4_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_UDP_IPV4_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_UDP_IPV6_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV4_CSUM_ENABLE_64 \
+				     | HTT_MSDU_EXT_DESC_FLAG_TCP_IPV6_CSUM_ENABLE_64)
+
 enum htt_data_tx_desc_flags0 {
 	HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT = 1 << 0,
 	HTT_DATA_TX_DESC_FLAGS0_NO_AGGR         = 1 << 1,
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index d334b7b..d97ef72 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -1475,8 +1475,10 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
 	    !test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
 		flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L3_OFFLOAD;
 		flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L4_OFFLOAD;
-		if (ar->hw_params.continuous_frag_desc)
-			ext_desc->flags |= HTT_MSDU_CHECKSUM_ENABLE;
+		if (ar->hw_params.continuous_frag_desc) {
+			memset(ext_desc->tso_flag, 0, sizeof(ext_desc->tso_flag));
+			ext_desc->tso_flag[3] |= HTT_MSDU_CHECKSUM_ENABLE_64;
+		}
 	}
 
 	/* Prevent firmware from sending up tx inspection requests. There's
-- 
1.9.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: ath10k: Enable hw checksum for wcn3990
  2018-04-06  5:45 ` pillair
  (?)
@ 2018-04-16 13:16 ` Kalle Valo
  -1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2018-04-16 13:16 UTC (permalink / raw)
  To: Rakesh Pillai; +Cc: linux-wireless, ath10k

Rakesh Pillai <pillair@codeaurora.org> wrote:

> By default ath10k driver enables the support for HW_CHECKSUM
> (NETIF_F_HW_CSUM). Since the TCP/UDP checksum calculation is not enabled
> in the wcn3990 firmware the checksum is incorrect in the TCP/UDP packets
> and all patckets are dropped. But due note that wcn3990 support in
> ath10k is still incomplete so this isn't a critical fix (yet).
> 
> Enable hw checksum calculations in wcn3990 hardware by
> setting the proper flags in msdu descriptor tso flags.
> 
> Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Introduces a new sparse warning:

potku:~/ath10k/src/ath$ ath10k-check 
drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47: warning: invalid assignment: |=
drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    left side has type restricted __le32
drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    right side has type unsigned long

Patch set to Changes Requested.

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

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


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: ath10k: Enable hw checksum for wcn3990
  2018-04-06  5:45 ` pillair
  (?)
  (?)
@ 2018-04-16 13:16 ` Kalle Valo
  -1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2018-04-16 13:16 UTC (permalink / raw)
  To: Rakesh Pillai; +Cc: ath10k, linux-wireless, Rakesh Pillai

Rakesh Pillai <pillair@codeaurora.org> wrote:

> By default ath10k driver enables the support for HW_CHECKSUM
> (NETIF_F_HW_CSUM). Since the TCP/UDP checksum calculation is not enabled
> in the wcn3990 firmware the checksum is incorrect in the TCP/UDP packets
> and all patckets are dropped. But due note that wcn3990 support in
> ath10k is still incomplete so this isn't a critical fix (yet).
> 
> Enable hw checksum calculations in wcn3990 hardware by
> setting the proper flags in msdu descriptor tso flags.
> 
> Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Introduces a new sparse warning:

potku:~/ath10k/src/ath$ ath10k-check 
drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47: warning: invalid assignment: |=
drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    left side has type restricted __le32
drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    right side has type unsigned long

Patch set to Changes Requested.

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

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

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

* Re: ath10k: Enable hw checksum for wcn3990
       [not found] ` <20180416131652.E274C606AC@smtp.codeaurora.org>
@ 2018-04-17  9:27     ` pillair
  0 siblings, 0 replies; 6+ messages in thread
From: pillair @ 2018-04-17  9:27 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless

Hi Kalle,

The ath10k-check warning has been corrected and I have sent the v2 for 
the same.

Thanks,
Rakesh Pillai.

On 2018-04-16 18:46, Kalle Valo wrote:
> Rakesh Pillai <pillair@codeaurora.org> wrote:
> 
>> By default ath10k driver enables the support for HW_CHECKSUM
>> (NETIF_F_HW_CSUM). Since the TCP/UDP checksum calculation is not 
>> enabled
>> in the wcn3990 firmware the checksum is incorrect in the TCP/UDP 
>> packets
>> and all patckets are dropped. But due note that wcn3990 support in
>> ath10k is still incomplete so this isn't a critical fix (yet).
>> 
>> Enable hw checksum calculations in wcn3990 hardware by
>> setting the proper flags in msdu descriptor tso flags.
>> 
>> Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> 
> Introduces a new sparse warning:
> 
> potku:~/ath10k/src/ath$ ath10k-check
> drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47: warning: invalid
> assignment: |=
> drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    left side has
> type restricted __le32
> drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    right side has
> type unsigned long
> 
> Patch set to Changes Requested.

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

* Re: ath10k: Enable hw checksum for wcn3990
@ 2018-04-17  9:27     ` pillair
  0 siblings, 0 replies; 6+ messages in thread
From: pillair @ 2018-04-17  9:27 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

Hi Kalle,

The ath10k-check warning has been corrected and I have sent the v2 for 
the same.

Thanks,
Rakesh Pillai.

On 2018-04-16 18:46, Kalle Valo wrote:
> Rakesh Pillai <pillair@codeaurora.org> wrote:
> 
>> By default ath10k driver enables the support for HW_CHECKSUM
>> (NETIF_F_HW_CSUM). Since the TCP/UDP checksum calculation is not 
>> enabled
>> in the wcn3990 firmware the checksum is incorrect in the TCP/UDP 
>> packets
>> and all patckets are dropped. But due note that wcn3990 support in
>> ath10k is still incomplete so this isn't a critical fix (yet).
>> 
>> Enable hw checksum calculations in wcn3990 hardware by
>> setting the proper flags in msdu descriptor tso flags.
>> 
>> Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> 
> Introduces a new sparse warning:
> 
> potku:~/ath10k/src/ath$ ath10k-check
> drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47: warning: invalid
> assignment: |=
> drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    left side has
> type restricted __le32
> drivers/net/wireless/ath/ath10k/htt_tx.c:1480:47:    right side has
> type unsigned long
> 
> Patch set to Changes Requested.

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

end of thread, other threads:[~2018-04-17  9:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06  5:45 [PATCH] ath10k: Enable hw checksum for wcn3990 pillair
2018-04-06  5:45 ` pillair
2018-04-16 13:16 ` Kalle Valo
2018-04-16 13:16 ` Kalle Valo
     [not found] ` <20180416131652.E274C606AC@smtp.codeaurora.org>
2018-04-17  9:27   ` pillair
2018-04-17  9:27     ` pillair

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.