* ipw2100 wireless driver
@ 2004-07-14 11:41 Pavel Machek
2004-07-14 11:48 ` Jeff Chua
` (2 more replies)
0 siblings, 3 replies; 43+ messages in thread
From: Pavel Machek @ 2004-07-14 11:41 UTC (permalink / raw)
To: netdev, kernel list
Hi!
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.
--- ipw2100-ofic/ieee80211.h 2004-07-09 06:32:17.000000000 +0200
+++ ipw2100-0.49/ieee80211.h 2004-07-14 13:18:50.000000000 +0200
@@ -440,7 +440,7 @@
u16 reserved;
u16 frag_size;
u16 payload_size;
- struct sk_buff *fragments[];
+ struct sk_buff *fragments[1];
};
extern struct ieee80211_txb *ieee80211_skb_to_txb(struct ieee80211_device *ieee,
* it requires CONFIG_CRYPTO, but fails to force it in Kconfig.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 43+ messages in thread* Re: ipw2100 wireless driver 2004-07-14 11:41 ipw2100 wireless driver Pavel Machek @ 2004-07-14 11:48 ` Jeff Chua 2004-07-14 11:55 ` Pavel Machek 2004-07-14 12:30 ` Tomas Szepe 2004-07-14 12:27 ` Pavel Machek 2004-07-14 13:15 ` Vojtech Pavlik 2 siblings, 2 replies; 43+ messages in thread From: Jeff Chua @ 2004-07-14 11:48 UTC (permalink / raw) To: Pavel Machek; +Cc: netdev, kernel list On Wed, 14 Jul 2004, Pavel Machek wrote: > Hi! > > 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. Jeff. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 11:48 ` Jeff Chua @ 2004-07-14 11:55 ` Pavel Machek 2004-07-14 14:53 ` Éric Brunet 2004-08-09 20:15 ` Tomas Szepe 2004-07-14 12:30 ` Tomas Szepe 1 sibling, 2 replies; 43+ messages in thread From: Pavel Machek @ 2004-07-14 11:55 UTC (permalink / raw) To: Jeff Chua; +Cc: netdev, kernel list Hi! > >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. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 11:55 ` Pavel Machek @ 2004-07-14 14:53 ` Éric Brunet 2004-07-14 15:24 ` Emiliano 'AlberT' Gabrielli 2004-08-09 20:15 ` Tomas Szepe 1 sibling, 1 reply; 43+ messages in thread From: Éric Brunet @ 2004-07-14 14:53 UTC (permalink / raw) To: linux-kernel >> >What is the status of ipw2100? Is there chance that it would be pushed >> >into mainline? For your information, I am very happy with that module; I installed the rpm from atrpms.net on my Fedora Core 2, ran the GUI to set up the interface, ifup eth1 and it worked on the first try. No recompile, no fiddle with configuration files, I couldn't believe it and was very impressed. I am not using the wifi card very often, but it works with no glitch each time I try it. It would really be a pity that the authors of the module get discouraged and stop developping it. (Computer is an ASUS S5200N; everything on that computer including lspci output on https://systemausfall.org/~phil/s5n.html) Éric Brunet ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 14:53 ` Éric Brunet @ 2004-07-14 15:24 ` Emiliano 'AlberT' Gabrielli 0 siblings, 0 replies; 43+ messages in thread From: Emiliano 'AlberT' Gabrielli @ 2004-07-14 15:24 UTC (permalink / raw) To: linux-kernel On 16:53, mercoledì 14 luglio 2004, Éric Brunet wrote: > >> >What is the status of ipw2100? Is there chance that it would be pushed > >> >into mainline? > > For your information, I am very happy with that module; I installed the > rpm from atrpms.net on my Fedora Core 2, ran the GUI to set up the > interface, ifup eth1 and it worked on the first try. No recompile, no > fiddle with configuration files, I couldn't believe it and was very > impressed. I am not using the wifi card very often, but it works with no > glitch each time I try it. > > It would really be a pity that the authors of the module get discouraged > and stop developping it. > > (Computer is an ASUS S5200N; everything on that computer including lspci > output on https://systemausfall.org/~phil/s5n.html) I'm using debian SID package, rebuilt against my 2.6.7-vanilla ... it works fine fom me too... -- <?php echo ' Emiliano `AlberT` Gabrielli '."\n". ' E-Mail: AlberT_AT_SuperAlberT_it '."\n". ' Web: http://SuperAlberT.it '."\n". ' IRC: #php,#AES azzurra.com '."\n".'ICQ: 158591185'; ?> ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 11:55 ` Pavel Machek 2004-07-14 14:53 ` Éric Brunet @ 2004-08-09 20:15 ` Tomas Szepe 2004-08-10 5:02 ` Jeff Chua 1 sibling, 1 reply; 43+ messages in thread From: Tomas Szepe @ 2004-08-09 20:15 UTC (permalink / raw) To: Pavel Machek; +Cc: Jeff Chua, netdev, kernel list On Jul-14 2004, Wed, 13:55 +0200 Pavel Machek <pavel@suse.cz> 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@pinerecords.com> 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; } ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-09 20:15 ` Tomas Szepe @ 2004-08-10 5:02 ` Jeff Chua 2004-08-10 6:55 ` Christoph Hellwig 0 siblings, 1 reply; 43+ messages in thread From: Jeff Chua @ 2004-08-10 5:02 UTC (permalink / raw) To: Tomas Szepe; +Cc: Pavel Machek, Jeff Chua, netdev, kernel list On Mon, 9 Aug 2004, Tomas Szepe wrote: > ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." Well, this is really good news! I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. Looks good. Thanks, Jeff ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-10 5:02 ` Jeff Chua @ 2004-08-10 6:55 ` Christoph Hellwig 2004-08-10 10:16 ` Pavel Machek 0 siblings, 1 reply; 43+ messages in thread From: Christoph Hellwig @ 2004-08-10 6:55 UTC (permalink / raw) To: Jeff Chua; +Cc: Tomas Szepe, Pavel Machek, netdev, kernel list On Tue, Aug 10, 2004 at 01:02:07PM +0800, Jeff Chua wrote: > > On Mon, 9 Aug 2004, Tomas Szepe wrote: > > > ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." > > Well, this is really good news! > > I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my > IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. Btw, any vounteer for merging the hostap-based generic ieee80211_* files from the ipw2100 driver with the hostap driver in the wireless-2.6 tree? ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-10 6:55 ` Christoph Hellwig @ 2004-08-10 10:16 ` Pavel Machek 2004-08-10 10:34 ` Christoph Hellwig 2004-08-11 10:16 ` James Ketrenos 0 siblings, 2 replies; 43+ messages in thread From: Pavel Machek @ 2004-08-10 10:16 UTC (permalink / raw) To: Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list Hi! > > > ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." > > > > Well, this is really good news! > > > > I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my > > IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. > > Btw, any vounteer for merging the hostap-based generic ieee80211_* files > from the ipw2100 driver with the hostap driver in the wireless-2.6 tree? I know very little about wireless-2.6 tree (where to get it without bitkeeper?), but... task is to take ipw2100 driver, drop ieee80211_* files from it, and make it work with ieee80211* files from wireless-2.6? Pavel -- Horseback riding is like software... ...vgf orggre jura vgf serr. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-10 10:16 ` Pavel Machek @ 2004-08-10 10:34 ` Christoph Hellwig 2004-08-11 12:17 ` Pavel Machek 2004-08-11 10:16 ` James Ketrenos 1 sibling, 1 reply; 43+ messages in thread From: Christoph Hellwig @ 2004-08-10 10:34 UTC (permalink / raw) To: Pavel Machek; +Cc: Jeff Chua, Tomas Szepe, netdev, kernel list On Tue, Aug 10, 2004 at 12:16:40PM +0200, Pavel Machek wrote: > I know very little about wireless-2.6 tree (where to get it without > bitkeeper?), but... http://gkernel.bkbits.net:8080/wireless-2.6 it the bkweb interface, that's the only thing I've looked at myself so far. > task is to take ipw2100 driver, drop ieee80211_* files from it, and > make it work with ieee80211* files from wireless-2.6? there's no ieee80211_* files in the wireless-2.6 tree, the code is part of hostap_* and btw, I think hostap_* is the wrong name for the prism-specific files, too. I'd rather call those prism2_* or something. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-10 10:34 ` Christoph Hellwig @ 2004-08-11 12:17 ` Pavel Machek 2004-08-11 17:54 ` Jeff Garzik 0 siblings, 1 reply; 43+ messages in thread From: Pavel Machek @ 2004-08-11 12:17 UTC (permalink / raw) To: Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list Hi! > > I know very little about wireless-2.6 tree (where to get it without > > bitkeeper?), but... > > http://gkernel.bkbits.net:8080/wireless-2.6 it the bkweb interface, that's > the only thing I've looked at myself so far. Hmm, strange, one merge in last 8 weeks. That's not too active project. Are you sure this is the right tree to work against? Are there plain diffs somewhere? Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 12:17 ` Pavel Machek @ 2004-08-11 17:54 ` Jeff Garzik 2004-08-11 20:27 ` Pavel Machek 0 siblings, 1 reply; 43+ messages in thread From: Jeff Garzik @ 2004-08-11 17:54 UTC (permalink / raw) To: Pavel Machek Cc: Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list, Jouni Malinen Pavel Machek wrote: > Hmm, strange, one merge in last 8 weeks. That's not too active > project. Are you sure this is the right tree to work against? It's the right tree, but wireless development hasn't coalesced yet on that tree it appears. It sounds like the Intel folks are interested in working on that tree, and others have mentioned they are interested as well. Waiting for people step up, and put their code where their mouth is... Jeff ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 17:54 ` Jeff Garzik @ 2004-08-11 20:27 ` Pavel Machek 2004-08-11 22:01 ` Jeff Garzik 0 siblings, 1 reply; 43+ messages in thread From: Pavel Machek @ 2004-08-11 20:27 UTC (permalink / raw) To: Jeff Garzik Cc: Pavel Machek, Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list, Jouni Malinen Hi! > >Hmm, strange, one merge in last 8 weeks. That's not too active > >project. Are you sure this is the right tree to work against? > > > It's the right tree, but wireless development hasn't coalesced yet on > that tree it appears. It sounds like the Intel folks are interested > in working on that tree, and others have mentioned they are > interested as well. Is there way to access that tree without bk? Daily patches maybe? -- 64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 20:27 ` Pavel Machek @ 2004-08-11 22:01 ` Jeff Garzik 0 siblings, 0 replies; 43+ messages in thread From: Jeff Garzik @ 2004-08-11 22:01 UTC (permalink / raw) To: Pavel Machek Cc: Pavel Machek, Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list, Jouni Malinen Pavel Machek wrote: > Hi! > > >>>Hmm, strange, one merge in last 8 weeks. That's not too active >>>project. Are you sure this is the right tree to work against? >> >> >>It's the right tree, but wireless development hasn't coalesced yet on >>that tree it appears. It sounds like the Intel folks are interested >>in working on that tree, and others have mentioned they are >>interested as well. > > > Is there way to access that tree without bk? Daily patches maybe? Just posted to netdev. No regular snapshots, though. Jeff ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-10 10:16 ` Pavel Machek 2004-08-10 10:34 ` Christoph Hellwig @ 2004-08-11 10:16 ` James Ketrenos 2004-08-11 10:44 ` Christoph Hellwig 2004-08-11 17:51 ` Jeff Garzik 1 sibling, 2 replies; 43+ messages in thread From: James Ketrenos @ 2004-08-11 10:16 UTC (permalink / raw) To: Pavel Machek Cc: Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list Pavel Machek wrote: > Hi! > >>>>ipw2100 0.51 from ipw2100.sf.net builds using gcc-2.95.3 "out of the box." >>> >>>Well, this is really good news! >>> >>>I just downloaded 0.51 compiled with gcc-2.95.3 and got it working on my >>>IBM X31 with WEP. Even better, 0.51 doesn't need hostap-driver. >> >>Btw, any vounteer for merging the hostap-based generic ieee80211_* files >>from the ipw2100 driver with the hostap driver in the wireless-2.6 tree? > > I know very little about wireless-2.6 tree (where to get it without > bitkeeper?), but... > > task is to take ipw2100 driver, drop ieee80211_* files from it, and > make it work with ieee80211* files from wireless-2.6? The ieee80211_* files in the ipw2100 were partially based on the hostap source, with any HW specific code pulled out. It handles Tx and Rx right now for BSS, IBSS, and MONITOR mode, supporting wep, etc. It doesn't have all the hooks needed for the host based AP mode that Host AP currently has, nor does it support wpa yet. We're also using the stack for the ipw2200 project (which we hope to get another snapshot release out soon) We've been talking about pulling ieee80211 into its own project as others have expressed an interest in using it in their drivers as well. The general goal for the ieee80211 stack has been to be able to take an skb from the xmit handler, fragment and encrypt that skb, and provide that list of those 802.11 fragments to the driver for transmission. On the Rx side, the ieee80211 stack expects a standard 802.11 data frame which it then performs any decrypt / defrag and then passes up to the kernel. Additional frame code is slowly being added to ieee80211 to support handling of probe response / beacons to manage scan results, etc. and provide default WE handlers for exposing that information. ieee80211_wx provides some generic implementation for the WE handlers that every driver has to implement the same way. We're currently working to clean up ipw2100 and ieee80211 code for submission to netdev for discussion and hopefully inclusion in the future. The ieee80211 code is still being heavily developed, but its usable. If anyone wants to help out, or if folks feel its ready as-is to get pulled into wireless-2.6, let me know. Thanks, James ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 10:16 ` James Ketrenos @ 2004-08-11 10:44 ` Christoph Hellwig 2004-08-11 10:53 ` Wichert Akkerman 2004-08-11 16:21 ` James Ketrenos 2004-08-11 17:51 ` Jeff Garzik 1 sibling, 2 replies; 43+ messages in thread From: Christoph Hellwig @ 2004-08-11 10:44 UTC (permalink / raw) To: James Ketrenos Cc: Pavel Machek, Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list On Wed, Aug 11, 2004 at 05:16:35AM -0500, James Ketrenos wrote: > We're currently working to clean up ipw2100 and ieee80211 code for submission to > netdev for discussion and hopefully inclusion in the future. The ieee80211 code > is still being heavily developed, but its usable. If anyone wants to help out, > or if folks feel its ready as-is to get pulled into wireless-2.6, let me know. Maybe we should switch to your ieee802.11 for a generic wireless stack then instead of the original hostap code. At least it seems more actively maintained right now and supports two drivers already. Btw, I've looked at the ipw2100 and have to concerns regarding the firmware, a) yo'ure not using the proper firmware loader but some horrible handcrafted code using sys_open/sys_read & co that's not namespace safe at all b) the firmware has an extremly complicated and hard to comply with license, I'm not sure we want a driver that can't work without a so strangely licensed blob in the kernel. Can you talk to intel lawyers and put it on simple redristribution and binary modification for allowed for all purposes license please? > Thanks, > James > > > ---end quoted text--- ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 10:44 ` Christoph Hellwig @ 2004-08-11 10:53 ` Wichert Akkerman 2004-08-11 10:59 ` Christoph Hellwig 2004-08-11 16:21 ` James Ketrenos 1 sibling, 1 reply; 43+ messages in thread From: Wichert Akkerman @ 2004-08-11 10:53 UTC (permalink / raw) To: Christoph Hellwig, James Ketrenos, Pavel Machek, Jeff Chua, Tomas Szepe, netdev, kernel list Previously Christoph Hellwig wrote: > a) yo'ure not using the proper firmware loader but some horrible > handcrafted code using sys_open/sys_read & co that's not namespace > safe at all It can use standard hotplug firmware load as well. Wichert. -- Wichert Akkerman <wichert@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 10:53 ` Wichert Akkerman @ 2004-08-11 10:59 ` Christoph Hellwig 0 siblings, 0 replies; 43+ messages in thread From: Christoph Hellwig @ 2004-08-11 10:59 UTC (permalink / raw) To: James Ketrenos, Pavel Machek, Jeff Chua, Tomas Szepe, netdev, kernel list On Wed, Aug 11, 2004 at 12:53:38PM +0200, Wichert Akkerman wrote: > Previously Christoph Hellwig wrote: > > a) yo'ure not using the proper firmware loader but some horrible > > handcrafted code using sys_open/sys_read & co that's not namespace > > safe at all > > It can use standard hotplug firmware load as well. Okay, I'll take that back. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 10:44 ` Christoph Hellwig 2004-08-11 10:53 ` Wichert Akkerman @ 2004-08-11 16:21 ` James Ketrenos 2004-08-11 16:30 ` Stephen Hemminger 2004-08-12 3:47 ` Luis R. Rodriguez 1 sibling, 2 replies; 43+ messages in thread From: James Ketrenos @ 2004-08-11 16:21 UTC (permalink / raw) To: Christoph Hellwig Cc: Pavel Machek, Jeff Chua, Tomas Szepe, netdev, kernel list Christoph Hellwig wrote: > On Wed, Aug 11, 2004 at 05:16:35AM -0500, James Ketrenos wrote: > >>We're currently working to clean up ipw2100 and ieee80211 code for submission to >>netdev for discussion and hopefully inclusion in the future. The ieee80211 code >>is still being heavily developed, but its usable. If anyone wants to help out, >>or if folks feel its ready as-is to get pulled into wireless-2.6, let me know. > > Maybe we should switch to your ieee802.11 for a generic wireless stack then > instead of the original hostap code. At least it seems more actively > maintained right now and supports two drivers already. This would be ideal for those working on the projects using that stack. If others agree I'll put together patches that introduce the ieee80211* module into wireless-2.6 once I get the next driver snapshots out for ipw2100 and ipw2200. > Btw, I've looked at the ipw2100 and have to concerns regarding the firmware, > > a) yo'ure not using the proper firmware loader but some horrible > handcrafted code using sys_open/sys_read & co that's not namespace > safe at all The driver supports (and defaults to) using firmware_class for loading the firmware. The driver also supports a legacy loading approach for folks that have problems with using hotplug to load the firmware (which represents a fair number of users). > b) the firmware has an extremly complicated and hard to comply with license, > I'm not sure we want a driver that can't work without a so strangely > licensed blob in the kernel. Can you talk to intel lawyers and put it on > simple redristribution and binary modification for allowed for all purposes > license please? The firmware license supports redistribution, and complying with the license shouldn't be too hard (I agree it may not be worded the most clearly, but few legal documents are). If you have issues or questions about specific terms please email me offlist and I can try and address them. Just to re-answer some others may be wondering regarding the firmware: 1) the firmware does not use nor is it dependent (at all) on the kernel. no part of the firmware executes on the host CPU. 2) the firmware is loaded from disk vs. having to have non-volatile storage on the NIC and requiring a firmware flashing utility, etc. 3) the firmware, as per its license, can be redistributed by OSDs, ISVs, etc. Thanks, James ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 16:21 ` James Ketrenos @ 2004-08-11 16:30 ` Stephen Hemminger 2004-08-11 16:33 ` Tomas Szepe 2004-08-12 3:47 ` Luis R. Rodriguez 1 sibling, 1 reply; 43+ messages in thread From: Stephen Hemminger @ 2004-08-11 16:30 UTC (permalink / raw) To: James Ketrenos Cc: Christoph Hellwig, Pavel Machek, Jeff Chua, Tomas Szepe, netdev, kernel list > The driver supports (and defaults to) using firmware_class for loading the > firmware. The driver also supports a legacy loading approach for folks that > have problems with using hotplug to load the firmware (which represents a fair > number of users). > When and if you submit it into mainline, please remove the legacy loading approach. Let's get to the cause of the problem and fix it, not bandaid around it. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 16:30 ` Stephen Hemminger @ 2004-08-11 16:33 ` Tomas Szepe 2004-08-11 16:51 ` Christoph Hellwig 2004-08-11 23:55 ` Jeff Chua 0 siblings, 2 replies; 43+ messages in thread From: Tomas Szepe @ 2004-08-11 16:33 UTC (permalink / raw) To: Stephen Hemminger Cc: James Ketrenos, Christoph Hellwig, Pavel Machek, Jeff Chua, netdev, kernel list On Aug-11 2004, Wed, 09:30 -0700 Stephen Hemminger <shemminger@osdl.org> wrote: > > The driver supports (and defaults to) using firmware_class for loading the > > firmware. The driver also supports a legacy loading approach for folks that > > have problems with using hotplug to load the firmware (which represents a fair > > number of users). > When and if you submit it into mainline, please remove the legacy loading > approach. Let's get to the cause of the problem and fix it, not bandaid > around it. Or better yet, let's not! There are many people who don't want to mess around with hotplug just to get a single driver to load. -- Tomas Szepe <szepe@pinerecords.com> ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 16:33 ` Tomas Szepe @ 2004-08-11 16:51 ` Christoph Hellwig 2004-08-11 17:02 ` Tomas Szepe 2004-08-11 23:55 ` Jeff Chua 1 sibling, 1 reply; 43+ messages in thread From: Christoph Hellwig @ 2004-08-11 16:51 UTC (permalink / raw) To: Tomas Szepe Cc: Stephen Hemminger, James Ketrenos, Christoph Hellwig, Pavel Machek, Jeff Chua, netdev, kernel list On Wed, Aug 11, 2004 at 06:33:33PM +0200, Tomas Szepe wrote: > There are many people who don't want to mess around with hotplug just > to get a single driver to load. Then use a distribution that gets it right for you. Having gazillions of diffferent firmware loaders just because people are too lazy to set up the canonical one isn't where we want to go. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 16:51 ` Christoph Hellwig @ 2004-08-11 17:02 ` Tomas Szepe 2004-08-11 17:11 ` Christoph Hellwig 2004-08-11 18:55 ` John Stoffel 0 siblings, 2 replies; 43+ messages in thread From: Tomas Szepe @ 2004-08-11 17:02 UTC (permalink / raw) To: Christoph Hellwig, Stephen Hemminger, James Ketrenos, Pavel Machek, Jeff Chua, netdev, kernel list On Aug-11 2004, Wed, 17:51 +0100 Christoph Hellwig <hch@infradead.org> wrote: > On Wed, Aug 11, 2004 at 06:33:33PM +0200, Tomas Szepe wrote: > > There are many people who don't want to mess around with hotplug just > > to get a single driver to load. > > Then use a distribution that gets it right for you. Having gazillions > of diffferent firmware loaders just because people are too lazy to set > up the canonical one isn't where we want to go. Agreed. But the point is, in the actual case of ipw2100, will the removal of 40 or so lines of code justify killing the functionality for those (lots) that use it? I don't think so. A nice /* duplicate this in another driver and die */ comment in the right place will do the job just fine IMHO. -- Tomas Szepe <szepe@pinerecords.com> ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 17:02 ` Tomas Szepe @ 2004-08-11 17:11 ` Christoph Hellwig 2004-08-11 17:22 ` Tomas Szepe 2004-08-11 18:55 ` John Stoffel 1 sibling, 1 reply; 43+ messages in thread From: Christoph Hellwig @ 2004-08-11 17:11 UTC (permalink / raw) To: Tomas Szepe Cc: Christoph Hellwig, Stephen Hemminger, James Ketrenos, Pavel Machek, Jeff Chua, netdev, kernel list On Wed, Aug 11, 2004 at 07:02:08PM +0200, Tomas Szepe wrote: > Agreed. But the point is, in the actual case of ipw2100, will the removal > of 40 or so lines of code justify killing the functionality for those (lots) > that use it? Yes. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 17:11 ` Christoph Hellwig @ 2004-08-11 17:22 ` Tomas Szepe 2004-08-11 17:41 ` Christoph Hellwig 0 siblings, 1 reply; 43+ messages in thread From: Tomas Szepe @ 2004-08-11 17:22 UTC (permalink / raw) To: Christoph Hellwig, Stephen Hemminger, James Ketrenos, Pavel Machek, Jeff Chua, netdev, kernel list On Aug-11 2004, Wed, 18:11 +0100 Christoph Hellwig <hch@infradead.org> wrote: > On Wed, Aug 11, 2004 at 07:02:08PM +0200, Tomas Szepe wrote: > > Agreed. But the point is, in the actual case of ipw2100, will the removal > > of 40 or so lines of code justify killing the functionality for those (lots) > > that use it? > > Yes. Well, "I'm not young enough to know everything." Too bad. And btw, mails to hch@infradead.org bounce. -- Tomas Szepe <szepe@pinerecords.com> ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 17:22 ` Tomas Szepe @ 2004-08-11 17:41 ` Christoph Hellwig 2004-08-11 17:51 ` Tomas Szepe 0 siblings, 1 reply; 43+ messages in thread From: Christoph Hellwig @ 2004-08-11 17:41 UTC (permalink / raw) To: Tomas Szepe; +Cc: kernel list On Wed, Aug 11, 2004 at 07:22:22PM +0200, Tomas Szepe wrote: > And btw, mails to hch@infradead.org bounce. not for just about everyone else on the planet :) ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 17:41 ` Christoph Hellwig @ 2004-08-11 17:51 ` Tomas Szepe 2004-08-11 22:43 ` David Woodhouse 0 siblings, 1 reply; 43+ messages in thread From: Tomas Szepe @ 2004-08-11 17:51 UTC (permalink / raw) To: Christoph Hellwig, kernel list On Aug-11 2004, Wed, 18:41 +0100 Christoph Hellwig <hch@infradead.org> wrote: > On Wed, Aug 11, 2004 at 07:22:22PM +0200, Tomas Szepe wrote: > > And btw, mails to hch@infradead.org bounce. > > not for just about everyone else on the planet :) $ telnet pentafluge.infradead.org 25 Trying 2002:d592:9a28::1... Trying 213.146.154.40... Connected to pentafluge.infradead.org. Escape character is '^]'. 220-pentafluge.infradead.org ESMTP Exim 4.33 Wed, 11 Aug 2004 18:47:44 +0100 220 Be gentle with me ehlo pinerecords.com 250-pentafluge.infradead.org Hello louise.pinerecords.com [213.168.176.16] 250-SIZE 52428800 250-8BITMIME 250-ETRN 250-EXPN 250-STARTTLS 250 HELP expn hch@infradead.org 550 Administrative prohibition mail from: szepe@pinerecords.com 250 OK rcpt to: hch@infradead.org 550-Verification failed for <szepe@pinerecords.com> 550-(result of earlier verification reused). 550 Sender verify failed I for one don't call this a properly configured mail system. ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 17:51 ` Tomas Szepe @ 2004-08-11 22:43 ` David Woodhouse 2004-08-11 22:56 ` Tomas Szepe 0 siblings, 1 reply; 43+ messages in thread From: David Woodhouse @ 2004-08-11 22:43 UTC (permalink / raw) To: Tomas Szepe; +Cc: Christoph Hellwig, kernel list On Wed, 2004-08-11 at 19:51 +0200, Tomas Szepe wrote: > 550-Verification failed for <szepe@pinerecords.com> > 550-(result of earlier verification reused). > 550 Sender verify failed > > I for one don't call this a properly configured mail system. Indeed it isn't. It doesn't accept mail to 'postmaster@pinerecords.com', which is in violation of RFC2821. Hence we don't accept mail from it. 2004-08-11 17:33:36 H=louise.pinerecords.com [213.168.176.16] sender verify fail for <kala@pinerecords.com>: response to "RCPT TO:<postmaster@pinerecords.com>" from louise.pinerecords.com [213.168.176.16] was: 553 5.3.0 <postmaster@pinerecords.com>... No such user 2004-08-11 17:33:36 H=louise.pinerecords.com [213.168.176.16] F=<kala@pinerecords.com> rejected RCPT <hch@infradead.org>: Sender verify failed -- dwmw2 ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 22:43 ` David Woodhouse @ 2004-08-11 22:56 ` Tomas Szepe 2004-08-11 23:06 ` David Woodhouse 0 siblings, 1 reply; 43+ messages in thread From: Tomas Szepe @ 2004-08-11 22:56 UTC (permalink / raw) To: David Woodhouse; +Cc: Christoph Hellwig, kernel list On Aug-11 2004, Wed, 23:43 +0100 David Woodhouse <postmaster@infradead.org> wrote: > On Wed, 2004-08-11 at 19:51 +0200, Tomas Szepe wrote: > > 550-Verification failed for <szepe@pinerecords.com> > > 550-(result of earlier verification reused). > > 550 Sender verify failed > > > > I for one don't call this a properly configured mail system. > > Indeed it isn't. It doesn't accept mail to 'postmaster@pinerecords.com', > which is in violation of RFC2821. Hence we don't accept mail from it. > > 2004-08-11 17:33:36 H=louise.pinerecords.com [213.168.176.16] sender > verify fail for <kala@pinerecords.com>: response to "RCPT > TO:<postmaster@pinerecords.com>" from louise.pinerecords.com > [213.168.176.16] was: 553 5.3.0 <postmaster@pinerecords.com>... No such > user > > 2004-08-11 17:33:36 H=louise.pinerecords.com [213.168.176.16] > F=<kala@pinerecords.com> rejected RCPT <hch@infradead.org>: Sender > verify failed Ok, thanks for the warning. Is there any reason why you should be trying to look up postmaster@ from the sender domain upon RCPT TO? -- Tomas Szepe <szepe@pinerecords.com> ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 22:56 ` Tomas Szepe @ 2004-08-11 23:06 ` David Woodhouse 2004-08-11 23:11 ` Tomas Szepe 0 siblings, 1 reply; 43+ messages in thread From: David Woodhouse @ 2004-08-11 23:06 UTC (permalink / raw) To: Tomas Szepe; +Cc: Christoph Hellwig, kernel list On Thu, 2004-08-12 at 00:56 +0200, Tomas Szepe wrote: > Ok, thanks for the warning. Is there any reason why you should > be trying to look up postmaster@ from the sender domain upon > RCPT TO? Part of standard verification of sender addresses. You're being offered an email.... if you can't send a bounce to the address it claims to come from, or if you can't send a mail to postmaster at the same domain, then the chances that the mail you're being offered is a fake are high enough to warrant rejecting it. Results are cached for a period of time -- the _first_ rejection should have been more explicit than 'result of earlier verification reused' -- it should have actually given you the results of trying to send that mail to postmaster@pinerecords.com: rcpt to:<postmaster@pinerecords.com> 553 5.3.0 <postmaster@pinerecords.com>... No such user -- dwmw2 ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 23:06 ` David Woodhouse @ 2004-08-11 23:11 ` Tomas Szepe 2004-08-11 23:21 ` David Woodhouse 0 siblings, 1 reply; 43+ messages in thread From: Tomas Szepe @ 2004-08-11 23:11 UTC (permalink / raw) To: David Woodhouse; +Cc: Christoph Hellwig, kernel list On Aug-12 2004, Thu, 00:06 +0100 David Woodhouse <postmaster@infradead.org> wrote: > On Thu, 2004-08-12 at 00:56 +0200, Tomas Szepe wrote: > > Ok, thanks for the warning. Is there any reason why you should > > be trying to look up postmaster@ from the sender domain upon > > RCPT TO? > > Part of standard verification of sender addresses. You're being offered > an email.... if you can't send a bounce to the address it claims to come > from, or if you can't send a mail to postmaster at the same domain, then > the chances that the mail you're being offered is a fake are high enough > to warrant rejecting it. Ok, I see, but wouldn't an "and" where you write "or" make more sense? :) Anyway, I screwed up in the aliases vs. virtusertable department again. -- Tomas Szepe <szepe@pinerecords.com> ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 23:11 ` Tomas Szepe @ 2004-08-11 23:21 ` David Woodhouse 0 siblings, 0 replies; 43+ messages in thread From: David Woodhouse @ 2004-08-11 23:21 UTC (permalink / raw) To: Tomas Szepe; +Cc: Christoph Hellwig, kernel list On Thu, 2004-08-12 at 01:11 +0200, Tomas Szepe wrote: > On Aug-12 2004, Thu, 00:06 +0100 > David Woodhouse <postmaster@infradead.org> wrote: > > > On Thu, 2004-08-12 at 00:56 +0200, Tomas Szepe wrote: > > > Ok, thanks for the warning. Is there any reason why you should > > > be trying to look up postmaster@ from the sender domain upon > > > RCPT TO? > > > > Part of standard verification of sender addresses. You're being offered > > an email.... if you can't send a bounce to the address it claims to come > > from, or if you can't send a mail to postmaster at the same domain, then > > the chances that the mail you're being offered is a fake are high enough > > to warrant rejecting it. > > Ok, I see, but wouldn't an "and" where you write "or" make more sense? :) Don't think so. I reject the mail _either_ if I can't send a bounce to the user it claims to come from, _or_ if I can't send mail to the postmaster at that domain. Either failure is sufficient to cause a rejection. I don't accept mail from an invalid user just because I can contact postmaster, and I don't accept any mail from a domain for which I can't contact postmaster (except for mail addressed to postmaster@ one of my domains, which is more permissive in order to assist debugging/reporting problems). > Anyway, I screwed up in the aliases vs. virtusertable department again. I saw it was fixed, and I wiped my callout cache so you should be able to send mail to users @infradead.org other than postmaster again. -- dwmw2 ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 17:02 ` Tomas Szepe 2004-08-11 17:11 ` Christoph Hellwig @ 2004-08-11 18:55 ` John Stoffel 1 sibling, 0 replies; 43+ messages in thread From: John Stoffel @ 2004-08-11 18:55 UTC (permalink / raw) To: Tomas Szepe Cc: Christoph Hellwig, Stephen Hemminger, James Ketrenos, Pavel Machek, Jeff Chua, netdev, kernel list Tomas> On Aug-11 2004, Wed, 17:51 +0100 Tomas> Christoph Hellwig <hch@infradead.org> wrote: >> On Wed, Aug 11, 2004 at 06:33:33PM +0200, Tomas Szepe wrote: >> > There are many people who don't want to mess around with hotplug just >> > to get a single driver to load. >> >> Then use a distribution that gets it right for you. Having gazillions >> of diffferent firmware loaders just because people are too lazy to set >> up the canonical one isn't where we want to go. Tomas> Agreed. But the point is, in the actual case of ipw2100, will Tomas> the removal of 40 or so lines of code justify killing the Tomas> functionality for those (lots) that use it? I don't think so. You can't have your cake and eat it too Tomas! You agree that having multiple firmware loaders in the kernel is bad, yet you still want to have your own special one in there? What's so difficult about setting up hotplug for this purpose anyway? John ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 16:33 ` Tomas Szepe 2004-08-11 16:51 ` Christoph Hellwig @ 2004-08-11 23:55 ` Jeff Chua 1 sibling, 0 replies; 43+ messages in thread From: Jeff Chua @ 2004-08-11 23:55 UTC (permalink / raw) To: Tomas Szepe Cc: Stephen Hemminger, James Ketrenos, Christoph Hellwig, Pavel Machek, Jeff Chua, netdev, kernel list On Wed, 11 Aug 2004, Tomas Szepe wrote: > Or better yet, let's not! > > There are many people who don't want to mess around with hotplug just > to get a single driver to load. Agreed. Please leave the legacy-loader in there. I don't need hotplug scripts just to load a single firmware on my X31. Thanks, Jeff ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 16:21 ` James Ketrenos 2004-08-11 16:30 ` Stephen Hemminger @ 2004-08-12 3:47 ` Luis R. Rodriguez 1 sibling, 0 replies; 43+ messages in thread From: Luis R. Rodriguez @ 2004-08-12 3:47 UTC (permalink / raw) To: James Ketrenos Cc: Christoph Hellwig, Pavel Machek, Jeff Chua, Tomas Szepe, netdev, kernel list On Wed, Aug 11, 2004 at 11:21:34AM -0500, James Ketrenos wrote: > Just to re-answer some others may be wondering regarding the firmware: <-- 1 and 2 and --> > 3) the firmware, as per its license, can be redistributed by OSDs, ISVs, > etc. Would it be possible to get a better licensing for the firmware, ie one that would allow free redistribution, and be transferable? Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-08-11 10:16 ` James Ketrenos 2004-08-11 10:44 ` Christoph Hellwig @ 2004-08-11 17:51 ` Jeff Garzik 1 sibling, 0 replies; 43+ messages in thread From: Jeff Garzik @ 2004-08-11 17:51 UTC (permalink / raw) To: James Ketrenos Cc: Pavel Machek, Christoph Hellwig, Jeff Chua, Tomas Szepe, netdev, kernel list James Ketrenos wrote: > We're currently working to clean up ipw2100 and ieee80211 code for > submission to netdev for discussion and hopefully inclusion in the > future. The ieee80211 code is still being heavily developed, but its > usable. If anyone wants to help out, or if folks feel its ready as-is > to get pulled into wireless-2.6, let me know. Well, wireless-2.6 is a development tree, so I would rather things land there sooner rather than later. Everybody needs to be developing "on the same page". Jeff ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 11:48 ` Jeff Chua 2004-07-14 11:55 ` Pavel Machek @ 2004-07-14 12:30 ` Tomas Szepe 1 sibling, 0 replies; 43+ messages in thread From: Tomas Szepe @ 2004-07-14 12:30 UTC (permalink / raw) To: Jeff Chua; +Cc: Pavel Machek, netdev, kernel list On Jul-14 2004, Wed, 19:48 +0800 Jeff Chua <jeffchua@silk.corp.fedex.com> wrote: > >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. I'd rather fiddle around with gcc versions than risk stack overflows from running Windows drivers in Linux kernel space. -- Tomas Szepe <szepe@pinerecords.com> ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 11:41 ipw2100 wireless driver Pavel Machek 2004-07-14 11:48 ` Jeff Chua @ 2004-07-14 12:27 ` Pavel Machek 2004-07-14 13:15 ` Vojtech Pavlik 2 siblings, 0 replies; 43+ messages in thread From: Pavel Machek @ 2004-07-14 12:27 UTC (permalink / raw) To: netdev, kernel list Hi! > What is the status of ipw2100? Is there chance that it would be pushed > into mainline? Hmm, it has very "nice" interface in proc, where it tells you (in english *sentences*) if radio kill switch is enabled or not. Ouch. iwconfig eth1 mode ad-hoc followed by iwconfig eth1 makes it crash in ipw2100_wx_get_power called from wireless_process_ioctl. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 11:41 ipw2100 wireless driver Pavel Machek 2004-07-14 11:48 ` Jeff Chua 2004-07-14 12:27 ` Pavel Machek @ 2004-07-14 13:15 ` Vojtech Pavlik 2004-07-14 13:42 ` Pavel Machek 2 siblings, 1 reply; 43+ messages in thread From: Vojtech Pavlik @ 2004-07-14 13:15 UTC (permalink / raw) To: Pavel Machek; +Cc: netdev, kernel list On Wed, Jul 14, 2004 at 01:41:35PM +0200, Pavel Machek wrote: > Hi! > > 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. Wouldn't "struct sk_buff **fragments" be a more correct fix? > --- ipw2100-ofic/ieee80211.h 2004-07-09 06:32:17.000000000 +0200 > +++ ipw2100-0.49/ieee80211.h 2004-07-14 13:18:50.000000000 +0200 > @@ -440,7 +440,7 @@ > u16 reserved; > u16 frag_size; > u16 payload_size; > - struct sk_buff *fragments[]; > + struct sk_buff *fragments[1]; > }; > > extern struct ieee80211_txb *ieee80211_skb_to_txb(struct ieee80211_device *ieee, > > * it requires CONFIG_CRYPTO, but fails to force it in Kconfig. > > Pavel > -- > People were complaining that M$ turns users into beta-testers... > ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- Vojtech Pavlik SuSE Labs, SuSE CR ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 13:15 ` Vojtech Pavlik @ 2004-07-14 13:42 ` Pavel Machek 2004-07-14 17:00 ` Victor J. Orlikowski 0 siblings, 1 reply; 43+ messages in thread From: Pavel Machek @ 2004-07-14 13:42 UTC (permalink / raw) To: Vojtech Pavlik; +Cc: netdev, kernel list Hi! > > 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. > > Wouldn't "struct sk_buff **fragments" be a more correct fix? Yep, that would certainly be better. I'll wait if I get some reply from ipw2100 people. If so I'll update the patch. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 13:42 ` Pavel Machek @ 2004-07-14 17:00 ` Victor J. Orlikowski 0 siblings, 0 replies; 43+ messages in thread From: Victor J. Orlikowski @ 2004-07-14 17:00 UTC (permalink / raw) To: kernel list On Wed, Jul 14, 2004 at 03:42:27PM +0200, Pavel Machek wrote: > Yep, that would certainly be better. I'll wait if I get some reply > from ipw2100 people. If so I'll update the patch. Pavel, Here's some work saved for you; I don't have crypto, so this patch is only missing edits to those bits that cover WEP in ipw2100. This ought to allow compilation w/ gcc 2.95. diff -ru ipw2100-0.49/ieee80211.h ipw2100-0.49-mod/ieee80211.h --- ipw2100-0.49/ieee80211.h Fri Jul 9 00:32:17 2004 +++ ipw2100-0.49-mod/ieee80211.h Wed Jul 14 11:06:24 2004 @@ -440,7 +440,7 @@ u16 reserved; u16 frag_size; u16 payload_size; - struct sk_buff *fragments[]; + struct sk_buff *fragments[0]; }; extern struct ieee80211_txb *ieee80211_skb_to_txb(struct ieee80211_device *ieee, diff -ru ipw2100-0.49/ipw2100.h ipw2100-0.49-mod/ipw2100.h --- ipw2100-0.49/ipw2100.h Fri Jul 9 00:32:17 2004 +++ ipw2100-0.49-mod/ipw2100.h Wed Jul 14 12:55:01 2004 @@ -48,7 +48,7 @@ #define work_struct tq_struct #define schedule_work schedule_task #define INIT_WORK INIT_TQUEUE -#define get_seconds(x) CURRENT_TIME +#define get_seconds() CURRENT_TIME #endif #ifndef IRQ_NONE @@ -238,9 +238,9 @@ struct bd_status { union { - struct { u8 nlf:1, txType:2, intEnabled:1, reserved:4; }; + struct { u8 nlf:1, txType:2, intEnabled:1, reserved:4;} fields; u8 field; - }; + } info; } __attribute__ ((packed)); #define IPW_BUFDESC_LAST_FRAG 0 @@ -402,13 +402,13 @@ struct { /* COMMAND */ struct ipw2100_cmd_header* cmd; dma_addr_t cmd_phys; - }; + } c_struct; struct { /* DATA */ struct ipw2100_data_header* data; dma_addr_t data_phys; struct ieee80211_txb *txb; - }; - }; + } d_struct; + } info; int jiffy_start; struct list_head list; @@ -857,7 +857,7 @@ u32 status; struct ipw2100_notification notification; struct ipw2100_cmd_header command; - }; + } rx_data; } __attribute__ ((packed)); // Bit 0-7 are for 802.11b tx rates - . Bit 5-7 are reserved diff -ru ipw2100-0.49/ipw2100_main.c ipw2100-0.49-mod/ipw2100_main.c --- ipw2100-0.49/ipw2100_main.c Fri Jul 9 00:32:17 2004 +++ ipw2100-0.49-mod/ipw2100_main.c Wed Jul 14 12:49:56 2004 @@ -402,7 +402,7 @@ if (IS_ORDINAL_TABLE_ONE(ordinals, ord)) { if (*len != IPW_ORD_TAB_1_ENTRY_SIZE) { *len = IPW_ORD_TAB_1_ENTRY_SIZE; - IPW2100_DEBUG_INFO("wrong size\n"); + IPW2100_DEBUG_INFO("%s", "wrong size\n"); return -EINVAL; } @@ -416,7 +416,7 @@ return 0; } - IPW2100_DEBUG_INFO("wrong table\n"); + IPW2100_DEBUG_INFO("%s", "wrong table\n"); if (IS_ORDINAL_TABLE_TWO(ordinals, ord)) return -EINVAL; @@ -443,28 +443,25 @@ spin_lock_irqsave(&priv->low_lock, flags); if (priv->fatal_error) { - IPW2100_DEBUG_INFO("Attempt to send command while hardware " - "in fatal error condition."); + IPW2100_DEBUG_INFO("%s", "Attempt to send command while hardware in fatal error condition."); err = -EIO; goto fail_unlock; } if (priv->stopped) { - IPW2100_DEBUG_INFO("Attempt to send command while hardware " - "is not running."); + IPW2100_DEBUG_INFO("%s", "Attempt to send command while hardware is not running."); err = -EIO; goto fail_unlock; } if (priv->message_sending) { - IPW2100_DEBUG_INFO("Attempt to send command while hardware " - "another command is pending."); + IPW2100_DEBUG_INFO("%s", "Attempt to send command while hardware another command is pending."); err = -EBUSY; goto fail_unlock; } if (list_empty(&priv->msg_free_list)) { - IPW2100_DEBUG_INFO("no available msg buffers\n"); + IPW2100_DEBUG_INFO("%s", "no available msg buffers\n"); goto fail_unlock; } @@ -477,14 +474,14 @@ packet->jiffy_start = jiffies; /* initialize the firmware command packet */ - packet->cmd->host_command_reg = cmd->host_command; - packet->cmd->host_command_reg1 = cmd->host_command1; - packet->cmd->host_command_len_reg = cmd->host_command_length; - packet->cmd->sequence = cmd->host_command_sequence; + packet->info.c_struct.cmd->host_command_reg = cmd->host_command; + packet->info.c_struct.cmd->host_command_reg1 = cmd->host_command1; + packet->info.c_struct.cmd->host_command_len_reg = cmd->host_command_length; + packet->info.c_struct.cmd->sequence = cmd->host_command_sequence; - memcpy(packet->cmd->host_command_params_reg, + memcpy(packet->info.c_struct.cmd->host_command_params_reg, cmd->host_command_parameters, - sizeof(packet->cmd->host_command_params_reg)); + sizeof(packet->info.c_struct.cmd->host_command_params_reg)); list_del(element); DEC_STAT(&priv->msg_free_stat); @@ -603,7 +600,7 @@ err = ipw2100_get_ordinal(priv, IPW_ORD_CARD_DISABLED, &card_disabled, &len); if (err) { - IPW2100_DEBUG_INFO("query failed.\n"); + IPW2100_DEBUG_INFO("%s", "query failed.\n"); break; } @@ -820,7 +817,7 @@ { struct ipw2100_ordinals *ord = &priv->ordinals; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); read_register(priv->ndev, IPW_MEM_HOST_SHARED_ORDINALS_TABLE_1, &ord->table1_addr); @@ -835,7 +832,7 @@ IPW2100_DEBUG_INFO("table 1 size: %d\n", ord->table1_size); IPW2100_DEBUG_INFO("table 2 size: %d\n", ord->table2_size); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } static inline void ipw2100_hw_set_gpio(struct ipw2100_priv *priv) @@ -969,7 +966,7 @@ int i; u32 r; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); if (!priv->stopped) return 0; @@ -996,7 +993,7 @@ write_register(priv->ndev, IPW_REG_RESET_REG, 0); /* wait for f/w intialization complete */ - IPW2100_DEBUG_FW("Waiting for f/w initialization to complete...\n"); + IPW2100_DEBUG_FW("%s", "Waiting for f/w initialization to complete...\n"); i = 5000; do { set_current_state(TASK_UNINTERRUPTIBLE); @@ -1049,7 +1046,7 @@ priv->stopped = 0; - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -1083,7 +1080,7 @@ u32 reg; int i; - IPW2100_DEBUG_INFO("Power cycling the hardware.\n"); + IPW2100_DEBUG_INFO("%s", "Power cycling the hardware.\n"); ipw2100_hw_set_gpio(priv); @@ -1105,8 +1102,7 @@ priv->reset_pending = 0; if (!i) { - IPW2100_DEBUG_INFO("exit - waited too long for master assert " - "stop\n"); + IPW2100_DEBUG_INFO("%s", "exit - waited too long for master assert stop\n"); return -EIO; } @@ -1148,7 +1144,7 @@ if (priv->phy_off == 1) return 0; - IPW2100_DEBUG_FW_COMMAND("CARD_DISABLE_PHY_OFF\n"); + IPW2100_DEBUG_FW_COMMAND("%s", "CARD_DISABLE_PHY_OFF\n"); /* Turn off the radio */ err = ipw2100_hw_send_command(priv, &cmd); @@ -1182,14 +1178,14 @@ }; int err; - IPW2100_DEBUG_FW_COMMAND("HOST_COMPLETE\n"); + IPW2100_DEBUG_FW_COMMAND("%s", "HOST_COMPLETE\n"); if (!priv->disabled) return 0; err = ipw2100_hw_send_command(priv, &cmd); if (err) { - IPW2100_DEBUG_INFO("Failed to send HOST_COMPLETE command\n"); + IPW2100_DEBUG_INFO("%s", "Failed to send HOST_COMPLETE command\n"); return err; } @@ -1201,7 +1197,7 @@ return err; } - IPW2100_DEBUG_INFO("TODO: implement scan state machine\n"); + IPW2100_DEBUG_INFO("%s", "TODO: implement scan state machine\n"); return 0; } @@ -1253,7 +1249,7 @@ * event. Therefore, skip waiting for it. Just wait a fixed * 100ms */ - IPW2100_DEBUG_FW_COMMAND("HOST_PRE_POWER_DOWN\n"); + IPW2100_DEBUG_FW_COMMAND("%s", "HOST_PRE_POWER_DOWN\n"); err = ipw2100_hw_send_command(priv, &cmd); if (err) @@ -1321,26 +1317,24 @@ }; int err; - IPW2100_DEBUG_FW_COMMAND("CARD_DISABLE\n"); + IPW2100_DEBUG_FW_COMMAND("%s", "CARD_DISABLE\n"); if (priv->disabled) return 0; err = ipw2100_hw_send_command(priv, &cmd); if (err) { - IPW2100_DEBUG_WARNING("exit - failed to send CARD_DISABLE " - "command\n"); + IPW2100_DEBUG_WARNING("%s", "exit - failed to send CARD_DISABLE command\n"); return err; } err = ipw2100_wait_for_card_state(priv, STATE_DISABLED); if (err) { - IPW2100_DEBUG_WARNING("exit - card failed to change to " - "DISABLED\n"); + IPW2100_DEBUG_WARNING("%s", "exit - card failed to change to DISABLED\n"); return err; } - IPW2100_DEBUG_INFO("TODO: implement scan state machine\n"); + IPW2100_DEBUG_INFO("%s", "TODO: implement scan state machine\n"); return 0; @@ -1545,7 +1539,7 @@ u32 chan; char *txratename; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); /* * TBD: BSSID is usually 00:00:00:00:00:00 here and not @@ -1639,11 +1633,9 @@ printk(KERN_DEBUG "%s: Association lost.\n", priv->ndev->name); - IPW2100_DEBUG_INFO("TODO: only scan if scanning enabled and " - "radio is on\n"); + IPW2100_DEBUG_INFO("%s", "TODO: only scan if scanning enabled and radio is on\n"); - IPW2100_DEBUG_INFO("TODO: Move broadcast_scan initiation to scheduled " - "work\n"); + IPW2100_DEBUG_INFO("%s", "TODO: Move broadcast_scan initiation to scheduled work\n"); #if 0 ipw2100_hw_send_command(priv, &cmd); @@ -1680,7 +1672,7 @@ static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) { - IPW2100_DEBUG_SCAN("scan complete\n"); + IPW2100_DEBUG_SCAN("%s", "scan complete\n"); /* Age the scan results... */ priv->scans++; priv->in_scan = 0; @@ -1762,7 +1754,7 @@ wake_up_interruptible(&priv->wait_command_queue); #ifdef CONFIG_IPW2100_DEBUG - IPW2100_DEBUG_INFO("received command status:\n"); + IPW2100_DEBUG_INFO("%s", "received command status:\n"); IPW2100_DEBUG_INFO(" CMD = %d\n", cmd->host_command_reg); IPW2100_DEBUG_INFO(" CMD1 = %08x\n", cmd->host_command_reg1); IPW2100_DEBUG_INFO(" SEQ = %d\n", cmd->sequence); @@ -1776,7 +1768,7 @@ struct ieee80211_hdr *header, struct ipw2100_status *status) { - IPW2100_DEBUG_RX("Ignoring control frame.\n"); + IPW2100_DEBUG_RX("%s", "Ignoring control frame.\n"); } static inline void isr_beacon_add( @@ -1924,12 +1916,12 @@ } if (list_empty(&priv->beacon_free_list)) { - IPW2100_DEBUG_SCAN("TODO: Expire oldest beacon to add new.\n"); + IPW2100_DEBUG_SCAN("%s", "TODO: Expire oldest beacon to add new.\n"); printk(KERN_WARNING DRV_NAME ": Beacon free list is empty.\n"); } else isr_beacon_add(priv, new_beacon, rssi); - IPW2100_DEBUG_SCAN("exit\n"); + IPW2100_DEBUG_SCAN("%s", "exit\n"); } static void isr_handle_mgt_packet( @@ -1950,7 +1942,7 @@ case IEEE802_11_STYPE_PROBE_RESP: msg = "PROBE RESPONSE"; - IPW2100_DEBUG_SCAN("Probe response\n"); + IPW2100_DEBUG_SCAN("%s", "Probe response\n"); isr_process_probe_response( priv, (struct ieee80211_probe_response *)header, status->rssi); @@ -1958,7 +1950,7 @@ case IEEE802_11_STYPE_BEACON: msg = "BEACON"; - IPW2100_DEBUG_SCAN("Beacon\n"); + IPW2100_DEBUG_SCAN("%s","Beacon\n"); isr_process_probe_response( priv, (struct ieee80211_probe_response *)header, status->rssi); @@ -2201,7 +2193,7 @@ .mac_time = jiffies, }; - IPW2100_DEBUG_RX("Handler...\n"); + IPW2100_DEBUG_RX("%s", "Handler...\n"); if (unlikely(status->frame_size > skb_tailroom(packet->skb))) { printk(KERN_INFO "%s: frame_size (%u) > skb_tailroom (%u)!" @@ -2245,7 +2237,7 @@ "%s: Unable to allocate SKB onto RBD ring - disabling " "adapter.\n", priv->ndev->name); /* TODO: schedule adapter shutdown */ - IPW2100_DEBUG_INFO("TODO: Shutdown adapter...\n"); + IPW2100_DEBUG_INFO("%s", "TODO: Shutdown adapter...\n"); } /* Update the RDB entry */ @@ -2260,17 +2252,17 @@ switch (frame_type) { case COMMAND_STATUS_VAL: - return (status->frame_size != sizeof(u->command)); + return (status->frame_size != sizeof(u->rx_data.command)); case STATUS_CHANGE_VAL: - return (status->frame_size != sizeof(u->status)); + return (status->frame_size != sizeof(u->rx_data.status)); case HOST_NOTIFICATION_VAL: - return (status->frame_size < sizeof(u->notification)); + return (status->frame_size < sizeof(u->rx_data.notification)); case P80211_DATA_VAL: case P8023_DATA_VAL: #ifdef CONFIG_IPW2100_PROMISC return 0; #else - switch (WLAN_FC_GET_TYPE(u->header.frame_control)) { + switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_control)) { case IEEE802_11_FTYPE_MGMT: case IEEE802_11_FTYPE_CTL: return 0; @@ -2322,7 +2314,7 @@ read_register(priv->ndev, IPW_MEM_HOST_SHARED_RX_WRITE_INDEX, &w); if (r >= rxq->entries) { - IPW2100_DEBUG_RX("exit - bad read index\n"); + IPW2100_DEBUG_RX("%s", "exit - bad read index\n"); return; } @@ -2364,11 +2356,11 @@ switch (frame_type) { case COMMAND_STATUS_VAL: - isr_rx_complete_command(priv, &u->command); + isr_rx_complete_command(priv, &u->rx_data.command); break; case STATUS_CHANGE_VAL: - isr_status_change(priv, u->status); + isr_status_change(priv, u->rx_data.status); break; case P80211_DATA_VAL: @@ -2379,16 +2371,16 @@ break; } #endif - if (frame_size < sizeof(u->header)) + if (frame_size < sizeof(u->rx_data.header)) break; - switch (WLAN_FC_GET_TYPE(u->header.frame_control)) { + switch (WLAN_FC_GET_TYPE(u->rx_data.header.frame_control)) { case IEEE802_11_FTYPE_MGMT: - isr_handle_mgt_packet(priv, &u->header, + isr_handle_mgt_packet(priv, &u->rx_data.header, &sq->drv[i]); break; case IEEE802_11_FTYPE_CTL: - isr_handle_ctl_packet(priv, &u->header, + isr_handle_ctl_packet(priv, &u->rx_data.header, &sq->drv[i]); break; @@ -2397,9 +2389,8 @@ * interface is open */ if (!priv->open) { priv->wstats.discard.misc++; - IPW2100_DEBUG_DROP( - "Dropping packet while " - "interface is not up.\n"); + IPW2100_DEBUG_DROP("%s", + "Dropping packet while interface is not up.\n"); break; } @@ -2412,7 +2403,7 @@ } /* clear status field associated with this RBD */ - rxq->drv[i].status.field = 0; + rxq->drv[i].status.info.field = 0; i = (i + 1) % rxq->entries; } @@ -2543,8 +2534,7 @@ * */ if (!((r <= w && (e < r || e >= w)) || (e < r && e >= w))) { - IPW2100_DEBUG_TX("exit - no processed packets ready to " - "release.\n"); + IPW2100_DEBUG_TX("%s", "exit - no processed packets ready to release.\n"); return 0; } @@ -2577,7 +2567,7 @@ switch (packet->type) { case DATA: - if (txq->drv[txq->oldest].status.txType != 0) + if (txq->drv[txq->oldest].status.info.fields.txType != 0) printk(KERN_WARNING "%s: Queue mismatch. " "Expecting DATA TBD but pulled " "something else: ids %d=%d.\n", @@ -2600,9 +2590,9 @@ PCI_DMA_TODEVICE); } - priv->ieee->stats.tx_bytes += packet->txb->payload_size; - ieee80211_txb_free(packet->txb); - packet->txb = NULL; + priv->ieee->stats.tx_bytes += packet->info.d_struct.txb->payload_size; + ieee80211_txb_free(packet->info.d_struct.txb); + packet->info.d_struct.txb = NULL; list_add_tail(element, &priv->tx_free_list); INC_STAT(&priv->tx_free_stat); @@ -2624,20 +2614,20 @@ break; case COMMAND: - if (txq->drv[txq->oldest].status.txType != 1) + if (txq->drv[txq->oldest].status.info.fields.txType != 1) printk(KERN_WARNING "%s: Queue mismatch. " "Expecting COMMAND TBD but pulled " "something else: ids %d=%d.\n", priv->ndev->name, txq->oldest, packet->index); #ifdef CONFIG_IPW2100_DEBUG - if (packet->cmd->host_command_reg < + if (packet->info.c_struct.cmd->host_command_reg < sizeof(command_types) / sizeof(*command_types)) IPW2100_DEBUG_TX( "Command '%s (%d)' processed: %d.\n", - command_types[packet->cmd->host_command_reg], - packet->cmd->host_command_reg, - packet->cmd->cmd_status_reg); + command_types[packet->info.c_struct.cmd->host_command_reg], + packet->info.c_struct.cmd->host_command_reg, + packet->info.c_struct.cmd->cmd_status_reg); #endif list_add_tail(element, &priv->msg_free_list); @@ -2688,7 +2678,7 @@ * maintained between the r and w indexes */ if (txq->available <= 3) { - IPW2100_DEBUG_TX("no room in tx_queue\n"); + IPW2100_DEBUG_TX("%s", "no room in tx_queue\n"); break; } @@ -2709,12 +2699,12 @@ tbd = &txq->drv[txq->next]; /* initialize TBD */ - tbd->host_addr = packet->cmd_phys; + tbd->host_addr = packet->info.c_struct.cmd_phys; tbd->buf_length = sizeof(struct ipw2100_cmd_header); /* not marking number of fragments causes problems * with f/w debug version */ tbd->num_fragments = 1; - tbd->status.field = + tbd->status.info.field = IPW_BD_STATUS_TX_FRAME_COMMAND | IPW_BD_STATUS_TX_INTERRUPT_ENABLE; @@ -2762,7 +2752,7 @@ element = priv->tx_pend_list.next; packet = list_entry(element, struct ipw2100_tx_packet, list); - if (unlikely(1 + packet->txb->nr_frags > IPW_MAX_BDS)) { + if (unlikely(1 + packet->info.d_struct.txb->nr_frags > IPW_MAX_BDS)) { /* TODO: Support merging buffers if more than * IPW_MAX_BDS are used */ printk(KERN_DEBUG @@ -2771,8 +2761,8 @@ priv->ndev->name); } - if (txq->available <= 3 + packet->txb->nr_frags) { - IPW2100_DEBUG_TX("no room in tx_queue\n"); + if (txq->available <= 3 + packet->info.d_struct.txb->nr_frags) { + IPW2100_DEBUG_TX("%s", "no room in tx_queue\n"); break; } @@ -2783,10 +2773,10 @@ packet->index = txq->next; - tbd->host_addr = packet->data_phys; + tbd->host_addr = packet->info.d_struct.data_phys; tbd->buf_length = sizeof(struct ipw2100_data_header); - tbd->num_fragments = 1 + packet->txb->nr_frags; - tbd->status.field = + tbd->num_fragments = 1 + packet->info.d_struct.txb->nr_frags; + tbd->status.info.field = IPW_BD_STATUS_TX_FRAME_802_3 | IPW_BD_STATUS_TX_FRAME_NOT_LAST_FRAGMENT; txq->next++; @@ -2797,27 +2787,27 @@ packet->index, tbd->host_addr, tbd->buf_length); #ifdef CONFIG_IPW2100_DEBUG - if (packet->txb->nr_frags > 1) + if (packet->info.d_struct.txb->nr_frags > 1) IPW2100_DEBUG_FRAG("fragment Tx: %d frames\n", - packet->txb->nr_frags); + packet->info.d_struct.txb->nr_frags); #endif - for (i = 0; i < packet->txb->nr_frags; i++) { + for (i = 0; i < packet->info.d_struct.txb->nr_frags; i++) { tbd = &txq->drv[txq->next]; - if (i == packet->txb->nr_frags - 1) - tbd->status.field = + if (i == packet->info.d_struct.txb->nr_frags - 1) + tbd->status.info.field = IPW_BD_STATUS_TX_FRAME_802_3 | IPW_BD_STATUS_TX_INTERRUPT_ENABLE; else - tbd->status.field = + tbd->status.info.field = IPW_BD_STATUS_TX_FRAME_802_3 | IPW_BD_STATUS_TX_FRAME_NOT_LAST_FRAGMENT; - tbd->buf_length = packet->txb->fragments[i]->len; + tbd->buf_length = packet->info.d_struct.txb->fragments[i]->len; tbd->host_addr = pci_map_single( priv->pdev, - packet->txb->fragments[i]->data, + packet->info.d_struct.txb->fragments[i]->data, tbd->buf_length, PCI_DMA_TODEVICE); @@ -2834,7 +2824,7 @@ txq->next %= txq->entries; } - txq->available -= 1 + packet->txb->nr_frags; + txq->available -= 1 + packet->info.d_struct.txb->nr_frags; SET_STAT(&priv->txq_stat, txq->available); list_add_tail(element, &priv->fw_pend_list); @@ -2895,7 +2885,7 @@ } if (inta & IPW2100_INTA_PARITY_ERROR) { - IPW2100_DEBUG_ERROR("***** PARITY ERROR INTERRUPT !!!! \n"); + IPW2100_DEBUG_ERROR("%s", "***** PARITY ERROR INTERRUPT !!!! \n"); priv->inta_other++; write_register( dev, IPW_REG_INTA, @@ -2903,7 +2893,7 @@ } if (inta & IPW2100_INTA_RX_TRANSFER) { - IPW2100_DEBUG_ISR("RX interrupt\n"); + IPW2100_DEBUG_ISR("%s", "RX interrupt\n"); priv->rx_interrupts++; @@ -2916,7 +2906,7 @@ } if (inta & IPW2100_INTA_TX_TRANSFER) { - IPW2100_DEBUG_ISR("TX interrupt\n"); + IPW2100_DEBUG_ISR("%s", "TX interrupt\n"); priv->tx_interrupts++; @@ -2929,7 +2919,7 @@ } if (inta & IPW2100_INTA_TX_COMPLETE) { - IPW2100_DEBUG_ISR("TX complete\n"); + IPW2100_DEBUG_ISR("%s", "TX complete\n"); priv->inta_other++; write_register( dev, IPW_REG_INTA, @@ -2947,7 +2937,7 @@ } if (inta & IPW2100_INTA_FW_INIT_DONE) { - IPW2100_DEBUG_ISR("FW init done interrupt\n"); + IPW2100_DEBUG_ISR("%s", "FW init done interrupt\n"); priv->inta_other++; read_register(dev, IPW_REG_INTA, &tmp); @@ -2964,7 +2954,7 @@ } if (inta & IPW2100_INTA_STATUS_CHANGE) { - IPW2100_DEBUG_ISR("Status change interrupt\n"); + IPW2100_DEBUG_ISR("%s", "Status change interrupt\n"); priv->inta_other++; write_register( dev, IPW_REG_INTA, @@ -2972,7 +2962,7 @@ } if (inta & IPW2100_INTA_SLAVE_MODE_HOST_COMMAND_DONE) { - IPW2100_DEBUG_ISR("slave host mode interrupt\n"); + IPW2100_DEBUG_ISR("%s", "slave host mode interrupt\n"); priv->inta_other++; write_register( dev, IPW_REG_INTA, @@ -2984,7 +2974,7 @@ spin_unlock_irqrestore(&priv->low_lock, flags); - IPW2100_DEBUG_ISR("exit\n"); + IPW2100_DEBUG_ISR("%s", "exit\n"); } @@ -3003,7 +2993,7 @@ spin_lock_irqsave(&priv->low_lock, flags); if (priv->irq_ignore) { - IPW2100_DEBUG_WARNING("IRQ ignored\n"); + IPW2100_DEBUG_WARNING("%s", "IRQ ignored\n"); spin_unlock_irqrestore(&priv->low_lock, flags); return IRQ_NONE; } @@ -3013,7 +3003,7 @@ if (inta == 0xFFFFFFFF) { /* Hardware disappeared */ - IPW2100_DEBUG_WARNING("IRQ INTA == 0xFFFFFFFF\n"); + IPW2100_DEBUG_WARNING("%s", "IRQ INTA == 0xFFFFFFFF\n"); spin_unlock_irqrestore(&priv->low_lock, flags); return IRQ_HANDLED; } @@ -3042,7 +3032,7 @@ { struct ipw2100_priv *priv = ipw2100_netdev(dev); struct list_head *element; - struct ipw2100_data_header *header; + struct ipw2100_data_header *header = NULL; struct ipw2100_tx_packet *packet; unsigned long flags; @@ -3051,7 +3041,7 @@ if (!priv->connected) { /* TODO: check code to ensure that xmit disabled during * any call that results in priv->connected == false */ - IPW2100_DEBUG_INFO("Can not transmit when not connected.\n"); + IPW2100_DEBUG_INFO("%s", "Can not transmit when not connected.\n"); priv->ieee->stats.tx_carrier_errors++; netif_stop_queue(dev); goto fail_unlock; @@ -3063,13 +3053,13 @@ element = priv->tx_free_list.next; packet = list_entry(element, struct ipw2100_tx_packet, list); - header = packet->data; + header = packet->info.d_struct.data; memcpy(header->dst_addr, skb->data, ETH_ALEN); memcpy(header->src_addr, skb->data + ETH_ALEN, ETH_ALEN); - packet->txb = ieee80211_skb_to_txb(priv->ieee, skb); - if (packet->txb == NULL) { - IPW2100_DEBUG_DROP("Failed to Tx packet\n"); + packet->info.d_struct.txb = ieee80211_skb_to_txb(priv->ieee, skb); + if (packet->info.d_struct.txb == NULL) { + IPW2100_DEBUG_DROP("%s", "Failed to Tx packet\n"); priv->ieee->stats.tx_errors++; goto fail_unlock; } @@ -3079,9 +3069,9 @@ /* For now we only support host based encryption */ header->needs_encryption = 0; - header->encrypted = packet->txb->encrypted; - if (packet->txb->nr_frags > 1) - header->fragment_size = packet->txb->frag_size; + header->encrypted = packet->info.d_struct.txb->encrypted; + if (packet->info.d_struct.txb->nr_frags > 1) + header->fragment_size = packet->info.d_struct.txb->frag_size; else header->fragment_size = 0; @@ -3096,12 +3086,12 @@ X__ipw2100_tx_send_data(priv); spin_unlock_irqrestore(&priv->low_lock, flags); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; fail_unlock: netif_stop_queue(dev); - IPW2100_DEBUG_INFO("exit - failed\n"); + IPW2100_DEBUG_INFO("%s", "exit - failed\n"); spin_unlock_irqrestore(&priv->low_lock, flags); return 1; } @@ -3139,9 +3129,9 @@ memset(v, 0, sizeof(struct ipw2100_cmd_header)); priv->msg_buffers[i].type = COMMAND; - priv->msg_buffers[i].cmd = + priv->msg_buffers[i].info.c_struct.cmd = (struct ipw2100_cmd_header*)v; - priv->msg_buffers[i].cmd_phys = p; + priv->msg_buffers[i].info.c_struct.cmd_phys = p; } if (i == IPW_COMMAND_POOL_SIZE) @@ -3151,8 +3141,8 @@ pci_free_consistent( priv->pdev, sizeof(struct ipw2100_cmd_header), - priv->msg_buffers[j].cmd, - priv->msg_buffers[j].cmd_phys); + priv->msg_buffers[j].info.c_struct.cmd, + priv->msg_buffers[j].info.c_struct.cmd_phys); } kfree(priv->msg_buffers); @@ -3185,8 +3175,8 @@ for (i = 0; i < IPW_COMMAND_POOL_SIZE; i++) { pci_free_consistent(priv->pdev, sizeof(struct ipw2100_cmd_header), - priv->msg_buffers[i].cmd, - priv->msg_buffers[i].cmd_phys); + priv->msg_buffers[i].info.c_struct.cmd, + priv->msg_buffers[i].info.c_struct.cmd_phys); } kfree(priv->msg_buffers); @@ -3487,7 +3477,7 @@ char *p = buf; if (copy_from_user(buf, buffer, len)) { - IPW2100_DEBUG_INFO("can't copy data from userspace\n"); + IPW2100_DEBUG_INFO("%s", "can't copy data from userspace\n"); /* stupid? yes, but how do I signal an error here? */ return count; } else @@ -3917,14 +3907,14 @@ struct net_device *dev = data; struct ipw2100_priv *priv = ipw2100_netdev(dev); - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); read_register(dev, IPW_MEM_HOST_SHARED_TX_QUEUE_READ_INDEX(0), &tbdr_r); read_register(dev, IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX(0), &tbdr_w); - IPW2100_DEBUG_INFO("after register read\n"); + IPW2100_DEBUG_INFO("%s", "after register read\n"); len += snprintf(page, count, "Tx Queue\nnic:\n\tread index=%d\n\twrite index=%d\n", @@ -3935,7 +3925,7 @@ priv->tx_queue.next); *eof = 1; - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return len; } @@ -3950,12 +3940,12 @@ struct net_device *dev = data; struct ipw2100_priv *priv = ipw2100_netdev(dev); - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); read_register(dev, IPW_MEM_HOST_SHARED_RX_READ_INDEX, &rbdr_r); read_register(dev, IPW_MEM_HOST_SHARED_RX_WRITE_INDEX, &rbdr_w); - IPW2100_DEBUG_INFO("after register read\n"); + IPW2100_DEBUG_INFO("%s", "after register read\n"); len += snprintf(page, count, "Rx Queue\nnic:\n\tread index=%d\n\twrite index=%d\n", @@ -3966,7 +3956,7 @@ *eof = 1; - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return len; } @@ -4011,7 +4001,7 @@ int i; if (copy_from_user(buf, buffer, len)) { - IPW2100_DEBUG_INFO("can't copy data from userspace\n"); + IPW2100_DEBUG_INFO("%s", "can't copy data from userspace\n"); return count; } else buf[len] = 0; @@ -4141,10 +4131,10 @@ u32 val; char *p = buf; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); if (copy_from_user(buf, buffer, len)) { - IPW2100_DEBUG_INFO("can't copy data from userspace\n"); + IPW2100_DEBUG_INFO("%s", "can't copy data from userspace\n"); /* stupid? yes, but how do I signal an error here? */ return count; } else @@ -4165,7 +4155,7 @@ IPW2100_DEBUG_INFO("set mem addr = 0x%08x\n", val); } - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return count; } @@ -4198,10 +4188,10 @@ unsigned long val; char *p = buf; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); if (copy_from_user(buf, buffer, len)) { - IPW2100_DEBUG_INFO("can't copy data from userspace\n"); + IPW2100_DEBUG_INFO("%s", "can't copy data from userspace\n"); /* stupid? yes, but how do I signal an error here? */ return count; } else @@ -4222,7 +4212,7 @@ IPW2100_DEBUG_INFO("set scan_age = %lu\n", priv->scan_age); } - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return count; } @@ -4470,7 +4460,7 @@ int ipw2100_proc_init(void) { - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); ipw2100_proc = create_proc_entry(DRV_NAME, S_IFDIR, proc_net); if (ipw2100_proc == NULL) { @@ -4497,20 +4487,20 @@ } #endif /* CONFIG_IPW2100_DEBUG */ - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; fail: ipw2100_proc_cleanup(); - IPW2100_DEBUG_INFO("exit on fail\n"); + IPW2100_DEBUG_INFO("%s", "exit on fail\n"); return -ENOMEM; } void ipw2100_proc_cleanup(void) { - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); if (ipw2100_proc) { #ifdef CONFIG_IPW2100_DEBUG @@ -4520,7 +4510,7 @@ ipw2100_proc = NULL; } - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } @@ -4528,7 +4518,7 @@ { struct ipw2100_status_queue *q = &priv->status_queue; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); q->size = entries * sizeof(struct ipw2100_status); q->drv = (struct ipw2100_status *)pci_alloc_consistent( @@ -4541,14 +4531,14 @@ memset(q->drv, 0, q->size); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } static void status_queue_free(struct ipw2100_priv *priv) { - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); if (priv->status_queue.drv) { pci_free_consistent( @@ -4557,13 +4547,13 @@ priv->status_queue.drv = NULL; } - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } static int bd_queue_allocate(struct ipw2100_priv *priv, struct ipw2100_bd_queue *q, int entries) { - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); memset(q, 0, sizeof(struct ipw2100_bd_queue)); @@ -4571,13 +4561,12 @@ q->size = entries * sizeof(struct ipw2100_bd); q->drv = pci_alloc_consistent(priv->pdev, q->size, &q->nic); if (!q->drv) { - IPW2100_DEBUG_INFO("can't allocate shared memory for " - "buffer descriptors\n"); + IPW2100_DEBUG_INFO("%s", "can't allocate shared memory for buffer descriptors\n"); return -ENOMEM; } memset(q->drv, 0, q->size); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -4585,7 +4574,7 @@ static void bd_queue_free(struct ipw2100_priv *priv, struct ipw2100_bd_queue *q) { - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); if (!q) return; @@ -4596,14 +4585,14 @@ q->drv = NULL; } - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } static void bd_queue_initialize( struct ipw2100_priv *priv, struct ipw2100_bd_queue * q, u32 base, u32 size, u32 r, u32 w) { - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); IPW2100_DEBUG_INFO("initializing bd queue at virt=%p, phys=%08x\n", q->drv, q->nic); @@ -4612,7 +4601,7 @@ write_register(priv->ndev, r, q->oldest); write_register(priv->ndev, w, q->next); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } static int ipw2100_tx_allocate(struct ipw2100_priv *priv) @@ -4621,7 +4610,7 @@ void *v; dma_addr_t p; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); err = bd_queue_allocate(priv, &priv->tx_queue, TX_QUEUE_LENGTH); if (err) { @@ -4651,9 +4640,9 @@ } priv->tx_buffers[i].type = DATA; - priv->tx_buffers[i].data = (struct ipw2100_data_header*)v; - priv->tx_buffers[i].data_phys = p; - priv->tx_buffers[i].txb = NULL; + priv->tx_buffers[i].info.d_struct.data = (struct ipw2100_data_header*)v; + priv->tx_buffers[i].info.d_struct.data_phys = p; + priv->tx_buffers[i].info.d_struct.txb = NULL; } if (i == TX_PENDED_QUEUE_LENGTH) @@ -4663,8 +4652,8 @@ pci_free_consistent( priv->pdev, sizeof(struct ipw2100_data_header), - priv->tx_buffers[j].data, - priv->tx_buffers[j].data_phys); + priv->tx_buffers[j].info.d_struct.data, + priv->tx_buffers[j].info.d_struct.data_phys); } kfree(priv->tx_buffers); @@ -4677,7 +4666,7 @@ { int i; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); /* * reinitialize packet info lists @@ -4696,9 +4685,9 @@ for (i = 0; i < TX_PENDED_QUEUE_LENGTH; i++) { /* We simply drop any SKBs that have been queued for * transmit */ - if (priv->tx_buffers[i].txb) { - ieee80211_txb_free(priv->tx_buffers[i].txb); - priv->tx_buffers[i].txb = NULL; + if (priv->tx_buffers[i].info.d_struct.txb) { + ieee80211_txb_free(priv->tx_buffers[i].info.d_struct.txb); + priv->tx_buffers[i].info.d_struct.txb = NULL; } list_add_tail(&priv->tx_buffers[i].list, &priv->tx_free_list); @@ -4718,7 +4707,7 @@ IPW_MEM_HOST_SHARED_TX_QUEUE_READ_INDEX(0), IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX(0)); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } @@ -4726,7 +4715,7 @@ { int i; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); bd_queue_free(priv, &priv->tx_queue); @@ -4734,22 +4723,22 @@ return; for (i = 0; i < TX_PENDED_QUEUE_LENGTH; i++) { - if (priv->tx_buffers[i].txb) { - ieee80211_txb_free(priv->tx_buffers[i].txb); - priv->tx_buffers[i].txb = NULL; + if (priv->tx_buffers[i].info.d_struct.txb) { + ieee80211_txb_free(priv->tx_buffers[i].info.d_struct.txb); + priv->tx_buffers[i].info.d_struct.txb = NULL; } - if (priv->tx_buffers[i].data) + if (priv->tx_buffers[i].info.d_struct.data) pci_free_consistent( priv->pdev, sizeof(struct ipw2100_data_header), - priv->tx_buffers[i].data, - priv->tx_buffers[i].data_phys); + priv->tx_buffers[i].info.d_struct.data, + priv->tx_buffers[i].info.d_struct.data_phys); } kfree(priv->tx_buffers); priv->tx_buffers = NULL; - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } @@ -4758,17 +4747,17 @@ { int i, j, err = -EINVAL; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); err = bd_queue_allocate(priv, &priv->rx_queue, RX_QUEUE_LENGTH); if (err) { - IPW2100_DEBUG_INFO("failed bd_queue_allocate\n"); + IPW2100_DEBUG_INFO("%s", "failed bd_queue_allocate\n"); return err; } err = status_queue_allocate(priv, RX_QUEUE_LENGTH); if (err) { - IPW2100_DEBUG_INFO("failed status_queue_allocate\n"); + IPW2100_DEBUG_INFO("%s", "failed status_queue_allocate\n"); bd_queue_free(priv, &priv->rx_queue); return err; } @@ -4780,7 +4769,7 @@ kmalloc(RX_QUEUE_LENGTH * sizeof(struct ipw2100_rx_packet), GFP_KERNEL); if (!priv->rx_buffers) { - IPW2100_DEBUG_INFO("can't allocate rx packet buffer table\n"); + IPW2100_DEBUG_INFO("%s", "can't allocate rx packet buffer table\n"); bd_queue_free(priv, &priv->rx_queue); @@ -4826,7 +4815,7 @@ static void ipw2100_rx_initialize(struct ipw2100_priv *priv) { - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); priv->rx_queue.oldest = 0; priv->rx_queue.available = priv->rx_queue.entries - 1; @@ -4845,14 +4834,14 @@ write_register(priv->ndev, IPW_MEM_HOST_SHARED_RX_STATUS_BASE, priv->status_queue.nic); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } static void ipw2100_rx_free(struct ipw2100_priv *priv) { int i; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); bd_queue_free(priv, &priv->rx_queue); status_queue_free(priv); @@ -4873,7 +4862,7 @@ kfree(priv->rx_buffers); priv->rx_buffers = NULL; - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } static int ipw2100_read_mac_address(struct ipw2100_priv *priv) @@ -4886,7 +4875,7 @@ err = ipw2100_get_ordinal(priv, IPW_ORD_STAT_ADAPTER_MAC, mac, &length); if (err) { - IPW2100_DEBUG_INFO("MAC address read failed\n"); + IPW2100_DEBUG_INFO("%s", "MAC address read failed\n"); return -EIO; } IPW2100_DEBUG_INFO("card MAC is %02X:%02X:%02X:%02X:%02X:%02X\n", @@ -4907,31 +4896,32 @@ struct host_command cmd = { .host_command = BROADCAST_SCAN, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = 0 + .host_command_length = 4 }; int err; + cmd.host_command_parameters[0] = 0; + /* No scanning if in monitor mode */ if (priv->ctx->port_type == MONITOR) return 1; if (priv->in_scan) { - IPW2100_DEBUG_SCAN("Scan requested while already in scan...\n"); + IPW2100_DEBUG_SCAN("%s", "Scan requested while already in scan...\n"); return 0; } - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); /* Not clearing here; doing so makes iwlist always return nothing... * * We should modify the table logic to use aging tables vs. clearing * the table on each scan start. */ - IPW2100_DEBUG_SCAN("starting scan\n"); + IPW2100_DEBUG_SCAN("%s", "starting scan\n"); err = ipw2100_hw_send_command(priv, &cmd); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return err; } @@ -4945,7 +4935,7 @@ }; int err; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); if (priv->custom_addr) { memcpy(cmd.host_command_parameters, priv->mac_addr, @@ -4957,7 +4947,7 @@ err = ipw2100_hw_send_command(priv, &cmd); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return err; } @@ -4967,11 +4957,12 @@ struct host_command cmd = { .host_command = PORT_TYPE, .host_command_sequence = 0, - .host_command_length = sizeof(u32), - .host_command_parameters[0] = port_type + .host_command_length = sizeof(u32) }; int err; + cmd.host_command_parameters[0] = port_type; + IPW2100_DEBUG_FW_COMMAND("PORT_TYPE: %s\n", port_type == IBSS ? "IBSS" : "BSS"); if (!batch_mode) { @@ -5002,11 +4993,12 @@ struct host_command cmd = { .host_command = CHANNEL, .host_command_sequence = 0, - .host_command_length = sizeof(u32), - .host_command_parameters[0] = channel + .host_command_length = sizeof(u32) }; int err; + cmd.host_command_parameters[0] = channel; + IPW2100_DEBUG_FW_COMMAND("CHANNEL: %d\n", channel); /* If not BSS then we don't support channel selection */ @@ -5107,11 +5099,12 @@ struct host_command cmd = { .host_command = BASIC_TX_RATES, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = rate & TX_RATE_MASK + .host_command_length = 4 }; int err; + cmd.host_command_parameters[0] = rate & TX_RATE_MASK; + if (!batch_mode) { err = ipw2100_disable_adapter(priv); if (err) @@ -5146,11 +5139,12 @@ struct host_command cmd = { .host_command = POWER_MODE, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = power_level + .host_command_length = 4 }; int err; + cmd.host_command_parameters[0] = power_level; + err = ipw2100_hw_send_command(priv, &cmd); if (err) return err; @@ -5177,11 +5171,12 @@ struct host_command cmd = { .host_command = RTS_THRESHOLD, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = threshold + .host_command_length = 4 }; int err; + cmd.host_command_parameters[0] = threshold; + err = ipw2100_hw_send_command(priv, &cmd); if (err) return err; @@ -5237,10 +5232,11 @@ struct host_command cmd = { .host_command = SHORT_RETRY_LIMIT, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = retry + .host_command_length = 4 }; int err; + + cmd.host_command_parameters[0] = retry; err = ipw2100_hw_send_command(priv, &cmd); if (err) @@ -5256,11 +5252,12 @@ struct host_command cmd = { .host_command = LONG_RETRY_LIMIT, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = retry + .host_command_length = 4 }; int err; + cmd.host_command_parameters[0] = retry; + err = ipw2100_hw_send_command(priv, &cmd); if (err) return err; @@ -5288,7 +5285,7 @@ bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]); else - IPW2100_DEBUG_FW_COMMAND("MANDATORY_BSSID: <clear>\n"); + IPW2100_DEBUG_FW_COMMAND("%s", "MANDATORY_BSSID: <clear>\n"); #endif /* if BSSID is empty then we disable mandatory bssid mode */ if (bssid != NULL) @@ -5434,19 +5431,20 @@ struct host_command cmd = { .host_command = TX_POWER_INDEX, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = tx_power + .host_command_length = 4 }; int err = 0; - IPW2100_DEBUG_INFO("enter\n"); + cmd.host_command_parameters[0] = tx_power; + + IPW2100_DEBUG_INFO("%s", "enter\n"); if (priv->port_type == IBSS) err = ipw2100_hw_send_command(priv, &cmd); if (!err) priv->tx_power = tx_power; - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -5457,12 +5455,13 @@ struct host_command cmd = { .host_command = BEACON_INTERVAL, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = interval + .host_command_length = 4 }; int err; - IPW2100_DEBUG_INFO("enter\n"); + cmd.host_command_parameters[0] = interval; + + IPW2100_DEBUG_INFO("%s", "enter\n"); if (priv->port_type == IBSS) { if (!batch_mode) { @@ -5480,7 +5479,7 @@ } } - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -5490,19 +5489,20 @@ struct host_command cmd = { .host_command = SET_SCAN_OPTIONS, .host_command_sequence = 0, - .host_command_length = 8, - .host_command_parameters[0] = priv->sec.enabled ? 0x2 : 0x0, - .host_command_parameters[1] = 0 + .host_command_length = 8 }; int err; - IPW2100_DEBUG_INFO("enter\n"); + cmd.host_command_parameters[0] = priv->sec.enabled ? 0x2 : 0x0; + cmd.host_command_parameters[1] = 0; + + IPW2100_DEBUG_INFO("%s", "enter\n"); - IPW2100_DEBUG_SCAN("setting scan options\n"); + IPW2100_DEBUG_SCAN("%s", "setting scan options\n"); err = ipw2100_hw_send_command(priv, &cmd); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return err; } @@ -5546,11 +5546,12 @@ struct host_command cmd = { .host_command = WEP_FLAGS, .host_command_sequence = 0, - .host_command_length = 4, - .host_command_parameters[0] = flags, + .host_command_length = 4 }; int err; + cmd.host_command_parameters[0] = flags; + IPW2100_DEBUG_FW_COMMAND("WEP_FLAGS: flags = 0x%08X\n", flags); if (!batch_mode) { @@ -5818,7 +5819,7 @@ int err; int batch_mode = 1; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); err = ipw2100_disable_adapter(priv); if (err) @@ -5829,7 +5830,7 @@ if (err) return err; - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -5903,7 +5904,7 @@ return err; */ - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -5945,7 +5946,7 @@ struct ipw2100_priv *priv = ipw2100_netdev(dev); unsigned long flags; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) MOD_INC_USE_COUNT; @@ -5955,7 +5956,7 @@ priv->open = 1; spin_unlock_irqrestore(&priv->low_lock, flags); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -5966,7 +5967,7 @@ struct list_head *element; struct ipw2100_tx_packet *packet; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); spin_lock_irqsave(&priv->low_lock, flags); @@ -5983,8 +5984,8 @@ list_del(element); DEC_STAT(&priv->tx_pend_stat); - ieee80211_txb_free(packet->txb); - packet->txb = NULL; + ieee80211_txb_free(packet->info.d_struct.txb); + packet->info.d_struct.txb = NULL; list_add_tail(element, &priv->tx_free_list); INC_STAT(&priv->tx_free_stat); @@ -5995,7 +5996,7 @@ MOD_DEC_USE_COUNT; #endif - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; } @@ -6016,7 +6017,7 @@ #ifdef CONFIG_IPW2100_PROMISC // we do nothing as we should not be transmitting anyway if (priv->ctx->port_type == MONITOR) { - IPW2100_DEBUG_TX("exit - monitor mode\n"); + IPW2100_DEBUG_TX("%s", "exit - monitor mode\n"); return; } #endif @@ -6027,7 +6028,7 @@ dev->name); schedule_reset(priv); - IPW2100_DEBUG_TX("exit\n"); + IPW2100_DEBUG_TX("%s", "exit\n"); } @@ -6056,9 +6057,9 @@ static int ipw2100_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - IPW2100_DEBUG_IOCTL("enter\n"); + IPW2100_DEBUG_IOCTL("%s", "enter\n"); - IPW2100_DEBUG_IOCTL("exit\n"); + IPW2100_DEBUG_IOCTL("%s", "exit\n"); return -EOPNOTSUPP; } @@ -6328,7 +6329,7 @@ int registered = 0; u32 val; - IPW2100_DEBUG_INFO("enter\n"); + IPW2100_DEBUG_INFO("%s", "enter\n"); /* set up PCI mappings for device */ err = pci_enable_device(pdev); @@ -6339,7 +6340,7 @@ err = pci_set_dma_mask(pdev, PCI_DMA_32BIT); if (err) { - IPW2100_DEBUG_INFO("failed pci_set_dma_mask!\n"); + IPW2100_DEBUG_INFO("%s", "failed pci_set_dma_mask!\n"); pci_disable_device(pdev); return err; } @@ -6363,7 +6364,7 @@ mem_flags = pci_resource_flags(pdev, 0); if ((mem_flags & IORESOURCE_MEM) != IORESOURCE_MEM) { - IPW2100_DEBUG_INFO("weird - resource type is not memory\n"); + IPW2100_DEBUG_INFO("%s", "weird - resource type is not memory\n"); err = -ENODEV; goto fail; } @@ -6426,7 +6427,7 @@ } dev->irq = pdev->irq; - IPW2100_DEBUG_INFO("Attempting to register device...\n"); + IPW2100_DEBUG_INFO("%s", "Attempting to register device...\n"); SET_MODULE_OWNER(dev); @@ -6481,7 +6482,7 @@ ipw2100_start_scan(priv); } - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); return 0; @@ -6565,7 +6566,7 @@ pci_release_regions(pdev); pci_disable_device(pdev); - IPW2100_DEBUG_INFO("exit\n"); + IPW2100_DEBUG_INFO("%s", "exit\n"); } #ifdef CONFIG_PM diff -ru ipw2100-0.49/ipw2100_wx.c ipw2100-0.49-mod/ipw2100_wx.c --- ipw2100-0.49/ipw2100_wx.c Fri Jul 9 00:32:17 2004 +++ ipw2100-0.49-mod/ipw2100_wx.c Wed Jul 14 12:51:49 2004 @@ -169,7 +169,7 @@ err = ipw2100_get_ordinal(priv, IPW_ORD_OUR_FREQ, &chan, &len); if (err) { - IPW2100_DEBUG_WX("failed querying ordinals.\n"); + IPW2100_DEBUG_WX("%s", "failed querying ordinals.\n"); return err; } @@ -385,7 +385,7 @@ } range->num_frequency = val; - IPW2100_DEBUG_WX("GET Range\n"); + IPW2100_DEBUG_WX("%s", "GET Range\n"); return 0; } @@ -411,7 +411,7 @@ if (!memcmp(any, wrqu->ap_addr.sa_data, ETH_ALEN) || !memcmp(off, wrqu->ap_addr.sa_data, ETH_ALEN)) { /* we disable mandatory BSSID association */ - IPW2100_DEBUG_WX("exit - disable mandatory BSSID\n"); + IPW2100_DEBUG_WX("%s", "exit - disable mandatory BSSID\n"); return ipw2100_set_mandatory_bssid(priv, NULL, 0); } @@ -470,7 +470,7 @@ char *essid = ""; /* ANY */ int err; - IPW2100_DEBUG_WX("enter\n"); + IPW2100_DEBUG_WX("%s", "enter\n"); if (wrqu->essid.flags && wrqu->essid.length) essid = extra; @@ -482,11 +482,11 @@ err = ipw2100_set_essid(priv, essid, 0); if (err) { - IPW2100_DEBUG_WX("SET SSID failed\n"); + IPW2100_DEBUG_WX("%s", "SET SSID failed\n"); return err; } - IPW2100_DEBUG_WX("exit\n"); + IPW2100_DEBUG_WX("%s", "exit\n"); return 0; } @@ -566,7 +566,7 @@ err = ipw2100_set_tx_rates(priv, rate, 0); if (err) { - IPW2100_DEBUG_WX("failed setting tx rates.\n"); + IPW2100_DEBUG_WX("%s", "failed setting tx rates.\n"); return err; } @@ -591,7 +591,7 @@ err = ipw2100_get_ordinal(priv, IPW_ORD_CURRENT_TX_RATE, &val, &len); if (err) { - IPW2100_DEBUG_WX("failed querying ordinals.\n"); + IPW2100_DEBUG_WX("%s", "failed querying ordinals.\n"); return err; } @@ -651,7 +651,7 @@ err = ipw2100_get_ordinal(priv, IPW_ORD_RTS_THRESHOLD, &wrqu->rts.value, &len); if (err) { - IPW2100_DEBUG_WX("query ordinal failed.\n"); + IPW2100_DEBUG_WX("%s", "query ordinal failed.\n"); return err; } } @@ -668,7 +668,7 @@ struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - IPW2100_DEBUG_WX("TODO: Power management by wireless extension...\n"); + IPW2100_DEBUG_WX("%s", "TODO: Power management by wireless extension...\n"); IPW2100_DEBUG_WX("SET TX Power -> %d \n", wrqu->rts.value); @@ -811,9 +811,9 @@ { struct ipw2100_priv *priv = ipw2100_netdev(dev); - IPW2100_DEBUG_WX("Initiating scan...\n"); + IPW2100_DEBUG_WX("%s", "Initiating scan...\n"); if (ipw2100_start_scan(priv)) { - IPW2100_DEBUG_WX("Start scan failed.\n"); + IPW2100_DEBUG_WX("%s", "Start scan failed.\n"); /* TODO: Mark a scan as pending so when hardware initialized * a scan starts */ @@ -913,7 +913,7 @@ char *stop = ev + IW_SCAN_MAX_DATA; int i; - IPW2100_DEBUG_WX("enter\n"); + IPW2100_DEBUG_WX("%s", "enter\n"); spin_lock_irqsave(&priv->low_lock, flags); @@ -967,11 +967,11 @@ if (wrqu->power.disabled) { err = ipw2100_set_power_mode(priv, IPW_POWER_MODE_CAM); if (err) { - IPW2100_DEBUG_WX("failed setting power mode.\n"); + IPW2100_DEBUG_WX("%s", "failed setting power mode.\n"); return err; } - IPW2100_DEBUG_WX("SET Power Management Mode -> off\n"); + IPW2100_DEBUG_WX("%s", "SET Power Management Mode -> off\n"); return 0; } @@ -1007,7 +1007,7 @@ err = ipw2100_set_power_mode(priv, i); if (err) { - IPW2100_DEBUG_WX("failed setting power mode.\n"); + IPW2100_DEBUG_WX("%s", "failed setting power mode.\n"); return err; } @@ -1028,7 +1028,7 @@ err = ipw2100_get_ordinal(priv, IPW_ORD_POWER_MGMT_MODE, &val, &len); if (err) { - IPW2100_DEBUG_WX("failed querying ordinals.\n"); + IPW2100_DEBUG_WX("%s", "failed querying ordinals.\n"); return err; } @@ -1270,7 +1270,7 @@ return wstats; fail_get_ordinal: - IPW2100_DEBUG_WX("failed querying ordinals.\n"); + IPW2100_DEBUG_WX("%s", "failed querying ordinals.\n"); return (struct iw_statistics *) NULL; } @@ -1281,7 +1281,7 @@ union iwreq_data wrqu; int len = ETH_ALEN; - IPW2100_DEBUG_WX("enter\n"); + IPW2100_DEBUG_WX("%s", "enter\n"); if (priv->wx_ap_event_pending) { priv->wx_ap_event_pending = 0; Victor -- Victor J. Orlikowski <> victor.j.orlikowski@alumni.duke.edu ^ permalink raw reply [flat|nested] 43+ messages in thread
[parent not found: <2hQr1-62p-23@gated-at.bofh.it>]
[parent not found: <2hRQ5-7bn-9@gated-at.bofh.it>]
* Re: ipw2100 wireless driver [not found] ` <2hRQ5-7bn-9@gated-at.bofh.it> @ 2004-07-14 14:07 ` Andi Kleen 2004-07-14 14:59 ` Vojtech Pavlik 0 siblings, 1 reply; 43+ messages in thread From: Andi Kleen @ 2004-07-14 14:07 UTC (permalink / raw) To: Vojtech Pavlik; +Cc: linux-kernel Vojtech Pavlik <vojtech@suse.cz> writes: > > Wouldn't "struct sk_buff **fragments" be a more correct fix? No, that would be a pointer to an array instead of the array itself. Completely different thing. The best would be struct sk_buff *fragments[0]; [] here is C99, which 2.95 didn't even attempt to support. -Andi >> --- ipw2100-ofic/ieee80211.h 2004-07-09 06:32:17.000000000 +0200 >> +++ ipw2100-0.49/ieee80211.h 2004-07-14 13:18:50.000000000 +0200 >> @@ -440,7 +440,7 @@ >> u16 reserved; >> u16 frag_size; >> u16 payload_size; >> - struct sk_buff *fragments[]; >> + struct sk_buff *fragments[1]; ^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: ipw2100 wireless driver 2004-07-14 14:07 ` Andi Kleen @ 2004-07-14 14:59 ` Vojtech Pavlik 0 siblings, 0 replies; 43+ messages in thread From: Vojtech Pavlik @ 2004-07-14 14:59 UTC (permalink / raw) To: Andi Kleen; +Cc: linux-kernel On Wed, Jul 14, 2004 at 04:07:52PM +0200, Andi Kleen wrote: > Vojtech Pavlik <vojtech@suse.cz> writes: > > > > Wouldn't "struct sk_buff **fragments" be a more correct fix? > > No, that would be a pointer to an array instead of the array itself. > > Completely different thing. Indeed. > The best would be struct sk_buff *fragments[0]; Agreed. It's not a very nice construction anyway. > [] here is C99, which 2.95 didn't even attempt to support. > > -Andi > > > >> --- ipw2100-ofic/ieee80211.h 2004-07-09 06:32:17.000000000 +0200 > >> +++ ipw2100-0.49/ieee80211.h 2004-07-14 13:18:50.000000000 +0200 > >> @@ -440,7 +440,7 @@ > >> u16 reserved; > >> u16 frag_size; > >> u16 payload_size; > >> - struct sk_buff *fragments[]; > >> + struct sk_buff *fragments[1]; > > -- Vojtech Pavlik SuSE Labs, SuSE CR ^ permalink raw reply [flat|nested] 43+ messages in thread
end of thread, other threads:[~2004-08-12 3:47 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-14 11:41 ipw2100 wireless driver Pavel Machek
2004-07-14 11:48 ` Jeff Chua
2004-07-14 11:55 ` Pavel Machek
2004-07-14 14:53 ` Éric Brunet
2004-07-14 15:24 ` Emiliano 'AlberT' Gabrielli
2004-08-09 20:15 ` Tomas Szepe
2004-08-10 5:02 ` Jeff Chua
2004-08-10 6:55 ` Christoph Hellwig
2004-08-10 10:16 ` Pavel Machek
2004-08-10 10:34 ` Christoph Hellwig
2004-08-11 12:17 ` Pavel Machek
2004-08-11 17:54 ` Jeff Garzik
2004-08-11 20:27 ` Pavel Machek
2004-08-11 22:01 ` Jeff Garzik
2004-08-11 10:16 ` James Ketrenos
2004-08-11 10:44 ` Christoph Hellwig
2004-08-11 10:53 ` Wichert Akkerman
2004-08-11 10:59 ` Christoph Hellwig
2004-08-11 16:21 ` James Ketrenos
2004-08-11 16:30 ` Stephen Hemminger
2004-08-11 16:33 ` Tomas Szepe
2004-08-11 16:51 ` Christoph Hellwig
2004-08-11 17:02 ` Tomas Szepe
2004-08-11 17:11 ` Christoph Hellwig
2004-08-11 17:22 ` Tomas Szepe
2004-08-11 17:41 ` Christoph Hellwig
2004-08-11 17:51 ` Tomas Szepe
2004-08-11 22:43 ` David Woodhouse
2004-08-11 22:56 ` Tomas Szepe
2004-08-11 23:06 ` David Woodhouse
2004-08-11 23:11 ` Tomas Szepe
2004-08-11 23:21 ` David Woodhouse
2004-08-11 18:55 ` John Stoffel
2004-08-11 23:55 ` Jeff Chua
2004-08-12 3:47 ` Luis R. Rodriguez
2004-08-11 17:51 ` Jeff Garzik
2004-07-14 12:30 ` Tomas Szepe
2004-07-14 12:27 ` Pavel Machek
2004-07-14 13:15 ` Vojtech Pavlik
2004-07-14 13:42 ` Pavel Machek
2004-07-14 17:00 ` Victor J. Orlikowski
[not found] <2hQr1-62p-23@gated-at.bofh.it>
[not found] ` <2hRQ5-7bn-9@gated-at.bofh.it>
2004-07-14 14:07 ` Andi Kleen
2004-07-14 14:59 ` Vojtech Pavlik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox