diff options
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/Kconfig.net | 2 | ||||
-rw-r--r-- | arch/um/Kconfig.um | 8 | ||||
-rw-r--r-- | arch/um/drivers/net_kern.c | 26 | ||||
-rw-r--r-- | arch/um/include/shared/net_kern.h | 1 |
4 files changed, 15 insertions, 22 deletions
diff --git a/arch/um/Kconfig.net b/arch/um/Kconfig.net index 3160b1a5adb7..820a56f00332 100644 --- a/arch/um/Kconfig.net +++ b/arch/um/Kconfig.net | |||
@@ -157,7 +157,7 @@ config UML_NET_MCAST | |||
157 | 157 | ||
158 | config UML_NET_PCAP | 158 | config UML_NET_PCAP |
159 | bool "pcap transport" | 159 | bool "pcap transport" |
160 | depends on UML_NET && EXPERIMENTAL | 160 | depends on UML_NET |
161 | help | 161 | help |
162 | The pcap transport makes a pcap packet stream on the host look | 162 | The pcap transport makes a pcap packet stream on the host look |
163 | like an ethernet device inside UML. This is useful for making | 163 | like an ethernet device inside UML. This is useful for making |
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um index bf87f25eb2de..a7520c90f62d 100644 --- a/arch/um/Kconfig.um +++ b/arch/um/Kconfig.um | |||
@@ -45,8 +45,8 @@ config HOSTFS | |||
45 | say Y or M here; otherwise say N. | 45 | say Y or M here; otherwise say N. |
46 | 46 | ||
47 | config HPPFS | 47 | config HPPFS |
48 | tristate "HoneyPot ProcFS (EXPERIMENTAL)" | 48 | tristate "HoneyPot ProcFS" |
49 | depends on EXPERIMENTAL && PROC_FS | 49 | depends on PROC_FS |
50 | help | 50 | help |
51 | hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc | 51 | hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc |
52 | entries to be overridden, removed, or fabricated from the host. | 52 | entries to be overridden, removed, or fabricated from the host. |
@@ -96,7 +96,7 @@ config MAGIC_SYSRQ | |||
96 | unless you really know what this hack does. | 96 | unless you really know what this hack does. |
97 | 97 | ||
98 | config SMP | 98 | config SMP |
99 | bool "Symmetric multi-processing support (EXPERIMENTAL)" | 99 | bool "Symmetric multi-processing support" |
100 | default n | 100 | default n |
101 | depends on BROKEN | 101 | depends on BROKEN |
102 | help | 102 | help |
@@ -126,7 +126,7 @@ config NR_CPUS | |||
126 | default "32" | 126 | default "32" |
127 | 127 | ||
128 | config HIGHMEM | 128 | config HIGHMEM |
129 | bool "Highmem support (EXPERIMENTAL)" | 129 | bool "Highmem support" |
130 | depends on !64BIT && BROKEN | 130 | depends on !64BIT && BROKEN |
131 | default n | 131 | default n |
132 | help | 132 | help |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index b1314ebf1f72..d8926c303629 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -274,8 +274,8 @@ static void uml_net_poll_controller(struct net_device *dev) | |||
274 | static void uml_net_get_drvinfo(struct net_device *dev, | 274 | static void uml_net_get_drvinfo(struct net_device *dev, |
275 | struct ethtool_drvinfo *info) | 275 | struct ethtool_drvinfo *info) |
276 | { | 276 | { |
277 | strcpy(info->driver, DRIVER_NAME); | 277 | strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver)); |
278 | strcpy(info->version, "42"); | 278 | strlcpy(info->version, "42", sizeof(info->version)); |
279 | } | 279 | } |
280 | 280 | ||
281 | static const struct ethtool_ops uml_net_ethtool_ops = { | 281 | static const struct ethtool_ops uml_net_ethtool_ops = { |
@@ -293,8 +293,9 @@ static void uml_net_user_timer_expire(unsigned long _conn) | |||
293 | #endif | 293 | #endif |
294 | } | 294 | } |
295 | 295 | ||
296 | static int setup_etheraddr(char *str, unsigned char *addr, char *name) | 296 | static void setup_etheraddr(struct net_device *dev, char *str) |
297 | { | 297 | { |
298 | unsigned char *addr = dev->dev_addr; | ||
298 | char *end; | 299 | char *end; |
299 | int i; | 300 | int i; |
300 | 301 | ||
@@ -334,13 +335,12 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name) | |||
334 | addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], | 335 | addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], |
335 | addr[5]); | 336 | addr[5]); |
336 | } | 337 | } |
337 | return 0; | 338 | return; |
338 | 339 | ||
339 | random: | 340 | random: |
340 | printk(KERN_INFO | 341 | printk(KERN_INFO |
341 | "Choosing a random ethernet address for device %s\n", name); | 342 | "Choosing a random ethernet address for device %s\n", dev->name); |
342 | eth_random_addr(addr); | 343 | eth_hw_addr_random(dev); |
343 | return 1; | ||
344 | } | 344 | } |
345 | 345 | ||
346 | static DEFINE_SPINLOCK(devices_lock); | 346 | static DEFINE_SPINLOCK(devices_lock); |
@@ -392,7 +392,6 @@ static void eth_configure(int n, void *init, char *mac, | |||
392 | struct net_device *dev; | 392 | struct net_device *dev; |
393 | struct uml_net_private *lp; | 393 | struct uml_net_private *lp; |
394 | int err, size; | 394 | int err, size; |
395 | int random_mac; | ||
396 | 395 | ||
397 | size = transport->private_size + sizeof(struct uml_net_private); | 396 | size = transport->private_size + sizeof(struct uml_net_private); |
398 | 397 | ||
@@ -419,9 +418,9 @@ static void eth_configure(int n, void *init, char *mac, | |||
419 | */ | 418 | */ |
420 | snprintf(dev->name, sizeof(dev->name), "eth%d", n); | 419 | snprintf(dev->name, sizeof(dev->name), "eth%d", n); |
421 | 420 | ||
422 | random_mac = setup_etheraddr(mac, device->mac, dev->name); | 421 | setup_etheraddr(dev, mac); |
423 | 422 | ||
424 | printk(KERN_INFO "Netdevice %d (%pM) : ", n, device->mac); | 423 | printk(KERN_INFO "Netdevice %d (%pM) : ", n, dev->dev_addr); |
425 | 424 | ||
426 | lp = netdev_priv(dev); | 425 | lp = netdev_priv(dev); |
427 | /* This points to the transport private data. It's still clear, but we | 426 | /* This points to the transport private data. It's still clear, but we |
@@ -468,17 +467,12 @@ static void eth_configure(int n, void *init, char *mac, | |||
468 | init_timer(&lp->tl); | 467 | init_timer(&lp->tl); |
469 | spin_lock_init(&lp->lock); | 468 | spin_lock_init(&lp->lock); |
470 | lp->tl.function = uml_net_user_timer_expire; | 469 | lp->tl.function = uml_net_user_timer_expire; |
471 | memcpy(lp->mac, device->mac, sizeof(lp->mac)); | 470 | memcpy(lp->mac, dev->dev_addr, sizeof(lp->mac)); |
472 | 471 | ||
473 | if ((transport->user->init != NULL) && | 472 | if ((transport->user->init != NULL) && |
474 | ((*transport->user->init)(&lp->user, dev) != 0)) | 473 | ((*transport->user->init)(&lp->user, dev) != 0)) |
475 | goto out_unregister; | 474 | goto out_unregister; |
476 | 475 | ||
477 | /* don't use eth_mac_addr, it will not work here */ | ||
478 | memcpy(dev->dev_addr, device->mac, ETH_ALEN); | ||
479 | if (random_mac) | ||
480 | dev->addr_assign_type |= NET_ADDR_RANDOM; | ||
481 | |||
482 | dev->mtu = transport->user->mtu; | 476 | dev->mtu = transport->user->mtu; |
483 | dev->netdev_ops = ¨_netdev_ops; | 477 | dev->netdev_ops = ¨_netdev_ops; |
484 | dev->ethtool_ops = ¨_net_ethtool_ops; | 478 | dev->ethtool_ops = ¨_net_ethtool_ops; |
diff --git a/arch/um/include/shared/net_kern.h b/arch/um/include/shared/net_kern.h index 5c367f22595b..012ac87d4900 100644 --- a/arch/um/include/shared/net_kern.h +++ b/arch/um/include/shared/net_kern.h | |||
@@ -18,7 +18,6 @@ struct uml_net { | |||
18 | struct net_device *dev; | 18 | struct net_device *dev; |
19 | struct platform_device pdev; | 19 | struct platform_device pdev; |
20 | int index; | 20 | int index; |
21 | unsigned char mac[ETH_ALEN]; | ||
22 | }; | 21 | }; |
23 | 22 | ||
24 | struct uml_net_private { | 23 | struct uml_net_private { |