Archived
14
0
Fork 0
Commit graph

2252 commits

Author SHA1 Message Date
Ivo van Doorn
aa776721b4 rt2x00: Fix basic rate initialization
The basic rate which is configured in the register
should not match all supported rates, but only the _basic_ rates.

Fix this by adding a new flag to the rt2x00_rate structure
and whenever the mode is changed, loop over all available rates
for that band to get the basic rate mask.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 19:31:42 -04:00
Ivo van Doorn
fd3c91c5e5 rt2x00: Always enable TSF ticking
Whatever mode we are in, according to the legacy drivers
we should always enable TSF ticking/counting.
We should also always enable the TBCN/TBTT field,
this field is only disabled during beacon regeneration.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 19:31:41 -04:00
Ivo van Doorn
72fa559bf4 rt2x00: Make rt2x00leds_register return void
rt2x00dev isn't interested in the rt2x00leds_register() value
anyway. So lets make it return void to even prevent people from
assuming there is anybody interested in the returnvalue.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 19:31:41 -04:00
Ivo van Doorn
7281037943 rt2x00: Rename config_preamble() to config_erp()
Rename config_preamble() to config_erp() and cleanup argument
list by putting it all into a single structure.
This will make the function more meaningful and easier to
expand later. This second option is mostly intended to make
the patch "mac80211: proper short-slot handling" from Johannes Berg
easier to apply for rt2x00.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:36 -04:00
Ivo van Doorn
e4030a2f40 rt2x00: Check IEEE80211_TXCTL_SEND_AFTER_DTIM flag
When mac sets the IEEE80211_TXCTL_SEND_AFTER_DTIM flag, we should
check if the ATIM queue is available in the driver and put the
frame in that queue for proper behavior (send frame after beacon interval).
Unfortunately not all drivers have this ATIM queue, and will lack
this feature for now.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:36 -04:00
Ivo van Doorn
a4fe07d913 rt2x00: Start bugging when rt2x00lib doesn't filter SW diversity
rt2x00lib should filter SW diversity out before sending any configuration
changes to the driver. When rt2x00lib fails to do this, it is important
that such events are reported because it _must_ be fixed.
So upgrading the error level to a BUG_ON() which will make sure
this bug gets noticed whenever it happens.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:36 -04:00
Ivo van Doorn
a7f3a06cbb rt2x00: Move firmware checksumming to driver
rt2x00lib depended on 2 crc algorithms because rt61/rt73
use a different algorithm then rt2800. This means that
even when only 1 algorithm was needed, the dependency was
still present for both.
By moving the checksum generation to the driver we can clean
up 2 annoying flags (which indicated which checksum was required)
and move the dependency to where it belongs: the driver.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:36 -04:00
Ivo van Doorn
5f46c4d053 rt2x00: Upgrade queue->lock to use irqsave
The queue->lock could be grabbed from interrupt context,
which could lead to lockdep panic like this:

kernel: ======================================================
kernel: [ INFO: soft-safe -> soft-unsafe lock order detected ]
kernel: 2.6.25-0.95.rc4.fc9 #1
kernel: ------------------------------------------------------
kernel: rt2500pci/1251 [HC0[0]:SC0[1]:HE1:SE0] is trying to acquire:
kernel:  (&queue->lock){--..}, at: [<ffffffff88213339>] rt2x00queue_get_entry+0x5a/0x81 [rt2x00lib]
kernel:
kernel: and this task is already holding:
kernel:  (_xmit_IEEE80211){-...}, at: [<ffffffff8122e9a3>] __qdisc_run+0x84/0x1a9
kernel: which would create a new lock dependency:
kernel:  (_xmit_IEEE80211){-...} -> (&queue->lock){--..}
kernel:
kernel: but this new dependency connects a soft-irq-safe lock:
kernel:  (_xmit_ETHER){-+..}
kernel: ... which became soft-irq-safe at:
kernel:   [<ffffffffffffffff>] 0xffffffffffffffff
kernel:
kernel: to a soft-irq-unsafe lock:
kernel:  (&queue->lock){--..}
kernel: ... which became soft-irq-unsafe at:
kernel: ...  [<ffffffff810545a2>] __lock_acquire+0x62d/0xd63
kernel:   [<ffffffff81054d36>] lock_acquire+0x5e/0x78
kernel:   [<ffffffff812a1497>] _spin_lock+0x26/0x53
kernel:   [<ffffffff88212f98>] rt2x00queue_reset+0x16/0x40 [rt2x00lib]
kernel:   [<ffffffff88212fd4>] rt2x00queue_alloc_entries+0x12/0xab [rt2x00lib]
kernel:   [<ffffffff88213091>] rt2x00queue_initialize+0x24/0xf2 [rt2x00lib]
kernel:   [<ffffffff88212036>] rt2x00lib_start+0x3b/0xd4 [rt2x00lib]
kernel:   [<ffffffff88212609>] rt2x00mac_start+0x18/0x1a [rt2x00lib]
kernel:   [<ffffffff881b9a4b>] ieee80211_open+0x1f3/0x46d [mac80211]
kernel:   [<ffffffff8121d980>] dev_open+0x4d/0x8b
kernel:   [<ffffffff8121d41e>] dev_change_flags+0xaf/0x172
kernel:   [<ffffffff81224fc2>] do_setlink+0x276/0x338
kernel:   [<ffffffff81225198>] rtnl_setlink+0x114/0x116
kernel:   [<ffffffff812262fc>] rtnetlink_rcv_msg+0x1d8/0x1f9
kernel:   [<ffffffff8123649a>] netlink_rcv_skb+0x3e/0xac
kernel:   [<ffffffff8122611a>] rtnetlink_rcv+0x29/0x33
kernel:   [<ffffffff81235eed>] netlink_unicast+0x1fe/0x26b
kernel:   [<ffffffff81236224>] netlink_sendmsg+0x2ca/0x2dd
kernel:   [<ffffffff812103b3>] sock_sendmsg+0xfd/0x120
kernel:   [<ffffffff812105a8>] sys_sendmsg+0x1d2/0x23c
kernel:   [<ffffffff8100c1c7>] tracesys+0xdc/0xe1
kernel:   [<ffffffffffffffff>] 0xffffffffffffffff

This can be fixed by using the irqsave/irqrestore versions
during the queue->lock handling.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:35 -04:00
Luis Correia
61191fb272 rt2x00: Fix trivial log message
Fix trivial log message.

Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:35 -04:00
Adam Baker
fd07e06380 rt2x00:correct rx packet length for USB devices
When fixing up the packet alignment, if we had to add 2 bytes to the front of
the skb we need to remember to take them off the end afterwards. This fixes
reception of encrypted packets which were otherwise failing with an invalid
ICV.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:35 -04:00
Ivo van Doorn
8af244ccb1 rt2x00: Only disable beaconing just before beacon update
We should not write 0 to the beacon sync register during
config_intf() since that will clear out the beacon interval
and forces the beacon to be send out at the lowest interval.
(reported by Mattias Nissler).

The side effect of the same bug was that while working with
multiple virtual AP interfaces a change for any of those
interfaces would disable beaconing untill an beacon update
was provided.

This is resolved by only updating the TSF_SYNC value during
config_intf(). In update_beacon() we disable beaconing
temporarily to prevent fake beacons to be transmitted.
Finally kick_tx_queue() will enable beaconing again.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:35 -04:00
Ivo van Doorn
3976ae6c2b rt2x00: Use skbdesc fields for descriptor initialization
In rt2x00lib_write_tx_desc() the skb->data and skb->len fields
were incorrectly used. For USB drivers both of those values
contain invalid data (skb->data points to the device descriptor,
skb->len contains the frame _and_ descriptor length).

Instead of using the skbuffer fields we should use the skbdesc
fields which are correctly initialized and contain all the data
that we need.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:34 -04:00
Mattias Nissler
2ae23854dc rt2x00: Don't use unitialized rxdesc->size
rxdesc->size is unitialized before the desriptor has been read.
Move the truncation of the sk buffer to the moment all variables
have been initialized.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:34 -04:00
Ivo van Doorn
2d1be5b0d1 rt2x00: Don't use uninitialized desc_len
skbdesc->desc_len is uninitialized at the start
of the function. So it is a _bad_ idea to use it...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:34 -04:00
Mattias Nissler
95db4d4d5f rt2x00: Use the correct size when copying the control info in txdone
The sizeof() operator was incorrectly applied to the pointer, not the struct.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:34 -04:00
Mattias Nissler
92f5ac6320 rt2x00: Initialize TX control field in data entries
In the TX path, the driver didn't copy the TX control data structure. Thus, it
was invalid in the TX done handler, causing serious trouble and misbehaviour.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Ivo van Doorn
f855c10b6e rt2x00: Align RX descriptor to 4 bytes
Some architectures give problems when reading
RX frame descriptor words when the descriptor
is not aligned on a 4 byte boundrary.

Due to optimalizations for the ieee80211 payload
4 byte alignment, it is no longer guarenteed
that the descriptor is placed on the 4 byte
boundrary (In fact, for rt73usb it is absolutely
never aligned to 4 bytes, for rt2500usb it depends
on the length of the payload).

This will copy the descriptor to a 4 byte aligned
location before it is read for the first time.
This will also move the payload data alignment
in rt2x00usb (instead of inside the driver) where
it has always belonged.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Harvey Harrison
40e024de93 b43: pull out helpers for writing noise table
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Jussi Kivilinna
461b3f2aa3 rndis_wlan: cleanup, rename structure members
Rename members of ndis_80211_* structures to match the style of
the rest of the code.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:33 -04:00
Jussi Kivilinna
1e41e1d277 rndis_wlan: cleanup, rename and reorder enums and structures
Rename enums and structures to ndis_80211_* for greater readability.
Also change order so that enumerations are presented first.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:32 -04:00
Joe Perches
e9010e2fdf drivers/net/wireless/ath5k - convert == (true|false) to simple logical tests
(test == true) is not nice.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:32 -04:00
Holger Schurig
52933d815b libertas: implement SSID scanning for SIOCSIWSCAN
After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported
scanning for a specific SSID. However, wpa_supplicant is a possible user of
this ioctl, so here is code that add's this.

While passing, removed even more of the debugfs-based scanning. You can (and
should) the SIOCSIWSCAN to ask for scans, so there is no need for
proprietary interfaces for scanning. And, besides, the scan result couldn't
be used further, e.g. not for associating.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:02:32 -04:00
Adrian Bunk
2079fcdc06 the scheduled bcm43xx removal
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: <Larry.Finger@lwfinger.net>
Cc: <stefano.brivio@polimi.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:01:04 -04:00
Adrian Bunk
affe0a0218 make b43_mac_{enable,suspend}() static
b43_mac_{enable,suspend}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 16:01:04 -04:00
Ivo van Doorn
1682fe6de2 rt2x00: Add suspend/resume handlers to rt2x00rfkill
Add suspend/resume handlers to rt2x00rfkill to have it stop
the input-polldev and prevent it from calling rt2x00 during
suspend period. This could lead to a NULL pointer fault when
rt2x00 suspended, but polldev send a request, because
the csr_addr is NULL.

