Skip to content

Commit 9330391

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 68f6517 commit 9330391

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

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

699-
ndev->hard_header_len += drvr->hdrlen;
699+
ndev->needed_headroom += drvr->hdrlen;
700700
ndev->ethtool_ops = &brcmf_ethtool_ops;
701701

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

0 commit comments

Comments
 (0)