hostap 0.0.2 and 2.5.69

Pavel Roskin proski at gnu.org
Mon May 5 16:30:01 EDT 2003


On Mon, 5 May 2003, Andreas Jellinghaus wrote:

Sorry, posted too fast.  Better this patch.  No funky return in a void
function, and also "Driver unloaded" is printed after the fact.

Still, I'm not sure if we really want to track unstable kernels so
closely, especially since the driver still compiles and runs.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- driver/modules/hostap_cs.c
+++ driver/modules/hostap_cs.c
@@ -295,11 +295,13 @@ static struct prism2_helper_functions pr
 };
 
 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,68)
 static void cs_error(client_handle_t handle, int func, int ret)
 {
 	error_info_t err = { func, ret };
 	CardServices(ReportError, handle, &err);
 }
+#endif
 
 
 /* allocate local data and register with CardServices
@@ -720,6 +722,30 @@ static int prism2_event(event_t event, i
 }
 
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,67)
+static struct pcmcia_driver hostap_driver = {
+	.drv		= {
+		.name	= "hostap_cs",
+	},
+	.attach		= prism2_attach,
+	.detach		= prism2_detach,
+	.owner		= THIS_MODULE,
+};
+
+static int __init init_prism2_pccard(void)
+{
+	printk(KERN_INFO "%s: %s\n", dev_info, version);
+	return pcmcia_register_driver(&hostap_driver);
+}
+
+static void __exit exit_prism2_pccard(void)
+{
+	pcmcia_unregister_driver(&hostap_driver);
+	printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
+}
+
+#else
+
 static int __init init_prism2_pccard(void)
 {
 	servinfo_t serv;
@@ -750,6 +776,7 @@ static void __exit exit_prism2_pccard(vo
 
 	printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
 }
+#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2,5,67) */
 
 
 module_init(init_prism2_pccard);


More information about the HostAP mailing list