Also don't let the rfkill allocation/registration block
the initialization of the entire device. Just print a warning
and continue as if nothing happened.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:26 -04:00
Pavel Roskin
f50e4a8494 ath5k: disable irq handling in ath5k_hw_detach()
Once ah has been freed, it may not be accessed.  Set ATH_STAT_INVALID
bit to make the interrupt handler return IRQ_NONE without accessing ah.

This fixes oops on unload with CONFIG_DEBUG_SHIRQ enabled.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:25 -04:00
Harvey Harrison
5abdc49d6e b43: phy.c fix typo in register write
Commit 61bca6eb85 b43: rewrite A PHY initialization
has a typo, the result of the register read should be masked, not the
register offset.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:25 -04:00
Jan Slupski
43557e15c2 prism54: support for 124a:4025 - another version of IOGear GWU513 802.11g
Add support to p54usb driver for apparently another version of IOGear GWU513
802.11g USB network card that uses GW3887IK chipset and is recognized as
"124a:4025 AirVast" by lsusb.

Cc: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13 15:57:22 -04:00
Ivo van Doorn
445815d7ea rt2x00: Add new D-Link USB ID
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-11 15:13:41 -04:00
Adam Baker
fbb0a27a8a rt2x00: never disable multicast because it disables broadcast too
On rt73 and rt61 disabling reception of multicast packets also disables
broadcast traffic which we never want to do. Therefore we should never
disable multicast.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-11 15:13:40 -04:00
Sebastian Siewior
5f0547c281 libertas: fix the 'compare command with itself' properly
|libertas: Invalid CMD_RESP 8012 to command 50!

