linux-2.6
16 years agort2x00: Release rt2x00 2.1.3
Ivo van Doorn [Mon, 25 Feb 2008 22:22:13 +0000 (23:22 +0100)] 
rt2x00: Release rt2x00 2.1.3

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Check for 5GHz band in link tuner
Ivo van Doorn [Mon, 25 Feb 2008 22:20:33 +0000 (23:20 +0100)] 
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>
16 years agop54: print unknown eeprom fields
Florian Fainelli [Mon, 25 Feb 2008 16:51:53 +0000 (17:51 +0100)] 
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>
16 years agoadm8211: fix cfg80211 band API conversion
Johannes Berg [Mon, 25 Feb 2008 10:12:18 +0000 (11:12 +0100)] 
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>
16 years agob43legacy: Fix nondebug build
Michael Buesch [Sun, 24 Feb 2008 13:42:29 +0000 (14:42 +0100)] 
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>
16 years agossb: Add CHIPCO IRQ access functions
Aurelien Jarno [Fri, 22 Feb 2008 15:14:58 +0000 (16:14 +0100)] 
ssb: Add CHIPCO IRQ access functions

This patch adds functions to setup and read the CHIPCO IRQ.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix IBSS code
Johannes Berg [Thu, 21 Feb 2008 10:08:33 +0000 (11:08 +0100)] 
mac80211: fix IBSS code

This patch fixes two errors introduced by

    commit 19d35612f3cd7f60dd9174c0100584e21f5a1025
    Author: Bruno Randolf <bruno@thinktube.com>
    Date:   Mon Feb 18 11:21:36 2008 +0900

        mac80211: enable IBSS merging

The first error is an endianness problem that sparse found and
the second is a build failure when CONFIG_MAC80211_IBSS_DEBUG
is not set.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix debugfs_sta print_mac() warning
Johannes Berg [Thu, 21 Feb 2008 10:22:12 +0000 (11:22 +0100)] 
mac80211: fix debugfs_sta print_mac() warning

When print_mac() was marked as __pure to avoid emitting a function
call in pr_debug() scenarios, a warning in this code surfaced since
it relies on the fact that the buffer is modified and doesn't use
the return value. This patch makes it use the return value instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: Disallow concurrent IBSS/STA mode interfaces
Johannes Berg [Thu, 21 Feb 2008 00:10:07 +0000 (01:10 +0100)] 
mac80211: Disallow concurrent IBSS/STA mode interfaces

Disallow having more than one IBSS interface up at any time
because of beacon distribution issues, and for now also disallow
having more than one IBSS/STA interface up at the same time
because we use the master interface's BSS struct which would
be completely corrupted when we have more than one up.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: atomically check whether STA exists already
Johannes Berg [Thu, 21 Feb 2008 13:09:30 +0000 (14:09 +0100)] 
mac80211: atomically check whether STA exists already

When a STA structure is added, it is often checked whether it
already exists before adding it. This, however, isn't done
atomically so there is a race condition that could lead to two
STA structures being added with the same MAC address. This
patch changes sta_info_add() to return an ERR_PTR in case
of failure and adds the failure mode -EEXIST when the STA
already exists.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: rework TX filtered frame code
Johannes Berg [Wed, 20 Feb 2008 22:59:33 +0000 (23:59 +0100)] 
mac80211: rework TX filtered frame code

This reworks the code for TX filtered frames, splitting it out to
a new function to handle those cases, making the clear instruction
a flag and renaming a few things to be easier to understand and
less Atheros hardware specific. Finally, it also makes the comments
explain more.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix incorrect use of CONFIG_MAC80211_IBSS_DEBUG
Pavel Roskin [Thu, 21 Feb 2008 16:33:58 +0000 (11:33 -0500)] 
mac80211: fix incorrect use of CONFIG_MAC80211_IBSS_DEBUG

