[Prism54-devel] Prism54 AP WPA using Hostap and WDS

Don Koch aardvark at krl.com
Sun Nov 7 17:35:09 UTC 2004


I found a similar problem with islpci_mgt.c.  If one uncomments the
-DCONFIG_PRISM54_HOSTAPD options in EXTRA_CFLAGS, a compile error and
link error occur.  Maybe one should be using dev_alloc_name(), not
dev_alloc(), which doesn't appear to exist?

Patches are against 2.6.8.1.

--- isl_ap.c.orig	2004-11-06 13:58:16.000000000 -0500
+++ isl_ap.c	2004-11-06 13:58:56.000000000 -0500
@@ -68,7 +68,7 @@
 	printk("isl_ap: create %s\n",aifname);
 	/* need to lock because double register_netdev calls */
 	rtnl_lock();
-	if (!(ap_dev = dev_alloc(aifname, &err))) {
+	if (!(err = dev_alloc_name(ap_dev, aifname))) {
 		return -1;
 	}
 	ap_dev->priv = kmalloc(sizeof(struct ap_net_local),GFP_KERNEL);

I also have been having kernel panics inside pimfor_decode_header().  The
following patch allows compilation (isl_ap.h is needed if HOSTAPD is used)
and is more robust about bad data.

--- islpci_mgt.c.orig	2004-11-05 18:44:57.000000000 -0500
+++ islpci_mgt.c	2004-11-06 12:40:04.000000000 -0500
@@ -32,6 +32,9 @@
 #include "islpci_mgt.h"
 #include "isl_oid.h"		/* additional types and defs for isl38xx fw */
 #include "isl_ioctl.h"
+#ifdef CONFIG_PRISM54_HOSTAPD
+#include "isl_ap.h"
+#endif
 
 #include <net/iw_handler.h>
 
@@ -85,6 +88,7 @@
 {
 	pimfor_header_t *h = data;
 
+	if (!data) return NULL;
 	while ((void *) h < data + len) {
 		if (h->flags & PIMFOR_FLAG_LITTLE_ENDIAN) {
 			le32_to_cpus(&h->oid);

-- 
Don Koch
http://www.krl.com/




More information about the Prism54-devel mailing list