kernel/kernel-generic.git
14 years agomwl8k: add AP firmware handling to ->configure_filter()
Lennert Buytenhek [Thu, 22 Oct 2009 18:21:36 +0000 (20:21 +0200)]
mwl8k: add AP firmware handling to ->configure_filter()

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: implement AP firmware antenna configuration
Lennert Buytenhek [Thu, 22 Oct 2009 18:21:33 +0000 (20:21 +0200)]
mwl8k: implement AP firmware antenna configuration

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: add the commands used for AP firmware initialisation
Lennert Buytenhek [Thu, 22 Oct 2009 18:21:30 +0000 (20:21 +0200)]
mwl8k: add the commands used for AP firmware initialisation

Add the AP version of the GET_HW_SPEC command, as well as the
SET_HW_SPEC command, for initialising AP firmware.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: rename mwl8k_cmd_get_hw_spec() to mwl8k_cmd_get_hw_spec_sta()
Lennert Buytenhek [Thu, 22 Oct 2009 18:21:05 +0000 (20:21 +0200)]
mwl8k: rename mwl8k_cmd_get_hw_spec() to mwl8k_cmd_get_hw_spec_sta()

As the AP version of the command uses a different format.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: set ->interface_modes from the driver data
Lennert Buytenhek [Thu, 22 Oct 2009 18:21:02 +0000 (20:21 +0200)]
mwl8k: set ->interface_modes from the driver data

As different chip/firmware combinations support different
interface types.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: allow for different receive descriptor formats
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:59 +0000 (20:20 +0200)]
mwl8k: allow for different receive descriptor formats

As the receive descriptor format is determined by the firmware running
on the hardware and not by the hardware itself, and as these
descriptor formats vary a bit between different firmware releases,
abstract out the receive descriptor init/refill/process methods, and
allow choosing between different formats at run time depending on the
chip and firmware we're running on.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: use pci_unmap_addr{,set}() to keep track of unmap addresses on rx
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:56 +0000 (20:20 +0200)]
mwl8k: use pci_unmap_addr{,set}() to keep track of unmap addresses on rx

Instead of reading back the unmap address from the receive
descriptor when doing receive processing, use DECLARE_PCI_UNMAP_ADDR
and pci_unmap_addr{,set}() to keep track of these addresses.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: handle loading AP firmware images
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:53 +0000 (20:20 +0200)]
mwl8k: handle loading AP firmware images

AP and STA firmware images provide a different signature in the
HIU_INT_CODE register after loading.  Record which of the signatures
we saw, as it determines which command sequences to use later on.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: spell out the names of firmware images in the pci driver data
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:50 +0000 (20:20 +0200)]
mwl8k: spell out the names of firmware images in the pci driver data

To allow use of a more flexible firmware file naming scheme.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: change pci id table driver data to a structure pointer
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:47 +0000 (20:20 +0200)]
mwl8k: change pci id table driver data to a structure pointer

To prepare for adding support for more device types, introduce a
new structure, mwl8k_device_info, where per-device information can
be stored, and change the pci id table driver data from an integer
indicating only the part number to a pointer to a mwl8k_device_info
structure.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: async station powersave handling
Johannes Berg [Fri, 6 Nov 2009 10:35:50 +0000 (11:35 +0100)]
mac80211: async station powersave handling

Some devices require that all frames to a station
are flushed when that station goes into powersave
mode before being able to send frames to that
station again when it wakes up or polls -- all in
order to avoid reordering and too many or too few
frames being sent to the station when it polls.

Normally, this is the case unless the station
goes to sleep and wakes up very quickly again.
But in that case, frames for it may be pending
on the hardware queues, and thus races could
happen in the case of multiple hardware queues
used for QoS/WMM. Normally this isn't a problem,
but with the iwlwifi mechanism we need to make
sure the race doesn't happen.

This makes mac80211 able to cope with the race
with driver help by a new WLAN_STA_PS_DRIVER
per-station flag that can be controlled by the
driver and tells mac80211 whether it can transmit
frames or not. This flag must be set according to
very specific rules outlined in the documentation
for the function that controls it.

When we buffer new frames for the station, we
normally set the TIM bit right away, but while
the driver has blocked transmission to that sta
we need to avoid that as well since we cannot
respond to the station if it wakes up due to the
TIM bit. Once the driver unblocks, we can set
the TIM bit.

