Commit Graph

662 Commits (3b4c7d640376dbccfe80fc4f7b8772ecc7de28c5)

Author SHA1 Message Date
Daniel Drake c9a4b35df9 [PATCH] zd1211rw: disable TX queue during stop
This avoids some potential races.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05 13:42:58 -04:00
Daniel Drake e85d0918b5 [PATCH] ZyDAS ZD1211 USB-WLAN driver
There are 60+ USB wifi adapters available on the market based on the ZyDAS
ZD1211 chip.

Unlike the predecessor (ZD1201), ZD1211 does not have a hardware MAC, so most
data operations are coordinated by the device driver. The ZD1211 chip sits
alongside an RF transceiver which is also controlled by the driver. Our driver
currently supports 2 RF types, we know of one other available in a few marketed
products which we will be supporting soon.

Our driver also supports the newer revision of ZD1211, called ZD1211B. The
initialization and RF operations are slightly different for the new revision,
but the main difference is 802.11e support. Our driver does not support the
QoS features yet, but we think we know how to use them.

This driver is based on ZyDAS's own GPL driver available from www.zydas.com.tw.
ZyDAS engineers have been responsive and supportive of our efforts, so thumbs
up to them. Additionally, the firmware is redistributable and they have
provided device specs.

This driver has been written primarily by Ulrich Kunitz and myself. Graham
Gower, Greg KH, Remco and Bryan Rittmeyer have also contributed. The
developers of ieee80211 and softmac have made our lives so much easier- thanks!

We maintain a small info-page: http://zd1211.ath.cx/wiki/DriverRewrite

If there is enough time for review, we would like to aim for inclusion in
2.6.18. The driver works nicely as a STA, and can connect to both open and
encrypted networks (we are using software-based encryption for now). We will
work towards supporting more advanced features in the future (ad-hoc, master
mode, 802.11a, ...).

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05 13:42:58 -04:00
Daniel Drake 4359219425 [PATCH] bcm43xx: enable shared key authentication
I recently patched softmac to enable shared key authentication. This small patch
will enable crazy or unfortunate bcm43xx users to use this new capability.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05 13:42:58 -04:00
Larry Finger fc8fd3400b [PATCH] Convert bcm43xx-softmac to use the ieee80211_is_valid_channel routine
The current version of bcm43xx-softmac uses local routines to check
if a channel is valid. As noted in the comments, these routines do
not take any regulatory information into account. This patch converts
the code to use the equivalent routine in ieee80211, which is being
converted to know about regulatory information.

Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05 13:42:57 -04:00
Michael Buesch a1d79aaaa5 [PATCH] bcm43xx: workaround init_board vs. IRQ race
Place the Init-vs-IRQ workaround before any card register
access, because we might not have the wireless core mapped
at all times in init. So this will result in a Machine Check
caused by a bus error.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05 13:42:57 -04:00
Daniel Drake e8d5969722 [PATCH] bcm43xx: use softmac-suggested TX rate
Use Softmac-suggested TX ratecode:
ieee80211softmac_suggest_txrate()

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05 13:42:57 -04:00
Faidon Liambotis d3cef4ee22 [PATCH] Add two PLX device IDs
This patch adds device IDs for Symbol LA-4123 and Global Sun Tech
GL24110P to the HostAP PLX driver.
This is not tested with real hardware, but there is no reason why it
shouldn't work.
Please test.

Signed-off-by: Faidon Liambotis <faidon@cube.gr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-07-05 13:42:57 -04:00
Linus Torvalds 51bece910d Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: introduce utsrelease.h
  kbuild: explicit turn off gcc stack-protector
2006-07-03 21:26:12 -07:00
Arjan van de Ven cd11acdd85 [PATCH] lockdep: annotate hostap netdev ->xmit_lock
On Fri, 2006-06-30 at 15:45 -0700, Miles Lane wrote:
> Okay, I rebuilt my kernel with your combo patch applied.
> Then, I inserted my US Robotics USR2210 PCMCIA wifi card,
> ran "pccardutil eject", popped out the card and then inserted
> a Compaq iPaq wifi card.  This triggered the following.
>
> [ INFO: possible circular locking dependency detected ]
> -------------------------------------------------------
> syslogd/1886 is trying to acquire lock:
>  (&dev->queue_lock){-+..}, at: [<c11a50b5>] dev_queue_xmit+0x120/0x24b
>
> but task is already holding lock:
>  (&dev->_xmit_lock){-+..}, at: [<c11a5118>] dev_queue_xmit+0x183/0x24b
>
> which lock already depends on the new lock.

