]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
13 years agoiwlagn: fix non-5000+ build
Johannes Berg [Wed, 10 Nov 2010 17:56:38 +0000 (09:56 -0800)]
iwlagn: fix non-5000+ build

When building 4965 without 5000+ there were a
lot of build errors due to functions being used
that weren't even compiled in. To fix this move
some code around and only compile the HCMD code
for 5000+ series as it's not used for 4965.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: update PCI ID for 100 series devices
Wey-Yi Guy [Wed, 10 Nov 2010 17:56:37 +0000 (09:56 -0800)]
iwlagn: update PCI ID for 100 series devices

Update the supported PCI ID list for 100 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: update PCI ID for 6000g2a series devices
Wey-Yi Guy [Wed, 10 Nov 2010 17:56:36 +0000 (09:56 -0800)]
iwlagn: update PCI ID for 6000g2a series devices

Update the supported PCI ID list for 6000g2a series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: update PCI ID for 6000g2b series devices
Wey-Yi Guy [Wed, 10 Nov 2010 17:56:35 +0000 (09:56 -0800)]
iwlagn: update PCI ID for 6000g2b series devices

Update the supported PCI ID list for 6000g2b series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Print stats as unsigned ints.
Ben Greear [Mon, 8 Nov 2010 18:50:03 +0000 (10:50 -0800)]
ath5k: Print stats as unsigned ints.

The debugfs code for ath5k was printing some unsigned int
stats with %d instead of %u.  This meant that you could see
negative numbers instead of a clean wrap.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add watchdog functions for HW queue
Ivo van Doorn [Sat, 6 Nov 2010 14:49:01 +0000 (15:49 +0100)]
rt2x00: Add watchdog functions for HW queue

Add watchdog functions for managing the Queues inside the hardware.
Normally the driver doesn't have much to do with these queues
directly, but the Ralink drivers did implement watchdog functions
for these. These watchdog functions are not triggered that often,
compared to the other watchdog functions, but I have at least
seen them trigger once or twice during a long stresstest run.

v2: Add extra documentation for register fields

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove rt2x00lib_toggle_rx
Ivo van Doorn [Sat, 6 Nov 2010 14:48:43 +0000 (15:48 +0100)]
rt2x00: Remove rt2x00lib_toggle_rx

As part of the queue refactoring, the rt2x00lib_toggle_rx
can be removed and replaced with the call directly to
the set_device_state callback function.

We can remove the STATE_RADIO_RX_ON_LINK and
STATE_RADIO_RX_OFF_LINK, as it was only used for
special behavior inside rt2x00lib rather then the
drivers.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix rt2x00queue_kick_tx_queue arguments
Ivo van Doorn [Sat, 6 Nov 2010 14:48:23 +0000 (15:48 +0100)]
rt2x00: Fix rt2x00queue_kick_tx_queue arguments

The queue_entry argument to rt2x00queue_kick_tx_queue,
doesn't make sense due to the function name (it is called
kick QUEUE)... But neither do we need the queue_entry, since
we need the data_queue.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Rename queue->lock to queue->index_lock
Ivo van Doorn [Sat, 6 Nov 2010 14:48:05 +0000 (15:48 +0100)]
rt2x00: Rename queue->lock to queue->index_lock

The queue->lock is only used to protect the index
numbers. Rename the lock accordingly.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt73usb.c
Mark Einon [Sat, 6 Nov 2010 14:47:46 +0000 (15:47 +0100)]
rt2x00: checkpatch.pl error fixes for rt73usb.c

rt73usb.c:43: ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2x00queue.c
Mark Einon [Sat, 6 Nov 2010 14:47:25 +0000 (15:47 +0100)]
rt2x00: checkpatch.pl error fixes for rt2x00queue.c

rt2x00queue.c:804: ERROR: space prohibited after that open parenthesis '('
rt2x00queue.c:805: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2x00link.c
Mark Einon [Sat, 6 Nov 2010 14:47:09 +0000 (15:47 +0100)]
rt2x00: checkpatch.pl error fixes for rt2x00link.c

rt2x00link.c:70: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2x00lib.h
Mark Einon [Sat, 6 Nov 2010 14:46:53 +0000 (15:46 +0100)]
rt2x00: checkpatch.pl error fixes for rt2x00lib.h

rt2x00lib.h:60: ERROR: space prohibited after that open parenthesis '('
rt2x00lib.h:60: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2x00dev.c
Mark Einon [Sat, 6 Nov 2010 14:46:36 +0000 (15:46 +0100)]
rt2x00: checkpatch.pl error fixes for rt2x00dev.c

rt2x00dev.c:689: ERROR: spaces required around that '=' (ctx:WxV)

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2x00config.c
Mark Einon [Sat, 6 Nov 2010 14:46:17 +0000 (15:46 +0100)]
rt2x00: checkpatch.pl error fixes for rt2x00config.c

rt2x00config.c:136: ERROR: space required before the open parenthesis '('

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2800usb.h
Mark Einon [Sat, 6 Nov 2010 14:45:58 +0000 (15:45 +0100)]
rt2x00: checkpatch.pl error fixes for rt2800usb.h

