X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fnet%2Fmeth.c;h=0b32648a213600fcecae9eda9496a63c996b1768;hb=6f97b220f414e3599ea5374905ba6d0dc47d63b0;hp=0c89b028a80c5f04c7b1ca0cdfe3ff62f6b974ce;hpb=160acc2e899f26356bde92bc257253b7ca78f0c3;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/meth.c b/drivers/net/meth.c index 0c89b028a80..0b32648a213 100644 --- a/drivers/net/meth.c +++ b/drivers/net/meth.c @@ -95,11 +95,14 @@ static inline void load_eaddr(struct net_device *dev) { int i; DECLARE_MAC_BUF(mac); + u64 macaddr; - for (i = 0; i < 6; i++) - dev->dev_addr[i] = o2meth_eaddr[i]; DPRINTK("Loading MAC Address: %s\n", print_mac(mac, dev->dev_addr)); - mace->eth.mac_addr = (*(unsigned long*)o2meth_eaddr) >> 16; + macaddr = 0; + for (i = 0; i < 6; i++) + macaddr |= dev->dev_addr[i] << ((5 - i) * 8); + + mace->eth.mac_addr = macaddr; } /* @@ -794,6 +797,7 @@ static int __init meth_probe(struct platform_device *pdev) #endif dev->irq = MACE_ETHERNET_IRQ; dev->base_addr = (unsigned long)&mace->eth; + memcpy(dev->dev_addr, o2meth_eaddr, 6); priv = netdev_priv(dev); spin_lock_init(&priv->meth_lock); @@ -826,6 +830,7 @@ static struct platform_driver meth_driver = { .remove = __devexit_p(meth_remove), .driver = { .name = "meth", + .owner = THIS_MODULE, } }; @@ -851,3 +856,4 @@ module_exit(meth_exit_module); MODULE_AUTHOR("Ilya Volynets "); MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:meth");