patch-2.4.0-test3 linux/drivers/net/hamradio/baycom_par.c

Next file: linux/drivers/net/hamradio/baycom_ser_fdx.c
Previous file: linux/drivers/net/epic100.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/drivers/net/hamradio/baycom_par.c linux/drivers/net/hamradio/baycom_par.c
@@ -63,6 +63,7 @@
  *   0.7  10.08.1999  Check if parport can do SPP and is safe to access during interrupt contexts
  *   0.8  12.02.2000  adapted to softnet driver interface
  *                    removed direct parport access, uses parport driver methods
+ *   0.9  03.07.2000  fix interface name handling
  */
 
 /*****************************************************************************/
@@ -101,7 +102,7 @@
 
 static const char bc_drvname[] = "baycom_par";
 static const char bc_drvinfo[] = KERN_INFO "baycom_par: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
-KERN_INFO "baycom_par: version 0.8 compiled " __TIME__ " " __DATE__ "\n";
+KERN_INFO "baycom_par: version 0.9 compiled " __TIME__ " " __DATE__ "\n";
 
 /* --------------------------------------------------------------------- */
 
@@ -512,14 +513,15 @@
 	 */
 	for (i = 0; i < NR_PORTS; i++) {
 		struct net_device *dev = baycom_device+i;
-		sprintf(dev->name, "bcp%d", i);
+		char ifname[IFNAMSIZ];
 
+		sprintf(ifname, "bcp%d", i);
 		if (!mode[i])
 			set_hw = 0;
 		if (!set_hw)
 			iobase[i] = 0;
 		j = hdlcdrv_register_hdlcdrv(dev, &par96_ops, sizeof(struct baycom_state),
-					     dev->name, iobase[i], 0, 0);
+					     ifname, iobase[i], 0, 0);
 		if (!j) {
 			bc = (struct baycom_state *)dev->priv;
 			if (set_hw && baycom_setmode(bc, mode[i]))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)