drivers: eth_enc28j60: fix calculation of frame length
Fix calculation of frame length in eth_enc28j60_rx(). The calculation was incorrect because the CRC size was subtracted only from the lower byte. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
1f74e0b1f7
commit
5d14f94c73
1 changed files with 1 additions and 1 deletions
|
@ -533,7 +533,7 @@ static int eth_enc28j60_rx(struct device *dev)
|
|||
/* Get the frame length from the rx status vector,
|
||||
* minus CRC size at the end which is always present
|
||||
*/
|
||||
frm_len = (info[1] << 8) | (info[0] - 4);
|
||||
frm_len = sys_get_le16(info) - 4;
|
||||
lengthfr = frm_len;
|
||||
|
||||
/* Get the frame from the buffer */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue