ath10k: implement tx checksum offloading
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 31 Jul 2013 08:47:57 +0000 (10:47 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 2 Aug 2013 06:28:39 +0000 (09:28 +0300)
HW supports L3/L4 tx checksum offloading.

This should reduce CPU load and improve
performance on slow host machines.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/htt_tx.c
drivers/net/wireless/ath/ath10k/mac.c

index dc3f3e8de32b1a41f4a1b243788d1d5f24fdf78f..656c2546b2949825a38b1b9b05d266e5af8bc5f0 100644 (file)
@@ -465,6 +465,8 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
        flags1  = 0;
        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;
 
        frags_paddr = ATH10K_SKB_CB(txfrag)->paddr;
 
index 344ad2772de8e6d14cbf5212171778cde4d8198b..57843377fa0b74ae7d6f633a4bf85ab1c162e1be 100644 (file)
@@ -3309,6 +3309,8 @@ int ath10k_mac_register(struct ath10k *ar)
        ar->hw->wiphy->iface_combinations = &ath10k_if_comb;
        ar->hw->wiphy->n_iface_combinations = 1;
 
+       ar->hw->netdev_features = NETIF_F_HW_CSUM;
+
        ret = ath_regd_init(&ar->ath_common.regulatory, ar->hw->wiphy,
                            ath10k_reg_notifier);
        if (ret) {