Re: ipw2100 wireless driver

From: Tomas Szepe
Date: Mon Aug 09 2004 - 15:39:07 EST


On Jul-14 2004, Wed, 13:55 +0200
Pavel Machek <pavel@xxxxxxx> wrote:

> > >What is the status of ipw2100? Is there chance that it would be pushed
> > >into mainline?
> > >
> > >I have few problems with that:
> > >
> > >* it will not compile with gcc-2.95. Attached patch fixes one problem
> > >but more remain.
> >
> > I've given up hope on that. Don't think it'll ever compile on 2.95. I'm
> > using ndiswrapper and it works nicely.
>
> No, I think that can be fixed... I'll rather fix ipw2100 than use
> ndiswrapper.

ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box."
Also make sure to use the attached patch for 2.6.8pre.

--
Tomas Szepe <szepe@xxxxxxxxxxxxxxx>


diff -urN linux-2.6.7/drivers/net/wireless/ipw2100/ipw2100_fw.c linux-2.6.7.x/drivers/net/wireless/ipw2100/ipw2100_fw.c
--- linux-2.6.7/drivers/net/wireless/ipw2100/ipw2100_fw.c 2004-08-09 21:37:11.000000000 +0200
+++ linux-2.6.7.x/drivers/net/wireless/ipw2100/ipw2100_fw.c 2004-08-09 21:36:15.000000000 +0200
@@ -200,7 +200,7 @@
goto fail;

}
- if (read(fd, c->buf, c->len) != c->len) {
+ if (sys_read(fd, c->buf, c->len) != c->len) {
printk(KERN_INFO "Failed to read chunk firmware "
"chunk %d.\n", i);
goto fail;
@@ -231,17 +231,17 @@
INIT_LIST_HEAD(&fw->fw.chunk_list);
INIT_LIST_HEAD(&fw->uc.chunk_list);

- fd = open(fn, 0, 0);
+ fd = sys_open(fn, 0, 0);
if (fd == -1) {
printk(KERN_INFO "Unable to load '%s'.\n", fn);
return 1;
}
- l = lseek(fd, 0L, 2);
- lseek(fd, 0L, 0);
+ l = sys_lseek(fd, 0L, 2);
+ sys_lseek(fd, 0L, 0);

IPW2100_DEBUG_FW("Loading %ld bytes for firmware '%s'\n", l, fn);

- if (read(fd, (char *)&h, sizeof(h)) != sizeof(h)) {
+ if (sys_read(fd, (char *)&h, sizeof(h)) != sizeof(h)) {
printk(KERN_INFO "Failed to read '%s'.\n", fn);
goto fail;
}
@@ -262,12 +262,12 @@
if (ipw2100_fw_load(fd, &fw->uc, h.uc_size))
goto fail;

- close(fd);
+ sys_close(fd);
return 0;

fail:
ipw2100_fw_free(fw);
- close(fd);
+ sys_close(fd);
return 1;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/