rt2800usb.h:43: ERROR: space prohibited after that open parenthesis '('
rt2800usb.h:43: ERROR: space prohibited before that close parenthesis ')'
rt2800usb.h:44: ERROR: space prohibited after that open parenthesis '('
rt2800usb.h:44: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2800usb.c
Mark Einon [Sat, 6 Nov 2010 14:45:41 +0000 (15:45 +0100)]
rt2x00: checkpatch.pl error fixes for rt2800usb.c

 rt2800usb.c:48: ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2800pci.h
Mark Einon [Sat, 6 Nov 2010 14:45:22 +0000 (15:45 +0100)]
rt2x00: checkpatch.pl error fixes for rt2800pci.h

rt2800pci.h:41: ERROR: Macros with complex values should be enclosed in parenthesis
rt2800pci.h:42: ERROR: Macros with complex values should be enclosed in parenthesis
rt2800pci.h:43: ERROR: Macros with complex values should be enclosed in parenthesis
rt2800pci.h:44: ERROR: Macros with complex values should be enclosed in parenthesis
rt2800pci.h:55: ERROR: space prohibited after that open parenthesis '('
rt2800pci.h:55: ERROR: space prohibited before that close parenthesis ')'
rt2800pci.h:56: ERROR: space prohibited after that open parenthesis '('
rt2800pci.h:56: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2800lib.c
Mark Einon [Sat, 6 Nov 2010 14:45:06 +0000 (15:45 +0100)]
rt2x00: checkpatch.pl error fixes for rt2800lib.c

rt2800lib.c:831: ERROR: inline keyword should sit between storage class and type

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2800.h
Mark Einon [Sat, 6 Nov 2010 14:44:52 +0000 (15:44 +0100)]
rt2x00: checkpatch.pl error fixes for rt2800.h

rt2800.h:1511: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1511: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1513: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1513: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1515: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1515: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1517: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1517: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1519: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1519: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1521: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1521: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1661: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1661: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1662: ERROR: space prohibited after that open parenthesis '('
rt2800.h:1662: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:1663: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:2013: ERROR: space prohibited after that open parenthesis '('
rt2800.h:2013: ERROR: space prohibited before that close parenthesis ')'
rt2800.h:2014: ERROR: space prohibited after that open parenthesis '('
rt2800.h:2014: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2500usb.c
Mark Einon [Sat, 6 Nov 2010 14:44:33 +0000 (15:44 +0100)]
rt2x00: checkpatch.pl error fixes for rt2500usb.c

rt2500usb.c:42: ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2500pci.h
Mark Einon [Sat, 6 Nov 2010 14:44:15 +0000 (15:44 +0100)]
rt2x00: checkpatch.pl error fixes for rt2500pci.h

rt2500pci.h:1091: ERROR: space prohibited after that open parenthesis '('
rt2500pci.h:1091: ERROR: space prohibited before that close parenthesis ')'
rt2500pci.h:1092: ERROR: space prohibited after that open parenthesis '('
rt2500pci.h:1092: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: checkpatch.pl error fixes for rt2400pci.h
Mark Einon [Sat, 6 Nov 2010 14:44:00 +0000 (15:44 +0100)]
rt2x00: checkpatch.pl error fixes for rt2400pci.h

rt2400pci.h:812: ERROR: space prohibited after that open parenthesis '('
rt2400pci.h:812: ERROR: space prohibited before that close parenthesis ')'
rt2400pci.h:813: ERROR: space prohibited after that open parenthesis '('
rt2400pci.h:813: ERROR: space prohibited before that close parenthesis ')'
rt2400pci.h:950: ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: tx path review
Christian Lamparter [Sat, 6 Nov 2010 13:07:10 +0000 (14:07 +0100)]
carl9170: tx path review

This patch fixes a few shortcomings in the tx path.

 * move temp. ampdu_[ack]_len out of txinfo->pad.

 * fix WARN_ON from tx.c:line 300 when tx_ampdu_queue
   fails to queue the frame.

 * In tx_prepare, we already have a local pointer
   to the station's ieee80211_sta struct.

 * remove a second !sta check, tx_prepare already takes
   care of that.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove redundant checks for NULL before calls to crypto_free_cipher()
Jesper Juhl [Thu, 4 Nov 2010 21:59:56 +0000 (22:59 +0100)]
mac80211: Remove redundant checks for NULL before calls to crypto_free_cipher()

crypto_free_cipher() is a wrapper around crypto_free_tfm() which is a
wrapper around crypto_destroy_tfm() and the latter can handle being passed
a NULL pointer, so checking for NULL in the
ieee80211_aes_key_free()/ieee80211_aes_cmac_key_free() wrappers around
crypto_free_cipher() is pointless and just increase object code size
needlesly and makes us execute extra test/branch instructions that we
don't need.
Btw; don't we have to many wrappers around wrappers ad nauseam here?
Anyway, this patch removes the redundant conditionals.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix comments in rt73usb.h and rt61pci.h
Lalith Suresh [Thu, 4 Nov 2010 19:43:16 +0000 (20:43 +0100)]
rt2x00: Fix comments in rt73usb.h and rt61pci.h

This patch fixes a few comments in rt73usb.h and rt61pci.h.

Signed-off-by: Lalith Suresh <suresh.lalith@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix hw crypto in AP mode for some devices
Helmut Schaa [Thu, 4 Nov 2010 19:42:36 +0000 (20:42 +0100)]
rt2x00: Fix hw crypto in AP mode for some devices

