1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

Merge pull request #6133 from haukepetersen/fix_w5100_srcaddr

drivers/w5100: set src addr to known state
This commit is contained in:
Martine Lenders 2016-11-16 23:21:38 +01:00 committed by GitHub
commit fa8861069a

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);