Subject: Re: [PATCH V3] net: emac: emac gigabit ethernet controller driver

From: Timur Tabi <[email-masked]>
Date: Tue, 5 Jan 2016 18:21:38 -0600

Gilad Avidov wrote:

> diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.c b/drivers/net/ethernet/qualcomm/emac/emac-mac.c
> new file mode 100644
> index 0000000..36a7746
> --- /dev/null
> +++ b/drivers/net/ethernet/qualcomm/emac/emac-mac.c
> @@ -0,0 +1,1808 @@
> +/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 and
> + * only version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +/* Qualcomm Technologies, Inc. EMAC Ethernet Controller MAC layer support
> + */
> +
> +#include <linux/tcp.h>
> +#include <linux/ip.h>
> +#include <linux/ipv6.h>
> +#include <linux/crc32.h>
> +#include <linux/if_vlan.h>
> +#include <linux/jiffies.h>
> +#include <linux/phy.h>
> +#include <linux/of.h>
> +#include <linux/gpio.h>
> +#include <linux/pm_runtime.h>
> +#include "emac.h"
> +#include "emac-sgmii.h"

You also need

	#include <net/ip6_checksum.h>

otherwise you get this:

   CC      drivers/net/ethernet/qualcomm/emac/emac-mac.o
drivers/net/ethernet/qualcomm/emac/emac-mac.c: In function 'emac_tso_csum':
drivers/net/ethernet/qualcomm/emac/emac-mac.c:2045:4: error: implicit 
declaration of function 'csum_ipv6_magic' 
[-Werror=implicit-function-declaration]
     tcp_hdr(skb)->check = ~csum_ipv6_magic(
     ^