Similarly, when the station just wakes up, we
need to wait until all other frames are flushed
before we can transmit frames to that station,
so the same applies here, we need to wait for
the driver to give the OK.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8187: Remove deprecated 'qual' from returned RX status
Larry Finger [Thu, 5 Nov 2009 06:09:51 +0000 (00:09 -0600)]
rtl8187: Remove deprecated 'qual' from returned RX status

The qual member of ieee80211_rx_status is deprecated. As a result, this
driver no longer needs to calculate a quality value.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43legacy: Remove deprecated 'qual' from returned RX status
Larry Finger [Thu, 5 Nov 2009 06:09:15 +0000 (00:09 -0600)]
b43legacy: Remove deprecated 'qual' from returned RX status

With the deprecation of the qual member of ieee80211_rx_status, that
calculation and an associated constant can be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Remove deprecated 'qual' from returned RX status
Larry Finger [Thu, 5 Nov 2009 06:08:59 +0000 (00:08 -0600)]
b43: Remove deprecated 'qual' from returned RX status

With the deprecation of the qual member of ieee80211_rx_status, that
calculation and an associated constant can be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: add LED support for Acer Aspire One AO751h/AO531h
Keng-Yu Lin [Thu, 5 Nov 2009 03:21:37 +0000 (11:21 +0800)]
ath5k: add LED support for Acer Aspire One AO751h/AO531h

Add LED support for a Foxconn AR242X module, found on
the Acer Aspire One models AO751h/AO531h

Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib (part four)
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:37:05 +0000 (18:37 +0100)]
rt2800: add rt2800lib (part four)

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib (part three)
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:57 +0000 (18:36 +0100)]
rt2800: add rt2800lib (part three)

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: move REGISTER_BUSY_* definitions to rt2x00.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:50 +0000 (18:36 +0100)]
rt2x00: move REGISTER_BUSY_* definitions to rt2x00.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib (part two)
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:40 +0000 (18:36 +0100)]
rt2800: add rt2800lib (part two)

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib (part one)
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:24 +0000 (18:36 +0100)]
rt2800: add rt2800lib (part one)

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: prepare for rt2800lib addition
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:17 +0000 (18:36 +0100)]
rt2800: prepare for rt2800lib addition

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: add support for different chipset interfaces
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:10 +0000 (18:36 +0100)]
rt2x00: add support for different chipset interfaces

Enhance rt2x00 infrastructure by adding explicit information
about used chipset interface to struct rt2x00_chip.

The new field will be used by rt2800 drivers for rt2800 library.

Also add commonly used rt2x00_intf_is_pci() and rt2x00_intf_is_usb()
helpers to make code easier to read (noticed by Ivo van Doorn).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: fix comments in rt2800.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:02 +0000 (18:36 +0100)]
rt2800: fix comments in rt2800.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: fix duplication in header files
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:54 +0000 (18:35 +0100)]
rt2800: fix duplication in header files

Updated debugging scripts are located here:

http://www.kernel.org/pub/linux/kernel/people/bart/rt2800/scripts/

(they also work fine with older drivers)

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add RXINFO_DESC_SIZE definition
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:47 +0000 (18:35 +0100)]
rt2800usb: add RXINFO_DESC_SIZE definition

Add RXINFO_DESC_SIZE definition and use it instead of abusing
RXD_DESC_SIZE one (TXD_DESC_SIZE and RXD_DESC_SIZE are specific
to PCI version of the chipset).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800: add rt2800lib.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:32 +0000 (18:35 +0100)]
rt2800: add rt2800lib.h

Code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix rt2x00pci_register_multi[read,write]() arguments
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:25 +0000 (18:35 +0100)]
rt2x00: fix rt2x00pci_register_multi[read,write]() arguments

Change type of 'length' argument from u16 to u32 (all arguments
match rt2x00usb_register_multi[read,write]() ones now).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix rt2x00usb_regbusy_read() arguments
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:18 +0000 (18:35 +0100)]
rt2x00: fix rt2x00usb_regbusy_read() arguments

Add const to 'field' argument of rt2x00usb_regbusy_read()
(all arguments match rt2x00pci_regbusy_read() ones now).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix rt2x00usb_register_multiwrite() arguments
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:10 +0000 (18:35 +0100)]
rt2x00: fix rt2x00usb_register_multiwrite() arguments