The special case got mixed up in 8a96df80b3.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-11 15:13:40 -04:00
Reinette Chatre
deedf50430 iwlwifi: fix potential lock inversion deadlock
This is a change to a previous patch ("iwlwifi: 3945 split tx_complete
to command and packet function") to ensure we do not have hardirq safe
locks (priv->lock in this case) depend on hardirq unsafe locks.

We only call iwl3945_tx_queue_reclaim while in a tasklet so we have to use
the irqsafe version of the function.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 17:25:26 -05:00
John W. Linville
f868f4e196 wireless: correct warnings from using '%llx' for type 'u64'
drivers/net/wireless/ath5k/debug.c: In function 'read_file_tsf': drivers/net/wireless/ath5k/debug.c:203: warning: format '%016llx'
expects type 'long long unsigned int', but argument 4 has type 'u64' drivers/net/wireless/ath5k/debug.c:203: warning: format '%016llx'
expects type 'long long unsigned int', but argument 4 has type 'u64' drivers/net/wireless/ath5k/debug.c: In function 'read_file_beacon':
drivers/net/wireless/ath5k/debug.c:274: warning: format '%016llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
drivers/net/wireless/ath5k/debug.c:274: warning: format '%016llx' expects type 'long long unsigned int', but argument 4 has type 'u64'

drivers/net/wireless/iwlwifi/iwl-4965.c: In function 'iwl4965_tx_status_reply_compressed_ba':
drivers/net/wireless/iwlwifi/iwl-4965.c:3907: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
drivers/net/wireless/iwlwifi/iwl-4965.c: In function 'iwl4965_rx_reply_compressed_ba':
drivers/net/wireless/iwlwifi/iwl-4965.c:4039: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type '__le64'
drivers/net/wireless/iwlwifi/iwl-4965.c:4046: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
drivers/net/wireless/iwlwifi/iwl4965-base.c: In function 'iwl4965_tx_status_reply_tx':
drivers/net/wireless/iwlwifi/iwl4965-base.c:3661: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'u64'

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 17:09:52 -05:00
Bruno Randolf
6ba81c2c98 ath5k: work around wrong beacon rx timestamp in IBSS mode
atheros hardware has a problem with the rx timestamp of some IBSS beacons when
they caused a TSF update (they have the same BSSID).

the rx timestamp is wrong especially if the beacon frames get bigger than 78
byte (at least on AR5213 and AR5414 hardware). in that case ath5k_extend_tsf()
will assume a rs_tstamp overflow and give us a timestamp too far in the past
which will cause mac80211 to merge IBSS on every beacon (which is not necessary
since the BSSID already matches). but in this case we know that the HW must
have synced to the beacons TSF and the rx timestamp must be later than that so
we can adjust mactime accordingly.

also rename the function to ath5k_check_ibss_tsf() and change comments, since
"hw merge" is better described as a TSF update.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:07:50 -05:00
Bruno Randolf
e14296caba ath5k: add notes about rx timestamp
add comments about the fact that we don't know when exactly the atheros
hardware takes the RX timestamp.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:07:50 -05:00
Bruno Randolf
b47f407bef ath5k: move rx and tx status structures out of hardware descriptor
move ath5k_tx_status and ath5k_rx_status structures out of the hardware
descriptor since they are not accessed by the hardware at all. they just
contain converted information from the hardware descriptor. since they are only
used in the rx and tx tasklets there is also no use to keep them for each
descriptor.

drivers/net/wireless/ath5k/ath5k.h:     Changes-licensed-under: ISC
drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
drivers/net/wireless/ath5k/debug.c:     Changes-licensed-under: GPL
drivers/net/wireless/ath5k/debug.h:     Changes-licensed-under: GPL
drivers/net/wireless/ath5k/hw.c:        Changes-licensed-under: ISC

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:07:49 -05:00
Bruno Randolf
19fd6e5510 ath5k: struct ath5k_desc cleanups
* make struct ath5k_desc clearer by directly including unions of structures,
  which correspond to the hardware descriptors of different HW versions (5210
  and 5212). before they were casted at onto ath5k_desc at different points
  (e.g.  ds_hw[2]).

* rename some structures and variable names to make their use clearer, e.g.
  struct ath5k_hw_4w_tx_desc to ath5k_hw_4w_tx_ctl.

* substitute "old" with "5210" and "new" with "5212" (eg. rename
  ath5k_hw_proc_new_rx_status() to ath5k_hw_proc_5212_rx_status()) because old
  and new are relative and we might have a newer structure at some point.

* unify structs ath5k_hw_old_rx_status and ath5k_hw_new_rx_status into one
  ath5k_hw_rx_status, because they only differ in the flags and masks.

drivers/net/wireless/ath5k/ath5k.h:     Changes-licensed-under: ISC
drivers/net/wireless/ath5k/debug.c:     Changes-licensed-under: GPL
drivers/net/wireless/ath5k/hw.c:        Changes-licensed-under: ISC
drivers/net/wireless/ath5k/hw.h:        Changes-licensed-under: ISC

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:07:49 -05:00
Ron Rindjunsky
b095d03a7d iwlwifi: grab NIC access when disabling aggregations
This patch grabs NIC access inside iwl4965_tx_queue_agg_disable, instead of the
caller doing it.
The caller must still hold priv->lock when calling the function.

Signed-off-by: Max Stepanov <max.stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:02 -05:00
Tomas Winkler
91c066f27b iwlwifi: 3945 split tx_complete to command and packet function
This patch
1. removes cmd completion from iwl3945_tx_queue_reclaim
and creates iwl3945_cmd_queue_reclaim.
1. removes 11n relevant elements from this function
2. removes call to ieee80211_tx_status_irqsafe
and uses ieee80211_tx_status only

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:02 -05:00
Tomas Winkler
28447f3cfd iwlwifi: Fix 3945 rate scaling
This patch fix 3945 rate scaling after cfg80211 rate/band changes

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:01 -05:00
Tomas Winkler
c54b679ddc iwlwifi: queue functions cleanup
This patch moves
1. iwl_queue_inc_wrap and int iwl_queue_dec_wrap
into  iwl-helpers.h these two functions are identical to common
for both iwl3956 and iwl4965
2. renames x2_queue_used to iwl3945_x2_queue_used
3. exports iwl3945_queue_space out of iwl3964-base.c

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:01 -05:00
Assaf Krauss
34cf6ff6dd iwlwifi: Moving EEPROM handling in iwlcore module
This patch move EEPROM code into iwl core module

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:01 -05:00
Tomas Winkler
df48c3235c iwlwifi: add iwl-core module
This patch adds iwl-core module to iwlwifi driver.
This module will contain common code and infrastracture for iwlwifi
driver

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:01 -05:00
Tomas Winkler
f4d6082d53 iwlwifi: fix locking unbalance in 4965 rate scale
This patch fixes locking unbalance after adding rcu locking
for sta

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:01 -05:00
Emmanuel Grumbach
b716bb918f iwlwifi: Cancel scanning upon association
This patch cancels an ongoing HW scan upon association. Not doing this
resulted in instability in association.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:00 -05:00
Tomas Winkler
4bf775cdc0 iwlwifi: Take the fw file name from the iwl_cfg.
This patch adds fw_name to iwl_cfg. This allows run time selection
of needed fw/ucode file

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:00 -05:00
Tomas Winkler
82b9a12131 iwlwifi: add struct iwl_cfg
This patch introduces struct iwl_cfg. struct iwl_cfg defines static
configuration for each device type and sku. It is passed as driver_data
to the bus probe function.
This patch also introduce new common header file iwl-core.h
which will represent core functionality of iwlwifi driver

3945ABG uses separate iwl-3945-dev.h header file for now

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:00 -05:00
Tomas Winkler
750fe63966 iwlwifi: Move HBUS address to iwl-csr.h
HBUS is accessed through CSR registers
moved to iwl-csr.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:00 -05:00
Tomas Winkler
6f83eaa170 iwlwifi: extract iwl-csr.h
This patch extract CSR Register definition into separate
header files as most of the definition are commons to both
3945 and 4965.

Definitions specific for 3945 and 4965 are properly prefixed

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:00 -05:00
Ron Rindjunsky
4c424e4cc7 iwlwifi: use mac80211_tx_control_flags
This patch makes use of the new mac80211_tx_control_flags and tx_rate to
pass Tx data, regular and 11n, from the HW tx response into the rate scaling.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:03:00 -05:00
Guy Cohen
134eb5d327 iwlwifi: 802.11n spec removes AUTO offset for FAT channel
This patch adapts to 802.11 patch and remove AUTO offset for FAT
channel

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:59 -05:00
Michael Buesch
87d96114a7 b43: Fix failed frames status report typo
This fixes a typo in the status report.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:59 -05:00
Michael Buesch
57df40d278 b43: Add TX statistics debugging counters
This adds a few debugging counters, that are useful for debugging the
"card does not transmit" or "connection is unstable" kind of problems.
It's also useful for tuning an RC algorithm.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:59 -05:00
Michael Buesch
b27faf8ebf b43: Rename the DMA ring pointers
Rename the DMA ring pointers to have more descriptive and standard
names. Also remove the 6th unused TX ring. We can add it back later,
if we need it. The unused TX-status rx-ring is also removed, as that's
only used by legacy devices not supported by this driver anyway.

This is no functional change, except less memory allocation for
the removed rings.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:59 -05:00
Michael Buesch
e6f5b934fb b43: Add QOS support
This adds QOS support to the b43 driver.
QOS can be disabled on driver level with a module parameter for debugging purposes.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:59 -05:00
Nick Kossifidis
bb0c9dc27e ath5k: Add 2413 to srev_names so that it shows up during module load
Add 2413 to srev_names so that it shows up during module load.
This is based on the new patch 7 which did not introduce a helper
on ath5k_hw_reset().

Changes-licensed-under: 3-clause-BSD
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:58 -05:00
Nick Kossifidis
c87cdfd270 ath5k: Make some changes to follow register dumps.
Make some changes which mimic what we see in register dumps.
This patch does not add a helper to ath5k_hw_reset(). It
does seem clear we need a re-shuffle around ath5k_hw_reset()
though as code in there is lengthy and already hitting 80-char
limit. This can be dealt with later though.

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:58 -05:00
Nick Kossifidis
56c9054f16 ath5k: Fixes for PCI-E cards
* Fix nic_wakeup for PCI-E chips (don't set AR5K_RESET_CTL_PCI bit)

 * Fix dma size setting for PCI-E chips (thanx to Bob Copeland).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:58 -05:00
Nick Kossifidis
74693a7f30 ath5k: Remove RF5413 from rf gain optimization functions
* Since RF2413 it seems that RF_BUFFER settings are different (notice
that the last part -"bank 7" or whatever- is smaller than in 5111/5112).
So until we know what's going on we assume there is no gain optimization
stuff in post-5112 chips.

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:58 -05:00
Nick Kossifidis
903b474efa ath5k: more RF2413 stuff
* Add AR5K_RF2413 to radio check during hw_reset so it doesn't complain

 * Write ah_phy_spending value we set during attach instead of checking
each time for radio revision

 * Skip txpower setup for RF2413 because it can't transmit with it
(weird thing is that RF5413 has no problem with it).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:58 -05:00
Nick Kossifidis
0af2256319 ath5k: Identify RF2413 and deal with PHY_SPENDING
* Attach RF2413.

 * Propertly handle different AR5K_PHY_SPENDING settings for each RF
chip by adding a field in ath5k_hw. This way we won't have to check
inside hw_reset (see next patch).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:58 -05:00
Nick Kossifidis
f714dd6d45 ath5k: Add RF2413 initial settings
* Add initial settings for RF2413

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:57 -05:00
Nick Kossifidis
8daeef9717 ath5k: Add RF2413 srev values
* Add RF2413 srev values and a new entry on ath5k_radio enum for it
  since it differs from RF5413 (it's not like 5112-2112).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-07 16:02:57 -05:00
Luis Carlos Cobo
72e77a8a79 zd1211rw: support for mesh interface and beaconing
The previously unused CR_CAM_MODE register is set to MODE_AP_WDS. This makes the
driver ack mesh (WDS) frames. It does not affect Infra functionality of the
driver.

Previously missing beaconing support has been added. This might also help
implement a currently missing ah-hoc mode.

Support for interrupts from the device have been added, but we are not handling
most of them.

Mesh interfaces are considered associated as long as the interface is up.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:19:47 -05:00
David Woodhouse
f137e05468 libertas: clean up scan.c, remove zeromac and bcastmac
Should be purely cosmetic apart from the removal of the two pointless
MAC addresses.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:19:46 -05:00
David Woodhouse
fa62f99cf8 libertas: convert 802_11_SCAN to a direct command
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:09:49 -05:00
David Woodhouse
c5562e9833 libertas: add LED control TLV to types.h
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:09:49 -05:00
David Woodhouse
9e1228d00a libertas: convert KEY_MATERIAL to a direct command
The struct enc_key probably wants to die too, but that can come later.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:09:48 -05:00
Tomas Winkler
17744ff6ae iwlwifi: Fix 52 rate report in rx status
This patch fixes reporting rate in RX packets in 52 band.
The rate was updated from CCK rate index instead of OFDM rate 6M
Most of the patch is collateral clean up

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:09:46 -05:00
Tomas Winkler
8211ef78d9 iwlwifi: refactor init geos function
This patch refactors init geos function. It also fixes few minor bugs.
IWL_MAX_RATE -> IWL_RATE_COUNT (IWL_MAX_RATE included also MCS setting)
There are 9 and 13 rates for 4965 in 2.4 and 5.2 respectively  (rate 60)

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:09:45 -05:00
Tomas Winkler
2acae16ee7 iwlwifi: removing unused priv->config
This patch removes unused variable in iwlYYYY_priv

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 17:09:44 -05:00
Johannes Berg
38968d096b b43: verify sta_notify mac80211 callback
This helps verify that nothing bad is going on in mac80211,
it is unfortunately not possible to implement this generically
in mac80211 easily because there we can't assume that we only
have a single vif which b43 currently can assume.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 15:30:47 -05:00
Johannes Berg
d0709a6518 mac80211: RCU-ify STA info structure access
This makes access to the STA hash table/list use RCU to protect
against freeing of items. However, it's not a true RCU, the
copy step is missing: whenever somebody changes a STA item it
is simply updated. This is an existing race condition that is
now somewhat understandable.

This patch also fixes the race key freeing vs. STA destruction
by making sure that sta_info_destroy() is always called under
RTNL and frees the key.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-06 15:30:46 -05:00
David S. Miller
255333c1db Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	net/mac80211/rc80211_pid_algo.c
2008-03-05 12:26:41 -08:00
Michael Buesch
c256e05b7b b43legacy: Fix module init message
This fixes the module init message to tell that the legacy
driver loaded. This makes it less confusing, in case both drivers are loaded.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04 18:36:39 -05:00
Jussi Kivilinna
cdb2a9fe63 rndis_wlan: fix broken data copy
Replace broken code that attempted to copy 6 byte array to 64-bit
integer. Due to missing cast to 64-bit integer, left shift operation
were 32-bit and lead to bytes been copied over each other. New code
uses simple memcpy, for greater readability and efficiency.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04 18:36:39 -05:00
Sebastian Siewior
8a96df80b3 libertas: compare the current command with response
instead of with itself.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04 18:36:39 -05:00
David Woodhouse
6305f49860 libertas: fix sanity check on sequence number in command response
Slightly more useful if we compare it against the sequence number of the
command we have outstanding, rather than comparing the reply with itself.

Doh. Pointed out by Sebastian Siewior

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04 18:36:37 -05:00
Johannes Berg
c2f2d3a06f p54: fix eeprom parser length sanity checks
When I called p54_parse_eeprom() on a hand-coded structure
I managed to make a small mistake with wrap->len which caused
a segfault a few lines down when trying to read entry->len.
This patch changes the validation code to avoid such problems.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04 18:36:36 -05:00
Johannes Berg
8c28293f55 p54: fix EEPROM structure endianness
Since the EEPROM structure is read from hardware, it is
always little endian, annotate that in the struct and
make sure to convert where applicable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Michael Wu <flamingice@sourmilk.net>
Tested-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04 18:36:36 -05:00
Pavel Roskin
38c07b430b ath5k: fix all endian issues reported by sparse
Changes-licensed-under: ISC
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:41:56 -05:00
Ivo van Doorn
e6084239d3 rt2x00: Release rt2x00 2.1.3
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:41:54 -05:00
Ivo van Doorn
1497074ad7 rt2x00: Check for 5GHz band in link tuner
Fix a typo in the link tuner where accidently the
2GHz band was checked instead of the 5GHz band.
This forced the link tuner to work in an invalid
range for the currently active band.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:41:52 -05:00
Florian Fainelli
58e3073983 p54: print unknown eeprom fields
This patch allows p54common to print the
uknown EEPROM fields, which can help
when debugging/testing devices.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:41:50 -05:00
Johannes Berg
9a89c839f7 adm8211: fix cfg80211 band API conversion
Insert a missing band assignment.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:41:48 -05:00
Michael Buesch
8f300ae5b8 b43legacy: Fix nondebug build
Fix a typo.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:41:45 -05:00
Johannes Berg
c2976ab005 p54: fix sparse warnings
This fixes a few sparse warnings in p54.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:27 -05:00
Johannes Berg
e63e3fa7bd adm8211: fix sparse warnings
Both of these seem to be actual errors, the first is just wrong
and the second is my mistake introduced by the cfg80211 API
update.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:27 -05:00
Roel Kluin
013b73faff wireless: Convert to list_for_each_entry_rcu()
Convert list_for_each_rcu() to list_for_each_entry_rcu()

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:25 -05:00
Ivo van Doorn
2533d5f800 rt2x00: Release rt2x00 2.1.2
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:25 -05:00
Ivo van Doorn
ce359f90d3 rt2x00: Fix MAC address defines in rt61pci
The MAC address offset defines were incorrect because
the byte offset was used instead of word index. This
bug had no affect on normal operations since these
defines weren't used. (EEPROM_MAC_ADDR_0 was used
to read 6 bytes from).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:25 -05:00
Gertjan van Wingerde
47ac268336 rt2x00: Fix hw mode registration with mac80211.
The supported_bands field of struct hw_mode_spec now represents a bitfield,
so bitfield operators need to be tested with when setting the band data.

The current code generates the following warning:

[176624.986244] WARNING: at /usr/local/src/incoming/compat-wireless-2.6/net/wireless/core.c:269 wiphy_register()
[176624.986249] Pid: 12548, comm: modprobe Tainted: P        2.6.24.2#4
[176624.986251]
[176624.986251] Call Trace:
[176624.986277]  [<ffffffff881c56bf>] :cfg80211:wiphy_register+0x17f/0x1a0
[176624.986282]  [<ffffffff881ddf80>] :rt61pci:rt61pci_eepromregister_write+0x0/0x80
[176624.986302]  [<ffffffff88b7e4bc>] :mac80211:ieee80211_register_hw+0x2c/0x2b0
[176624.986310]  [<ffffffff881cdc80>] :rt2x00lib:rt2x00lib_probe_dev+0x350/0x3f0
[176624.986318]  [<ffffffff881d74b9>] :rt2x00pci:rt2x00pci_probe+0x149/0x200
[176624.986325]  [<ffffffff8030c858>] pci_device_probe+0xf8/0x170
[176624.986331]  [<ffffffff803594fc>] driver_probe_device+0x9c/0x1c0
[176624.986335]  [<ffffffff80359700>] __driver_attach+0x0/0xb0
[176624.986337]  [<ffffffff803597a5>] __driver_attach+0xa5/0xb0
[176624.986341]  [<ffffffff8035877d>] bus_for_each_dev+0x4d/0x80
[176624.986347]  [<ffffffff80358b8c>] bus_add_driver+0xac/0x210
[176624.986351]  [<ffffffff8030cad3>] __pci_register_driver+0x73/0xc0
[176624.986357]  [<ffffffff8025689e>] sys_init_module+0x18e/0x1a20
[176624.986374]  [<ffffffff8020c42e>] system_call+0x7e/0x83

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:24 -05:00
Ivo van Doorn
47b10cd137 rt2x00: Remove async vendor request calls from rt2x00usb
The async vendor requests are a ugly hack which is not working correctly.
The proper fix for the scheduling while atomic issue is finding out why
we can't use led classes for USB drivers and fix that.

Just replace all async calls with the regular ones and print an
error for the disallowed LED configuration attempts. That will
help in determining which led class is causing the problem.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:24 -05:00
Ivo van Doorn
31562e802a rt2x00: Cleanup mode registration
Don't wildly pass any number for num_rates to rt2x00lib,
instead pass which type of rates are supported (CCK, OFDM).
Same for num_modes but then for the 2GHZ and 5GHZ band.

This makes the interface look much nicer and makes
extending it later easier.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:23 -05:00
Ivo van Doorn
de99ff82cd rt2x00: Rename dscape -> mac80211
The dscape stack was renamed to mac80211 a long time ago,
we are long overdue with fixing all comments to reflect this.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:23 -05:00
Ivo van Doorn
ef8f66cd1d rt2x00: Remove reset_tsf()
Specifications indicate the TSF registers are read-only,
so there is no point in writing 0 to those registers.

As far as I know there isn't another way to reset the
TSF registers. So removing these callbacks will notify
mac80211 about the lack of support.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:23 -05:00
Ivo van Doorn
30b3a23c25 rt2x00: Fix Descriptor DMA initialization
As Adam Baker reported the DMA address for the
descriptor base was incorrectly initialized in
the PCI drivers.

Instead of the DMA base for the descriptor, the
DMA base for the data was passed resulting in a
broken TX/RX state for PCI drivers.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:22 -05:00
Ivo van Doorn
e542239f63 rt2x00: Filter ACK_CTS based on FIF_CONTROL
The ACK_CTS frame is a control frame, this means
dropping the frame depends on the FIF_CONTROL flag
for filtering.

This also fixes an obvious typo in register definition.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:22 -05:00
Ivo van Doorn
baf26a7eae rt2x00: Don't report driver generated frames to tx_status()
This adds a new flag for the skb_frame_desc structure which is used to tag
rts/cts frames that are generated by the driver. Through the tag we can
recognize frames we have generated ourselves, so we don't report their tx
status to mac80211.

This patch is based on the original patch by
Mattias Nissler <mattias.nissler@gmx.de>.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:22 -05:00
Ivo van Doorn
ac1aa7e4f3 rt2x00: Send frames out with configured TX power
mac80211 sends the txpower to use during config(),
we already store it in the rt2x00_dev structure.
When writing the descriptor correctly initialize
the txpower field with this value to make sure
all frames are send out with the correct tx power.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:22 -05:00
Ivo van Doorn
d3f5feaa51 rt2x00: Release rt2x00 2.1.1
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:21 -05:00
Ivo van Doorn
330e3f95b3 rt2x00: Kill guardian urb during disable_radio
When the radio is being disabled we should also
kill the guardian urb which could still be pending
in the device.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:21 -05:00
Ivo van Doorn
c1aa3dc7ac rt2x00: Cleanup Makefile
Simplify the way rt2x00 assigns new objects to the
rt2x00lib module. This saves a few if statements
and overall does this looks much nicer.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:21 -05:00
Ivo van Doorn
8f539276ee rt2x00: Fix queue->qid initialization
As Adam Baker reported the queue->qid was not initialized
correctly. The QID_AC_BE was assigned to the RX ring.

This will move the queue initialization into a seperate function
and makes sure that all queues are initialized directly with the
correct qids.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:21 -05:00
Ivo van Doorn
647d0ca905 rt2x00: Fix skbdesc->data_len initialization
skbdesc->data_len was not initialized correctly
in rt2x00pci, rt2x00usb, rt2500usb and rt73usb.

The value was set to queue->data_size which
means that the incorrect frame size was pased
to the upper layers.

Correctly base the value on either the skb->len,
or the rx frame size passed to the driver by the
device.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:20 -05:00
Ivo van Doorn
417f412f2d rt2x00: Fix typo in debug statement
The second eeprom recovery message is about
the RSSI offset for ieee802.11 A.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:20 -05:00
Ivo van Doorn
68598d294b rt2x00: Add queue statistics to debugfs
Rename "frame" folder to "queue" folder,
add extra file to this folder which contains
statistics about all hardware queues. This will
help debugging and spotting problems in the
queue indexing system.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:20 -05:00
Ivo van Doorn
e44df9296a rt2x00: Fix scheduling while atomic errors in usb drivers
Call rt2x00_config_intf() outside of the spinlock context since
the call will sleep for USB drivers. By using the ieee80211_if_conf
values as arguments we make keep access tp rt2x00_intf thread safe
even without the lock.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:19 -05:00
Ivo van Doorn
21795094e2 rt2x00: make csr_cache and csr_addr an union
The csr_cache and csr_addr pointers are both the same size
and they are never used both by the same driver. This makes
them a nice candidate for an union.
We could merge into 1 pointer, but that would either upset sparse,
or require a lot of __force casts.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:19 -05:00
Ivo van Doorn
f590f48e87 rt2x00: Select CONFIG_NEW_LEDS
Select CONFIG_NEW_LEDS before selecting the other LED config
options. This fixes a link error when NEW_LEDS was disabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:19 -05:00
Adam Baker
231be4e92c rt2x00: correct address calc for queue private data
When calculating the offset to add to the queue entry base to get the
individual entry's private data area the base address must be treated
as a char * not a struct queue_entry so we can do byte oriented
pointer arithmetic with it.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:18 -05:00
Ivo van Doorn
16938a24ae rt2x00: Remove MGMT ring initialization
Remove the last remnants of the MGMT ring initialization
from rt61pci.ko

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:18 -05:00
Ivo van Doorn
25fd893db2 rt2x00: Make rt2x00 less verbose
Remove the debug messages regarding initialization from
EEPROM. The values are vendor specific, and are not really
needed for debug purposes. If they ever become usefull we
still have access to them through debugfs which also
prints the exact same values...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:18 -05:00
Ivo van Doorn
9c9dd2c9a4 rt2x00: Fix invalid DMA free
Be more strict when using the queue_entry_priv_pci_rx
and queue_entry_priv_pci_tx structures. Only use a
particular type that matches the queue type.

When freeing the DMA the priv_tx->data and priv_tx->dma
was used. This is incorrect since the start of the DMA
was in fact the priv_tx->desc pointer. Instead of
recalculating the dma_addr_t for the DMA start this
patch will swap the data and descriptor part of the
allocated memory.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:17 -05:00
Randy Dunlap
0d84d78db5 wireless: rt2x00: fix driver menu indenting
Michael Büker <m.bueker@berlin.de> reports that the RT2x00 drivers
are not indented as they should be, so use proper dependencies to make
them be indented as expected.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Ack-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:17 -05:00
Matthias Kaehlcke
f948db5de5 prism54: Convert wpa_sem in a mutex
The semaphore wpa_sem is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:17 -05:00
Matthias Kaehlcke
f8139218b3 prism54: Convert stats_sem in a mutex
The semaphore stats_sem is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:17 -05:00
Matthias Kaehlcke
6f865c0ab9 prism54: Convert acl->sem in a mutex
The semaphore acl->sem is used as mutex, convert it to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:16 -05:00
Marcin Slusarz
5c05863d03 ipw2200: le*_add_cpu conversion
replace all:
little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
					expression_in_cpu_byteorder);
with:
	leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:15 -05:00
Daniel Drake
19ae3a6a96 ipw2100/ipw2200: note firmware loading caveat in Kconfig help text
Most wireless drivers load their firmware at interface open time, which
generally occurs after the filesystem is available. However, the ipw drivers
load their firmware at probe time because firmware is required to read the
device MAC address. When built-in, probe happens before the filesystem is
available, hence device init will only complete successfully if the user
has made special arrangements (including firmware plus a loader in the
initramfs).

Note all this in the kconfig help text for both drivers.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:15 -05:00
Christian Lamparter
5200e8cdf2 p54: use IEEE 802.11e defaults for initialization
This trival one-liner changes the QoS initialization values to match IEEE
802.11e defaults.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:14 -05:00
Michael Buesch
2c1a1b124f zd1211rw: Fix beacon filter flags thinko
We must not clear the FIF_BCN_PRBRESP_PROMISC bit in the
new_flags. The zd-driver does support sending beacons and
probe responses to the host. What the flag does is say "Send me
all beacons and probe responses". And we actually do that. We always
do that, so we ignore the case when the bit is disabled. But that is
fine. But we must not clear the flag, as that tells mac80211 that
we do not support passing beacons and probe responses to the stack.
And that's not true.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:14 -05:00
Javier Cardona
e51c683717 zd1211rw: Fixed incorrect constant name.
Trial and error reveals that CR_ZD1211B_TX_PWR_CTL* do not affect the
transmission power.  Instead these registers seem to control the contention
windows limits for different QoS access categories.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:13 -05:00
Tomas Winkler
9f6adf23d8 iwlwifi: remove twice defined CSR register
This patch removes twice defined CSR register. It was confusing

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:13 -05:00
Johannes Berg
d007b7f42e b43(legacy): include full timestamp in beacon frames
Having the full RX timestamp in beacons is necessary for IBSS
merge to work properly so extend the 16-bit timestamp to the
full 64 bits for beacon frames (as well as when monitor mode
is active.)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:12 -05:00
Johannes Berg
aa68cbfb20 rtl818x: fix RTS/CTS-less transmit
This fixes packet transmission of packets without RTS/CTS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:12 -05:00
Reinette Chatre
3230455d13 iwlwifi: fix name of function in comment (_rx_card_state_notif)
iwl_rx_card_state_notif is named iwl3945_rx_card_state_notif and
iwl4965_rx_card_state_notif in the two iwlwifi drivers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:11 -05:00
Jiri Slaby
6cd74e3b99 WDEV: ath5k, typecheck on nonDEBUG
At least type check the ATH5K_TRACE paramter on !ATH5K_DEBUG configs.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:11 -05:00
S.Çağlar Onur
6e33e30d7a drivers/net/wireless/atmel.c: Use time_* macros
The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values.

So following patch implements usage of the time_after() macro, defined at linux/jiffies.h, which deals with wrapping correctly

Cc: linux-wireless@vger.kernel.org
Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:11 -05:00
Tomas Winkler
3e82a822c7 iwlwifi: Add tx_ant_num hw setting variable
Added tx_ant_num variable into hw_setting
This will be used for scanning TX antenna toggling
On the way removed ac_queue_num unused

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:10 -05:00
Tomas Winkler
5c1b09581b iwlwifi: change iwl->priv iwl_priv * type in iwl-YYY-io.h
This patch makes all variables of type struct iwl_priv to be named priv
This is needed for smooth change of debug printing mechanism

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:09 -05:00
Emmanuel Grumbach
eaaf789495 iwlwifi-2.6: Adds and fixes defines about security
This patch adds some missing defines defines for HW security. It also fixes
the add_station host cmd layout.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:08 -05:00
Michael Buesch
35f0d354bf b43: Add HostFlags HI support
This adds support for the high 16 bits of the hostflags.
No functional change.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:08 -05:00
Johannes Berg
3330d7be70 mac80211: give burst time in txop rather than 0.1msec units
This changes mac80211 to pass the burst time to conf_tx in txop
units rather than 0.1msec units. 0.1msec units are only required
by atheros hardware (according to current driver support), all
other drivers do other calculations or require the txop value.
Therefore, it results in fewer calculations and more precision
if we just pass the txop value through to the driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:07 -05:00
Michael Buesch
bb1eeff12d b43: Fix bandswitch
This fixes bandswitching for the new mac80211 band API.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:07 -05:00
Reinette Chatre
b9e0b449ae iwlwifi: Update iwlwifi version stamp to 1.2.26
We update the version stamp at this time to distinguish the in-kernel
driver from the out of tree driver. The out of tree driver currently
has version number 1.2.25, but the latest driver code can only be
found in this in-kernel driver.

Having a later version number will reduce confusion between the two
versions as we transition from out of tree to in-kernel.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:07 -05:00
Stefano Brivio
4688be308f b43legacy: fix B43legacy_WARN_ON macro
Fix the B43legacy_WARN_ON macro so that it will evaluate expressions.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:06 -05:00
Stefano Brivio
a297170dae b43legacy: fix upload of beacon packets to the hardware
This fixes uploading of the beacon data and writing of the TIM and DTIM offsets.

The patch by Michael Buesch has been ported to b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:06 -05:00
Stefano Brivio
eed0fd2102 b43legacy: add definitions for MAC control register
This adds some definitions for the MAC control register and uses them. This is
basically no functional change.

The patch by Michael Buesch has been ported to b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:06 -05:00
Ron Rindjunsky
292ae1745b iwlwifi: remove IWL{4965,3945}_QOS
This patch removes the IWL4965_QOS and IWL3945_QOS defines from Kconfig
file along with all uses of it. These defines were relevant for the
period QoS code was tested to be stable in driver's flows.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:05 -05:00
Tomas Winkler
78330fddec iwlwifi: Fix HT compilation breakage caused by cfg80211 API for channels/bitrates patch
This patch fixes compilation breakage caused by 'cfg80211 API for
channels/bitrates' patch.
however it doesn't fix the driver's functional problems caused by that
patch.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:01 -05:00
Ivo van Doorn
b86af631b8 rt2x00: Release rt2x00 2.1.0
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:01 -05:00
Ivo van Doorn
8f5fa7f044 rt2x00: Fix rate initialization
Fix typo in rate initialization. This fixes the WARN_ON()
in net/wireless/util.cpp:83

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:00 -05:00
Ivo van Doorn
3b640f21af rt2x00: Enable LED class support for rt2500usb/rt73usb
Add kerneldoc for vendor request functions in rt2x00usb.
Add asynchroneous vendor request function in rt2x00usb.

With the availability of the asynchroneuous vendor request
we can now enable LED class support for rt2500usb and rt73usb.
Since LED handling is not important, it doesn't really matter
if a register call fails (This solution is better then no
LED class support at all).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:00 -05:00
Ivo van Doorn
a9450b70a7 rt2x00: Make use of MAC80211_LED_TRIGGERS
Make use of the led triggers provided by mac80211 to control
the led status. This can be enabled through a per-driver
configuration option which will automatically enable the
generic handler in rt2x00lib.

This has been enabled for rt2500usb and rt73usb for the moment
since the led class will call set_brightness in irq context which
will not work correctly with the usb drivers who need to sleep.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:37:00 -05:00
Ivo van Doorn
f2a3c7f5c8 rt2x00: Use ieee80211_channel_to_frequency()
No need to perform the calculation ourselves when
wireless provides a helper function for it.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:38 -05:00
Ivo van Doorn
f5507ce90b rt2x00: Remove HWMODE_{A,B,G}
rt2500usb initialized the SIFS and EIFS without using the
values coming from rt2x000lib. After this is fixed HWMODE_{A,B,G}
is now unused and can be removed in favour of the ieee80211_band
enumeration which could still be usefull later.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:38 -05:00
Ivo van Doorn
70e2fed4ec rt2x00: Rate structure overhaul
Recent changes to the rate structure registration broke rt2x00,
the hw_value was reduced from 32bits to 16bits while rt2x00 used
the full 32bits. However the way rt2x00 used the value was inflexible
and needed to be changed anyway.

This patch creates a array containing information for each rate,
the hw_value passed to mac80211 is the index value for that array
including a field to indicate if short preamble should be enabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:38 -05:00
Luis R. Rodriguez
e71c9fac31 ath5k/phy.c: fix negative array index
Author: Adrian Bunk <bunk@kernel.org>

This patch fixes a negative array index spotted by the Coverity checker.

Changes-licensed-under: ISC

Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:38 -05:00
Luis R. Rodriguez
6844e63a94 ath5k: Use software encryption for now
Hardware encryption doesn't work yet so lets use software
encryption for now.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:38 -05:00
Luis R. Rodriguez
b446197cc1 ath5k: Port debug.c over to the new band API and enable as build option
This patch finishes the port and enables debug as an build option.
This was tested on:

Atheros AR5213A chip found (MAC: 0x59, PHY: 0x43)
RF5112A multiband radio found (0x36)

Note:

For 2 GHz band on the above card I noticed we get negative channel
numbers. Will look into this unless someone beats me to it.

Example out put when loading using:

sudo modprobe ath5k debug=0x00000400

 Band 2 GHz: channels 26, rates 12
  channels:
     1 2412 00c0 0000
     2 2417 00c0 0000
     3 2422 00c0 0000
     4 2427 00c0 0000
     5 2432 00c0 0000
     6 2437 00c0 0000
     7 2442 00c0 0000
     8 2447 00c0 0000
     9 2452 00c0 0000
    10 2457 00c0 0000
    11 2462 00c0 0000
    12 2467 00c0 0000
    13 2472 00c0 0000
    14 2484 00c0 0000
   -498 2512 00c0 0000
   -494 2532 00c0 0000
   -490 2552 00c0 0000
   -486 2572 00c0 0000
   -482 2592 00c0 0000
   -478 2612 00c0 0000
   -474 2632 00c0 0000
   -470 2652 00c0 0000
   -466 2672 00c0 0000
   -462 2692 00c0 0000
   -458 2712 00c0 0000
   -454 2732 00c0 0000
 Band 5 GHz: channels 194, rates 8
  channels:
    27 5135 0140 0000
    28 5140 0140 0000
[... etc ]
   219 6095 0140 0000
   220 6100 0140 0000
  rates:
     60 000b 0000 0000
     90 000f 0000 0000
    120 000a 0000 0000
    180 000e 0000 0000
    240 0009 0000 0000
    360 000d 0000 0000
    480 0008 0000 0000
    540 000c 0000 0000

Changes to base.c, base.h
Changes-licensed-under: 3-Clause-BSD

Changes to debug.c, debug.h
Changes-licensed-under: GPL

Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:37 -05:00
Luis R. Rodriguez
e9ddc0f25c ath5k: Use our own Kconfig file, we'll be expanding this shortly
Apologoes, this is a re-post of patch-04, forgot to git-add
our Kconfig... New series (only 2 patches needed fixing, which
I am reposting) can be found here:

http://kernel.org/pub/linux/kernel/people/mcgrof/patches/ath5k/2008-02-04.v2/

Use our own Kconfig file, we'll be expanding this shortly.

Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:37 -05:00
Luis R. Rodriguez
a3f4b914a0 ath5k: ath5k_copy_channels() was not setting the channel band
ath5k_copy_channels() wasn't setting the channel's band so all
driver channels had a 2GHz band set. Lets set this.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:37 -05:00
Luis R. Rodriguez
400ec45a02 ath5k: Cleanup after API changes
Cleanup after API changes patch (checkpatch.pl stuff) and on
ath5k_hw_channel() make use of the existing ath5k_channel_ok()
instead of re-implementing the checks again. This was necessary
to make the code cleaner and fit the 80-chars wide limit so
sending it within the same patch.

Finally make a note that we *may* eventually move cap_range stuff
to struct wiphy (band frequency range capabilities). This
information can later be exported to userspace, for example,
and giving it access to mac80211 and drivers in general can come
in handy.

Changes to initvals.c, phy.c
Changes-licensed-under: ISC

Changes to ath5k.h, base.c
Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:37 -05:00
Luis R. Rodriguez
d8ee398d18 ath5k: Port to new bitrate/channel API
Author: Nick Kossifidis <mickflemm@gmail.com>

Tested on 5211, 5213+5112, 5213A+2112A and it wors fine.

Also i figured out a way to process rate vallue found
on status descriptors, it's still buggy but we are getting
closer (i think it improved stability a little).

Changes to hw.c, initvals.c, phy.c
Changes-licensed-under: ISC

Changes to ath5k.h, base.c, base.h
Changes-licensed-under: 3-Clause-BSD

Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:35 -05:00
Mohamed Abbas
2c28b36275 iwlwifi: set rate_idx correctly from plcp
rate_idx is derived from plcp information

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:33 -05:00
Mohamed Abbas
7b72304d86 iwlwifi: initialize ieee80211_channel->hw_value
hw_value is being used uninitialized. fix it.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:33 -05:00
Johannes Berg
8318d78a44 cfg80211 API for channels/bitrates, mac80211 and driver conversion
This patch creates new cfg80211 wiphy API for channel and bitrate
registration and converts mac80211 and drivers to the new API. The
old mac80211 API is completely ripped out. All drivers (except ath5k)
are updated to the new API, in many cases I expect that optimisations
can be done.

Along with the regulatory code I've also ripped out the
IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be
unnecessary if the hardware simply gives us whatever channels it wants
to support and we then enable/disable them as required, which is pretty
much required for travelling.

Additionally, the patch adds proper "basic" rate handling for STA
mode interface, AP mode interface will have to have new API added
to allow userspace to set the basic rate set, currently it'll be
empty... However, the basic rate handling will need to be moved to
the BSS conf stuff.

I do expect there to be bugs in this, especially wrt. transmit
power handling where I'm basically clueless about how it should work.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:32 -05:00
Ivo van Doorn
10b6b80145 rt2x00: Fix queue index handling
When Q_INDEX is increased, the queue->length should be increased,
only when Q_INDEX_DONE is increased should queue_length be descreased.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:29 -05:00
Ivo van Doorn
5957da4c6e rt2x00: Move beacon and atim queue defines into rt2x00
As Johannes Berg indicated the BEACON and AFTER_BEACON
queue indeces in mac80211 should be removed because they
are too hardware specific. This patch adds the queue index
defines into rt2x00queue.h and removes the dependency of
the defines inside mac80211.h.

Also move rt2x00pci_beacon_update() into rt2400pci and
rt2500pci individually since it is no longer a generic
function since rt61 and rt2800 no longer use that.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:29 -05:00
Ivo van Doorn
091ed315ef rt2x00: Initialize QID from queue->qid
The QID_MGMT is assigned to the beacon and atim queue
during initialization. This means we don't need a seperate
check in write_tx_desc()..

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:28 -05:00
Ivo van Doorn
871ff6ed64 rt2x00: Remove TX_MGMT queue usage
rt73usb doesn't have a 5th queue, correctly initialize hw->queues
rt61pci had a 5th queue but was removed recently, correctly initialize
hw->queues and remove the last remnants.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:28 -05:00
Ivo van Doorn
6bb40dd13b rt2x00: Add per-interface structure
Rework the interface handling. Delete the interface structure
and replace it with a per-interface structure. This changes the
way rt2x00 handles the active interface drastically.

Copy ieee80211_bss_conf to the this rt2x00_intf structure during
the bss_info_changed() callback function. This will allow us to
reference it later, and removes the requirement for the device flag
SHORT_PREAMBLE flag which is interface specific.

Drivers receive the option to give the maximum number of virtual
interfaces the device can handle. Virtual interface support:
rt2400pci: 1 sta or 1 ap, * monitor interfaces
rt2500pci: 1 sta or 1 ap, * monitor interfaces
rt2500usb: 1 sta or 1 ap, * monitor interfaces
rt61pci: 1 sta or 4 ap, * monitor interfaces
rt73usb: 1 sta or 4 ap, * monitor interfaces

At the moment none of the drivers support AP and STA interfaces
simultaneously, this is a hardware limitation so future support
will be very unlikely.

Each interface structure receives its dedicated beacon entry,
with this we can easily work with beaconing while multiple master
mode interfaces are currently active.

The configuration handlers for the MAC, BSSID and type are
often called together since they all belong to the interface
configuration. Merge the 3 configuration calls and cleanup
the API between rt2x00lib and the drivers. While we are cleaning
up the interface configuration anyway, we might as well clean up
the configuration handler as well.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:28 -05:00
Ivo van Doorn
9404ef34e4 rt2x00: Driver requiring firmware should select crc algo
The driver should select what CRC algorithm is required
when performing a checksum on the firmware.

rt61pci & rt73usb require crc-itu-t
rt2800pci & rt2800usb require crc-ccitt

Legacy 2800pci/usb driver uses crc-itu-t + bit order reversion,
but that is just inefficient especially since the end result is
the same as a different algorithm which is also available as library. ;)

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:28 -05:00
Ivo van Doorn
adfdbb79c0 rt2x00: Enable master and adhoc mode again
This will enable the creation of master mode and adhoc
interfaces again. This does not mean the issues surrounding
beaconing have been resolved, but this will make testing
easier and perhaps we can discover which cards are actually
working and which ones not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:28 -05:00
Ivo van Doorn
3b3618ad51 rt2x00: Fix tx parameter initialization
Check if the aifs, cw_min and cw_max are above 0
when determining if the default should be used.
Tor aifs a negative number is used to determine
if the default should be used or not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:27 -05:00
Adam Baker
d7bafff3f9 rt2x00: don't write past the end when writing short descriptors on rt61
The space allocated in the skb for a descriptor is only 24 bytes when
setting up beacons in rt61 so make sure we don't write to the descriptor
words beyond that and corrupt the beacon packet.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:27 -05:00
Ivo van Doorn
181d6902b6 rt2x00: Queue handling overhaul
This introduces a big queue handling overhaul, this also
renames "ring" to "queues".

