1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

drivers/w5100: set src addr to known state

This commit is contained in:
Hauke Petersen 2016-11-16 17:44:26 +01:00
parent c833a82f03
commit efb7e8a3ba

View File

@ -180,6 +180,13 @@ static int init(netdev2_t *netdev)
wreg(dev, S0_MR, MR_MACRAW);
wreg(dev, S0_CR, CR_OPEN);
/* set the source IP address to something random to prevent the device to do
* stupid thing (e.g. answering ICMP echo requests on its own) */
wreg(dev, REG_SIPR0, 0x01);
wreg(dev, REG_SIPR1, 0x01);
wreg(dev, REG_SIPR2, 0x01);
wreg(dev, REG_SIPR3, 0x01);
/* start receiving packets */
wreg(dev, S0_CR, CR_RECV);