All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath11k: add HW checksum offload support
@ 2019-04-24  5:53 Sathishkumar Muruganandam
  0 siblings, 0 replies; only message in thread
From: Sathishkumar Muruganandam @ 2019-04-24  5:53 UTC (permalink / raw)
  To: ath11k; +Cc: Sathishkumar Muruganandam

- advertise HW checksum offload capabilities to netdev

Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/dp_tx.c | 4 ++++
 drivers/net/wireless/ath/ath11k/mac.c   | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index b2807a88df9c..84965000c54d 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -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 */
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index ddb8beba3ab7..6cba3ebab6ed 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -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);
-- 
1.9.1


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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-24  5:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24  5:53 [PATCH] ath11k: add HW checksum offload support Sathishkumar Muruganandam

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.