Hello!

On 4/11/2017 4:04 AM, Benjamin Herrenschmidt wrote:

The documentation describes NETIF_F_IP_CSUM as deprecated
so let's switch to NETIF_F_HW_CSUM and use the helper to
handle unhandled protocols.

Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
 drivers/net/ethernet/faraday/ftgmac100.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/faraday/ftgmac100.c 
b/drivers/net/ethernet/faraday/ftgmac100.c
index 98b8956..85b650a 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -637,7 +637,8 @@ static int ftgmac100_hard_start_xmit(struct sk_buff *skb,
                                csum_vlan |= FTGMAC100_TXDES1_TCP_CHKSUM;
                        else if (ip_proto == IPPROTO_UDP)
                                csum_vlan |= FTGMAC100_TXDES1_UDP_CHKSUM;
-               }
+               } else if (skb_checksum_help(skb))
+                       goto drop;

Need {} here as well since the 1st branch has it -- see Documentation/process/coding-style.rst (the end of the section 3).

[...]

MBR, Sergei

Reply via email to