Move queue handling into rt2x00queue.c and the matching header,
use Kerneldoc to improve rt2x00 library documentation.

Access to the queues is now protected under a spinlock, this
to prevent race conditions which could corrupt the indexing
system of the queue.

Each queue entry allocates x bytes for driver/device specific data,
this cleans up the queue structure significantly and improves
code readability.

rt2500usb no longer needs 2 entries in the beacon queue to correctly
send out the guardian byte. This is now handled in the entry specific
structure.

rt61 and rt73 now use the correct descriptor size for beacon frames,
since this data is written into the registers not the entire TXD
descriptor was used but instead of a subset of it named TXINFO.

Finally this also fixes numerous other bugs related to incorrect
beacon handling or beacon related code.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:27 -05:00
Ivo van Doorn
811aa9cad1 rt2x00: Update copyright notice
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:22 -05:00
Roel Kluin
194c7ca664 wireless/iwlwifi/iwl-4965.c: add parentheses
'!' has a higher priority than '&': bitanding has no effect.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:22 -05:00
Tomas Winkler
145de9b693 iwlwifi: enable 802.11n in Kconfig
This patch removes 'IWL4965_HT: depends on n'  from iwlwifi's Kconfig
1. 11n is functional so no need to make it invisible in the configuration
2. Latest Johannes patch 'cfg80211 API for channels/bitrates, mac80211 and
driver conversion' broke compilation because this config option was
invisible - patch fixing it will be provided later

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:19 -05:00
Ron Rindjunsky
0c11b4de5d iwlwifi: A-MPDU Tx activation by load measures
This patch gives a heuristic for activation of the A-MPDU Tx.
As the rate scaling is rate aware, it now also measures estimated load, and
sends A-MPDU activation after a threshold has been met.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:19 -05:00
Ron Rindjunsky
995564382f iwlwifi: A-MPDU Tx conform block Ack rate scaling to mac80211
This patch uses the changes in ieee80211_tx_status to pass Block Ack data
to rate scaling module, and uses this data in rate scaling calculations

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:19 -05:00
Ron Rindjunsky
fe01b477bb iwlwifi: A-MPDU Tx conform flows to mac80211
This patch alters the current iwlwifi behavior to fit the flows introduced
by the mac80211, mainly queues handling and start/stop call backs flows

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:18 -05:00
Ron Rindjunsky
8114fcf185 iwlwifi: A-MPDU Tx conform API to mac80211
This patch alters the current API in order to fit the new
API mac80211 gives for A-MPDU Tx

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:18 -05:00
Ron Rindjunsky
0df3ef45a3 mac80211: A-MPDU Tx add session's and low level driver's API
This patch adds the API for 3 stages in A-MPDU Tx session flow:
- request mac80211 to start/stop A-MPDU Tx session for specific TID. such a
  request should be issued by a load aware element, either mac80211 itself
  or external element.
