netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] r8152: fix r8152_csum_workaround function
@ 2014-07-11  8:48 Hayes Wang
  2014-07-11 21:52 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Hayes Wang @ 2014-07-11  8:48 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb

The transport offset of the IPv4 packet should be fixed and wouldn't
be out of the hw limitation, so the r8152_csum_workaround() should
be used for IPv6 packets.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 drivers/net/usb/r8152.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index a795ecf..7bad2d3 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1359,7 +1359,7 @@ static void r8152_csum_workaround(struct r8152 *tp, struct sk_buff *skb,
 		struct sk_buff_head seg_list;
 		struct sk_buff *segs, *nskb;
 
-		features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO);
+		features &= ~(NETIF_F_SG | NETIF_F_IPV6_CSUM | NETIF_F_TSO6);
 		segs = skb_gso_segment(skb, features);
 		if (IS_ERR(segs) || !segs)
 			goto drop;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] r8152: fix r8152_csum_workaround function
  2014-07-11  8:48 [PATCH net] r8152: fix r8152_csum_workaround function Hayes Wang
@ 2014-07-11 21:52 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-07-11 21:52 UTC (permalink / raw)
  To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb

From: Hayes Wang <hayeswang@realtek.com>
Date: Fri, 11 Jul 2014 16:48:27 +0800

> The transport offset of the IPv4 packet should be fixed and wouldn't
> be out of the hw limitation, so the r8152_csum_workaround() should
> be used for IPv6 packets.
> 
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>

Applied and queued up for -stable, but this patch was harder to review
than it needed to be...

> -		features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO);
> +		features &= ~(NETIF_F_SG | NETIF_F_IPV6_CSUM | NETIF_F_TSO6);

because you changed the order of the flags unnecessarily.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-11 21:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-11  8:48 [PATCH net] r8152: fix r8152_csum_workaround function Hayes Wang
2014-07-11 21:52 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).