patch-1.3.38 linux/drivers/net/net_init.c

Next file: linux/drivers/net/pi2.c
Previous file: linux/drivers/net/ne.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.37/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
@@ -18,6 +18,8 @@
 		
 	Modifications by Wolfgang Walter
 		Use dev_close cleanly so we always shut things down tidily.
+		
+	Changed 29/10/95, Alan Cox to pass sockaddr's around for mac addresses.
 */
 
 #include <linux/config.h>
@@ -130,13 +132,11 @@
 }
 
 
-static int eth_mac_addr(struct device *dev, void * addr)
+static int eth_mac_addr(struct device *dev, struct sockaddr *addr)
 {
-	struct ifreq * ifr = (struct ifreq *) addr;
-
 	if(dev->start)
 		return -EBUSY;
-	memcpy(dev->dev_addr, ifr->ifr_hwaddr.sa_data,dev->hard_header_len);
+	memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
 	return 0;
 }
 
@@ -247,6 +247,7 @@
 			for (i = 0; i < MAX_ETH_CARDS; ++i)
 				if (ethdev_index[i] == NULL) {
 					sprintf(dev->name, "eth%d", i);
+					printk("loading device '%s'...\n", dev->name);
 					ethdev_index[i] = dev;
 					break;
 				}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this