- requests by mac80211 to low-level driver to start/stop Tx aggregation.
  notice that low level driver responds now with Starting Sequence Number.
- async feedback by low-level to mac80211 to inform that HW is ready for
  next A-MPDU Tx state.
Changes in API to Rx A-MPDU were also made, reflected in iwlwifi changes as
well.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:13 -05:00
Holger Schurig
8816edcea9 libertas: rename/document scan_channel
Rename last_scanned_channel to scan_channel, just so that a
grep for struct bss_descriptor's last_scanned element doesn't
show up so many positives.

Also documented the variable and moved it to other scan related
entries in lbs_private.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:12 -05:00
Holger Schurig
23ff50361f libertas: make lbs_unset_basic_rate_flags() static
... by moving it into the file where it's sole user resides

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:11 -05:00
Holger Schurig
e226868ec3 libertas: make lbs_sync_channel() static
... by moving it into the file where it's sole user resides

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:11 -05:00
Holger Schurig
52507c2087 libertas: make association debug output nicer
This also fixes a bug where should_deauth_infrastructure() always
returned 0.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:10 -05:00
Holger Schurig
1afc09ab7c libertas: trim overly long debug statement
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-29 15:19:09 -05:00
Alexey Zaytsev
f9d8f88952 Don't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.
This may happen e.g. when the ssb is statically enables by the b44 driver,
and the b43 pci-ssb bridge is enbled by the b43/b43legacy drivers, or the
b43/b43legacy drivers are built statically.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:10 -05:00
Alexey Zaytsev
c7084535c9 Use a separate config option for the b43 pci to ssb bridge.
The bridge code was unnecessary enabled by the b44
driver, but it prevents the bcm43xx driver from
being loaded, as the bridge claims the same pci ids.