ok this appears to be hostap playing games... it has 2 network devices
for one piece of hardware and one calls the other via the networking
layer; there is thankfully a natural ordering between the two, so just
making the slave one a separate type ought to make this work.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03 15:27:10 -07:00
Sam Ravnborg 63104eec23 kbuild: introduce utsrelease.h
include/linux/version.h contained both actual KERNEL version
and UTS_RELEASE that contains a subset from git SHA1 for when
kernel was compiled as part of a git repository.
This had the unfortunate side-effect that all files including version.h
would be recompiled when some git changes was made due to changes SHA1.
Split it out so we keep independent parts in separate files.

Also update checkversion.pl script to no longer check for UTS_RELEASE.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-07-03 23:30:54 +02:00
Thomas Gleixner 1fb9df5d30 [PATCH] irq-flags: drivers/net: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:51 -07:00
Linus Torvalds 22a3e233ca Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  Remove obsolete #include <linux/config.h>
  remove obsolete swsusp_encrypt
  arch/arm26/Kconfig typos
  Documentation/IPMI typos
  Kconfig: Typos in net/sched/Kconfig
  v9fs: do not include linux/version.h
  Documentation/DocBook/mtdnand.tmpl: typo fixes
  typo fixes: specfic -> specific
  typo fixes in Documentation/networking/pktgen.txt
  typo fixes: occuring -> occurring
  typo fixes: infomation -> information
  typo fixes: disadvantadge -> disadvantage
  typo fixes: aquire -> acquire
  typo fixes: mecanism -> mechanism
  typo fixes: bandwith -> bandwidth
  fix a typo in the RTC_CLASS help text
  smb is no longer maintained

Manually merged trivial conflict in arch/um/kernel/vmlinux.lds.S
2006-06-30 15:39:30 -07:00
Komuro fd99ddd070 [PATCH] pcmcia: hostap_cs.c - 0xc00f,0x0000 conflicts with pcnet_cs
Comment out the ID 0xc00f,0x0000 in hostap_cs.c, as it conflicts with the
pcnet_cs driver.

Signed-off-by: komurojun-mbn@nifty.com
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-06-30 22:09:12 +02:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Adrian Bunk 80f7228b59 typo fixes: occuring -> occurring
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 18:27:16 +02:00
Jesper Juhl 8f76078037 [PATCH] Remove redundant NULL checks before [kv]free - in drivers/
Remove redundant NULL chck before kfree + tiny CodingStyle cleanup for
drivers/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-27 17:32:48 -07:00
Linus Torvalds da206c9e68 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  typo fixes
  Clean up 'inline is not at beginning' warnings for usb storage
  Storage class should be first
  i386: Trivial typo fixes
  ixj: make ixj_set_tone_off() static
  spelling fixes
  fix paniced->panicked typos
  Spelling fixes for Documentation/atomic_ops.txt
  move acknowledgment for Mark Adler to CREDITS
  remove the bouncing email address of David Campbell
2006-06-26 13:33:14 -07:00
Michael Buesch 71c0cd7042 [PATCH] Add bcm43xx HW RNG support
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:19 -07:00
Andreas Mohr d6e05edc59 spelling fixes
acquired (aquired)
contiguous (contigious)
successful (succesful, succesfull)
surprise (suprise)
whether (weather)
some other misspellings

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-26 18:35:02 +02:00
Herbert Xu 5b057c6b1a [NET]: Avoid allocating skb in skb_pad
First of all it is unnecessary to allocate a new skb in skb_pad since
the existing one is not shared.  More importantly, our hard_start_xmit
interface does not allow a new skb to be allocated since that breaks
requeueing.

This patch uses pskb_expand_head to expand the existing skb and linearize
it if needed.  Actually, someone should sift through every instance of
skb_pad on a non-linear skb as they do not fit the reasons why this was
originally created.