The BSSID register shouldn't be set in AP mode on some older devices (like
rt73usb) as it breaks hw crypto on these. However, rt2800 devices explicitly
need the BSSID register set to the same value as our own MAC address (only
in AP mode).

Hence, don't set the BSSID from rt2x00lib but move it down into rt2800 to
avoid problems on older devices.

This fixes a regression (at least for rt73usb) and avoids a new regression
for rt2800 devices in 2.6.36.

Reported-by: Johannes Stezenbach <js@sig21.net>
Reported-by: Lee <lee-in-berlin@web.de>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix crash on USB unplug
Ivo van Doorn [Thu, 4 Nov 2010 19:41:05 +0000 (20:41 +0100)]
rt2x00: Fix crash on USB unplug

By not scheduling the TX/RX completion worker threads
when Radio is disabled, or hardware has been unplugged,
the queues cannot be completely cleaned.

This causes crashes when the hardware has been unplugged while
the radio is still enabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix MCU_SLEEP arguments
Ivo van Doorn [Thu, 4 Nov 2010 19:40:46 +0000 (20:40 +0100)]
rt2x00: Fix MCU_SLEEP arguments

Legacy driver uses 0xff as the second argument for the MCU_SLEEP
command. It is still unknown what the values actually mean, but
this will at least keep the command in-sync with the original
driver.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Implement flush callback
Ivo van Doorn [Thu, 4 Nov 2010 19:40:11 +0000 (20:40 +0100)]
rt2x00: Implement flush callback

Implement a basic flush callback function, which simply loops
over all TX queues and waits until all frames have been transmitted
and the status reports have been gathered.

At this moment we don't support dropping any frames during the
flush, but mac80211 will only send 'false' for this argument anyway,
so this is not important at this time.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove failsave from rt2x00usb_watchdog_tx_dma
Ivo van Doorn [Thu, 4 Nov 2010 19:39:48 +0000 (20:39 +0100)]
rt2x00: Remove failsave from rt2x00usb_watchdog_tx_dma

When the TX status handler failed to clear the queue
in rt2x00usb_watchdog_tx_dma() we shouldn't use a failsave
to use the rt2x00usb txdone handler.

If a driver has overriden the txdone handler it must make
sure the txdone handler is capable of cleaning up the queue itself.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Rename rt2x00queue_timeout
Ivo van Doorn [Thu, 4 Nov 2010 19:39:23 +0000 (20:39 +0100)]
rt2x00: Rename rt2x00queue_timeout

Rename rt2x00queue_timeout to rt2x00queue_status_timeout to
better describe what is actually timing out (note that
we already have a rt2x00queue_dma_timeout).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Optimize rt2x00debug_dump_frame when frame dumping is not active
Helmut Schaa [Thu, 4 Nov 2010 19:38:56 +0000 (20:38 +0100)]
rt2x00: Optimize rt2x00debug_dump_frame when frame dumping is not active

When rt2x00 is compiled with debugging but frame dumping is currently
not active we can avoid the call to do_gettimeofday. Furthermore,
frame dumping is not the default case, mark it as unlikely.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Reduce tx descriptor size
Helmut Schaa [Thu, 4 Nov 2010 19:38:15 +0000 (20:38 +0100)]
rt2x00: Reduce tx descriptor size

The tx descriptor values qid, cw_min, cw_max and aifs are directly
accessible through the tx entry struct. So there's no need to copy
them into the tx descriptor and passing them to the indiviual drivers.
Instead we can just get the correct value from the tx entry.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Wait up to one second on rt2800 for WPDMA to be ready
Helmut Schaa [Thu, 4 Nov 2010 19:37:47 +0000 (20:37 +0100)]
rt2x00: Wait up to one second on rt2800 for WPDMA to be ready

At least some devices need such a long time to inititalize WPDMA. This
only increases the maximum wait time and shouldn't affect devices that
have been working before.

Reported-by: Joshua Smith <jesmith@kaon.com>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Sync Tx and RX ring sizes with legacy drivers
Helmut Schaa [Thu, 4 Nov 2010 19:37:22 +0000 (20:37 +0100)]
rt2x00: Sync Tx and RX ring sizes with legacy drivers

All rt2x00 devices used the same Tx and Rx ring size (24 entries) till
now. Newer devices (like rt2800) can however make use of a larger TX and
RX ring due to 11n capabilities (AMPDUs of size 64 for example).

Hence, bring rt2x00 in sync with the legacy drivers and use the same TX
and RX ring sizes. Also remove the global defines RX_ENTRIES, TX_ENTRIES,
BEACON_ENTRIES and ATIM_ENTRIES and use per driver values.

That is 24 entries for rt2400pci, 32 entries for rt2500pci, rt2500usb,
rt61pci and rt73usb and 128 (RX) and 64 (TX) for rt2800pci and rt2800usb.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add TXOP_CTRL_CFG register definition
Helmut Schaa [Thu, 4 Nov 2010 19:36:59 +0000 (20:36 +0100)]
rt2x00: Add TXOP_CTRL_CFG register definition

