]> git.karo-electronics.de Git - linux-beck.git/commitdiff
brcmfmac: increment hard_header_len instead of overriding
authorArend van Spriel <arend@broadcom.com>
Thu, 6 Jun 2013 11:18:06 +0000 (13:18 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Jun 2013 19:06:24 +0000 (15:06 -0400)
In brcmf_net_attach() the hard_header_len is set to sum of ETH_HLEN
and the headroom needed by the bus interface. Better use increment
instead as hard_header_len is already initialized upon alloc_netdev().

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c

index 63cadf63ccfec5306e075f131c1f53c17838dd99..29828865ed69b38e2e9dc7959c55ad65f80f8cf3 100644 (file)
@@ -640,7 +640,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked)
        /* set appropriate operations */
        ndev->netdev_ops = &brcmf_netdev_ops_pri;
 
-       ndev->hard_header_len = ETH_HLEN + drvr->hdrlen;
+       ndev->hard_header_len += drvr->hdrlen;
        ndev->ethtool_ops = &brcmf_ethtool_ops;
 
        drvr->rxsz = ndev->mtu + ndev->hard_header_len +