Skip to contentSkip to conversation

ath11k: add HW checksum offload support

PATCH Applied Sathishkumar Muruganandam 2 participants 2 messages Apr 24, 2019 – May 2, 2019 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ath11k: add HW checksum offload support

Advertise HW checksum offload capabilities to netdev

---
Changes in v2:
Modified commit log

 drivers/net/wireless/ath/ath11k/dp_tx.c | 4 ++++
 drivers/net/wireless/ath/ath11k/mac.c   | 3 +++
 2 files changed, 7 insertions(+)
drivers/net/wireless/ath/ath11k/dp_tx.c +4 -0
index b2807a88df9c..84965000c54d 100644
@@ -142,6 +142,10 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 		ath11k_dp_encap_nwifi(skb);
 		break;
 	case HAL_TCL_ENCAP_TYPE_RAW:
+		/*  TODO: for CHECKSUM_PARTIAL case in raw mode, HW checksum offload
+		 *	  is not applicable, hence manual checksum calculation using
+		 *	  skb_checksum_help() is needed
+		 */
 	case HAL_TCL_ENCAP_TYPE_ETHERNET:
 	case HAL_TCL_ENCAP_TYPE_802_3:
 		/* TODO: Take care of other encap modes as well */
drivers/net/wireless/ath/ath11k/mac.c +3 -0
index ddb8beba3ab7..6cba3ebab6ed 100644
@@ -4927,6 +4927,9 @@ static int ath11k_mac_register(struct ath11k *ar)
 
 	ath11k_reg_init(ar);
 
+	/* advertise HW checksum offload capabilities */
+	ar->hw->netdev_features = NETIF_F_HW_CSUM;
+
 	ret = ieee80211_register_hw(ar->hw);
 	if (ret) {
 		ath11k_err(ar->ab, "ieee80211 registration failed: %d\n", ret);
Signature · 7 lines
1.9.1


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