Skip to contentSkip to conversation

ath10k: Use TX cksum offload only for CHECKSUM_PARTIAL

PATCH Applied Helmut Schaa 2 participants 4 messages Jan 28, 2015 – Feb 4, 2015 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Use TX cksum offload only for CHECKSUM_PARTIAL

Otherwise ath10k will just checksum everything even if it did not go through the TCP/IP stack (for example bridged frames). In the worst case this could mean recreating the checksum for incorrect data.

---
 drivers/net/wireless/ath/ath10k/htt_tx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/htt_tx.c +4 -2
index a1bda41..e142502 100644
@@ -534,8 +534,10 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
 
 	flags1 |= SM((u16)vdev_id, HTT_DATA_TX_DESC_FLAGS1_VDEV_ID);
 	flags1 |= SM((u16)tid, HTT_DATA_TX_DESC_FLAGS1_EXT_TID);
-	flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L3_OFFLOAD;
-	flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L4_OFFLOAD;
+	if (msdu->ip_summed == CHECKSUM_PARTIAL) {
+		flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L3_OFFLOAD;
+		flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L4_OFFLOAD;
+	}
 
 	/* Prevent firmware from sending up tx inspection requests. There's
 	 * nothing ath10k can do with frames requested for inspection so force
Signature · 7 lines
1.8.4.5


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#1 lore raw
Quoted 5 lines · Helmut Schaa

Otherwise ath10k will just checksum everything even if it did not go through the TCP/IP stack (for example bridged frames). In the worst case this could mean recreating the checksum for incorrect data.

In the future, please also CC linux-wireless. We get good review comments that way.

Signature · 6 lines
Kalle Valo

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#2 lore raw
Quoted 10 lines · Kalle Valo
Quoted 5 lines · Helmut Schaa

Otherwise ath10k will just checksum everything even if it did not go through the TCP/IP stack (for example bridged frames). In the worst case this could mean recreating the checksum for incorrect data.

In the future, please also CC linux-wireless. We get good review comments that way.

Ok, will do next time :)
Helmut

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

Applied
#3 lore raw
In reply to Helmut Schaa
Quoted 5 lines · Helmut Schaa

Otherwise ath10k will just checksum everything even if it did not go through the TCP/IP stack (for example bridged frames). In the worst case this could mean recreating the checksum for incorrect data.

Thanks, applied to ath.git.

Signature · 1 line
Kalle Valo