From: Jesse Millan <[EMAIL PROTECTED]>


ifrm_spc is a 4 bit wide bitfield. Trying to assign the 6 bit value 0x20
to it results in the compiler chopping off the first 2 bits and assigning
the remaining 4 bits (all zeros) to it. Similar story for slottim_low.

I don't think that was the intended purpose. I am not a driver writer,
but by comparing the comments by the assignment along with the code in a
similar driver (znet.c), it looks as if the assignment should be 0x2 not
0x20 i.e. 2*16 is "32 bit times the interframe spacing" not 32*16. 0x20
is 32*16, which seems to be 512 bit times the interframe spacing.

Signed-off-by: Jesse Millan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---
 wavelan_cs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: quilt/drivers/net/wireless/wavelan_cs.c
===================================================================
--- quilt.orig/drivers/net/wireless/wavelan_cs.c
+++ quilt/drivers/net/wireless/wavelan_cs.c
@@ -3604,8 +3604,8 @@ wv_82593_config(struct net_device *       dev)
   cfblk.lin_prio = 0;          /* conform to 802.3 backoff algoritm */
   cfblk.exp_prio = 5;          /* conform to 802.3 backoff algoritm */
   cfblk.bof_met = 1;           /* conform to 802.3 backoff algoritm */
-  cfblk.ifrm_spc = 0x20;       /* 32 bit times interframe spacing */
-  cfblk.slottim_low = 0x20;    /* 32 bit times slot time */
+  cfblk.ifrm_spc = 0x2;        /* 32 bit times interframe spacing */
+  cfblk.slottim_low = 0x2;     /* 32 bit times slot time */
   cfblk.slottim_hi = 0x0;
   cfblk.max_retr = 15;
   cfblk.prmisc = ((lp->promiscuous) ? TRUE: FALSE);    /* Promiscuous mode */

--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to