Incidentally, this fixes a minor bug when the skb is cloned (tcpdump,
TCP, etc.).  As it is skb_pad will simply write over a cloned skb.  Because
of the position of the write it is unlikely to cause problems but still
it's best if we don't do it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-23 02:06:41 -07:00
Alan Cox aa95abefcc [PATCH] skb_padto()-area fixes in 8390, wavelan
Ar Iau, 2006-06-22 am 21:29 +1000, ysgrifennodd Herbert Xu:
> Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >
> > The 8390 change (corrected version) also makes 8390.c faster so should
> > be applied anyway, and the orinoco one fixes some code that isn't even
> > needed and someone forgot to remove long ago. Otherwise the skb_padto
>
> Yeah I agree totally.  However, I haven't actually seen the fixed 8390
> version being posted yet or at least not to netdev :)

Ah the resounding clang of a subtle hint ;)

Signed-off-by: Alan Cox <alan@redhat.com>

- Return 8390.c to the old way of handling short packets (which is also
faster)

- Remove the skb_padto from orinoco. This got left in when the padding bad
write patch was added and is actually not needed. This is fixing a merge
error way back when.

- Wavelan can also use the stack based buffer trick if you want
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-22 23:32:02 -04:00
Eric Sesterhenn a192491ad5 [PATCH] Array overrun in drivers/net/wireless/wavelan.c
hi,

