]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: dec: tulip: Fix length mask in receive length calculation
authorMoritz Fischer <mdf@kernel.org>
Tue, 4 Feb 2020 23:01:18 +0000 (15:01 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Feb 2020 13:21:31 +0000 (14:21 +0100)
commit2f5ae8c3f68aca5f497dd18b23cf5dc6dbefd9a9
treed6a1cb4363e7c15cf6ad8772ee9aaeeffbe2f94e
parent6319eba2b7f2976ae2ec6d72b6b9308a680667d7
net: ethernet: dec: tulip: Fix length mask in receive length calculation

The receive frame length calculation uses a wrong mask to calculate the
length of the received frames.

Per spec table 4-1 the length is contained in the FL (Frame Length)
field in bits 30:16.

This didn't show up as an issue so far since frames were limited to
1500 bytes which falls within the 11 bit window.

Signed-off-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dec/tulip/de2104x.c