drivers: eth_enc28j60: reverts part of 3722c64

Reverts part of 3722c643c9 commit.
Reverts dummy buffer and uses NULL pointers.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
This commit is contained in:
Andrei Gansari 2020-06-19 11:20:45 +03:00 committed by Maureen Helm
commit b65c0ad8d7

View file

@ -510,7 +510,6 @@ static int eth_enc28j60_rx(struct device *dev, uint16_t *vlan_tag)
struct eth_enc28j60_runtime *context = dev->driver_data;
uint16_t lengthfr;
uint8_t counter;
uint8_t dummy[4];
/* Errata 6. The Receive Packet Pending Interrupt Flag (EIR.PKTIF)
* does not reliably/accurately report the status of pending packet.
@ -601,13 +600,13 @@ static int eth_enc28j60_rx(struct device *dev, uint16_t *vlan_tag)
} while (frm_len > 0);
/* Let's pop the useless CRC */
eth_enc28j60_read_mem(dev, dummy, 4);
eth_enc28j60_read_mem(dev, NULL, 4);
/* Pops one padding byte from spi circular buffer
* introduced by the device when the frame length is odd
*/
if (lengthfr & 0x01) {
eth_enc28j60_read_mem(dev, dummy, 1);
eth_enc28j60_read_mem(dev, NULL, 1);
}
#if defined(CONFIG_NET_VLAN)