Remove the magic value initialisation of the TXOP_CTRL_CFG register by
defining its fields and using them during intialisation. The field
RESERVED_TRUN_EN is referred to as reserved, however it is set to 1 by
the legacy drivers. Hence, do the same.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: rework tx queue selection and fix queue stopping/waking
Felix Fietkau [Sun, 7 Nov 2010 13:59:39 +0000 (14:59 +0100)]
ath9k: rework tx queue selection and fix queue stopping/waking

The current ath9k tx queue handling code showed a few issues that could
lead to locking issues, tx stalls due to stopped queues, and maybe even
DMA issues.

The main source of these issues is that in some places the queue is
selected via skb queue mapping in places where this mapping may no
longer be valid. One such place is when data frames are transmitted via
the CAB queue (for powersave buffered frames). This is made even worse
by a lookup WMM AC values from the assigned tx queue (which is
undefined for the CAB queue).

This messed up the pending frame counting, which in turn caused issues
with queues getting stopped, but not woken again.

To fix these issues, this patch removes an unnecessary abstraction
separating a driver internal queue number from the skb queue number
(not to be confused with the hardware queue number).

It seems that this abstraction may have been necessary because of tx
queue preinitialization from the initvals. This patch avoids breakage
here by pushing the software <-> hardware queue mapping to the function
that assigns the tx queues and redefining the WMM AC definitions to
match the numbers used by mac80211 (also affects ath9k_htc).

To ensure consistency wrt. pending frame count tracking, these counters
are moved to the ath_txq struct, updated with the txq lock held, but
only where the tx queue selected by the skb queue map actually matches
the tx queue used by the driver for the frame.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Björn Smedman <bjorn.smedman@venatech.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43legacy: rfkill: use status register based on core revision (not PHY's)
Rafał Miłecki [Wed, 3 Nov 2010 20:36:12 +0000 (21:36 +0100)]
b43legacy: rfkill: use status register based on core revision (not PHY's)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1201: Add missing id
maximilian attems [Tue, 2 Nov 2010 22:39:12 +0000 (23:39 +0100)]
zd1201: Add missing id

The Mandriva patch seems to stem from 2.6.14, so much for their
upstreaming effort.

Didn't find another Linux reference of it, just an omnious
"USB\VID_1044&PID_8004" from GigabyteZD1201U.INF for
Gigabyte GN-WLBZ101 802.11b USB Adapter, which matches the
Mandriva patch comment.

Aboves file also lists an "USB\VID_1044&PID_8006", which I have
kept appart as this "Gigabyte GN-WBZB-M 802.11b USB Adapter"
didn't show up in googling.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: add 2 missing usb id's
maximilian attems [Tue, 2 Nov 2010 22:10:12 +0000 (23:10 +0100)]
zd1211rw: add 2 missing usb id's

"These USB ID came from Palnex <http://www.planex.co.jp/>
Worked fine." says Mandriva patch for their 2.6.32 and earlier.

Web has evidence for both id's to work, so just add them upstream:
http://www.mail-archive.com/zd1211-devs@lists.sourceforge.net/msg00507.html
http://ubuntuforums.org/showthread.php?t=473046

Signed-off-by: Go Taniguchi <go@turbolinux.co.jp>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: restore anaparam registers after reset with 8187B
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:39 +0000 (22:59 -0200)]
rtl8187: restore anaparam registers after reset with 8187B

Current 8187B initialization misses anaparam registers restore after
8187 reset. This causes ANAPARAM register to stay zeroed out (ANAPARAM2
kept its value on my tests). To avoid this, call rtl8187_set_anaparam
right after chip reset (to be on the safe side, as it makes sure we
restore all ANAPARAM registers).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: seno <senada@t-online.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: remove uneeded setting of anaparam write
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:38 +0000 (22:59 -0200)]
rtl8187: remove uneeded setting of anaparam write

Usually you set RTL818X_CONFIG3_ANAPARAM_WRITE when you are going to
change/write ANAPARAM registers. But in current initialization of
RTL8187B there is a place where ANAPARAM_WRITE bit is set without any
ANAPARAM register being written, without reason, so remove it.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: seno <senada@t-online.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: consolidate anaparam on/off write sequences
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:37 +0000 (22:59 -0200)]
rtl8187: consolidate anaparam on/off write sequences

There are repeated calls for anaparam on/off sequence in the code.
Consolidate the common code in rtl8187_set_anaparam and use it where
needed.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: don't set RTL818X_CONFIG3_GNT_SELECT flag on 8187B
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:36 +0000 (22:59 -0200)]
rtl8187: don't set RTL818X_CONFIG3_GNT_SELECT flag on 8187B

The GNTSel bit should only concern pci devices by looking at RTL8180
spec, which is not the case of 8187B. Also testing shows that trying to
set this bit fails, a subsequent read from the register after trying to
set it shows that the bit isn't set, seems the hardware ignores it,
which makes sense. This setting was a left over from Realtek sources.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: move pll reset at start out of ANAPARAM write
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:35 +0000 (22:59 -0200)]
rtl8187: move pll reset at start out of ANAPARAM write

On 8187B start, comment about pll reset, and move it out of ANAPARAM
write sequence, so that code is more readable.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: avoid redundant write to register FF72 (RFSW_CTRL)
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:34 +0000 (22:59 -0200)]
rtl8187: avoid redundant write to register FF72 (RFSW_CTRL)