Configuration variables are only available to the preprocessor

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: fix sparse warnings
Johannes Berg [Wed, 20 Feb 2008 11:08:12 +0000 (12:08 +0100)] 
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>
16 years agoadm8211: fix sparse warnings
Johannes Berg [Wed, 20 Feb 2008 11:06:47 +0000 (12:06 +0100)] 
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>
16 years agossb: Add support for 8bit register access
Michael Buesch [Wed, 20 Feb 2008 18:08:10 +0000 (19:08 +0100)] 
ssb: Add support for 8bit register access

This adds support for 8bit wide register reads/writes.
This is needed in order to support the gigabit ethernet core.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: consolidate TIM handling code
Johannes Berg [Wed, 20 Feb 2008 10:21:35 +0000 (11:21 +0100)] 
mac80211: consolidate TIM handling code

This consolidates all TIM handling code to avoid re-introducing
errors with the bitmap/set_tim order and to reduce code. While
reading the code I noticed a possible problem so I also added
a comment about that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: remove sta TIM flag, fix expiry TIM handling
Johannes Berg [Wed, 20 Feb 2008 01:07:21 +0000 (02:07 +0100)] 
mac80211: remove sta TIM flag, fix expiry TIM handling

The TIM flag that is kept in each station's info is completely
useless, there's no code (aside from the debugfs display code)
checking it, hence it can be removed. While doing that, I noticed
that the TIM handling is broken when buffered frames expire, so
fix that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: invoke set_tim() callback after setting own TIM info
Johannes Berg [Wed, 20 Feb 2008 00:36:16 +0000 (01:36 +0100)] 
mac80211: invoke set_tim() callback after setting own TIM info

Drivers should be allowed to simply get a complete new beacon when
set_tim() is invoked (and set_tim() is required for drivers that
just want a beacon template!), so we need to update our own TIM
bitmap before calling set_tim() so that getting the beacon will
now get an already updated beacon.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: Convert to list_for_each_entry_rcu()
Roel Kluin [Tue, 19 Feb 2008 14:41:50 +0000 (15:41 +0100)] 
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>
16 years agowireless: update US regulatory domain
Tomas Winkler [Wed, 13 Feb 2008 18:58:34 +0000 (20:58 +0200)] 
wireless: update US regulatory domain

