[Prism54-devel] Prism54 AP WPA using Hostap and WDS
Luis R. Rodriguez
mcgrof at ruslug.rutgers.edu
Mon Nov 8 16:11:35 UTC 2004
On Sun, Nov 07, 2004 at 12:35:09PM -0500, Don Koch wrote:
> 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);
>
Thanks Don, I've checked and dev_alloc has been deprecated in 2.5 tree
since last year. dev_alloc_name looks sane and is used by other drivers.
> 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>
>
This I forgot to include thanks I've added this.
> @@ -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);
>
Good catch. I've committed this works as well. If anyone is confused of
the changes, just check the ChangeLog.
Luis
--
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E
More information about the Prism54-devel
mailing list