The table with misc register initialization was setting it, and later
on we would set it again with a explicity call to rtl818x_iowrite16_idx.

Remove duplicate initialization from the register table.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: fix wrong register initialization in 8187B
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:33 +0000 (22:59 -0200)]
rtl8187: fix wrong register initialization in 8187B

We were using wrong address for BRSR (Basic Rate Set Register) while
initializing its value, comparing with Realtek sources, for 8187B case.

Also, the same register is initialized in rtl8187b_reg_table, so remove
the duplicate initialization from the table.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: remove setting of beacon/atim registers from initialization
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:32 +0000 (22:59 -0200)]
rtl8187: remove setting of beacon/atim registers from initialization

On 8187B path, we set a initial value for beacon interval and atim
window on initialization. But this isn't needed, since same setup is
done on rtl8187_config.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187: remove redundant initialization of ARFR
Herton Ronaldo Krzesinski [Tue, 2 Nov 2010 00:59:31 +0000 (22:59 -0200)]
rtl8187: remove redundant initialization of ARFR

This removes redundant write to Auto Rate Fallback Register on RTL8187B.
The same value was being written twice in the same function. Avoid this
removing the duplicate initialization on rtl8187b_reg_table, and also
add comment for this write (information from Realtek source).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: force AP mode to use non-AMPDU frames
Nishant Sarmukadam [Tue, 2 Nov 2010 00:55:48 +0000 (17:55 -0700)]
mwl8k: force AP mode to use non-AMPDU frames

AP firmware uses xmitcontrol to differentiate between AMPDU
and non-AMPDU frames. As the support for AMPDU is not yet
added, set xmitcontrol to non-AMPDU for all tx frames for AP
firmware. This field will be set to indicate ampdu/non-ampdu
frames when tx AMPDU support is added.

Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: configurable beacon rates
Christian Lamparter [Fri, 29 Oct 2010 22:36:53 +0000 (00:36 +0200)]
carl9170: configurable beacon rates

Previously, the beacon rate was fixed to either:
 * 1Mb/s [2.4GHz band]
 * 6Mb/s [5GHz band]

This limitation has been addressed and now the
beacon rate is selected by ieee80211_tx_info's
rate control info, almost like any ordinary
data frame.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: stop stale uplink BA sessions
Christian Lamparter [Fri, 29 Oct 2010 21:41:16 +0000 (23:41 +0200)]
carl9170: stop stale uplink BA sessions