Add const to 'value' argument of rt2x00usb_register_multiwrite()
(all arguments match rt2x00pci_register_multiwrite() ones now).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: convert to use struct rt2800_ops methods
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:00 +0000 (18:35 +0100)]
rt2800pci: convert to use struct rt2800_ops methods

Add chipset registers access abstraction layer and prepare for later
code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: convert to use struct rt2800_ops methods
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:53 +0000 (18:34 +0100)]
rt2800usb: convert to use struct rt2800_ops methods

Add chipset registers access abstraction layer and prepare for later
code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: add driver private field to struct rt2x00_dev
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:46 +0000 (18:34 +0100)]
rt2x00: add driver private field to struct rt2x00_dev

Enhance rt2x00 infrastructure by adding driver specific field to
struct rt2x00_dev.

The new field will be used by rt2800 drivers for chipset registers
access abstraction layer.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_mcu_request() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:39 +0000 (18:34 +0100)]
rt2800pci: add rt2800_mcu_request() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_mcu_request() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:32 +0000 (18:34 +0100)]
rt2800usb: add rt2800_mcu_request() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_rf_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:25 +0000 (18:34 +0100)]
rt2800pci: add rt2800_rf_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_rf_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:18 +0000 (18:34 +0100)]
rt2800usb: add rt2800_rf_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_rfcsr_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:11 +0000 (18:34 +0100)]
rt2800pci: add rt2800_rfcsr_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_rfcsr_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:34:04 +0000 (18:34 +0100)]
rt2800usb: add rt2800_rfcsr_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_bbp_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:57 +0000 (18:33 +0100)]
rt2800pci: add rt2800_bbp_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_bbp_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:50 +0000 (18:33 +0100)]
rt2800usb: add rt2800_bbp_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_regbusy_read() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:41 +0000 (18:33 +0100)]
rt2800pci: add rt2800_regbusy_read() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_regbusy_read() wrapper
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:34 +0000 (18:33 +0100)]
rt2800usb: add rt2800_regbusy_read() wrapper

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_register_multi[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:27 +0000 (18:33 +0100)]
rt2800pci: add rt2800_register_multi[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_register_multi[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:20 +0000 (18:33 +0100)]
rt2800usb: add rt2800_register_multi[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800pci: add rt2800_register_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:13 +0000 (18:33 +0100)]
rt2800pci: add rt2800_register_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2800usb: add rt2800_register_[read,write]() wrappers
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:33:05 +0000 (18:33 +0100)]
rt2800usb: add rt2800_register_[read,write]() wrappers

Part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: use __dev_alloc_skb() on RX
Luis R. Rodriguez [Mon, 2 Nov 2009 17:15:15 +0000 (12:15 -0500)]
wl1271: use __dev_alloc_skb() on RX

RX is handled in a workqueue therefore allocating for GFP_ATOMIC
is overkill and not required.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix internal scan request
Johannes Berg [Mon, 2 Nov 2009 10:31:51 +0000 (11:31 +0100)]
mac80211: fix internal scan request

The internal scan request mac80211 uses to
scan for IBSS networks was set up to contain
no channels at all because n_channels wasn't
set after setting up the channels array. Fix
this to properly scan for networks.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix IBSS merge
Sujith [Mon, 2 Nov 2009 07:03:23 +0000 (12:33 +0530)]
mac80211: Fix IBSS merge

Currently, in IBSS mode, a single creator would go into
a loop trying to merge/scan. This happens because the IBSS timer is
rearmed on finishing a scan and the subsequent
timer invocation requests another scan immediately.

This patch fixes this issue by checking if we have just completed
a scan run trying to merge with other IBSS networks.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: remove needless ifdefs from rt2x00leds.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:36:33 +0000 (18:36 +0100)]
rt2x00: remove needless ifdefs from rt2x00leds.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800usb: fix comments in rt2800usb.h
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:35:39 +0000 (18:35 +0100)]
rt2800usb: fix comments in rt2800usb.h

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800usb: use rt2x00usb_register_multiwrite() to set key entries
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:58 +0000 (18:32 +0100)]
rt2800usb: use rt2x00usb_register_multiwrite() to set key entries

Since struct hw_key_entry is 32-bytes large and is smaller than
CSR cache size (which is 64-bytes large) we can use the standard
rt2x00usb_register_multiwrite() helper to set key entries.

