Commit efaca9a2 authored by Jochen Friedrich's avatar Jochen Friedrich Committed by Jeff Garzik

[tokenring smctr] fix MAC address input

After taking a second look, i just recognized that both cases (MAC adress
all-zero or not) are handled exactly the same (by duplicated code), so the
whole stuff is unnecessary.

The whole function just reduces to a simple copy loop:
parent 93e50e5e
......@@ -3063,28 +3063,12 @@ static int smctr_load_node_addr(struct net_device *dev)
unsigned int i;
__u8 r;
/* Check if node address has been specified by user. (non-0) */
for(i = 0; ((i < 6) && (dev->dev_addr[i] == 0)); i++)
{
if(i != 6)
{
for(i = 0; i < 6; i++)
{
r = inb(ioaddr + LAR0 + i);
dev->dev_addr[i] = (char)r;
}
dev->addr_len = 6;
}
else /* Node addr. not given by user, read it from board. */
{
for(i = 0; i < 6; i++)
{
r = inb(ioaddr + LAR0 + i);
dev->dev_addr[i] = (char)r;
}
dev->addr_len = 6;
}
}
return (0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment