diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-01-08 04:50:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-09 10:56:39 -0500 |
commit | df2d08eed2a38cee971b3f2ff132d8369471404e (patch) | |
tree | 7d117e1a0d3c6191b8fc4ef2f9a7ac6930c09e0c | |
parent | 83982cbe2bf095d258dcb1687b70622cab18347d (diff) |
wil6210: Fix IP version indication for Tx csum offload
Bit DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_POS should be set for IPv4
only. Don't set it for IPv6
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index d505b2676a73..18003c0d5141 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c | |||
@@ -673,9 +673,12 @@ static int wil_tx_desc_offload_cksum_set(struct wil6210_priv *wil, | |||
673 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 673 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
674 | return 0; | 674 | return 0; |
675 | 675 | ||
676 | d->dma.b11 = ETH_HLEN; /* MAC header length */ | ||
677 | |||
676 | switch (skb->protocol) { | 678 | switch (skb->protocol) { |
677 | case cpu_to_be16(ETH_P_IP): | 679 | case cpu_to_be16(ETH_P_IP): |
678 | protocol = ip_hdr(skb)->protocol; | 680 | protocol = ip_hdr(skb)->protocol; |
681 | d->dma.b11 |= BIT(DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_POS); | ||
679 | break; | 682 | break; |
680 | case cpu_to_be16(ETH_P_IPV6): | 683 | case cpu_to_be16(ETH_P_IPV6): |
681 | protocol = ipv6_hdr(skb)->nexthdr; | 684 | protocol = ipv6_hdr(skb)->nexthdr; |
@@ -701,8 +704,6 @@ static int wil_tx_desc_offload_cksum_set(struct wil6210_priv *wil, | |||
701 | } | 704 | } |
702 | 705 | ||
703 | d->dma.ip_length = skb_network_header_len(skb); | 706 | d->dma.ip_length = skb_network_header_len(skb); |
704 | d->dma.b11 = ETH_HLEN; /* MAC header length */ | ||
705 | d->dma.b11 |= BIT(DMA_CFG_DESC_TX_OFFLOAD_CFG_L3T_IPV4_POS); | ||
706 | /* Enable TCP/UDP checksum */ | 707 | /* Enable TCP/UDP checksum */ |
707 | d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_POS); | 708 | d->dma.d0 |= BIT(DMA_CFG_DESC_TX_0_TCP_UDP_CHECKSUM_EN_POS); |
708 | /* Calculate pseudo-header */ | 709 | /* Calculate pseudo-header */ |