Skip to content

Commit 9d5070e

Browse files
dberlinjannau
authored andcommitted
[brcmfmac] Don't issue wrong insufficient headroom warning
We may just have had to clone a packet, and not actually have run out of headroom. Only issue warning about headroom when we actually ran out of headroom. This removes useless spam about needing 0 more bytes of headroom. Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
1 parent d6e6827 commit 9d5070e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,11 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
326326
/* Make sure there's enough writeable headroom */
327327
if (skb_headroom(skb) < drvr->hdrlen || skb_header_cloned(skb)) {
328328
head_delta = max_t(int, drvr->hdrlen - skb_headroom(skb), 0);
329-
330-
brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n",
331-
brcmf_ifname(ifp), head_delta);
329+
/* Don't warn unless we actually ran out of headroom vs
330+
had to clone.*/
331+
if (head_delta != 0)
332+
brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n",
333+
brcmf_ifname(ifp), head_delta);
332334
atomic_inc(&drvr->bus_if->stats.pktcowed);
333335
ret = pskb_expand_head(skb, ALIGN(head_delta, NET_SKB_PAD), 0,
334336
GFP_ATOMIC);

0 commit comments

Comments
 (0)