This patch adds channels to US regulatory domain

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Release rt2x00 2.1.2
Ivo van Doorn [Sun, 17 Feb 2008 16:36:49 +0000 (17:36 +0100)] 
rt2x00: Release rt2x00 2.1.2

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix MAC address defines in rt61pci
Ivo van Doorn [Sun, 17 Feb 2008 16:36:33 +0000 (17:36 +0100)] 
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>
16 years agort2x00: Fix hw mode registration with mac80211.
Gertjan van Wingerde [Sun, 17 Feb 2008 16:35:55 +0000 (17:35 +0100)] 
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>
16 years agort2x00: Remove async vendor request calls from rt2x00usb
Ivo van Doorn [Sun, 17 Feb 2008 16:35:28 +0000 (17:35 +0100)] 
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>
16 years agort2x00: Cleanup mode registration
Ivo van Doorn [Sun, 17 Feb 2008 16:35:05 +0000 (17:35 +0100)] 
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>
16 years agort2x00: Rename dscape -> mac80211
Ivo van Doorn [Sun, 17 Feb 2008 16:34:26 +0000 (17:34 +0100)] 
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>
16 years agort2x00: Remove reset_tsf()
Ivo van Doorn [Sun, 17 Feb 2008 16:33:57 +0000 (17:33 +0100)] 
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>
16 years agort2x00: Fix Descriptor DMA initialization
Ivo van Doorn [Sun, 17 Feb 2008 16:33:24 +0000 (17:33 +0100)] 
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>
16 years agort2x00: Filter ACK_CTS based on FIF_CONTROL
Ivo van Doorn [Sun, 17 Feb 2008 16:33:13 +0000 (17:33 +0100)] 
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>
16 years agort2x00: Don't report driver generated frames to tx_status()
Ivo van Doorn [Sun, 17 Feb 2008 16:32:08 +0000 (17:32 +0100)] 
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>
16 years agort2x00: Send frames out with configured TX power
Ivo van Doorn [Sun, 17 Feb 2008 16:31:48 +0000 (17:31 +0100)] 
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>
16 years agort2x00: Release rt2x00 2.1.1
Ivo van Doorn [Sun, 10 Feb 2008 21:52:56 +0000 (22:52 +0100)] 
rt2x00: Release rt2x00 2.1.1

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Kill guardian urb during disable_radio
Ivo van Doorn [Sun, 10 Feb 2008 21:52:36 +0000 (22:52 +0100)] 
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>
16 years agort2x00: Cleanup Makefile
Ivo van Doorn [Sun, 10 Feb 2008 21:52:10 +0000 (22:52 +0100)] 
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>
16 years agort2x00: Fix queue->qid initialization
Ivo van Doorn [Sun, 10 Feb 2008 21:51:41 +0000 (22:51 +0100)] 
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>
16 years agort2x00: Fix skbdesc->data_len initialization
Ivo van Doorn [Sun, 10 Feb 2008 21:51:21 +0000 (22:51 +0100)] 
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>
16 years agort2x00: Fix typo in debug statement
Ivo van Doorn [Sun, 10 Feb 2008 21:50:58 +0000 (22:50 +0100)] 
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>
16 years agort2x00: Add queue statistics to debugfs
Ivo van Doorn [Sun, 10 Feb 2008 21:50:28 +0000 (22:50 +0100)] 
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>
16 years agort2x00: Fix scheduling while atomic errors in usb drivers
Ivo van Doorn [Sun, 10 Feb 2008 21:50:04 +0000 (22:50 +0100)] 
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>
16 years agort2x00: make csr_cache and csr_addr an union
Ivo van Doorn [Sun, 10 Feb 2008 21:49:13 +0000 (22:49 +0100)] 
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>
16 years agort2x00: Select CONFIG_NEW_LEDS
Ivo van Doorn [Sun, 10 Feb 2008 21:48:47 +0000 (22:48 +0100)] 
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>
16 years agort2x00: correct address calc for queue private data
Adam Baker [Sun, 10 Feb 2008 21:48:19 +0000 (22:48 +0100)] 
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>
16 years agort2x00: Remove MGMT ring initialization
Ivo van Doorn [Sun, 10 Feb 2008 21:47:46 +0000 (22:47 +0100)] 
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>
16 years agort2x00: Make rt2x00 less verbose
Ivo van Doorn [Sun, 10 Feb 2008 21:47:17 +0000 (22:47 +0100)] 
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>
16 years agort2x00: Fix invalid DMA free
Ivo van Doorn [Sun, 10 Feb 2008 21:46:52 +0000 (22:46 +0100)] 
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>
16 years agowireless: rt2x00: fix driver menu indenting
Randy Dunlap [Sun, 10 Feb 2008 18:52:52 +0000 (10:52 -0800)] 
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>
16 years agoprism54: Convert wpa_sem in a mutex
Matthias Kaehlcke [Fri, 15 Feb 2008 19:57:07 +0000 (20:57 +0100)] 
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>
16 years agoprism54: Convert stats_sem in a mutex
Matthias Kaehlcke [Fri, 15 Feb 2008 19:56:59 +0000 (20:56 +0100)] 
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>
16 years agoprism54: Convert acl->sem in a mutex
Matthias Kaehlcke [Fri, 15 Feb 2008 19:56:48 +0000 (20:56 +0100)] 
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>
16 years agoipw2200: le*_add_cpu conversion
Marcin Slusarz [Tue, 12 Feb 2008 23:06:12 +0000 (00:06 +0100)] 
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>
16 years agoipw2100/ipw2200: note firmware loading caveat in Kconfig help text
Daniel Drake [Tue, 12 Feb 2008 13:49:42 +0000 (13:49 +0000)] 
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>
16 years agop54: use IEEE 802.11e defaults for initialization
Christian Lamparter [Tue, 12 Feb 2008 13:02:06 +0000 (14:02 +0100)] 
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>
16 years agozd1211rw: Fix beacon filter flags thinko
Michael Buesch [Sun, 10 Feb 2008 15:03:55 +0000 (16:03 +0100)] 
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>
16 years agozd1211rw: Fixed incorrect constant name.
Javier Cardona [Sat, 9 Feb 2008 02:41:17 +0000 (18:41 -0800)] 
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>
16 years agoiwlwifi: remove twice defined CSR register
Tomas Winkler [Tue, 19 Feb 2008 22:05:33 +0000 (14:05 -0800)] 
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>
16 years agomac80211: convert sta_info.pspoll to a flag
Johannes Berg [Tue, 19 Feb 2008 10:31:14 +0000 (11:31 +0100)] 
mac80211: convert sta_info.pspoll to a flag