This cleanup is a part of preparations for later code unification.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: fix rt2x00usb_register_read() comment
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:50 +0000 (18:32 +0100)]
rt2x00: fix rt2x00usb_register_read() comment

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800pci: fix comment about IV/EIV fields
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:40 +0000 (18:32 +0100)]
rt2800pci: fix comment about IV/EIV fields

The bit tested by hardware is TXD_W3_WIV and its value
equals the negated value of ENTRY_TXD_ENCRYPT_IV bit.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800pci: fix comment about register access
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:32 +0000 (18:32 +0100)]
rt2800pci: fix comment about register access

Registers used for indirect BBP and RF registers access are
respectively BBPCSR and RFCSR, also make it clear that all CSR
registers access goes through rt2x00pci_register_[read,write]()
methods.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800pci: fix crypto in TX frame
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:24 +0000 (18:32 +0100)]
rt2800pci: fix crypto in TX frame

Based on rt2800usb patch from Benoit PAPILLAULT
(commit 17616310836ad2cc45a64576ef0e1520b0dcc81b).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800usb: fix rt2800usb_rfcsr_read()
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:17 +0000 (18:32 +0100)]
rt2800usb: fix rt2800usb_rfcsr_read()

The driver should write the read request into RF_CSR_CFG register
and not BBP_CSR_CFG one in rt2800usb_rfcsr_read().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800pci: make Kconfig help entry more helpful
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:32:10 +0000 (18:32 +0100)]
rt2800pci: make Kconfig help entry more helpful

Document known issues with the driver to aid distribution makers,
users and developers in making informed decisions instead of wasting
their time needlessly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2800usb: make Kconfig help entry more helpful
Bartlomiej Zolnierkiewicz [Wed, 4 Nov 2009 17:31:58 +0000 (18:31 +0100)]
rt2800usb: make Kconfig help entry more helpful

Document known issues with the driver to aid distribution makers,
users and developers in making informed decisions instead of wasting
their time needlessly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: make ieee80211_find_sta per virtual interface
Johannes Berg [Wed, 4 Nov 2009 13:42:28 +0000 (14:42 +0100)]
mac80211: make ieee80211_find_sta per virtual interface

Since we have a TODO item to make all station
management dependent on virtual interfaces, I
figured I'd start with pushing such a change
to drivers before more drivers start using the
ieee80211_find_sta() API with a hw pointer and
cause us grief later on.

For now continue exporting the old API in form
of ieee80211_find_sta_by_hw(), but discourage
its use strongly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: remove dead variable
Johannes Berg [Sat, 31 Oct 2009 15:15:39 +0000 (16:15 +0100)]
cfg80211: remove dead variable

commit 211a4d12abf86fe0df4cd68fc6327cbb58f56f81
  Author: Johannes Berg <johannes@sipsolutions.net>
  Date:   Tue Oct 20 15:08:53 2009 +0900

      cfg80211: sme: deauthenticate on assoc failure

accidentally introduced a dead variable, I had
changed the code to not need it while creating
the patch and it looks like I forgot to remove
the variable (and nobody else noticed either).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: pci BAR mapping changes
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:43 +0000 (20:20 +0200)]
mwl8k: pci BAR mapping changes

Map BAR0 as well, as we need to write to it during init on some chips.

Also, if BAR0 is a 64bit BAR, the register BAR becomes BAR2, so try
mapping BAR2 if mapping BAR1 fails.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: shorten receive/transmit state variable names
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:40 +0000 (20:20 +0200)]
mwl8k: shorten receive/transmit state variable names

To conserve horizontal space.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: add support for enabling hardware sniffer mode
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:32 +0000 (20:20 +0200)]
mwl8k: add support for enabling hardware sniffer mode

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: report rate and other information for received frames
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:29 +0000 (20:20 +0200)]
mwl8k: report rate and other information for received frames

When receiving a frame, report the antenna info, long/short preamble
status, 20/40 MHz flag, long/short guard interval status, MCS/legacy
rate status, and MCS/legacy rate index to the stack.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: clarify WME transmit queue 0/1 swizzling
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:25 +0000 (20:20 +0200)]
mwl8k: clarify WME transmit queue 0/1 swizzling

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: use cond_resched() when loading firmware blocks
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:16 +0000 (20:20 +0200)]
mwl8k: use cond_resched() when loading firmware blocks

