hostap 0.0.2 and 2.5.69

Pavel Roskin proski at gnu.org
Mon May 5 16:22:23 EDT 2003


On Mon, 5 May 2003, Andreas Jellinghaus wrote:

> I added -I$(KERNEL_PATH)/include/asm/mach-default
> to INCLUDES, because irq.h needs to find irq_vectors.h.

You shouldn't need it.  I've just tested hostap 0.0.2 and Linux 2.5.69,
and this is not necessary.  I guess you are doing something differently
from the rest of us.  Maybe the kernel is not configured yet?  Maybe the
new kernel is not installed yet?  Maybe the modules are not installed?

> driver/modules/hostap_cs.c
> driver/modules/hostap_cs.c:300: warning: static declaration for
> `cs_error' follows non-static
>
> cs_error is also defined in pcmcia/ds.h (part of the kernel headers).

Yes, it's new.  It wasn't there in 2.5.68.  We can track all little
changes in 2.5.x kernels, but there are more changes to come, and I
didn't want to waste Jouni's time on that.

OK, since users are concerned, here's the patch.  HostAP will use the new
API to register and unregister the module starting with version 2.5.68
(the old API will be removed before 2.6) and cs_error won't be redefined
for 2.5.69 and above.

-- 
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)
+{
+	printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
+	return pcmcia_unregister_driver(&hostap_driver);
+}
+
+#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