this is another array overrun spotted by coverity (#id 507)
we should check the index against array size before using it.
Not sure why the driver doesnt use ARRAY_SIZE instead of its
own macro.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-22 23:24:18 -04:00
Jeff Garzik 4b2d9cf009 Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream 2006-06-20 04:46:02 -04:00
Linus Torvalds d0b952a983 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (109 commits)
  [ETHTOOL]: Fix UFO typo
  [SCTP]: Fix persistent slowdown in sctp when a gap ack consumes rx buffer.
  [SCTP]: Send only 1 window update SACK per message.
  [SCTP]: Don't do CRC32C checksum over loopback.
  [SCTP] Reset rtt_in_progress for the chunk when processing its sack.
  [SCTP]: Reject sctp packets with broadcast addresses.
  [SCTP]: Limit association max_retrans setting in setsockopt.
  [PFKEYV2]: Fix inconsistent typing in struct sadb_x_kmprivate.
  [IPV6]: Sum real space for RTAs.
  [IRDA]: Use put_unaligned() in irlmp_do_discovery().
  [BRIDGE]: Add support for NETIF_F_HW_CSUM devices
  [NET]: Add NETIF_F_GEN_CSUM and NETIF_F_ALL_CSUM
  [TG3]: Convert to non-LLTX
  [TG3]: Remove unnecessary tx_lock
  [TCP]: Add tcp_slow_start_after_idle sysctl.
  [BNX2]: Update version and reldate
  [BNX2]: Use CPU native page size
  [BNX2]: Use compressed firmware
  [BNX2]: Add firmware decompression
  [BNX2]: Allow WoL settings on new 5708 chips
  ...

Manual fixup for conflict in drivers/net/tulip/winbond-840.c
2006-06-19 18:55:56 -07:00
Herbert Xu 932ff279a4 [NET]: Add netif_tx_lock
Various drivers use xmit_lock internally to synchronise with their
transmission routines.  They do so without setting xmit_lock_owner.
This is fine as long as netpoll is not in use.

With netpoll it is possible for deadlocks to occur if xmit_lock_owner
isn't set.  This is because if a printk occurs while xmit_lock is held
and xmit_lock_owner is not set can cause netpoll to attempt to take
xmit_lock recursively.

While it is possible to resolve this by getting netpoll to use
trylock, it is suboptimal because netpoll's sole objective is to
maximise the chance of getting the printk out on the wire.  So
delaying or dropping the message is to be avoided as much as possible.

So the only alternative is to always set xmit_lock_owner.  The
following patch does this by introducing the netif_tx_lock family of
functions that take care of setting/unsetting xmit_lock_owner.

I renamed xmit_lock to _xmit_lock to indicate that it should not be
used directly.  I didn't provide irq versions of the netif_tx_lock
functions since xmit_lock is meant to be a BH-disabling lock.

This is pretty much a straight text substitution except for a small
bug fix in winbond.  It currently uses
netif_stop_queue/spin_unlock_wait to stop transmission.  This is
unsafe as an IRQ can potentially wake up the queue.  So it is safer to
use netif_tx_disable.

The hamradio bits used spin_lock_irq but it is unnecessary as
xmit_lock must never be taken in an IRQ handler.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-17 21:30:14 -07:00
Zhu Yi 89c318ed39 [PATCH] ipw2200 locking fix
Well, this is not 100% if when the card fires two consecutive
interrupts. Though unlikely, it's better to protect early than seeing
some "weird" bugs one day. I proposed attached patch. If you can help to
test, that will be appreciated (I cannot see the lockdep warning on my
box somehow).

Cc: Frederik Deweerdt <deweerdt@free.fr>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:14 -04:00
Jiri Slaby 12a3768792 [PATCH] pci: bcm43xx avoid pci_find_device
bcm43xx avoid pci_find_device

Change pci_find_device to safer pci_get_device with support for more
devices.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:13 -04:00
Michael Buesch 91769e7dd9 [PATCH] bcm43xx: preemptible periodic work
Make the heavy periodic work preemptible to avoid disabling
local IRQs for several msecs.

Signed-off-by: Michael Buesch <mb@buesch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:13 -04:00
Michael Buesch 78ff56a06e [PATCH] bcm43xx: redesign locking
Redesign the bcm43xx locking.
This is pre-work to get a preemptible periodic work handler.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:13 -04:00
Pavel Machek 5c601d0c94 [PATCH] wireless: move zd1201 where it belongs
zd1201 is wifi adapter, yet it is hiding in drivers/usb/net where
noone can find it. This moves Kconfig/Makefile zd1201 to the right
place.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05 16:13:30 -04:00
Jason Lunz ff7562aaec [PATCH] bcm43xx: quiet down log spam from set_security
The debug logging in bcm43xx_ieee80211_set_security() is pretty noisy.
Make it more silent.

Signed-off-by: Jason Lunz <lunz@falooley.org>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05 15:53:10 -04:00
John W. Linville f6882a0688 Merge branch 'upstream-fixes' into upstream 2006-06-05 15:31:57 -04:00
Michael Buesch ea9a771959 [PATCH] bcm43xx: add DMA rx poll workaround to DMA4
Also add the Poll RX DMA Memory workaround to the DMA4
(xmitstatus) path.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05 15:28:56 -04:00
John W. Linville b1141f6d5d Merge branch 'upstream-fixes' into upstream 2006-05-26 16:12:24 -04:00
Randy Dunlap 4541a5db0b [PATCH] arlan: fix section mismatch warnings
Fix section mismatch warnings:
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.init.text:arlan_probe from .text between 'init_module' (at offset
0x3526) and 'cleanup_module'
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.init.text:init_arlan_proc from .text between 'init_module' (at offset
0x3539) and 'cleanup_module'
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.exit.text:cleanup_arlan_proc from .text between 'cleanup_module' (at
offset 0x356c) and 'arlan_diagnostic_info_string'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-26 16:11:56 -04:00
Randy Dunlap 53072d68cc [PATCH] wavelan: fix section mismatch
Fix section mismatch warning:
WARNING: drivers/net/wireless/wavelan.o - Section mismatch: reference to
.init.text: from .text between 'init_module' (at offset 0x371e) and
'cleanup_module'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-26 16:11:56 -04:00
Florin Malita bb6e093da2 [PATCH] orinoco: possible null pointer dereference in orinoco_rx_monitor()
If the skb allocation fails, the current error path calls
dev_kfree_skb_irq() with a NULL argument.  Also, 'err' is not being used.

Coverity CID: 275.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-23 10:35:32 -07:00
Marcin Juszkiewicz df8ccb9bf1 [PATCH] hostap: new pcmcia IDs
Add two Prism cards to hostap_cs driver.

  product info: "Pretec", "CompactWLAN Card 802.11b", "2.5"
  manfid: 0x0156, 0x0002

  product info: "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02", ""
  manfid: 0x0156, 0x0002

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-22 14:51:33 -04:00
John W. Linville 01d654d25d Merge branch 'upstream-fixes' into upstream 2006-05-22 14:45:29 -04:00
Florin Malita 82464e63a0 [PATCH] orinoco: possible null pointer dereference in orinoco_rx_monitor()
If the skb allocation fails, the current error path calls
dev_kfree_skb_irq() with a NULL argument.  Also, 'err' is not being used.

Coverity CID: 275.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-22 14:39:04 -04:00
Arjan van de Ven 5d25ea7c0c [PATCH] unused exports in wireless drivers
There's a bunch of unused exports in the wireless drivers; that's
bad since unused exports take up quite a bit of space in total;
the patch below removes them.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-17 14:58:55 -04:00
John W. Linville 59d4b684fb Merge branch 'upstream-fixes' into upstream 2006-05-17 14:54:09 -04:00
David Woodhouse bc519f30eb [PATCH] bcm43xx: associate on 'ifconfig up'
I still need this hack to work around the fact that softmac doesn't
attempt to associate when we bring the device up...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-17 14:53:19 -04:00
Stefano Brivio f03cc4fd92 [PATCH] bcm43xx: add PCI ID for bcm4319
Add PCI ID for bcm4319.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:41 -04:00
Stefano Brivio ec000ca9d4 [PATCH] bcm43xx: fix whitespace
Fix whitespace.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:41 -04:00
Pavel Roskin 461c078c9c [PATCH] orinoco: don't put PCI resource data to the network device
The resource data in the network device is intended for ISA and other
older busses, but not for PCI.  Don't put PCI data there.  Don't (ab)use
the network device for keeping the IRQ number.

Retire orinoco_pci_setup_netdev(), and print some minimal information to
the kernel log instead, identifying the network device and the driver
mostly to identify problems at startup.  Scripts should rely on sysfs.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:41 -04:00
Pavel Roskin 95047dd6d0 [PATCH] orinoco: eliminate the suspend/resume functions if CONFIG_PM is unset
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:40 -04:00
Pavel Roskin 6cbaa330f1 [PATCH] orinoco: simplify locking, fix error handling in PCMCIA resume
Don't use flags in the spinlocks - the PCMCIA resume functions may not
be called under lock.  Don't ignore any errors.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:40 -04:00
Pavel Roskin 9a568da209 [PATCH] orinoco: report more relevant data on startup
Report only the first I/O window and IRQ, and also add the driver name.
The second I/O window, Vpp and configuration index are not interesting
to most users.  They can be found by PCMCIA debug tools if needed.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:40 -04:00
Pavel Roskin e4f4f98efd [PATCH] orinoco: unregister network device before releasing PCMCIA resources
Hardware resources should not be made available to other devices while
the network device is still registered.  Also remove the related debug
statements.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:40 -04:00
Michal Schmidt 0c6157a371 [PATCH] wireless/airo: minimal WPA awareness
Running Linux 2.6.17-rc3-mm1 which has this patch included I get this
interesting message:
airo(eth0): WPA unsupported (only firmware versions 5.30.17 and greater
support WPA.  Detected 5.30.17)

airo_test_wpa_capable assumes that the softSubVer part of the firmware
version number is coded in BCD. Apparently, that's not true.
I have firmware version 5.30.17 and cap_rid.softSubVer is 0x11==17.

Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 17:10:39 -04:00
John W. Linville fd5226a726 Merge branch 'upstream-fixes' into upstream 2006-05-05 16:56:24 -04:00
David Woodhouse 178e0cc5ff [PATCH] bcm43xx: Fix access to non-existent PHY registers
Fix the conditions under which we poke at the APHY registers in
bcm43xx_phy_initg() to avoid a machine check on chips where they don't
exist.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Michael Buesch 869aaab181 [PATCH] bcm43xx: Fix array overrun in bcm43xx_geo_init
The problem here is that the bcm34xx driver and the ieee80211
stack do not agree on what channels are possible for 802.11a.
The ieee80211 stack only wants channels between 34 and 165, while
the bcm43xx driver accepts anything from 0 to 200. I made the
bcm43xx driver comply with the ieee80211 stack expectations, by
using the proper constants.

Signed-off-by: Jean Delvare <jdelvare@suse.de>

[mb]: Reduce stack usage by kzalloc-ing ieee80211_geo

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Stefano Brivio f9f7b9602e [PATCH] bcm43xx: check for valid MAC address in SPROM
Check for valid MAC address in SPROM fields instead of relying on
PHY type while setting the MAC address in the networking subsystem,
as some devices have multiple PHYs.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Michael Buesch 5b4b9775a0 [PATCH] bcm43xx: fix iwmode crash when down
This fixes a crash when

	iwconfig ethX mode foo

is done before

	ifconfig ethX up

or after

	ifconfig ethX down

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Dan Williams 3c30495675 [PATCH] wireless/airo: minimal WPA awareness
airo cards with firmware versions of 5.30.17 and higher support WPA.
This patch recognizes WPA-capable firmware versions and adds support for
retrieving the WPA and RSN information elements from the card's scan
results.  The JOB and FLAG fields are now independent, since there was
no space left in the FLAG field for FLAG_WPA_CAPABLE.

Signed-off-by: matthieu castet <castet.matthieu@free.fr>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:26:14 -04:00
Zhu Yi e3c5a64e70 [PATCH] ipw2200: Fix wpa_supplicant association problem
The new ipw2200 scan completion event feature will cause a potential event
race condition in wpa_supplicant. The patch fixes this problem by move the
ipw_disassociate() to the IW_AUTH_WPA_ENABLED event handling code.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:57 -04:00
Zhu Yi 127119d50f [PATCH] ipw2200: remove priv->last_noise reference
priv->last_noise is not used with the exponential averaging algorithm

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:57 -04:00
Zhu Yi 459d408768 [PATCH] ipw2200: rename CONFIG_IEEE80211_RADIOTAP to CONFIG_IPW2200_RADIOTAP
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:57 -04:00
Zhu Yi 34f8ae467b [PATCH] wireless Kconfig add IPW2200_RADIOTAP
Makefile both IPW2200_RADIOTAP and IPW2200_PROMISCUOUS depend on
IPW2200_MONITOR. Let IPW2200_PROMISCUOUS select IPW2200_RADIOTAP.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:57 -04:00
Zhu Yi e43e3c1e90 [PATCH] ipw2200: rename CONFIG_IPW_QOS to CONFIG_IPW2200_QOS
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:57 -04:00
Zhu Yi 555fd91852 [PATCH] ipw2200: update version stamp to 1.1.2
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:56 -04:00
Zhu Yi ae4af61f6d [PATCH] ipw2200: version string rework
Added version string fields so the version string indicates what is
configured (ie, you'll see 1.1.1kpmd if you are using a GIT snapshot
(Kernel.. previously -git), promiscuous (p), monitor (m), debug (d) build.

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:56 -04:00
Zhu Yi d685b8c226 [PATCH] ipw2200: Enable rtap interface for RF promiscuous mode while associated
With this patch, a new promiscuous mode is enabled. If the module is loaded
with the rtap_iface=1 module parameter, two interfaces will be created
(instead of just one).

The second interface is prefixed 'rtap' and provides received 802.11 frames
on the current channel to user space in a radiotap header format.

Example usage:

        % modprobe ipw2200 rtap_iface=1
        % iwconfig eth1 essid MyNetwork
        % dhcpcd eth1
        % tcpdump -i rtap0

If you do not specify 'rtap_iface=1' then the rtap interface will
not be created and you will need to turn it on via:

        % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface

You can filter out what type of information is passed to user space via
the rtap_filter sysfs entry.  Currently you can tell the driver to
transmit just the headers (which will provide the RADIOTAP and IEEE
802.11 header but not the payload), to filter based on frame control
type (Management, Control, or Data), and whether to report transmitted
frames, received frames, or both.

The transmit frame reporting is based on a patch by Stefan Rompf.

Filters can be get and set via a sysfs interface. For example, set the
filter to only send headers (0x7), don't report Tx'd frames (0x10), and
don't report data frames (0x100):

        % echo 0x117 > /sys/bus/pci/drivers/ipw2200/*/rtap_filter

All your packets are belong to us:

        % tethereal -n -i rtap0

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:56 -04:00
Zhu Yi 0070f8c738 [PATCH] ipw2200: Fix endian issues with v3.0 fw image format
This patch corrects endian issues with the v3.0 fw image format.

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:56 -04:00
Zhu Yi 455936c733 [PATCH] ipw2200: Set the 'fixed' flags in wext get_rate
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:55 -04:00
Zhu Yi 61fb9ed99d [PATCH] ipw2200: turn off signal debug log
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:55 -04:00
Zhu Yi d0b526b715 [PATCH] ipw2200: Do not continue loading the firmware if kmalloc fails
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: "Zhu, Yi" <yi.zhu@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:55 -04:00
Zhu Yi 5dc81c3071 [PATCH] ipw2200: fix compile warning when !CONFIG_IPW2200_DEBUG
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:55 -04:00
Zhu Yi d2b83e1214 [PATCH] ipw2200: add module_param support for antenna selection
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:55 -04:00
Zhu Yi 07f02e4625 [PATCH] ipw2200: generates a scan event after a scan has completed
The patch make ipw2200 generate the scan event every time a scan has
completed, so that user space know when to get fresh results.
Dan Williams would like to go towards this model in Network Manager
rather than having to poll.

Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:54 -04:00
Zhu Yi a5cf4fe651 [PATCH] ipw2200: Fix TX QoS enabled frames problem
This patch works with the ieee80211 stack to set the correct QoS bit to the
ipw2200 card. It fixed the TX failure problem for using WPA with QoS.

Signed-off-by: Hong Liu <hong.liu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:54 -04:00
Zhu Yi 00d21de5c6 [PATCH] ipw2200: Exponential averaging for signal and noise Level
This patch replaces sliding averaging by exponential averaging for
reporting the wireless statistics for signal and noise level for ipw2200.
See details from: http://www.ces.clemson.edu/linux/ipw2200_averages.shtml

Signed-off-by: Bill Moss <bmoss@clemson.edu>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:54 -04:00
Michael Buesch cc9357104b [PATCH] bcm43xx: use pci_iomap() for convenience.
This reduces codesize.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:53 -04:00
Pavel Roskin f298a2ec62 [PATCH] orinoco: bump version to 0.15
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:52 -04:00
Pavel Roskin dc3437d205 [PATCH] orinoco: further comment cleanup in the PCI drivers
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:52 -04:00
Pavel Roskin b884c872fa [PATCH] orinoco: reduce differences between PCI drivers, create orinoco_pci.h
Make all Orinoco PCI drivers (orinoco_pci, orinoco_plx, orinoco_tmd and
orinoco_nortel) as similar as possible.  Use the best implementation of
error handling, the best error messages, the best comments.

Put common code to orinoco_pci.h.  For now, it's suspend and resume
functions and function for registering the network device.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:52 -04:00
Pavel Roskin c6fb2e9abe [PATCH] orinoco: support PCI suspend/resume for Nortel, PLX and TMD adaptors
Copy PCI suspend/resume functions from orinoco_pci.c.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:52 -04:00
Pavel Roskin 3d52996221 [PATCH] orinoco_pci: use pci_iomap() for resources
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:52 -04:00
Pavel Roskin d62274b374 [PATCH] orinoco_pci: disable device and free IRQ when suspending
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:52 -04:00
Pavel Roskin 37a6c6117d [PATCH] orinoco: delay FID allocation after firmware initialization
This is needed to identify the card before possible allocation problems,
so that the user at least can report the firmware version that fails.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:51 -04:00
Jiri Benc 2c1bd26035 [PATCH] orinoco: fix BAP0 offset error after several days of operation
After several days of operation of Netgear MA311 card, the card becomes
to seek improperly and needs reset. This patch tries to reset the card
when this situation occurs.

Mar  9 06:45:16 berkeley kernel: wlan0: Error -5 writing packet to BAP
Mar  9 06:45:16 berkeley kernel: hermes @ f992a000: BAP0 offset error: reg=0x4044 id=0x128 offset=0x44
Mar  9 06:45:16 berkeley kernel: wlan0: Error -5 writing packet to BAP
Mar  9 06:45:16 berkeley kernel: hermes @ f992a000: BAP0 offset error: reg=0x4044 id=0x128 offset=0x44
(etc.)

A more detailed description of the problem can be found at
https://bugzilla.novell.com/show_bug.cgi?id=154773
The same problem with different card is reported at
http://sourceforge.net/mailarchive/message.php?msg_id=14597046

Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:51 -04:00
Pavel Roskin a28dc81dcd [PATCH] orinoco: simplify 802.3 encapsulation code
Use skb_pull() to strip the addresses from the original packet.  Don't
strip protocol bytes.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:51 -04:00
Pavel Roskin 470e2aa6db [PATCH] orinoco: refactor and clean up Tx error handling
The result of orinoco_xmit() can be OK, dropped packet and busy
transmitter.  Rename labels accordingly.  Increment stats->tx_errors in
one place.  Increment stats->tx_dropped - nobody is doing it for us.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:51 -04:00
Pavel Roskin 8d5be08826 [PATCH] orinoco: don't use any padding for Tx frames
hermes_bap_pwrite() supports odd-sized packets now.   There is no
minimal packet size for 802.11.  Also, hermes_bap_pwrite() supports
odd-sized packets now.  This removes all reasons to pad the Tx data.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:51 -04:00
Pavel Roskin 6b61626290 [PATCH] orinoco replace hermes_write_words() with hermes_write_bytes()
The new function can write an odd number of bytes, thus making padding
unnecessary.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:50 -04:00
Pavel Roskin b34b867e94 [PATCH] orinoco: orinoco_xmit() should only return valid symbolic constants
Don't ever return -errno from orinoco_xmit() - the network layer doesn't
expect it.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:50 -04:00
Pavel Roskin 30c2d3b481 [PATCH] orinoco: optimize Tx exception handling in orinoco
When processing Tx exception, only read data until addr1.  Rename
hermes_tx_descriptor_802_11 to hermes_txexc_data since it's only used to
Tx exceptions.  Reuse existing hermes_tx_descriptor structure.  Remove
fields after addr1 - they are not read from the card.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:50 -04:00
Pavel Roskin 4ebe2eb0b3 [PATCH] orinoco: Symbol card supported by spectrum_cs is LA4137, not LA4100
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:50 -04:00
Pavel Roskin 754b1364e7 [PATCH] orinoco: remove debug buffer code and userspace include support
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:50 -04:00
Pavel Roskin 65b1fe7df7 [PATCH] orinoco: remove tracing code, it's unused
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:49 -04:00
Pavel Roskin 7eeae2ffad [PATCH] orinoco: remove underscores from little-endian field names
Sparse is much better at finding endianess issues than such visual cues.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:49 -04:00
Pavel Roskin b018779cbd [PATCH] orinoco: remove PCMCIA audio support, it's useless for wireless cards
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:49 -04:00
Pavel Roskin a6e26e8ddb [PATCH] orinoco: Remove useless CIS validation
The PCMCIA drivers would never be loaded if the CIS were wrong.
No other PCMCIA drivers validate CIS.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 16:15:49 -04:00
Michael Buesch 7c241d37fe [PATCH] bcm43xx: make PIO mode usable
This patch fixes PIO mode on the softmac bcm43xx
driver. (A dscape patch will follow).
It mainly fixes endianess issues.
This patch is tested on PowerPC32 and i386.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 15:20:24 -04:00
Pavel Roskin dac322e39a [PATCH] Fix crash on big-endian systems during scan
The original code was doing arithmetics on a little-endian value.
Reported by Stelios Koroneos <stelios@stelioscellar.com>

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-24 15:20:22 -04:00
Erik Mouw a392149ee1 [PATCH] bcm43xx: iw_priv_args names should be <16 characters
The room for the names in bcm43xx_priv_wx_args[] are IFNAMSIZ long and
IFNAMSIZ is defined as 16, so the names in bcm43xx_priv_wx_args should
be 15 characters (16 including the trailing \0). This patch fixes that
for the "set_shortpreambl", "get_shortpreambl", "set_swencryption", and
"get_swencryption" private calls. Patch is against 2.6.17-rc1.

Signed-off-by: Erik Mouw <erik@harddisk-recovery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-19 17:25:41 -04:00
Michael Buesch b35d649cb2 [PATCH] bcm43xx: sysfs code cleanup
This cleans up the bcm43xx sysfs code and makes it compliant
with the unwritten sysfs rules (at least I hope so).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-19 17:25:41 -04:00
Michael Buesch 8829d55e6b [PATCH] bcm43xx: fix pctl slowclock limit calculation
This fixes coverity bug:
http://marc.theaimsgroup.com/?l=linux-netdev&m=114417628413880&w=2

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-04-19 17:25:40 -04:00