Skip to content
This repository has been archived by the owner on May 3, 2018. It is now read-only.

Commit

Permalink
brcmfmac: use ndev->needed_headroom to reserve additional header space
Browse files Browse the repository at this point in the history
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
Phil Elwell authored and ksacilotto committed Dec 11, 2017
1 parent 46170ce commit a8a374a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,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 += drvr->hdrlen;
ndev->needed_headroom += drvr->hdrlen;
ndev->ethtool_ops = &brcmf_ethtool_ops;

drvr->rxsz = ndev->mtu + ndev->hard_header_len +
Expand Down

0 comments on commit a8a374a

Please sign in to comment.