linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / net / iseries_veth.c
index cdc1440..f0f04be 100644 (file)
@@ -56,6 +56,7 @@
  * number of packets outstanding to a remote partition at a time.
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/errno.h>
@@ -68,7 +69,6 @@
 #include <linux/delay.h>
 #include <linux/mm.h>
 #include <linux/ethtool.h>
-#include <linux/if_ether.h>
 
 #include <asm/abs_addr.h>
 #include <asm/iseries/mf.h>
@@ -1035,22 +1035,11 @@ static struct ethtool_ops ops = {
        .get_link = veth_get_link,
 };
 
-static struct net_device * __init veth_probe_one(int vlan,
-               struct vio_dev *vio_dev)
+static struct net_device * __init veth_probe_one(int vlan, struct device *vdev)
 {
        struct net_device *dev;
        struct veth_port *port;
-       struct device *vdev = &vio_dev->dev;
        int i, rc;
-       const unsigned char *mac_addr;
-
-       mac_addr = vio_get_attribute(vio_dev, "local-mac-address", NULL);
-       if (mac_addr == NULL)
-               mac_addr = vio_get_attribute(vio_dev, "mac-address", NULL);
-       if (mac_addr == NULL) {
-               veth_error("Unable to fetch MAC address from device tree.\n");
-               return NULL;
-       }
 
        dev = alloc_etherdev(sizeof (struct veth_port));
        if (! dev) {
@@ -1075,11 +1064,16 @@ static struct net_device * __init veth_probe_one(int vlan,
        }
        port->dev = vdev;
 
-       memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
+       dev->dev_addr[0] = 0x02;
+       dev->dev_addr[1] = 0x01;
+       dev->dev_addr[2] = 0xff;
+       dev->dev_addr[3] = vlan;
+       dev->dev_addr[4] = 0xff;
+       dev->dev_addr[5] = this_lp;
 
        dev->mtu = VETH_MAX_MTU;
 
-       memcpy(&port->mac_addr, mac_addr, ETH_ALEN);
+       memcpy(&port->mac_addr, dev->dev_addr, 6);
 
        dev->open = veth_open;
        dev->hard_start_xmit = veth_start_xmit;
@@ -1614,7 +1608,7 @@ static int veth_probe(struct vio_dev *vdev, const struct vio_device_id *id)
        struct net_device *dev;
        struct veth_port *port;
 
-       dev = veth_probe_one(i, vdev);
+       dev = veth_probe_one(i, &vdev->dev);
        if (dev == NULL) {
                veth_remove(vdev);
                return 1;
@@ -1647,7 +1641,7 @@ static int veth_probe(struct vio_dev *vdev, const struct vio_device_id *id)
  * support.
  */
 static struct vio_device_id veth_device_table[] __devinitdata = {
-       { "network", "IBM,iSeries-l-lan" },
+       { "vlan", "" },
        { "", "" }
 };
 MODULE_DEVICE_TABLE(vio, veth_device_table);