Skip to contentSkip to conversation

2.4.4-ac11 aironet fixes

PATCH In review Andrzej Krzysztofowicz 2 participants 2 messages May 19, 2001 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.4-ac11 aironet fixes

Hi,

The following patch fixes aironet drivers. It contains
- fixed Config.in to disable non-working configurations (PNP without isapnp, built-in ISA or I365)
- marked __init/__devinit/__devinitdata some initial code/variables
- disable (#if 0) currently unused function (awc4500_pnp_hw_reset)
- version printing fixes
- long delay fixes (udelay()->mdelay())
- added MODULE_PARM_DESC
- functions with local onlu use marked static
- removes duplicated version string from PCMCIA driver.

Andrzej

drivers/net/Config.in +7 -3
diff -ur linux-2.4.4-ac11/drivers/net/Config.in linux/drivers/net/Config.in
@@ -260,10 +260,14 @@
    tristate '  Aironet 4500/4800 series adapters' CONFIG_AIRONET4500
    dep_tristate '   Aironet 4500/4800 ISA/PCI/PNP/365 support ' CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500
    if [ "$CONFIG_AIRONET4500" != "n" -a "$CONFIG_AIRONET4500_NONCS" != "n" ]; then
-      bool '     Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+      if [ "$CONFIG_AIRONET4500_NONCS" = "m" -a "$CONFIG_ISAPNP" = "m" -o "$CONFIG_ISAPNP" = "y" ]; then
+	 bool '     Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+      fi
       dep_bool '     Aironet 4500/4800 PCI support ' CONFIG_AIRONET4500_PCI $CONFIG_PCI
-      dep_bool '     Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
-      dep_bool '     Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+      if [ "$CONFIG_AIRONET4500_NONCS" = "m" ]; then
+	 dep_bool '     Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
+	 dep_bool '     Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+      fi
    fi
    dep_tristate '   Aironet 4500/4800 PROC interface ' CONFIG_AIRONET4500_PROC $CONFIG_AIRONET4500 m
 
drivers/net/aironet4500_card.c +47 -37

245 lines not on this page · raw message

drivers/net/aironet4500_core.c +12 -6
diff -ur linux-2.4.4-ac11/drivers/net/aironet4500_core.c linux/drivers/net/aironet4500_core.c
@@ -2537,8 +2537,8 @@
 
 };
 
-static const char *aironet4500_core_version =
-"aironet4500.c v0.1 1/1/99 Elmer Joandi, [email protected].\n";
+static char aironet4500_core_version[] __initdata =
+	KERN_INFO "aironet4500_core.c v0.1 1/1/99 Elmer Joandi, [email protected].\n";
 
 struct net_device * aironet4500_devices[MAX_AWCS];
 
@@ -2566,7 +2566,7 @@
 MODULE_PARM(awc_debug,"i");
 MODULE_PARM(tx_rate,"i");
 MODULE_PARM(channel,"i");
-MODULE_PARM(tx_full_rate,"i");
+//MODULE_PARM(tx_full_rate,"i");
 MODULE_PARM(adhoc,"i");
 MODULE_PARM(master,"i");
 MODULE_PARM(slave,"i");
@@ -2575,6 +2575,12 @@
 MODULE_PARM(large_buff_mem,"i");
 MODULE_PARM(small_buff_no,"i");
 MODULE_PARM(SSID,"c33");
+MODULE_PARM_DESC(awc_debug,"Aironet debug mask");
+MODULE_PARM_DESC(channel,"Aironet ");
+MODULE_PARM_DESC(adhoc,"Aironet Access Points not available (0-1)");
+MODULE_PARM_DESC(master,"Aironet is Adhoc master (creates network sync) (0-1)");
+MODULE_PARM_DESC(slave,"Aironet is Adhoc slave (0-1)");
+MODULE_PARM_DESC(max_mtu,"Aironet MTU limit (256-2312)");
 #endif
 
 /*EXPORT_SYMBOL(tx_queue_len);
@@ -3209,18 +3215,18 @@
 	return 0;
 };
 
-static int aironet_core_init(void)
+static int __init aironet_core_init(void)
 {
 //	unsigned long flags;
 
 		
-	printk(KERN_INFO"%s", aironet4500_core_version);
+	printk(aironet4500_core_version);
 	return 0;
 	
 
 }
 
-static void aironet_core_exit(void)
+static void __exit aironet_core_exit(void)
 {
 	printk(KERN_INFO "aironet4500 unloading core module \n");
 
drivers/net/aironet4500_proc.c +1 -1
diff -ur linux-2.4.4-ac11/drivers/net/aironet4500_proc.c linux/drivers/net/aironet4500_proc.c
@@ -1,5 +1,5 @@
 /*
- *	 Aironet 4500 Pcmcia driver
+ *	 Aironet 4500 /proc interface
  *
  *		Elmer Joandi, Januar 1999
  *	Copyright GPL
drivers/net/pcmcia/aironet4500_cs.c +3 -8
diff -uNr linux-2.4.4-ac11/drivers/net/pcmcia/aironet4500_cs.c linux/drivers/net/pcmcia/aironet4500_cs.c
@@ -10,10 +10,6 @@
  *
  */
 
-static const char *awc_version =
-"aironet4500_cs.c v0.1 1/1/99 Elmer Joandi, [email protected].\n";
-
-
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -50,6 +46,8 @@
 
 #include "../aironet4500.h"
 
+static const char awc_version[] =
+KERN_INFO "aironet4500_cs.c v0.1 1/1/99 Elmer Joandi, [email protected].\n";
 
 static u_int irq_mask = 0x5eF8;
 static int 	awc_ports[] = {0x140,0x100,0xc0, 0x80 };
@@ -65,8 +63,6 @@
 static int pc_debug = PCMCIA_DEBUG;
 MODULE_PARM(pc_debug, "i");
 #define PC_DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version =
-"aironet4500_cs.c v0.1 1/1/99 Elmer Joandi, [email protected].\n";
 #else
 #define PC_DEBUG(n, args...)
 #endif
@@ -615,8 +611,7 @@
 	servinfo_t serv;
 
 	/* Always emit the version, before any failure. */
-	printk(KERN_INFO"%s", awc_version);
-	PC_DEBUG(0, "%s\n", version);
+	printk(awc_version);
 	CardServices(GetCardServicesInfo, &serv);
 	if (serv.Revision != CS_RELEASE_CODE) {
 		printk(KERN_NOTICE "awc_cs: Card Services release "
Signature · 4 lines
=======================================================================
  Andrzej M. Krzysztofowicz               [email protected]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
#1 lore raw

Patch looks generally ok.

Comments:
* you forgot to cc Elmer Joandi, the maintainer, who wakes up every now and then :)
* When is aironet4500_card version string printed, for the modular case?
* did you actually trace the code paths to mark sure code marked __init was never called by the pcmcia hotplug part of the code? I just want to make sure you didn't mark them __init due to an assumption based on function name.

Signature · 3 lines
Jeff Garzik      | "Do you have to make light of everything?!"
Building 1024    | "I'm extremely serious about nailing your
MandrakeSoft     |  step-daughter, but other than that, yes."