Now we enable the birdge only if the b43{legacy}
drivers are selected.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:10 -05:00
Roland Dreier
4b7524a42e libertas: Remove unused exports
The libertas driver exports a number of symbols with no in-tree users;
remove these unused exports.  lbs_reset_device() is completely unused, with
no callers at all, so remove the function completely.

A couple of these unused exported symbols are static, which causes the
following build error on ia64 with gcc 4.2.3:

    drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict
    drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:10 -05:00
Ivo van Doorn
53b3f8e47a rt2x00: Fix rt2x00lib_reset_link_tuner()
rt2x00lib_reset_link_tuner() can be called from within
the link tuner itself. This means that it should
_not_ call rt2x00lib_stop_link_tuner() since that will
cause the thread to hang.

Reorder the things that should be done during a
link tuner reset and during a link tuner start.

Also make antenna tuning the last step of the link
tuner since it could possibly reset some statistical
information which we need for average calculation.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:10 -05:00
Ivo van Doorn
05253c93fe rt2x00: Don't switch to antenna with low rssi
When rssi_a > rssi_b is true and the current antenna
was already antenna A, then rt2x00 incorrectly jumped
to antenna B.

Also don't configure the antenna when there has been
no change in the antenna setup.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:09 -05:00
Ivo van Doorn
61667d8d5b rt2x00: Add link tuner safe RX toggle states
This adds 2 new states which both are used to toggle
the RX. These new states are required for usage
inside the link tuner thread, because the normal
RX toggling will stop the link tuner thread.
While it is possible that the link tuner thread itself
is the caller of the RX toggle (when using software
antenna diversity).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:09 -05:00
Ivo van Doorn
b290d43361 rt2x00: Fix antenna diversity
Fix 2 issues in antenna diversity selection.

1) the following statement will always return true.
	if ((rssi_curr - rssi_old) > -5 || (rssi_curr - rssi_old) < 5)
It is cleaner to check if the absolute value is smaller then 5.

2) Only enable software diversity when default antenna setup
indicates support for it. Don't select it when the hardware
does not indicate support for it...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:09 -05:00
Johannes Berg
5b0acc64a3 rndis_wlan: fix sparse warnings
It is obviously wrong to use an enum in a little endian struct,
and those other enums should be declared differently.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28 09:13:09 -05:00
Johannes Berg
5078ed5071 zd1211rw: fix sparse warnings
This silences sparse when run on zd1211rw.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:55 -05:00
Johannes Berg
1955fd0b53 rtl818x: fix sparse warnings
This silences a few sparse warnings. There are two more where
I can't follow the code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:49 -05:00
David Miller
04f93a87a2 ath5k: Fix build warnings on some 64-bit platforms.
'u64' is not necessarily 'unsigned long long'

drivers/net/wireless/ath5k/base.c: In function 'ath5k_beacon_update_timers':
drivers/net/wireless/ath5k/base.c:2130: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
drivers/net/wireless/ath5k/base.c:2130: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
drivers/net/wireless/ath5k/base.c: In function 'ath5k_intr':
drivers/net/wireless/ath5k/base.c:2391: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'u64'

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:48 -05:00
Jiri Slaby
b988763857 WDEV, ath5k, don't return int from bool function
sparse sees int -> bool cast as an error:
hw.c:3754:10: warning: cast truncates bits from constant value (ffffffea becomes 0)
Fix it by converting the rettype to int and check appropriately.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:48 -05:00
Jiri Slaby
65872e6b43 WDEV: ath5k, fix lock imbalance
Omitted lock causes sparse warning
drivers/net/wireless/ath5k/base.c:1682:1: warning: context imbalance in 'ath5k_tasklet_rx' - different lock contexts for basic block

Add the lock to the guilty fail path.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 20:11:48 -05:00
John W. Linville
387e100ac2 p54usb: add USB ID for Linksys WUSB54G ver 2
Based on report from Cavan Carroll <cavancarroll@hotmail.com>:

	http://bugzilla.kernel.org/show_bug.cgi?id=9863