This doesn't really need to be a full int variable since it's
just a flag to indicate a PS-poll is in progress.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43(legacy): include full timestamp in beacon frames
Johannes Berg [Mon, 18 Feb 2008 17:53:55 +0000 (18:53 +0100)] 
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>
16 years agortl818x: fix RTS/CTS-less transmit
Johannes Berg [Mon, 18 Feb 2008 13:20:30 +0000 (14:20 +0100)] 
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>
16 years agomac80211: enable IBSS merging
Bruno Randolf [Mon, 18 Feb 2008 02:21:36 +0000 (11:21 +0900)] 
mac80211: enable IBSS merging

enable IBSS cell merging. if an IBSS beacon with the same channel, same ESSID
and a TSF higher than the local TSF (mactime) is received, we have to join its
BSSID. while this might not be immediately apparent from reading the 802.11
standard it is compliant and necessary to make IBSS mode functional in many
cases. most drivers have a similar behaviour.

* move the relevant code section (previously only containing debug code) down
to the end of the function, so we can reuse the bss structure.

* we have to compare the mactime (TSF at the time of packet receive) rather
than the current TSF. since mactime is defined as the time the first data
symbol arrived we add the time until byte 24 where the timestamp resides, since
this is how the beacon timestamp is defined. as some some drivers are not able
to give a reliable mactime we fall back to use the current TSF, which will be
enough to catch most (but not all) cases where an IBSS merge is necessary.

* in IBSS mode we want to allow beacons to override probe response info so we
can correctly do merges.

* we don't only configure beacons based on scan results, so change that
message.

* to enable this we have to let all beacons thru in IBSS mode, even if they
have a different BSSID.

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: move function ieee80211_sta_join_ibss()
Bruno Randolf [Mon, 18 Feb 2008 02:21:15 +0000 (11:21 +0900)] 
mac80211: move function ieee80211_sta_join_ibss()

this moves ieee80211_sta_join_ibss() up for the next patch (ibss merge).

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: better definition of mactime
Bruno Randolf [Mon, 18 Feb 2008 02:20:51 +0000 (11:20 +0900)] 
mac80211: better definition of mactime

define mactime as the time when the first data symbol arrived at the HW. the
old definition was questionable because 802.11 defines timestamp only for
beacon and probe response frames, and there it means the timestamp field.

a stricter definition of mactime is necessary for correct merging of IBSS.