This patch fixes a possible lengthy stall if the device
is operating as an experimental 11n AP and an STA
[during heavy txrx action] suddenly signalized to go
off-channel (old NetworkManager), or (sleep - which is
unlikely, because then it wouldn't be *active* at all!?).

Because the driver has to manage the BA Window, the
sudden PSM transition can leave active uplink BA
sessions to the STA in a bad state and a proper
cleanup is needed.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: fix spurious restart due to high latency
Christian Lamparter [Fri, 29 Oct 2010 21:26:13 +0000 (23:26 +0200)]
carl9170: fix spurious restart due to high latency

RX Stress tests of unidirectional bulk traffic with
bitrates of up to 220Mbit/s have revealed that the
fatal-event recovery logic [which was solely triggered
by an out-of-rx-buffer situation] is too aggressive.

The new method now "pings" the device and then
decides - based on the response - whenever
a restart is needed or not.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: initialize HW aMPDU parameters properly
Christian Lamparter [Fri, 29 Oct 2010 21:17:38 +0000 (23:17 +0200)]
carl9170: initialize HW aMPDU parameters properly

This patch changes the initial aMPDU density and
factor settings to match those of Otus.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: import hw/fw header updates
Christian Lamparter [Fri, 29 Oct 2010 20:44:59 +0000 (22:44 +0200)]
carl9170: import hw/fw header updates

This patch imports all shared header changes
from carl9170fw.git.

 * add some strategic __aligned(4).
   This allows the compiler generate optimized code for
   architectures which can't access (unaligned/packed)
   data efficiently.
   ("ath9k_hw: optimize all descriptor access functions")

 * add a forgotten __CARL9170FW__ ifdef around
   a private firmware-internal struct.

 * GET_VAL macro helper
   Very useful for extracting data out of the
   bit-packed PHY registers.

 * cosmetic changes
   e.g.: _CCA_MINCCA_ to just _CCA_MIN_.

 * version bump 1.8.8.3 -> 1.9.0.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211_hwsim: Incorporate txpower into rssi
Blaise Gassend [Thu, 28 Oct 2010 09:01:24 +0000 (02:01 -0700)]
mac80211_hwsim: Incorporate txpower into rssi

Up to now mac80211_hwsim has been reporting an rssi of -50. This patch
improves the model slightly by returning txpower-50. This makes it
easy to stimulate tests that need to see a varying rssi.

Signed-off-by: Blaise Gassend <blaise@willowgarage.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl8187b: do not do per packet TX AGC
Thadeu Lima de Souza Cascardo [Thu, 28 Oct 2010 22:01:00 +0000 (20:01 -0200)]
rtl8187b: do not do per packet TX AGC

Clearing the per packet TX AGC for the RTL8187B device appears to
increase its overall TX power. This allows the device to associate and a
connection to be established using APs a little further away.

This is in accordance to what is done for RTL8187L devices and also what
Realtek drivers do.

Tested-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: linux-wireless@vger.kernel.org
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Rogerio Luz Coelho <rogluz.news@gmail.com>
Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Hin-Tak Leung <hintak.leung@gmail.com>
Cc: seno <senada@t-online.de>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1271: add recover testmode command
Eliad Peller [Wed, 27 Oct 2010 12:09:58 +0000 (14:09 +0200)]
wl1271: add recover testmode command

add RECOVER testmode command.
this command triggers a recovery sequence (by enqueueing a recovery_work).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: handle HW watchdog interrupt
Eliad Peller [Wed, 27 Oct 2010 12:09:57 +0000 (14:09 +0200)]
wl1271: handle HW watchdog interrupt

unmask the WL1271_ACX_INTR_WATCHDOG interrupt.
when getting it - enqueue a recovery work and bail out.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: refactor debugfs function generation code
Eliad Peller [Wed, 27 Oct 2010 12:58:30 +0000 (14:58 +0200)]
wl1271: refactor debugfs function generation code

refactor wl1271_debugfs by using a format&copy function, instead of
duplicating the code for each generated function.

this change reduces about 3Kb from wl1271.ko

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: set wl->vif only if add_interface succeeded.
Eliad Peller [Thu, 28 Oct 2010 19:46:43 +0000 (21:46 +0200)]
wl1271: set wl->vif only if add_interface succeeded.

set wl->vif to the newly created interface only after the firmware booted
successfully. on the way - make the function flow more clear.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Check interface state in op_* functions
Juuso Oikarinen [Tue, 26 Oct 2010 11:24:39 +0000 (13:24 +0200)]
wl1271: Check interface state in op_* functions

Check the state of the interface on op_* function so we don't try to access
the hardware in when its off.

The mac80211 may call these in some corner cases related, for instance, to
the hardware recovery procedure. These accesses cause a kernel crash on at
least some SDIO devices, because the bus is not properly claimed in that
scenario.

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>
13 years agowl1271: Fix scan failure detection
Juuso Oikarinen [Tue, 26 Oct 2010 11:24:38 +0000 (13:24 +0200)]
wl1271: Fix scan failure detection

In scan_complete_work, because the mutex is released before accessing the
scan->failed flag, it is possible for unfounded hardware recovery rounds
to be executed.

Fix this.

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>
13 years agowl1271: Fix RX path stall
Juuso Oikarinen [Mon, 25 Oct 2010 09:24:29 +0000 (11:24 +0200)]
wl1271: Fix RX path stall

The wl1271_rx function loops through packets in an aggregated buffer. Each
packet in the buffer is handled by a call to wl1271_rx_handle_data, which will
fail if skb memory allocation fails or production mode is enabled. These
failures currently prevent the rx counters to be incremented, thus causing the
rx loop to run forever.

Fix this by ignoring error codes reported wl1271_rx_handle_data function.
This essentially means that frames will be dropped in production mode, which
is the intetion, and frames will be dropped if memory allocation fails, which
is a decent way to recover from that situation.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowireless/wl1271: remove redundant if-statement v2
Nicolas Kaiser [Mon, 25 Oct 2010 13:30:03 +0000 (15:30 +0200)]
wireless/wl1271: remove redundant if-statement v2

wl1271_ps_elp_sleep() is void and cannot return a value.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: exit ELP mode when setting enabled rates in tx
Luciano Coelho [Wed, 20 Oct 2010 12:15:52 +0000 (15:15 +0300)]
wl1271: exit ELP mode when setting enabled rates in tx

This bug was being triggered by a call to acx_rate_policies in tx_work
without calling ps_elp_wakeup first.  If we have full PSM enabled, this
happens rather often, immediately after association.

Reported-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
13 years agowl1271: Fix warning about unsupported RX rate
Teemu Paasikivi [Thu, 14 Oct 2010 09:00:04 +0000 (11:00 +0200)]
wl1271: Fix warning about unsupported RX rate

While scanning, it is possible that beacon and probe response frames are
received on other band than configured to the driver. In rx status
handling this has caused "Unsupported RX rate from HW" warnings. This
patch changes the wl1271_rate_to_index function to take the band of the
received frame as a parameter instead of using value configuret to
wl->band.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: 11n Support, functionality and configuration ability
Shahar Levi [Wed, 13 Oct 2010 14:09:41 +0000 (16:09 +0200)]
wl1271: 11n Support, functionality and configuration ability

Add 11n ability in scan, connection and using MCS rates.
The configuration is temporary due to the code incomplete and
still in testing process. That plans to be remove in the future.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: 11n Support, ACX Commands
Shahar Levi [Wed, 13 Oct 2010 14:09:40 +0000 (16:09 +0200)]
wl1271: 11n Support, ACX Commands

Added ACX command to the FW for 11n support.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: 11n Support, Add Definitions
Shahar Levi [Wed, 13 Oct 2010 14:09:39 +0000 (16:09 +0200)]
wl1271: 11n Support, Add Definitions

Two acx commands: ht_capabilities & ht_information, 11n sta capabilities
macro.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Fix TX queue low watermark handling
Ido Yariv [Tue, 12 Oct 2010 12:49:12 +0000 (14:49 +0200)]
wl1271: Fix TX queue low watermark handling

The number of entries in the TX queue is compared to the low watermark
value each time TX completion interrupts are handled.
However, the fact that a TX completion arrived does not necessarily mean
there are any less skbs in the TX queue.

In addition, a TX completion interrupt does not necessarily mean that there
are any new available TX blocks. Thus, queuing TX work when the low
watermark is reached might not be needed.

Fix this by moving the low watermark handling to the TX work function,
and avoid queuing TX work in this case.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Allocate TX descriptors more efficiently
Ido Yariv [Tue, 12 Oct 2010 14:20:06 +0000 (16:20 +0200)]
wl1271: Allocate TX descriptors more efficiently

On each TX descriptor allocation, a free entry is found by traversing the TX
descriptors array.

Improve this by holding a bitmap of all TX descriptors, and using efficient
bit operations to search for free entries.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: Fix TX starvation
Ido Yariv [Tue, 12 Oct 2010 12:49:10 +0000 (14:49 +0200)]
wl1271: Fix TX starvation

While wl1271_irq_work handles RX directly (by calling wl1271_rx), a different
work is scheduled for transmitting packets. The IRQ work might handle more than
one interrupt during a single call, including multiple TX completion
interrupts. This might starve TX, since no packets are transmitted until all
interrupts are handled.

Fix this by calling the TX work function directly, instead of deferring
it.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: TX aggregation optimization
Ido Yariv [Tue, 12 Oct 2010 12:49:09 +0000 (14:49 +0200)]
wl1271: TX aggregation optimization

In case the aggregation buffer is too small to hold all available packets,
the buffer is transferred to the FW and no more packets are aggregated.
Although there may be enough available TX blocks, no additional packets will
be handled by the current TX work.

Fix this by flushing the aggregation buffer when it's full, and continue
transferring packets as long as there are enough available TX blocks.

Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl1271: ref_clock cosmetic changes
Gery Kahn [Tue, 5 Oct 2010 14:09:05 +0000 (16:09 +0200)]
wl1271: ref_clock cosmetic changes

Cosmetic cleanup for ref_clock code while configured by board.

Signed-off-by: Gery Kahn <geryk@ti.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agoiwlagn: use 6000g2b uCode for 130 series devices
Wey-Yi Guy [Sat, 23 Oct 2010 16:15:46 +0000 (09:15 -0700)]
iwlagn: use 6000g2b uCode for 130 series devices

For 130 series device, 6000g2b uCode will be used, no need to
have additional defines for 130 devices, so remove those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: add new devices to Kconfig
Wey-Yi Guy [Sat, 23 Oct 2010 16:15:45 +0000 (09:15 -0700)]
iwlwifi: add new devices to Kconfig

Adding description to Kconfig to indicate more devices
are being supported by iwlagn

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: turn dynamic smps on while BT is on
Wey-Yi Guy [Sat, 23 Oct 2010 16:15:44 +0000 (09:15 -0700)]
iwlagn: turn dynamic smps on while BT is on

While BT is on and doing iscan and/or pscan, BT is in listen
mode which will impact WiFi throughput, we need to
enable dynamic smps in order to improve the rx throughput.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: implement switching iftype while up
Johannes Berg [Sat, 23 Oct 2010 16:15:43 +0000 (09:15 -0700)]
iwlwifi: implement switching iftype while up

Implement switching the interface while an
interface is up in iwlwifi. Interfaces have
to stay on the context they were created on.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix IBSS beaconing
Johannes Berg [Sat, 23 Oct 2010 16:15:42 +0000 (09:15 -0700)]
iwlwifi: fix IBSS beaconing

My previous patch to clean up all RXON handling
inadvertently broke IBSS because it failed to
take into account that unlike in AP mode, IBSS
requires beacons to be sent only after setting
the RXON assoc.

Fix this, clean up the code a bit, improve the
error checking around this, and also react to
beacon changes in IBSS mode from mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: new RXON processing for modern devices
Johannes Berg [Sat, 23 Oct 2010 16:15:41 +0000 (09:15 -0700)]
iwlagn: new RXON processing for modern devices

In order to simplify the flow, and make new
enhancements easier, separate out the RXON
processing for modern AGN (5000 and newer)
from RXON processing for the older 3945 and
4965 devices. Avoid changing these old ones
to avoid regressions and move their code to
a new file (iwl-legacy.c). 4965 gets the
commit_rxon that used to be common for all
AGN devices, but with removed PAN support.

The new RXON processing is more central and
does more work in committing, so that it is
easier to follow.

To make it more evident what is split out
for legacy, split the necessary operations
for that into a new struct iwl_legacy_ops.
Those parts that still exist in the new AGN
code don't need to be parametrized.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: don't resend RXON timing
Johannes Berg [Sat, 23 Oct 2010 16:15:40 +0000 (09:15 -0700)]
iwlagn: don't resend RXON timing

Resending RXON timing here caused issues with
dual-mode under certain circumstances, so avoid
doing it here right now.

This effectively reverts b01efe434bd6ea807eb72b
and partially 2491fa42d9bdf26075765. The next
patch will make all this cleaner for just the
devices that need it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: make mac80211 ops a device config
Johannes Berg [Sat, 23 Oct 2010 16:15:39 +0000 (09:15 -0700)]
iwlwifi: make mac80211 ops a device config

In the future, 4965 and modern AGN devices will
need to have different mac80211 callbacks since
they have different capabilities. Prepare for
that by making the mac80211 operations a device
config.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: refactor debugfs function generation code
Eliad Peller [Wed, 27 Oct 2010 12:58:29 +0000 (14:58 +0200)]
mac80211: refactor debugfs function generation code

refactor mac80211 debugfs code by using a format&copy function, instead of
duplicating the code for each generated function.

this change reduces about 600B from mac80211.ko

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: content DMA start / stop through the PCU lock
Luis R. Rodriguez [Tue, 26 Oct 2010 22:27:25 +0000 (15:27 -0700)]
ath9k: content DMA start / stop through the PCU lock

This helps align resets / RX enable & disable / TX stop / start.
Locking around the PCU is important to ensure the hardware doesn't
get stale data when working with DMA'able data.

This is part of a series of patches which fix stopping
TX DMA completley when requested on the driver.
For more details about this issue refer to this thread:

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

Tested-by: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: move the PCU lock to the sc structure
Luis R. Rodriguez [Tue, 26 Oct 2010 22:27:24 +0000 (15:27 -0700)]
ath9k: move the PCU lock to the sc structure

The PCU lock should be used to contend TX DMA as well,
this will be done next.

This is part of a series of patches which fix stopping
TX DMA completley when requested on the driver.
For more details about this issue refer to this thread:

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

Tested-by: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: simplify hw reset locking
Luis R. Rodriguez [Tue, 26 Oct 2010 22:27:23 +0000 (15:27 -0700)]
ath9k: simplify hw reset locking

The new PCU lock is better placed so we can just contend
against that when trying to reset hardware.

This is part of a series of patches which fix stopping
TX DMA completley when requested on the driver.
For more details about this issue refer to this thread:

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

Tested-by: Ben Greear <greearb@candelatech.com>
Cc: Kyungwan Nam <kyungwan.nam@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Properly assign boolean types
Mohammed Shafi Shajakhan [Tue, 26 Oct 2010 15:58:57 +0000 (21:28 +0530)]
ath9k: Properly assign boolean types

This takes care that boolean types are properly assigned

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Handle monitor mode properly for HTC devices
Rajkumar Manoharan [Tue, 26 Oct 2010 14:41:29 +0000 (20:11 +0530)]
ath9k_htc: Handle monitor mode properly for HTC devices

No need to inform about monitor interface changes to
firmware. Set the HW mode to monitor type based on mac80211
indication flag is sufficient.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: Convert to new PCI PM framework
John W. Linville [Mon, 25 Oct 2010 20:12:37 +0000 (16:12 -0400)]
iwlwifi: Convert to new PCI PM framework

Use the new PCI PM and let the PCI core code handle the PCI-specific
details of power transitions.

Based on similarly titled ath9k patch posted by Rafael J. Wysocki.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agort2x00pci: do not use GFP_DMA
John W. Linville [Mon, 25 Oct 2010 14:33:07 +0000 (10:33 -0400)]
rt2x00pci: do not use GFP_DMA

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
13 years agob43: remove extraneous code in free_ringmemory
John W. Linville [Mon, 25 Oct 2010 14:24:09 +0000 (10:24 -0400)]
b43: remove extraneous code in free_ringmemory

This code seems to have been cut-n-pasted from alloc_ringmemory?
Anyway, it is useless.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: fix typos
Hauke Mehrtens [Sat, 23 Oct 2010 17:51:32 +0000 (19:51 +0200)]
carl9170: fix typos

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: improve 2055 radio initialization
Rafał Miłecki [Fri, 22 Oct 2010 15:43:49 +0000 (17:43 +0200)]
b43: N-PHY: improve 2055 radio initialization

1) Upload 5 GHz values when needed.
2) Do not upload all values on first init. Follow wl.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: determine usage of radio regulatory workaround correctly
Rafał Miłecki [Fri, 22 Oct 2010 15:43:48 +0000 (17:43 +0200)]
b43: N-PHY: determine usage of radio regulatory workaround correctly

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: define known SPROM boardflags2 bits
Rafał Miłecki [Fri, 22 Oct 2010 15:43:47 +0000 (17:43 +0200)]
b43: define known SPROM boardflags2 bits

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix 2055 radio init
Rafał Miłecki [Fri, 22 Oct 2010 15:43:46 +0000 (17:43 +0200)]
b43: N-PHY: fix 2055 radio init

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: avoid commit rxon during scan in iwl_set_no_assoc
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:30 +0000 (17:04 +0200)]
iwlwifi: avoid commit rxon during scan in iwl_set_no_assoc

Currently we are canceling scan when changing BSSID. Behave the same
when changing association and beacon enablement, to avoid committing
rxon during scan in iwl_set_no_assoc().

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: defer update power mode while scan
Stanislaw Gruszka [Fri, 22 Oct 2010 15:04:29 +0000 (17:04 +0200)]
iwlwifi: defer update power mode while scan

Do not set power mode when scanning, and defer that when scan finish.
We still set power mode in force case i.e. when device is overheated.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>