Since each firmware block takes on the order of several hundred usec
to upload to the hardware, using msleep in the inner loop would make
the firmware loading process take a lot more time than just doing
busy-waiting like we do now.  But if we keep the busy-waiting, we can
at least add a cond_resched() to the inner loop so that we give other
tasks a chance to run while the firmware is being loaded.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: clear hardware MAC address if no STA interface configured
Lennert Buytenhek [Thu, 22 Oct 2009 18:20:04 +0000 (20:20 +0200)]
mwl8k: clear hardware MAC address if no STA interface configured

If there is no STA interface configured, clear the hardware MAC
address to prevent ACKing frames sent to our MAC address.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: enforce FIF_BCN_PRBRESP_PROMISC when no STA interfaces are active
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:53 +0000 (20:19 +0200)]
mwl8k: enforce FIF_BCN_PRBRESP_PROMISC when no STA interfaces are active

When FIF_BCN_PRBRESP_PROMISC is not set, we enable the hardware's BSS
filter so that we'll only see packets destined for our BSS.  But if no
STA interfaces have been configured, we would end up passing the BSSID
00:00:00:00:00:00 into the POST_SCAN command, which actually disables
the hardware's BSS filter, as it's not a valid BSSID.

Fix this by passing in 01:00:00:00:00:00 instead (the criterion is
that the OUI part of the BSSID must be nonzero), and add comments to
explain what PRE_SCAN and POST_SCAN do.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: implement FIF_ALLMULTI
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:50 +0000 (20:19 +0200)]
mwl8k: implement FIF_ALLMULTI

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: use the mac80211-provided workqueue instead of creating our own
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:45 +0000 (20:19 +0200)]
mwl8k: use the mac80211-provided workqueue instead of creating our own

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: fix multicast address filter programming
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:41 +0000 (20:19 +0200)]
mwl8k: fix multicast address filter programming

mwl8k's ->prepare_multicast() currently just enables reception of
all multicast packets, which is somewhat ineffective.

Fix this by either disabling all multicast RX, enabling multicast
RX according to the multicast address filter table, or enabling all
multicast RX, depending on whether ->prepare_multicast() was given
any multicast addresses and whether the hardware multicast address
filter table is large enough to fit all requested addresses.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: minor transmit quiescing rework
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:37 +0000 (20:19 +0200)]
mwl8k: minor transmit quiescing rework

Minor changes to the transmit quiescing logic:
- Clarify the locking rules for ->tx_wait: only the holder of fw_mutex
  can wait for the TX path to become idle, but tx_wait itself is read
  and cleared by the TX reclaim tasklet under tx_lock.
- Inline mwl8k_txq_busy() in its callers.
- There's no need to kick the transmitter again in
  mwl8k_tx_wait_empty(), since it will have been kicked when the
  packets currently in the TX ring were added to it.
- If the TX ring didn't drain in time, run mwl8k_scan_tx_ring() after
  reading priv->pending_pkts without dropping tx_lock in between.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: coding style cleanups
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:33 +0000 (20:19 +0200)]
mwl8k: coding style cleanups

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomwl8k: fix GET_STAT firmware command packet layout
Lennert Buytenhek [Thu, 22 Oct 2009 18:19:23 +0000 (20:19 +0200)]
mwl8k: fix GET_STAT firmware command packet layout

The GET_STAT command doesn't have an 'action' field like other
commands do, so remove it.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: depend on INET
John W. Linville [Mon, 2 Nov 2009 18:43:32 +0000 (13:43 -0500)]
wl1271: depend on INET

wl1271_main.c:(.text+0x271052): undefined reference to `unregister_inetaddr_notifier'
wl1271_main.c:(.text+0x2714d7): undefined reference to `register_inetaddr_notifier'

Driver is doing some filtering based on IP addresses...

Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: Generalize command response reading
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:13 +0000 (20:22 +0200)]
wl1271: Generalize command response reading

Responses to firmware commands are read in by the command transmission
function, as part of command flow. Previously responses were read in
multiple places.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: Correct endianness-handling of command status
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:12 +0000 (20:22 +0200)]
wl1271: Correct endianness-handling of command status

Correct the endianness-handling of the firmware command result status handling
code.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: Add retry implementation for PSM entries
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:11 +0000 (20:22 +0200)]
wl1271: Add retry implementation for PSM entries

PSM entries can fail (transmitting the corresponding null-func may not
be heard by the AP.) Previously, this scenario was not detected, and
out-of-sync between STA and AP could occur.

