mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
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: 67afd6d1cf
("net: stmmac: Add Split Header support and enable it in XGMAC cores")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
eeb9d74516
commit
96147375d4
1 changed files with 2 additions and 1 deletions
|
@ -288,7 +288,8 @@ 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)
|
||||
{
|
||||
*len = le32_to_cpu(p->des2) & XGMAC_RDES2_HL;
|
||||
if (le32_to_cpu(p->des3) & XGMAC_RDES3_L34T)
|
||||
*len = le32_to_cpu(p->des2) & XGMAC_RDES2_HL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue