Skip to content

Commit 16221db

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
brcmfmac: use ndev->needed_headroom to reserve additional header space
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: #1357 Signed-off-by: Phil Elwell <[email protected]>
1 parent ce895c7 commit 16221db

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

1 file changed

+1
-1
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked)
516516
/* set appropriate operations */
517517
ndev->netdev_ops = &brcmf_netdev_ops_pri;
518518

519-
ndev->hard_header_len += drvr->hdrlen;
519+
ndev->needed_headroom += drvr->hdrlen;
520520
ndev->ethtool_ops = &brcmf_ethtool_ops;
521521

522522
drvr->rxsz = ndev->mtu + ndev->hard_header_len +

0 commit comments

Comments
 (0)