Add retry implementation for the entries to recover from the situation.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: Check result code of commands
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:10 +0000 (20:22 +0200)]
wl1271: Check result code of commands

Check the result code of all commands, and return an error code if the
firmware reports an error in execution. Previously this error would go
ignored in most cases.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: Increase TX power value
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:09 +0000 (20:22 +0200)]
wl1271: Increase TX power value

Currently, to avoid distortions, the TX power level has been hardcoded
to a low value. The value is slightly too low for good functionality, so
we increase it from 7dB to 12dB.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: Remove excess null-data template settings
Juuso Oikarinen [Mon, 2 Nov 2009 18:22:08 +0000 (20:22 +0200)]
wl1271: Remove excess null-data template settings

The null-data template (nullfunc) is dependent on the BSSID of the
current AP only, so it needs to be updated only when the BSSID changes.

Removed excess setting of the template.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: validate scan channels
Johannes Berg [Mon, 2 Nov 2009 12:32:03 +0000 (13:32 +0100)]
cfg80211: validate scan channels

Currently it is possible to request a scan on only
disabled channels, which could be problematic for
some drivers. Reject such scans, and also ignore
disabled channels that are given. This resuls in
the scan begin/end event only including channels
that are actually used.

This makes the mac80211 check for disabled channels
superfluous. At the same time, remove the no-IBSS
check from mac80211 -- nothing says that we should
not find any networks on channels that cannot be
used for an IBSS, even when operating in IBSS mode.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: Send ACK frames on the hwsim0 interface
Jouni Malinen [Sun, 1 Nov 2009 09:31:45 +0000 (11:31 +0200)]
mac80211_hwsim: Send ACK frames on the hwsim0 interface

Report successful transmissions (receiver awake and on the same
channel) by generating ACK frames on the hwsim0 interface. This makes
it easier to figure out from packet capture logs whether frames were
delivered or not.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: Check idle state on TX
Jouni Malinen [Sun, 1 Nov 2009 09:30:48 +0000 (11:30 +0200)]
mac80211_hwsim: Check idle state on TX

Track the idle state for hwsim radios and reject TX if mac80211 is
trying to transmit something when the radio is supposed to be idle. In
addition, do not deliver frames if the receiving radio is in the idle
state.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: Fix WEXT compat siwauth wpa and group cipher
Jouni Malinen [Sun, 1 Nov 2009 09:18:49 +0000 (11:18 +0200)]
cfg80211: Fix WEXT compat siwauth wpa and group cipher

Neither of these commands should clear the current configuration value
if they return error. Furthermore, cfg80211_set_cipher_group() should
be able to handle IW_AUTH_CIPHER_NONE without reporting error.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: disable channels with incomplete calibration data sets
Christian Lamparter [Sat, 31 Oct 2009 21:59:27 +0000 (22:59 +0100)]
p54: disable channels with incomplete calibration data sets

James Grossmann [1] reported that p54 spews out confusing
messages instead of preventing the mayhem from happening.

the reason is that "p54: generate channel list dynamically"
is not perfect. It didn't discard incomplete channel data
sets and therefore p54 advertised to support them as well.

[1]: http://marc.info/?l=linux-wireless&m=125699830215890

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: James Grossmann <cctsurf@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix scan abort sanity checks
Johannes Berg [Sat, 31 Oct 2009 06:44:08 +0000 (07:44 +0100)]
mac80211: fix scan abort sanity checks

Since sometimes mac80211 queues up a scan request
to only act on it later, it must be allowed to
(internally) cancel a not-yet-running scan, e.g.
when the interface is taken down. This condition
was missing since we always checked only the
local->scanning variable which isn't yet set in
that situation.

Reported-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: add wimax/wifi coexist support for 6x50 series
Wey-Yi Guy [Fri, 30 Oct 2009 21:36:18 +0000 (14:36 -0700)]
iwlwifi: add wimax/wifi coexist support for 6x50 series

For 6x50 series, it is wimax/wifi combo device, so driver need to enable
the wimax/wifi co-exist function and send the coexist event priority
table to uCode for operation.

The priority table will be used by uCode to determine what is the proper
action it should take when co-exist with WiMAX.
For example, when WiFi runs a scan, it must own radio exclusively, therefore
will disconnect WiMAX if WiMAX is connected.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: add SM PS support for 6x50 series
Wey-Yi Guy [Fri, 30 Oct 2009 21:36:17 +0000 (14:36 -0700)]
iwlwifi: add SM PS support for 6x50 series