Cc: Cavan Carroll <cavancarroll@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 17:16:19 -05:00
Ivo Couckuyt
1a17582e64 p54usb: add USB ID for Phillips CPWUA054
Retarget of an old patch against prism54usb in linux-wireless archive:

	http://marc.info/?l=linux-wireless&m=117449935810254&w=2

Cc: Ivo Couckuyt <iv0co@yahoo.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 17:16:19 -05:00
Stefano Brivio
6fff1c64ff b43legacy: Add driver load messages
This adds printk messages with basic information about the driver being loaded.
This information includes a summary of the compiled-in features, which
simplifies bug-reporting and debugging a lot.
Also a firmware ID is printed. This is a unique identifier blob for a specific
version of the firmware. This ID is attached to a specific version of the firmware
blob in b43-fwcutter (see fwcutter git).
This helps users to select the right firmware for their device.
This also makes it possible to use automated scripts to fetch and extract the right
firmware for the driver. (The script will grep the .ko for the "Firmware-ID: xxx" string.)
While the driver might still support other versions of the firmware for backward
compatibility, this will always print out the officially supported version, which
people _should_ use.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:19 -05:00
Dan Williams
943dbef4b8 ipw2200: fix ucode assertion for RX queue overrun
Restock the RX queue when there are a lot of unused frames so that the
RX ring buffer doesn't overrun, causing a ucode assertion.  Backport of
patch "iwlwifi: fix ucode assertion for RX queue overrun".

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:19 -05:00
Reinette Chatre
a6477249b4 iwlwifi: only check for association id when associating with AP
There is no association process in IBSS mode - so testing the
association id is not needed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
CC: Richard Scherping <richard@scherping.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:19 -05:00
Tomas Winkler
58ff6d4db9 iwlwifi: reverting 'misc wireless annotations' patch for iwlwifi
This patch revert commit blow that wrongly suppressed sparse warning in
iwlwifi eeprom reading
In addtion it suppresses correctly the iwlwifi eeprom register reading anomaly.

commit 45883ae47a0a4700c0f4716dc75a255cccdc3a76
misc wireless annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:19 -05:00
Stefano Brivio
cfbc35b627 b43legacy: fix firmware load message level
The firmware version information should always get printed. Not only on a
debug build.

The patch by Michael Buesch has been ported to b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:19 -05:00
Stefano Brivio
1a1c360d73 b43legacy: add firmware information to modinfo
This adds the firmware ID to modinfo.

The patch by Michael Buesch has been ported to b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:19 -05:00
Ivo van Doorn
db433febba rt2x00: Add new USB ID to rt2500usb
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:18 -05:00
Michael Buesch
588e6cdfcc b43: Fix firmware load message level
The firmware version information should always get printed. Not only
on a debug build.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:18 -05:00
Michael Buesch
9c7d99d6fb b43: Add firmware information to modinfo
This adds the firmware ID to modinfo.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:18 -05:00
Michael Buesch
26bc783f8c b43: Add driver load messages
This adds printk messages with basic information about the driver being loaded.
This information includes a summary of the compiled-in features, which
simplifies bug-reporting and debugging a lot.
Also a firmware ID is printed. This is a unique identifier blob for a specific
version of the firmware. This ID is attached to a specific version of the firmware
blob in b43-fwcutter (see fwcutter git).
This helps users to select the right firmware for their device.
This also makes it possible to use automated scripts to fetch and extract the right
firmware for the driver. (the script will grep the .ko for the "Firmware-ID: xxx" string.
While the driver might still support other versions of the firmware for backward
compatibility, this will always print out the officially supported version, which
people _should_ use.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:18 -05:00
Stefano Brivio
8e118f0ed8 b43legacy: fix DMA for 30/32-bit DMA engines
This checks if the DMA address is bigger than what the controller can manage.
It will reallocate the buffers in the GFP_DMA zone in that case.

The patch by Michael Buesch has been ported to b43legacy.
Thanks to Matti Viljanen for reporting this.

Cc: Matti Viljanen <viljanen.matti@gmail.com>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:18 -05:00
Mohamed Abbas
d68ab68066 iwlwifi: earlier rx allocation
Value of count is used to decide when to replenish rx buffers. If it is
equal or above 8 we replenish the buffers. Ensure there is no starvation
by initializing count to 8 - thus forcing replenish at first iteration.

This is helpful when rx receives batches of buffers smaller than 8.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:18 -05:00
Gregory Greenman
c342a1b91f iwlwifi: Don't send host commands on rfkill
This patch prevents sending host commands when rfkill is on

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:18 -05:00
Reinette Chatre
9788864e21 iwlwifi: do not clear GEO_CONFIGURED bit when calling _down
The geos information is set up during probe and should only
be removed during pci_remove, not during _down.
This is a temporary fix until the setting of the status bits
have been cleaned up (to explicitly match all setting with
clearing of status bits).

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:17 -05:00
Jussi Kivilinna
a97b1f3d20 rndis_wlan: enable stall workaround by link quality instead of link speed
Enable workaround for poor link stalls by link quality instead of link
speed. Using link speed caused workaround be active always on 802.11b
networks which reduced performance and not even catch all stalls.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:17 -05:00
Bruno Randolf
281c56dd27 ath5k: correct padding in tx descriptors
when setting up the tx descriptors for the hardware we must account for any
padding between the header and the data we might have added previously. frame
len is the length of the frame in the air (including FCS but no padding) and
buffer len is the length of the buffer (including padding, but without FCS).

changing the way ah_setup_tx_desc is called: now excluding the FCS, since it's
easier to add that in the function where we need it.

before this fix we sent trailing zero bytes after the packet (because frame len
included the padding) which was not a big problem without WEP, but with WEP
this resultes in a wrong WEP checksum and the packet is discarded - which is
how i noticed at all ;)

an easy way to run into header padding problems, btw, is to connect to a QoS
(WME) enabled access point (eg. madwifi) - QoS data frames are 2 byte longer
and will require padding.

this patch applies on top of luis latest patch series from 04.02.2008.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
drivers/net/wireless/ath5k/hw.c:        Changes-licensed-under: ISC

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:17 -05:00
John W. Linville
bd196ec7f0 wavelan: mark hardware interfacing structures as packed
With assists from Russell King <rmk+kernel@arm.linux.org.uk> and
Andrew Morton <akpm@linux-foundation.org>...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15 13:44:17 -05:00
Richard Purdie
6c152beefb leds: Standardise LED naming scheme
As discussed on LKML some notion of 'function' is needed in
LED naming. This patch adds this to the documentation and
standardises existing LED drivers.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2008-02-07 09:47:00 +00:00
David S. Miller
a29961b33b Merge branch 'fixes' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-02-05 19:58:05 -08:00
Michael Buesch
b79caa68c0 b43: Fix DMA for 30/32-bit DMA engines
This checks if the DMA address is bigger than what the controller can manage.
It will reallocate the buffers in the GFP_DMA zone in that case.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:47 -05:00
Adrian Bunk
221c80cf03 iwl3945-base.c: fix off-by-one errors
This patch fixes two off-by-one errors resulting in array overflows
spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:47 -05:00
Stefano Brivio
8dd0100ce9 b43legacy: fix DMA slot resource leakage
This fixes four resource leakages.
In any error path we must deallocate the DMA frame slots we
previously allocated by request_slot().
This is done by storing the ring pointers before doing any ring
allocation and restoring the old pointers in case of an error.

This patch by Michael Buesch has been ported to b43legacy.

Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Stefano Brivio
9eca9a8e81 b43legacy: drop packets we are not able to encrypt
We must drop any packets we are not able to encrypt.
We must not send them unencrypted or with an all-zero-key (which
basically is the same as unencrypted, from a security point of view).

This might only trigger shortly after resume before mac80211 reassociated
and reconfigured the keys.

It is safe to drop these packets, as the association they belong to
is not guaranteed anymore anyway.
This is a security fix in the sense that it prevents information leakage.

This patch by Michael Buesch has been ported to b43legacy.

Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Stefano Brivio
ada50731c0 b43legacy: fix suspend/resume
This patch makes suspend/resume work with the b43legacy driver.
We must not overwrite the MAC addresses in the init function, as this
would also overwrite the MAC on resume. With an all-zero MAC the device
firmware is not able to ACK any received packets anymore.
Fix this by moving the initializion stuff that must be done on init but
not on resume to the start function.
Also zero out filter_flags to make sure we don't have some flags
from a previous instance for a tiny timeframe until mac80211 reconfigures
them.

This patch by Michael Buesch has been ported to b43legacy.

Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Stefano Brivio
0cd67d48b5 b43legacy: fix PIO crash
Fix the crash reported below, which seems to happen on bcm4306 rev. 2 devices
only while using PIO:

Oops: 0000 [#1] PREEMPT
Modules linked in: b43(F) rfkill(F) led_class(F) input_polldev(F) arc4 b43legacy mac80211 cfg80211 i915 drm snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device ohci1394 ieee1394 ssb pcmcia snd_intel8x0m ehci_hcd uhci_hcd evdev

Pid: 0, comm: swapper Tainted: GF	(2.6.24st3 #2)
EIP: 0060:[<f90f667b>] EFLAGS: 00010002 CPU: 0
EIP is at b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy]
EAX: 0000049b EBX: f11f8044 ECX: 00000001 EDX: 00000000
ESI: f1ff8000 EDI: 00000000 EBP: f11f8040 ESP: c04f4ef4
 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Process swapper (pid: 0, ti=c04f4000 task=c0488300 task.ti=c04b8000)
Stack: f90f2788 c05009f0 c0500900 000010f7 f1053823 c04f4f24 dfb8e800 00000003
       f1368000 00000007 00000296 f90f1975 00001000 010c0800 01000000 00000007
       f90f6391 f11f8000 00000082 c04f4f4a 00000000 00004fd0 10f70000 8c061000
Call Trace:
 [<f90f2788>] b43legacy_debugfs_log_txstat+0x48/0xb0 [b43legacy]
 [<f90f1975>] b43legacy_handle_hwtxstatus+0x75/0x80 [b43legacy]
 [<f90f6391>] b43legacy_pio_rx+0x201/0x280 [b43legacy]
 [<f90e4fa3>] b43legacy_interrupt_tasklet+0x2e3/0x870 [b43legacy]
 [<c0123567>] tasklet_action+0x27/0x60
 [<c01237b4>] __do_softirq+0x54/0xb0
 [<c010686b>] do_softirq+0x7b/0xe0
 [<c01457c0>] handle_level_irq+0x0/0x110
 [<c01457c0>] handle_level_irq+0x0/0x110
 [<c0123758>] irq_exit+0x38/0x40
 [<c0106953>] do_IRQ+0x83/0xd0
 [<c011812f>] __update_rq_clock+0x4f/0x180
 [<c0104b4f>] common_interrupt+0x23/0x28
 [<c011007b>] wakeup_code+0x7b/0xde
 [<c02b1039>] acpi_processor_idle+0x24a/0x3c9
 [<c01025c7>] cpu_idle+0x47/0x80
 [<c04b9ad5>] start_kernel+0x205/0x290
 [<c04b9360>] unknown_bootoption+0x0/0x1f0
 =======================
Code: 0f 00 00 81 fb ff 00 00 00 0f 87 36 01 00 00 8d 04 db 85 ff 8d 6c c6 40 8d 5d 04 0f 85 ef 00 00 00 fe 4e 0e 0f b7 46 0c 8b 53 04 <8b> 4a 50 29 c8 83 e8 52 66 89 46 0c 8b 54 24 14 80 7a 0b 00 74
EIP: [<f90f667b>] b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy] SS:ESP 0068:c04f4ef4
Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-05 14:35:46 -05:00
Rafael J. Wysocki
3506e0c49a b43: avoid unregistering device objects during suspend
Modify the b43 driver to avoid deadlocking suspend and resume, which happens
as a result of attempting to unregister device objects locked by the PM core
during suspend/resume cycles.  Also, make it use a suspend-safe method of
unregistering device object in the resume error path.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Michael Buesch <mb@bu3sch.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:23 -08:00
Mark Gross
f011e2e2df latency.c: use QoS infrastructure
Replace latency.c use with pm_qos_params use.

