2002-04-04 06:55:54

by flaniganr

[permalink] [raw]
Subject: [PATCH] 2.5.8-pre1 wavelan_cs


not sure if i did this right, so if you
have any suggestions/comments please tell me.

Basically 2.5.8-pre1 fails to compile with:

In file included from wavelan_cs.c:59:
wavelan_cs.p.h:495:33: warning: extra tokens at end of #undef directive
wavelan_cs.c: In function `wv_pcmcia_config':
wavelan_cs.c:4480: structure has no member named `rmem_start'
wavelan_cs.c:4482: structure has no member named `rmem_end'
make[3]: *** [wavelan_cs.o] Error 1

due to the removal of rmem_{start,end} from net_device.
here is the patch [tested]:

diff -ru a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
--- a/drivers/net/wireless/wavelan_cs.c Tue Mar 19 05:37:16 2002
+++ b/drivers/net/wireless/wavelan_cs.c Thu Apr 4 13:17:43 2002
@@ -4383,6 +4383,7 @@
tuple_t tuple;
cisparse_t parse;
struct net_device * dev;
+ struct net_local * lp;
int i;
u_char buf[64];
win_req_t req;
@@ -4390,6 +4391,7 @@

handle = link->handle;
dev = (device *) link->priv;
+ lp = (net_local *)dev->priv;

#ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "->wv_pcmcia_config(0x%p)\n", link);
@@ -4477,9 +4479,9 @@
break;
}

- dev->rmem_start = dev->mem_start =
+ lp->rmem_start = dev->mem_start =
(u_long)ioremap(req.Base, req.Size);
- dev->rmem_end = dev->mem_end = dev->mem_start + req.Size;
+ lp->rmem_end = dev->mem_end = dev->mem_start + req.Size;

mem.CardOffset = 0; mem.Page = 0;
i = CardServices(MapMemPage, link->win, &mem);
diff -ru a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h
--- a/drivers/net/wireless/wavelan_cs.p.h Tue Mar 19 05:37:09 2002
+++ b/drivers/net/wireless/wavelan_cs.p.h Thu Apr 4 14:05:43 2002
@@ -638,6 +638,9 @@
int rfp; /* Last DMA machine receive pointer */
int overrunning; /* Receiver overrun flag */

+ unsigned long rmem_start;
+ unsigned long rmem_end;
+
#ifdef WIRELESS_EXT
iw_stats wstats; /* Wireless specific stats */
#endif




--

----


2002-04-04 07:12:48

by Robert Love

[permalink] [raw]
Subject: Re: [PATCH] 2.5.8-pre1 wavelan_cs

On Thu, 2002-04-04 at 01:54, [email protected] wrote:

> wavelan_cs.p.h:495:33: warning: extra tokens at end of #undef directive

Good ... and the attached patch will fix the warning wrt trailing tokens
after the undef.

Robert Love

diff -urN linux-2.5.8-pre1/drivers/net/wireless/wavelan_cs.p.h linux/drivers/net/wireless/wavelan_cs.p.h
--- linux-2.5.8-pre1/drivers/net/wireless/wavelan_cs.p.h Wed Apr 3 20:57:23 2002
+++ linux/drivers/net/wireless/wavelan_cs.p.h Thu Apr 4 02:06:49 2002
@@ -492,7 +492,7 @@
#undef DEBUG_RX_INFO /* Header of the transmitted packet */
#undef DEBUG_RX_FAIL /* Normal failure conditions */
#define DEBUG_RX_ERROR /* Unexpected conditions */
-#undef DEBUG_PACKET_DUMP 32 /* Dump packet on the screen */
+#undef DEBUG_PACKET_DUMP /* Dump packet on the screen */
#undef DEBUG_IOCTL_TRACE /* Misc call by Linux */
#undef DEBUG_IOCTL_INFO /* Various debug info */
#define DEBUG_IOCTL_ERROR /* What's going wrong */

2002-04-04 07:19:10

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] 2.5.8-pre1 wavelan_cs

diff -Nru a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
--- a/drivers/net/wireless/wavelan_cs.c Thu Apr 4 02:17:38 2002
+++ b/drivers/net/wireless/wavelan_cs.c Thu Apr 4 02:17:38 2002
@@ -4477,9 +4477,8 @@
break;
}

- dev->rmem_start = dev->mem_start =
- (u_long)ioremap(req.Base, req.Size);
- dev->rmem_end = dev->mem_end = dev->mem_start + req.Size;
+ dev->mem_start = (u_long)ioremap(req.Base, req.Size);
+ dev->mem_end = dev->mem_start + req.Size;

mem.CardOffset = 0; mem.Page = 0;
i = CardServices(MapMemPage, link->win, &mem);


Attachments:
patch (606.00 B)

2002-04-04 17:41:27

by Jean Tourrilhes

[permalink] [raw]
Subject: Re: [PATCH] 2.5.8-pre1 wavelan_cs

On Thu, Apr 04, 2002 at 02:18:45AM -0500, Jeff Garzik wrote:
> [email protected] wrote:
> > not sure if i did this right, so if you
> > have any suggestions/comments please tell me.
> >
> > Basically 2.5.8-pre1 fails to compile with:
> >
> > In file included from wavelan_cs.c:59:
> > wavelan_cs.p.h:495:33: warning: extra tokens at end of #undef directive
> > wavelan_cs.c: In function `wv_pcmcia_config':
> > wavelan_cs.c:4480: structure has no member named `rmem_start'
> > wavelan_cs.c:4482: structure has no member named `rmem_end'
> > make[3]: *** [wavelan_cs.o] Error 1
>
> not needed, just delete the unused references to rmem_{start,end}.
> (see attached patch)
>
> Jeff

Correct. It was just information displayed by ifconfig.
Jeff, will you take care of it or do you need an "official"
patch (I would just resend your patch + the one of Robert).
Thanks...

Jean

2002-04-04 19:25:45

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] 2.5.8-pre1 wavelan_cs

Jean Tourrilhes wrote:
> On Thu, Apr 04, 2002 at 02:18:45AM -0500, Jeff Garzik wrote:
>
>>[email protected] wrote:
>>
>>>not sure if i did this right, so if you
>>>have any suggestions/comments please tell me.
>>>
>>>Basically 2.5.8-pre1 fails to compile with:
>>>
>>>In file included from wavelan_cs.c:59:
>>>wavelan_cs.p.h:495:33: warning: extra tokens at end of #undef directive
>>>wavelan_cs.c: In function `wv_pcmcia_config':
>>>wavelan_cs.c:4480: structure has no member named `rmem_start'
>>>wavelan_cs.c:4482: structure has no member named `rmem_end'
>>>make[3]: *** [wavelan_cs.o] Error 1
>>>
>>not needed, just delete the unused references to rmem_{start,end}.
>>(see attached patch)
>>
>> Jeff
>>
>
> Correct. It was just information displayed by ifconfig.
> Jeff, will you take care of it or do you need an "official"
> patch (I would just resend your patch + the one of Robert).


I've already taken care of it, in fact :)

Jeff