note that it is up to the driver to convert whatever its hardware returns to
this definition. unfortunately we don't know for example when atheros hardware
takes its rx timestamp exactly :(

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix name of function in comment (_rx_card_state_notif)
Reinette Chatre [Fri, 15 Feb 2008 22:34:37 +0000 (14:34 -0800)] 
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>
16 years agoWDEV: ath5k, typecheck on nonDEBUG
Jiri Slaby [Fri, 15 Feb 2008 20:58:53 +0000 (21:58 +0100)] 
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>
16 years agodrivers/net/wireless/atmel.c: Use time_* macros
S.Çağlar Onur [Thu, 14 Feb 2008 15:36:49 +0000 (17:36 +0200)] 
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>
16 years agonet/mac80211/: Use time_* macros
S.Çağlar Onur [Thu, 14 Feb 2008 15:36:47 +0000 (17:36 +0200)] 
net/mac80211/: 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>
16 years agomac80211: fix ecw2cw brain-damage
Johannes Berg [Wed, 13 Feb 2008 23:30:35 +0000 (00:30 +0100)] 
mac80211: fix ecw2cw brain-damage

This brain-damaged code just bothers me, fix it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Add tx_ant_num hw setting variable
Tomas Winkler [Wed, 13 Feb 2008 19:32:31 +0000 (11:32 -0800)] 
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>
16 years agoiwlwifi: change iwl->priv iwl_priv * type in iwl-YYY-io.h
Tomas Winkler [Wed, 13 Feb 2008 19:32:30 +0000 (11:32 -0800)] 
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>
16 years agoiwlwifi-2.6: Adds and fixes defines about security
Emmanuel Grumbach [Wed, 13 Feb 2008 19:32:29 +0000 (11:32 -0800)] 
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>
16 years agob43: Add HostFlags HI support
Michael Buesch [Wed, 13 Feb 2008 13:31:08 +0000 (14:31 +0100)] 
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>
16 years agomac80211: Extend filter flag documentation about unsupported flags
Michael Buesch [Tue, 12 Feb 2008 19:12:45 +0000 (20:12 +0100)] 
mac80211: Extend filter flag documentation about unsupported flags

This extends the filter flags documentation to make it clear
what clearing a flag really means.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: give burst time in txop rather than 0.1msec units
Johannes Berg [Sun, 10 Feb 2008 15:49:38 +0000 (16:49 +0100)] 
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>
16 years agob43: Fix bandswitch
Michael Buesch [Sat, 9 Feb 2008 11:08:58 +0000 (12:08 +0100)] 
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>
16 years agoiwlwifi: Update iwlwifi version stamp to 1.2.26
Reinette Chatre [Sat, 9 Feb 2008 00:39:11 +0000 (16:39 -0800)] 
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>
16 years agomac80211: defer master netdev allocation to ieee80211_register_hw
Johannes Berg [Fri, 8 Feb 2008 08:48:13 +0000 (09:48 +0100)] 
mac80211: defer master netdev allocation to ieee80211_register_hw

When we want to go multiqueue, we will need to know the number of
queues the hardware has for registering the master netdev. This
number is only available in ieee80211_register_hw() rather than
ieee80211_alloc_hw(), so defer allocation of the master device to
ieee80211_register_hw().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43legacy: fix B43legacy_WARN_ON macro
Stefano Brivio [Fri, 8 Feb 2008 05:31:39 +0000 (06:31 +0100)] 
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>
16 years agob43legacy: fix upload of beacon packets to the hardware
Stefano Brivio [Fri, 8 Feb 2008 05:31:25 +0000 (06:31 +0100)] 
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>
16 years agob43legacy: add definitions for MAC control register
Stefano Brivio [Fri, 8 Feb 2008 05:31:10 +0000 (06:31 +0100)] 
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>
16 years agoiwlwifi: remove IWL{4965,3945}_QOS
Ron Rindjunsky [Wed, 6 Feb 2008 19:20:39 +0000 (11:20 -0800)] 
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>
16 years agomac80211: adjustable number of bits for qdisc pool
Ron Rindjunsky [Wed, 30 Jan 2008 10:58:45 +0000 (12:58 +0200)] 
mac80211: adjustable number of bits for qdisc pool

This fix allows to control the number of bits that qdiscs book keeping
can be done for with respect to the qdisc pool

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: Add cooked monitor mode support
Michael Wu [Thu, 31 Jan 2008 18:48:27 +0000 (19:48 +0100)] 
mac80211: Add cooked monitor mode support

This adds "cooked" monitor mode to mac80211. A monitor interface
in "cooked" mode will see all frames that mac80211 has not used
internally.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: move some code into ieee80211_invoke_rx_handlers
Johannes Berg [Thu, 31 Jan 2008 18:48:26 +0000 (19:48 +0100)] 
mac80211: move some code into ieee80211_invoke_rx_handlers

There is some duplicated code that sits in front of each function
call to ieee80211_invoke_rx_handlers() that can very well be part
of that function if it gets slightly different arguments.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: remove "dynamic" RX/TX handlers
Johannes Berg [Thu, 31 Jan 2008 18:48:25 +0000 (19:48 +0100)] 
mac80211: remove "dynamic" RX/TX handlers

It doesn't really make sense to have extra pointers to the RX/TX
handler arrays instead of just using the arrays directly, that
also allows us to make them static.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up some things in the RX path
Johannes Berg [Thu, 31 Jan 2008 18:48:24 +0000 (19:48 +0100)] 
mac80211: clean up some things in the RX path

Uninline ieee80211_invoke_rx_handlers to save .text space,
make the code more readable in some places and remove the
"optimisation" that is hit only very few times and unclear
to start with.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: Use monitor configuration flags
Michael Wu [Thu, 31 Jan 2008 18:48:23 +0000 (19:48 +0100)] 
mac80211: Use monitor configuration flags

Take advantage of the monitor configuration flags now provided by cfg80211.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agonl80211: Add monitor interface configuration flags
Michael Wu [Thu, 31 Jan 2008 18:48:22 +0000 (19:48 +0100)] 
nl80211: Add monitor interface configuration flags

This allows precise control over what a monitor interface shows.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: split RX_DROP
Johannes Berg [Thu, 31 Jan 2008 18:48:21 +0000 (19:48 +0100)] 
mac80211: split RX_DROP

Some instances of RX_DROP mean that the frame was useless,
others mean that the frame should be visible in userspace
on "cooked" monitor interfaces. This patch splits up RX_DROP
and changes each instance appropriately.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: split ieee80211_txrx_result
Johannes Berg [Thu, 31 Jan 2008 18:48:20 +0000 (19:48 +0100)] 
mac80211: split ieee80211_txrx_result

The _DROP result will need to be split in the RX path but not
in the TX path, so for preparation split up the type into two
types, one for RX and one for TX. Also make sure (via sparse)
that they cannot be confused.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Fix HT compilation breakage caused by cfg80211 API for channels/bitrates...
Tomas Winkler [Wed, 6 Feb 2008 00:37:18 +0000 (02:37 +0200)] 
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>
16 years agort2x00: Release rt2x00 2.1.0
Ivo van Doorn [Sun, 3 Feb 2008 14:56:02 +0000 (15:56 +0100)] 
rt2x00: Release rt2x00 2.1.0

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix rate initialization
Ivo van Doorn [Sun, 3 Feb 2008 14:54:34 +0000 (15:54 +0100)] 
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>
16 years agort2x00: Enable LED class support for rt2500usb/rt73usb
Ivo van Doorn [Sun, 3 Feb 2008 14:54:11 +0000 (15:54 +0100)] 
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>
16 years agort2x00: Make use of MAC80211_LED_TRIGGERS
Ivo van Doorn [Sun, 3 Feb 2008 14:53:40 +0000 (15:53 +0100)] 
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>
16 years agort2x00: Use ieee80211_channel_to_frequency()
Ivo van Doorn [Sun, 3 Feb 2008 14:52:45 +0000 (15:52 +0100)] 
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>
16 years agort2x00: Remove HWMODE_{A,B,G}
Ivo van Doorn [Sun, 3 Feb 2008 14:51:13 +0000 (15:51 +0100)] 
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>
16 years agort2x00: Rate structure overhaul
Ivo van Doorn [Sun, 3 Feb 2008 14:50:40 +0000 (15:50 +0100)] 
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>
16 years agoath5k/phy.c: fix negative array index
Luis R. Rodriguez [Mon, 4 Feb 2008 02:53:51 +0000 (21:53 -0500)] 
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>
16 years agoath5k: Use software encryption for now
Luis R. Rodriguez [Mon, 4 Feb 2008 02:53:20 +0000 (21:53 -0500)] 
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>
16 years agoath5k: Port debug.c over to the new band API and enable as build option
Luis R. Rodriguez [Mon, 4 Feb 2008 15:03:54 +0000 (10:03 -0500)] 
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>
16 years agoath5k: Use our own Kconfig file, we'll be expanding this shortly
Luis R. Rodriguez [Mon, 4 Feb 2008 14:56:32 +0000 (09:56 -0500)] 
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>