summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-10-22 11:03:27 +1000
committerRusty Russell <rusty@rustcorp.com.au>2007-10-23 15:49:51 +1000
commit48245cc0708d49d1d0566b9fa617ad6c5f4c6934 (patch)
treeb396fd2d1ab185aab20894570e7e84bd4f656355 /drivers/net
parent3c6b5bfa3cf3b4057788e08482a468cc3bc00780 (diff)
Remove fixed limit on number of guests, and lguests array.
Back when we had all the Guest state in the switcher, we had a fixed array of them. This is no longer necessary. If we switch the network code to using random_ether_addr (46 bits is enough to avoid clashes), we can get rid of the concept of "guest id" altogether. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/lguest_net.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/lguest_net.c b/drivers/net/lguest_net.c
index abce2ee8430..e255476f224 100644
--- a/drivers/net/lguest_net.c
+++ b/drivers/net/lguest_net.c
@@ -463,12 +463,7 @@ static int lguestnet_probe(struct lguest_device *lgdev)
/* Ethernet defaults with some changes */
ether_setup(dev);
dev->set_mac_address = NULL;
-
- dev->dev_addr[0] = 0x02; /* set local assignment bit (IEEE802) */
- dev->dev_addr[1] = 0x00;
- memcpy(&dev->dev_addr[2], &lguest_data.guestid, 2);
- dev->dev_addr[4] = 0x00;
- dev->dev_addr[5] = 0x00;
+ random_ether_addr(dev->dev_addr);
dev->open = lguestnet_open;
dev->stop = lguestnet_close;