Signed-off-by: mark gross <mgross@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:22 -08:00
Olof Johansson
906da809c5 pcmcia: replace kio_addr_t with unsigned int everywhere
Remove kio_addr_t, and replace it with unsigned int.  No known architecture
needs more than 32 bits for IO addresses and ports and having a separate type
for it is just messy.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:08 -08:00
Andrew Morton
96cf49a2c1 drivers/net/wireless/b43/main.c needs io.h
m68k:

drivers/net/wireless/b43/main.c:251: error: implicit declaration of function 'mmiowb'

Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:07 -08:00
Linus Torvalds
f5bb3a5e9d Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (79 commits)
  Jesper Juhl is the new trivial patches maintainer
  Documentation: mention email-clients.txt in SubmittingPatches
  fs/binfmt_elf.c: spello fix
  do_invalidatepage() comment typo fix
  Documentation/filesystems/porting fixes
  typo fixes in net/core/net_namespace.c
  typo fix in net/rfkill/rfkill.c
  typo fixes in net/sctp/sm_statefuns.c
  lib/: Spelling fixes
  kernel/: Spelling fixes
  include/scsi/: Spelling fixes
  include/linux/: Spelling fixes
  include/asm-m68knommu/: Spelling fixes
  include/asm-frv/: Spelling fixes
  fs/: Spelling fixes
  drivers/watchdog/: Spelling fixes
  drivers/video/: Spelling fixes
  drivers/ssb/: Spelling fixes
  drivers/serial/: Spelling fixes
  drivers/scsi/: Spelling fixes
  ...
2008-02-04 07:58:52 -08:00
Paulius Zaleckas
efad798b9f Spelling fixes: lenght->length
Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:42:53 +02:00
John W. Linville
04a9e451fd ath5k: fix section mismatch warning
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-01 16:15:50 -05:00
Reinette Chatre
e903fbd41e iwlwifi: fix merge sequence: exit on error before state change
The intention behind the original patch:
"iwlwifi: fix possible read attempt on ucode that is not available"
was to exit before any state is changed. Due to its submission directly
to 2.6.24 it was not clear how this relates to the latest iwlwifi work.

This patch does exactly the same as the previous patch, just earlier to
prevent any state from being changed if there is an error.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-01 16:14:21 -05:00
Tomas Winkler
ff5059eff2 iwlwifi: remove ieee80211 types from iwl-helpers.h
This patch removes IEEE80211_STYPE_BACK_REQ and
IEEE80211_STYPE_BACK defines from iwl-helpers.h. These are already
defined in include/linux/ieee80211.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-01 16:13:43 -05:00
Tomas Winkler
e53cfe0ead iwlwifi: Fix MIMO PS mode
This patch setups correctly MIMO PS mode flags

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-01 16:13:16 -05:00
Ron Rindjunsky
bd8a040e24 iwlwifi: fix sparse warning in iwl 3945
This patch fixes a sparse warning over iwl3945_add_radiotap function by
turning it static

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-01 16:13:05 -05:00
Jussi Kivilinna
bf164cc054 Add new driver 'rndis_wlan' for wireless RNDIS devices.
New driver for wireless RNDIS devices. So far only known chip that uses
wireless RNDIS is Broadcom 4320. Driver detects all RNDIS devices that
have RNDIS wireless physical medium. At least following devices are
detected:

  Buffalo WLI-U2-KG125S
  U.S. Robotics USR5421
  Belkin F5D7051
  Linksys WUSB54GSv2
  Linksys WUSB54GSC
  Asus WL169gE
  Eminent EM4045
  BT Voyager 1055
  Linksys WUSB54GSv1
  U.S. Robotics USR5420
  BUFFALO WLI-USB-G54

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:27:01 -08:00
Marcin Juszkiewicz
5d635ead20 Add another Prism2 card to hostap
Card reported by Ångström user:
http://bugs.openembedded.net/show_bug.cgi?id=3236

Socket 1:
   product info: "Wireless LAN", "11Mbps PC Card", "Version 01.02", ""
   manfid: 0x0156, 0x0002
   function: 6 (network)

Signed-off-by: Marcin Juszkiewicz <openembedded@haerwu.biz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:51 -08:00
Michal Piotrowski
709365af80 hostap_80211.h: remove duplicate prototype
There were two identical prototypes for hostap_80211_rx() in
drivers/net/wireless/hostap/hostap_80211.h.

This patch fixes kernel Bugzilla #8930.

Reported by Christoph Burger-Scheidlin.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:50 -08:00
Cyrill Gorcunov
18904f5839 wireless: iwlwifi3945/4965 - fix incorrect counting of memory
This patch does fix incorrect counting of memory allocated by kmalloc.
It seems that could lead to allocated memory overrun and corrupt
nearlaid memory area.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:49 -08:00
Holger Schurig
fdfb92eab5 libertas: fix interrupt while removing driver
Previously I've got an interrupt while removing the driver.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:49 -08:00
Ihar Hrachyshka
5a6e04345a libertas: fix memory alignment problems on the blackfin
Fixing unaligned memory access on the blackfin architecture (maybe on the
ARM also).

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@promwad.com>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:48 -08:00
Eric Sandeen
9e7d1a445e iwlwifi: correct math in elapsed_jiffies
w/o the first change: if end == start you get MAX_JIFFY_OFFSET which
isn't what you want...

For the latter I think to be technically correct you need the +1 to
account for the jiffy between MAX_JIFFY_OFFSET and 0

(hmm w/ the 2nd change the first isn't strictly needed... ah well)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:47 -08:00
Michael Buesch
09552ccd82 b43: Drop packets that we are not able to encrypt
We must not transmit packets we're not able to encrypt.

This fixes a bug where in a tiny timeframe after machine resume
packets can get sent unencrypted and might leak information.

This also fixes three small resource leakages I spotted while fixing
the security problem. Properly deallocate the DMA slots in any DMA
allocation error path.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:45 -08:00
Michael Buesch
7be1bb6b79 b43: Fix suspend/resume
This fixes suspend/resume.

We must not overwrite the MAC addresses on resume. Otherwise
the card won't ACK any packets anymore.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:45 -08:00
Gregory Greenman
76f3915b4c iwlwifi: Fix uCode error on association
The problem is that priv->assoc_id is set when assoc. resp frame is
received. But, when it is set, LQ cmd is still not sent to the uCode, it is
done from bg_post_assoc, which is called through a workqueue.

On the other hand, when a tx arrives at the moment when this flag is set,
but LQ is still not sent, the if condition in tx_skb will not hold and
the frame will not be dropped.  Thus, it will be sent through
which is still not in the sta table in the uCoded.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:44 -08:00
Joonwoo Park
25c03d8e8c iwlwifi: do not schedule tasklet when rcv unused irq
The nic controller's scheduler interrupt (CSR_INT_BIT_SCD) indicates
to the driver that scheduler finished to transmit the frame/frames.
This bit is not used and the tasklet should thus not be scheduled upon
its receipt.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:43 -08:00
Reinette Chatre
74a3a2509d iwlwifi: cleanup usage of inline functions
Be consistent when using inline functions. If the function only used
once we move it to where it is used - no need for externs.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:42 -08:00
Reinette Chatre
849e0dcea6 iwlwifi: initialize geo/channel information during probe
The geo/channel information is obtained from the EEPROM, which is read
during probe. We can thus set up channel information at this time. This
helps us to support ioctl commands that rely on this before the interface
is brought up.

Clearly matches _init_channel_map with _free_channel_map and _init_geos
with _free_geos to ensure functions calling these routines can also call
their cleanup routines.

Fixes a few bugs:
- if channel information is not available when ioctl commands are
  issued then we get a NULL pointer oops. Having channel information
  set up during probe we can deal with ioctl commands without requiring
  interface to be brought up.
  This fixes bug: http://www.bughost.org/bugzilla/show_bug.cgi?id=1552
- Fix potential problem if user triggers probe/remove/probe sequence. The
  value of priv->channel_count was used to determine if channel map is
  set up. This value was never reset when channel map was removed.
- Fix memory leak: priv->modes need to be freed when device removed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:41 -08:00
Reinette Chatre
75849d287c iwl4965: fix return code indicating one interface is supported
This is a fix to patch "iwlwifi: fix iwl_mac_add_interface handler".
In that patch the return code was corrected for iwl3945, but not for
iwl4965.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:40 -08:00
Maarten Lankhorst
d986bcd1ca iwlwifi: Fix an invalid bitmask test in iwl3945 and iwl4965
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:39 -08:00
Adrian Bassett
4fcc54707e rtl8180_dev.c: add support for 1799:700f
I have been using the rtl8180 driver via the git kernel route for a while now and would like to suggest that the following local ammendment is included in the development tree in order to support the PCI device 1799:700f.

This device is found on the 'Belkin Wireless G Desktop Card' product, model 'F5D7000uk'.  From memory, the chip on the card is inscribed RTL8185L;  (I don't know the significance of the 'L', I'm afraid).

Signed-off-by: Adrian Bassett <adrian.bassett@hotmail.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:39 -08:00
Stefano Brivio
e78c9d2857 b43legacy: fix MAC control and microcode init
This zeros out all microcode related memory before loading
the microcode.

This also fixes initialization of the MAC control register.
The _only_ place where we overwrite the contents of the MAC control
register is at the beginning of b43_chip_init().
All other places must do read() -> mask/set -> write() to not
overwrite existing bits.

This also adds a longer delay for waiting for the microcode
to initialize itself. It seems that the current timeout is sufficient
on all available devices, but there's no real reason why we shouldn't
wait for up to one second. Slow embedded devices might exist.
Better safe than sorry.

While at it, fix naming of MACCTL values.

This patch by Michael Buesch has been ported to b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:37 -08:00
Michael Buesch
8712f2769d b43legacy: Fix rfkill allocation leakage in error paths
We must kill rfkill in any error paths that trigger after rfkill init.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:26:36 -08:00