Spatial Multiplexing Power Save was disabled to achieve better
throughput while in power save mode by activating all the rx chains all the time.
By doing so, the device power consumption is high.

Enable static/dynamic spatial multiplexing power save if device support
it, which can lower the power consumption without impact throughput.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: coex API data structure
Wey-Yi Guy [Fri, 30 Oct 2009 21:36:16 +0000 (14:36 -0700)]
iwlwifi: coex API data structure

Add data structure define for COEX_MEDIUM_NOTIFICATION and
COEX_EVENT_CMD host commands.

COEX_MEDIUM_NOTIFICATION is notification from uCode to host to indicate
medium changes. COEX_EVENT_CMD is from host to uCode for coex event
request.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: print warning when sending host command fails
Reinette Chatre [Fri, 30 Oct 2009 21:36:15 +0000 (14:36 -0700)]
iwlwifi: print warning when sending host command fails

More information than the "-EIO" return code will be useful here.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: move rate scale initialization to init function
Reinette Chatre [Fri, 30 Oct 2009 21:36:14 +0000 (14:36 -0700)]
iwlagn: move rate scale initialization to init function

This fits better in how the callbacks operate (alloc does allocation and
init does initialization). This also helps if we later want to do our own
initialization without relying on the mac80211 allocation.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: store station rate scale information in mac80211 station structure
Reinette Chatre [Fri, 30 Oct 2009 21:36:13 +0000 (14:36 -0700)]
iwl3945: store station rate scale information in mac80211 station structure

Currently the rate scale information is pointed to from the mac80211
station structure but since that is the only member we might as well make
it part of the structure. Also move the rate scaling initialization to the
init function, no need to do it when we allocate the structure. This fits
with how mac80211 deals with rate scaling information (it always calls init
after allocation) and makes it easier for us to later call initialization
directly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: split adding broadcast station from others
Reinette Chatre [Fri, 30 Oct 2009 21:36:12 +0000 (14:36 -0700)]
iwlwifi: split adding broadcast station from others

In preparation for some station management changes we split the addition of
a broadcast station from the other stations. Later we will rely on mac80211
to direct all management (addition/removal) of all stations except the
broadcast station.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: move iwl_[un]init_drv to iwlagn
Reinette Chatre [Fri, 30 Oct 2009 21:36:11 +0000 (14:36 -0700)]
iwlwifi: move iwl_[un]init_drv to iwlagn

Since iwlagn is the only user of these functions, move it to this module.
This results in a bit more code moving than just these functions since the
functions only used by them are also moved and we need to export the
symbols previously available to them directly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: unmap memory before use
Reinette Chatre [Fri, 30 Oct 2009 21:36:10 +0000 (14:36 -0700)]
iwlwifi: unmap memory before use

Handling responses to driver originated commands include passing the
original command buffer to the caller. At this time it is possible for a
callback to be invoked that is passed this command buffer and thus likely
to access it.

We need to make sure that the memory associated with that buffer is not DMA
mapped at the time.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: update write pointers for all tx queues after wakeup
Ben Cahill [Fri, 30 Oct 2009 21:36:09 +0000 (14:36 -0700)]
iwlagn: update write pointers for all tx queues after wakeup

Wakeup interrupt has been updating write pointers (indexes, actually) only
for tx queues 0-5.  This is adequate just for 3945, but inadequate for other
devices, all of which have more tx queues.  Now updating all tx/command queues,
so device can be aware of all new tx and host commands enqueued while
device was asleep.

This can potentially improve data traffic bandwidth and/or latency.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: Clarify FH_TX interrupt
Ben Cahill [Fri, 30 Oct 2009 21:36:08 +0000 (14:36 -0700)]
iwlagn: Clarify FH_TX interrupt

Add/clarify comments and debug messages for interrupt used only for uCode load

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: invoke L0S workaround for 6000/1000 series
Ben Cahill [Fri, 30 Oct 2009 21:36:07 +0000 (14:36 -0700)]
iwlagn: invoke L0S workaround for 6000/1000 series

Invoke workaround to avoid instability in L0->L0S->L1 transition on PCIe bus.
Workaround disables L0S state so device moves directly from L0->L1.
Workaround needed on all devices since and including 4965; add to 6000/1000.

Describe bug and workaround better in comments.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>