Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96147375 authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller
Browse files

net: stmmac: xgmac: Only get SPH header len if available



Split Header length is only available when L34T == 0. Fix this by
correctly checking if L34T is zero before trying to get Header length.

Fixes: 67afd6d1 ("net: stmmac: Add Split Header support and enable it in XGMAC cores")
Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eeb9d745
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -288,6 +288,7 @@ static int dwxgmac2_get_rx_hash(struct dma_desc *p, u32 *hash,

static int dwxgmac2_get_rx_header_len(struct dma_desc *p, unsigned int *len)
{
	if (le32_to_cpu(p->des3) & XGMAC_RDES3_L34T)
		*len = le32_to_cpu(p->des2) & XGMAC_RDES2_HL;
	return 0;
}