firefly-linux-kernel-4.4.55.git
14 years agomac80211: update copyrights to 2009
Rui Paulo [Mon, 9 Nov 2009 23:46:58 +0000 (23:46 +0000)]
mac80211: update copyrights to 2009

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add nl80211/cfg80211 handling of the new mesh root mode option.
Rui Paulo [Mon, 9 Nov 2009 23:46:57 +0000 (23:46 +0000)]
mac80211: add nl80211/cfg80211 handling of the new mesh root mode option.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: implement a timer to send RANN action frames
Rui Paulo [Mon, 9 Nov 2009 23:46:56 +0000 (23:46 +0000)]
mac80211: implement a timer to send RANN action frames

RANN (Root Annoucement) frame TX. Send an action frame every second
trying to build a path to all nodes on the mesh.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: replace "destination" with "target" to follow the spec
Rui Paulo [Mon, 9 Nov 2009 23:46:55 +0000 (23:46 +0000)]
mac80211: replace "destination" with "target" to follow the spec

Resulting object files have the same MD5 as before.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add the DS params to the beacon
Rui Paulo [Mon, 9 Nov 2009 23:46:54 +0000 (23:46 +0000)]
mac80211: add the DS params to the beacon

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix BSSID setup for beacon frames
Rui Paulo [Mon, 9 Nov 2009 23:46:53 +0000 (23:46 +0000)]
mac80211: fix BSSID setup for beacon frames

BSSID is now set to the TA.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: set the AID field correctly for mesh peer frames
Rui Paulo [Mon, 9 Nov 2009 23:46:52 +0000 (23:46 +0000)]
mac80211: set the AID field correctly for mesh peer frames

This sets the AID field correctly for mesh peer confirm frames.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: properly forward the RANN IE
Rui Paulo [Mon, 9 Nov 2009 23:46:51 +0000 (23:46 +0000)]
mac80211: properly forward the RANN IE

Increase hopcount and convert metric to LE before forwarding the RANN
action frame.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: update PERR frame format
Rui Paulo [Mon, 9 Nov 2009 23:46:50 +0000 (23:46 +0000)]
mac80211: update PERR frame format

Update the PERR IE frame format according to latest draft (3.03).

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: implement RANN processing and forwarding
Rui Paulo [Wed, 11 Nov 2009 00:01:31 +0000 (00:01 +0000)]
mac80211: implement RANN processing and forwarding

Process the RANN (Root Annoucement) Frame and try to find the HWMP
root station by sending a PREQ.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix typo in rf programming of rt2800lib.
Gertjan van Wingerde [Mon, 9 Nov 2009 21:59:04 +0000 (22:59 +0100)]
rt2x00: Fix typo in rf programming of rt2800lib.

Fix a type in rt2800_config_channel_rt3x. The second write to RF
register 2 should be to RF register 3.  This is confirmed by the
legacy Ralink code.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix max HT rate processing on mac80211
Luis R. Rodriguez [Mon, 9 Nov 2009 21:03:22 +0000 (16:03 -0500)]
mac80211: fix max HT rate processing on mac80211

The max MCS index is 76, fix the higher check to allow through
frames received at MCS 76. This is a non-issue for current drivers
as MCS 76 is only possible with a device supporting 4 spatial
streams.

While at it change the WARN_ON() on invalid HT rates to a WARN()
to provide more useful information. This will help debug issues
when the driver is passing up a bogus HT rate value.

The rate must map to a valid MCS index which can be any of the
values in the set [0 - 76] (inclusive).

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix some typos and punctuation in comments
Thadeu Lima de Souza Cascardo [Mon, 9 Nov 2009 08:45:50 +0000 (09:45 +0100)]
rt2x00: fix some typos and punctuation in comments

fix some typos and punctuation in comments

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoat76c50x-usb: Supply additional parameters to at76_start_monitor scan request
Jason Andryuk [Mon, 9 Nov 2009 00:02:19 +0000 (19:02 -0500)]
at76c50x-usb: Supply additional parameters to at76_start_monitor scan request

For my Linksys WUSB11 at76c503-i3861 device, scanning fails without
probe_delay, min_channel_time, and max_channel_time specified for the
scan request.  These values were found by checking scan requests from
the at76_usb driver.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoat76c50x-usb: Remove mac2str and replace with %pM format specifier.
Jason Andryuk [Sun, 8 Nov 2009 23:58:01 +0000 (18:58 -0500)]
at76c50x-usb: Remove mac2str and replace with %pM format specifier.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Update copyright statements.
Gertjan van Wingerde [Sun, 8 Nov 2009 15:39:55 +0000 (16:39 +0100)]
rt2x00: Update copyright statements.

As mentioned on the linux-wireless mailing list, the current copyright
statements in the rt2x00 are meaningless, as the rt2x00 project is
not even a formal legal entity. Therefore it is better to replace
the existing copyright statements with copyright statements for the
people that actually wrote the code.

Note: Updated to the best of my knowledge with respect to who
contributed considerable amounts of code.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2500usb: remove dead link tuning code
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:43:35 +0000 (14:43 +0100)]
rt2500usb: remove dead link tuning code

Link tuning code from the legacy rt2570 driver turned out to be
harmful and got disabled by the commit d06193f ("rt2x00: Disable
link tuning in rt2500usb") in August 2008.

There is no reason to keep this dead code any longer so remove it
(it can still be retrieved from the git history if necessary).

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>
14 years agort2800usb: add eFuse EEPROM support
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:55 +0000 (14:39 +0100)]
rt2800usb: add eFuse EEPROM support

It is needed for at least RT3070 chip.

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 eFuse EEPROM support code to rt2800lib
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:48 +0000 (14:39 +0100)]
rt2800: add eFuse EEPROM support code to rt2800lib

eFuse EEPROM is used also by USB chips (i.e. RT3070)
so move the needed code from rt2800pci to rt2800lib.

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>
14 years agort2800usb: fix RX descriptor naming
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:40 +0000 (14:39 +0100)]
rt2800usb: fix RX descriptor naming

Rename RXD_W0_* defines to RXINFO_W0_* ones to match naming
used for TX descriptor and by the vendor driver.

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: unify rt2800*_probe_hw_mode()
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:32 +0000 (14:39 +0100)]
rt2800: unify rt2800*_probe_hw_mode()

Add rf_vals tables and rt2800_probe_hw_mode() to rt2800lib.

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>
14 years agort2800: prepare for rt2800*_probe_hw_mode() unification
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:25 +0000 (14:39 +0100)]
rt2800: prepare for rt2800*_probe_hw_mode() unification

Enclose interface specific code in rt2800[pci,usb]_probe_hw_mode()
with rt2x00_intf_is_[pci,usb]() checks.

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: reorganize code in rt2800usb_probe_hw_mode()
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:16 +0000 (14:39 +0100)]
rt2800usb: reorganize code in rt2800usb_probe_hw_mode()

Move hw_mode information initialization code block before
HT information initialization one to match the ordering used
by rt2800pci's rt2800pci_probe_hw_mode().

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 missing RF values to rf_vals table
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:09 +0000 (14:39 +0100)]
rt2800pci: add missing RF values to rf_vals table

rt2800pci's rf_vals[] copy was missing values for some channels.

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: unify EEPROM support code
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:39:01 +0000 (14:39 +0100)]
rt2800: unify EEPROM support code

Add rt2800_validate_eeprom() and rt2800_init_eeprom() to rt2800lib.

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 unification of EEPROM support code
Bartlomiej Zolnierkiewicz [Sun, 8 Nov 2009 13:38:54 +0000 (14:38 +0100)]
rt2800: prepare for unification of EEPROM support code

* Factor out common code from rt2800[pci,usb]_validate_eeprom()
  to rt2800_validate_eeprom().

* Fix interface specific comment in rt2800[pci,usb]_validate_eeprom().

* Enclose interface specific code in rt2800[pci,usb]_init_eeprom()
  with rt2x00_intf_is_[pci,usb]() checks.

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: Remove deprecated ieee80211_rx_status->qual usage
Ivo van Doorn [Sun, 8 Nov 2009 13:37:48 +0000 (14:37 +0100)]
rt2x00: Remove deprecated ieee80211_rx_status->qual usage

ieee80211_rx_status->qual has been marked deprecated.
This allows us to remove several functions and fields which
were used to calculate a reasonable value for it.

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>
14 years agort2x00: Add dynamic detection of eFuse EEPROM in rt2800pci.
Gertjan van Wingerde [Sun, 8 Nov 2009 11:30:35 +0000 (12:30 +0100)]
rt2x00: Add dynamic detection of eFuse EEPROM in rt2800pci.

Instead of assuming that all rt3090 devices will have an eFuse EEPROM,
do as the legacy Ralink driver, and detect at run-time whether an
eFuse EEPROM is present.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_common: clarify and correct jumbogram processing
Luis R. Rodriguez [Thu, 5 Nov 2009 22:10:07 +0000 (14:10 -0800)]
ath9k_common: clarify and correct jumbogram processing

Jumbograms are frames put together linked together through
more than one descriptor. For example ath9k_htc will use this
to send from the target a large frame split up into 2 or more
segments. The driver then would be in charge of putting the
frame back together.

When jumbograms are constructed the rx_stats->rs_more will
bet set and rx_stats->rs_status will not have any valid content
as the actual status will only be avialable at the end of
the chained descriptors.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_common: remove ath9k_compute_qual()
Luis R. Rodriguez [Thu, 5 Nov 2009 16:53:10 +0000 (08:53 -0800)]
ath9k_common: remove ath9k_compute_qual()

This is now deprecated and unused within mac80211, so time
to remove it as otherwise we'd be doing some unecessary
computations for nothing.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_common: add new module to share 802.11n driver helpers
Luis R. Rodriguez [Thu, 5 Nov 2009 16:44:39 +0000 (08:44 -0800)]
ath9k_common: add new module to share 802.11n driver helpers

ath9k and ath9k_htc share a lot of common hardware characteristics.
They only differ in that ath9k_htc works with a target CPU and ath9k
works directly with the hardware. ath9k_htc will do *some* things in
the firmware, but a lot of others on the host.

The common 802.11n hardware code is already shared through the ath9k_hw
module. Common helpers amongst all Atheros drivers can use the ath module,
this includes ath5k and ar9170 as users. But there is some common driver
specific helpers which are not exactly hardware code which ath9k and
ath9k_htc can share. We'll be using ath9k_common for this to avoid
bloating the ath module and the common 802.11n hardware module ath9k_hw.

We start by sharing skb pre and post processing in preparation for a hand
off to mac80211.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move RX skb post processing to a helper
Luis R. Rodriguez [Thu, 5 Nov 2009 00:47:22 +0000 (16:47 -0800)]
ath9k: move RX skb post processing to a helper

Use a helper for the RX skb post processing,
ath9k_rx_skb_postprocess().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: use the common->keymap
Luis R. Rodriguez [Thu, 5 Nov 2009 01:47:31 +0000 (17:47 -0800)]
ath5k: use the common->keymap

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move driver keymap, keymax and splitmic to common
Luis R. Rodriguez [Thu, 5 Nov 2009 01:21:01 +0000 (17:21 -0800)]
ath9k: move driver keymap, keymax and splitmic to common

This will make sharing code easier between ath9k and ath9k_htc.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: rename ath_rx_prepare() to ath9k_rx_skb_preprocess()
Luis R. Rodriguez [Thu, 5 Nov 2009 00:34:33 +0000 (16:34 -0800)]
ath9k: rename ath_rx_prepare() to ath9k_rx_skb_preprocess()

And change the return value to something more obvious.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move the max rx buffer size check to ath9k_rx_accept()
Luis R. Rodriguez [Wed, 4 Nov 2009 23:11:05 +0000 (15:11 -0800)]
ath9k: move the max rx buffer size check to ath9k_rx_accept()

While at it flip the order, seems easier to read and also
add some better description as to why we do this check.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove double cache alignment, ath_rxbuf_alloc() already does it
Luis R. Rodriguez [Wed, 4 Nov 2009 17:44:50 +0000 (09:44 -0800)]
ath5k: remove double cache alignment, ath_rxbuf_alloc() already does it

ath5k is using the (csz - 1) twice as ath_rxbuf_alloc() already allocates
and moves skb->data accordingly. Remove the extra (csz -1).

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath: move the rx bufsize to common to share with ath5k/ath9k
Luis R. Rodriguez [Wed, 4 Nov 2009 17:11:34 +0000 (09:11 -0800)]
ath: move the rx bufsize to common to share with ath5k/ath9k

This will also be used by ath9k_htc.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move the rx_stats->rs_datalen check to ath9k_rx_accept()
Luis R. Rodriguez [Wed, 4 Nov 2009 16:58:45 +0000 (08:58 -0800)]
ath9k: move the rx_stats->rs_datalen check to ath9k_rx_accept()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: avoid the copy skb->cb on every RX'd skb
Luis R. Rodriguez [Wed, 4 Nov 2009 16:20:42 +0000 (08:20 -0800)]
ath9k: avoid the copy skb->cb on every RX'd skb

The skb->cb (control buffer, 48 bytes) is available to the skb
upon skb allocation. You can fill it up imediately after skb
allocation. ath9k was copying onto the skb->cb the data from the
processed skb for mac80211 from a stack struct ieee80211_rx_status
structure. This is unnecessary, instead use the skb->cb for the
rx status immediately after the skb becomes available and DMA
synched.

Additionally, avoid the copy of the skb->cb also for virtual wiphys
as skb_copy() will copy over the skb->cb for us as well.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move rssi processing into a helper
Luis R. Rodriguez [Wed, 4 Nov 2009 02:35:05 +0000 (18:35 -0800)]
ath9k: move rssi processing into a helper

This moves all the RX processing of RSSI into a helper,
ath_rx_prepare(). ath_rx_prepare() should now be really
easy to read and follow.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move qual processing into a helper
Luis R. Rodriguez [Wed, 4 Nov 2009 02:20:26 +0000 (18:20 -0800)]
ath9k: move qual processing into a helper

This moves the qual computing into a small helper,
ath9k_compute_qual()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move rate descriptor reading into a helper
Luis R. Rodriguez [Wed, 4 Nov 2009 02:10:30 +0000 (18:10 -0800)]
ath9k: move rate descriptor reading into a helper

ath9k_process_rate() now does all the rx status processing to
read the rate the hardware passed and translate it to whatever
mac80211 wants.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: remove temp variable ratecode from ath_rx_prepare()
Luis R. Rodriguez [Wed, 4 Nov 2009 01:52:33 +0000 (17:52 -0800)]
ath9k: remove temp variable ratecode from ath_rx_prepare()

Its just a distraction when reading the code, instead use the
rx_stats->rs_rate directly.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move RX check code into helper ath9k_rx_accept()
Luis R. Rodriguez [Wed, 4 Nov 2009 01:39:00 +0000 (17:39 -0800)]
ath9k: move RX check code into helper ath9k_rx_accept()

This does sanity checking on the skb and RX status descriptor
prior to processing.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: use the ieee80211_hw to get to an sband on ath_rx_prepare()
Luis R. Rodriguez [Tue, 3 Nov 2009 23:57:16 +0000 (15:57 -0800)]
ath9k: use the ieee80211_hw to get to an sband on ath_rx_prepare()

No need to use the private driver structure to get to an sband.
This will make it easier to share this code with ath9k_htc.

With the sc gone we can now just pass the common structure to
ath_rx_prepare().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: move struct ath_ani to common area
Luis R. Rodriguez [Wed, 4 Nov 2009 01:07:04 +0000 (17:07 -0800)]
ath9k: move struct ath_ani to common area

This can be shared between ath9k and ath9k_htc. It will also
help with sharing routine helpers on the RX path.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: move ath_extend_tsf() to hw code to share as ath9k_hw_extend_tsf()
Luis R. Rodriguez [Wed, 4 Nov 2009 00:10:46 +0000 (16:10 -0800)]
ath9k_hw: move ath_extend_tsf() to hw code to share as ath9k_hw_extend_tsf()

This will be shared between ath9k and ath9k_htc.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: do not pass the entire descriptor to ath_rx_prepare()
Luis R. Rodriguez [Tue, 3 Nov 2009 02:49:56 +0000 (18:49 -0800)]
ath9k: do not pass the entire descriptor to ath_rx_prepare()

Its not needed, so just pass the hardware RX status.
We'll be simplfying ath_rx_prepare() with code we can share
between ath9k and ath9k_htc. This will help make that code
easier to read and manage.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: handle low buffer space for virtual wiphys
Luis R. Rodriguez [Tue, 3 Nov 2009 01:09:12 +0000 (17:09 -0800)]
ath9k: handle low buffer space for virtual wiphys

ath9k virtual wiphys all share the same internal buffer space
for TX but they do not share the mac80211 skb queues. When
ath9k detects it is running low on buffer space to TX it tells
mac80211 to stop sending it skbs its way but it always does
this only for the primary wiphy. This means mac80211 won't know
its best to avoid sending ath9k more skbs on a separate virtual
wiphy. The same issue is present for reliving the skb queue.

Since ath9k does not keep track of which virtual wiphy is hammering
on TX silence all wiphy's TX when we're low on buffer space. When
we're free on buffer space only bother informing the virtual wiphy
which is active that we have free buffers.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: use the right hw on ath_tx_setup_buffer() for HT
Luis R. Rodriguez [Tue, 3 Nov 2009 00:27:33 +0000 (16:27 -0800)]
ath9k: use the right hw on ath_tx_setup_buffer() for HT

When using virtual wiphys the base sc->hw was being used, the correct
hw is passed along the caller already so just use that.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: use correct hw for tx aggregation TX completion
Luis R. Rodriguez [Tue, 3 Nov 2009 00:08:34 +0000 (16:08 -0800)]
ath9k: use correct hw for tx aggregation TX completion

When ath9k virtual wiphys are used the sc->hw will not always represent
the active hw, instead we need to get it from the skb->cb private
driver area. This ensures the right hw is used to find a sta for
the TX'd skb.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: pass the ieee80211_hw on radio enable/disable
Luis R. Rodriguez [Mon, 2 Nov 2009 22:35:42 +0000 (14:35 -0800)]
ath9k: pass the ieee80211_hw on radio enable/disable

We use the ieee80211_hw for radio enable/disable but the wrong
structure hw was being used in consideration for virtual wiphys
as each virtual wiphy has its own ieee80211_hw struct.

Just pass the hw struct to ensure we use the right one. This should
fix the hw used and passed for radio enable/disable. This includes
the stoping / starting of the software TX queues so mac80211 doesn't
send us data for a specific virtual wiphy. ath9k already takes care
of pausing virtual wiphys and stopping the respective queues on its
own, but this should handle the idle mac80211 conf calls as well.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: use the passed ieee80211_hw on ath_rx_prepare()
Luis R. Rodriguez [Mon, 2 Nov 2009 22:17:51 +0000 (14:17 -0800)]
ath9k: use the passed ieee80211_hw on ath_rx_prepare()

this now uses the proper hw which should mean finding the
right sta when using ath9k virtual wiphy stuff. Only
advantage I see here is getting the rssi properly updated
so the 'fix' itself isn't that great, but at least this
is correct.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: simpify RX by calling ath_get_virt_hw() once
Luis R. Rodriguez [Mon, 2 Nov 2009 19:36:08 +0000 (11:36 -0800)]
ath9k: simpify RX by calling ath_get_virt_hw() once

ath_get_virt_hw() is required on RX to determine for which virtual
wiphy an skb came in for. Instead of searching for the hw twice do
it only once.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: update hw configuration for virtual wiphys
Luis R. Rodriguez [Wed, 28 Oct 2009 20:39:40 +0000 (13:39 -0700)]
ath9k: update hw configuration for virtual wiphys

ath9k supports its own virtual wiphys. The hardware code
relies on the ieee80211_hw for the present interface but
with recent changes introduced the common->hw was never
updated and is required for virtual wiphys.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix listening to idle requests
Luis R. Rodriguez [Thu, 29 Oct 2009 17:41:15 +0000 (10:41 -0700)]
ath9k: fix listening to idle requests

The way idle configuration detection was implemented as
busted due to the fact that it assumed the ath9k virtual wiphy,
the aphy, would be marked as inactive if it was not used but
it turns out an aphy is always active if its the only wiphy
present. We need to distinguish between aphy activity and
idleness so we now add an idle bool for the aphy and mark
it as such based on the passed IEEE80211_CONF_CHANGE_IDLE
from mac80211.

Previous to all_wiphys_idle would never be true when using
only one device so we never really were using
IEEE80211_CONF_CHANGE_IDLE -- we never turned the radio
off or on upon IEEE80211_CONF_CHANGE_IDLE changes as radio
changes depended on all_wiphys_idle being true either to
turn the radio on or off. Since it was always false for
one device this code was doing nothing.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Reported-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: implement support for 4-address frames for AP and client mode
Felix Fietkau [Tue, 10 Nov 2009 19:10:05 +0000 (20:10 +0100)]
mac80211: implement support for 4-address frames for AP and client mode

In some situations it might be useful to run a network with an
Access Point and multiple clients, but with each client bridged
to a network behind it. For this to work, both the client and the
AP need to transmit 4-address frames, containing both source and
destination MAC addresses.
With this patch, you can configure a client to communicate using
only 4-address frames for data traffic.
On the AP side you can enable 4-address frames for individual
clients by isolating them in separate AP VLANs which are configured
in 4-address mode.
Such an AP VLAN will be limited to one client only, and this client
will be used as the destination for all traffic on its interface,
regardless of the destination MAC address in the packet headers.
The advantage of this mode compared to regular WDS mode is that it's
easier to configure and does not require a static list of peer MAC
addresses on any side.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: add a parameter for using 4-address frames on virtual interfaces
Felix Fietkau [Tue, 10 Nov 2009 17:53:10 +0000 (18:53 +0100)]
nl80211: add a parameter for using 4-address frames on virtual interfaces

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: improve peer link management debugging
Rui Paulo [Mon, 9 Nov 2009 23:46:48 +0000 (23:46 +0000)]
mac80211: improve peer link management debugging

Print the FSM state strings instead of just the numbers.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: improve HWMP debugging
Rui Paulo [Mon, 9 Nov 2009 23:46:47 +0000 (23:46 +0000)]
mac80211: improve HWMP debugging

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: allow processing of more than one HWMP IE
Rui Paulo [Mon, 9 Nov 2009 23:46:46 +0000 (23:46 +0000)]
mac80211: allow processing of more than one HWMP IE

Since the HWMP IEs are now all optional and the action code is fixed,
allow the HWMP code to find and process each IE on the path
selection action frames.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <rpaulo@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add MAC80211_VERBOSE_MHWMP_DEBUG
Rui Paulo [Mon, 9 Nov 2009 23:46:45 +0000 (23:46 +0000)]
mac80211: add MAC80211_VERBOSE_MHWMP_DEBUG

Add MAC80211_VERBOSE_MHWMP_DEBUG, a debugging option for HWMP
frame processing.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: update the format of path selection frames
Rui Paulo [Mon, 9 Nov 2009 23:46:44 +0000 (23:46 +0000)]
mac80211: update the format of path selection frames

Update the format of path selection frames according to latest
draft (3.03).

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: update peer link management IE and action frames
Rui Paulo [Mon, 9 Nov 2009 23:46:43 +0000 (23:46 +0000)]
mac80211: update peer link management IE and action frames

Update the length and format of the peer link management action frames.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix typo in a comment
Rui Paulo [Mon, 9 Nov 2009 23:46:42 +0000 (23:46 +0000)]
mac80211: fix typo in a comment

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: implement the meshconf formation info field
Rui Paulo [Mon, 9 Nov 2009 23:46:41 +0000 (23:46 +0000)]
mac80211: implement the meshconf formation info field

The Mesh Configuration Formation Info field contains the number of
neighbors.  This means that the beacon must be updated every time a
peer joins or leaves.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <rpaulo@gmail.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: set MESH_TTL to 31
Rui Paulo [Mon, 9 Nov 2009 23:46:40 +0000 (23:46 +0000)]
mac80211: set MESH_TTL to 31

Update the mesh time to live field to 31 according to draft 3.03.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: update meshconf IE
Rui Paulo [Mon, 9 Nov 2009 23:46:39 +0000 (23:46 +0000)]
mac80211: update meshconf IE

This updates the Mesh Configuration IE according to the latest
draft (3.03).
Notable changes include the simplified protocol IDs.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix building of rt2800lib when rt2x00 driver is built-in.
Gertjan van Wingerde [Mon, 9 Nov 2009 22:38:35 +0000 (23:38 +0100)]
rt2x00: Fix building of rt2800lib when rt2x00 driver is built-in.

When enabling rt2800usb as a built-in driver (as opposed to a as a module) the build fails. See
http://marc.info/?l=linux-wireless&m=125768687711034&w=2 for details.

Fix it by properly including <linux/usb.h> from rt2x00usb.h

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Move interface type assignments to generic code.
Gertjan van Wingerde [Sun, 8 Nov 2009 11:30:14 +0000 (12:30 +0100)]
rt2x00: Move interface type assignments to generic code.

Make sure all drivers can benefit of the assignment of the interface
type of an adapter, instead of keeping it for rt2800 only.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless: correct check on CCS_START_NETWORK
Julia Lawall [Sun, 8 Nov 2009 08:23:07 +0000 (09:23 +0100)]
drivers/net/wireless: correct check on CCS_START_NETWORK

CCS_START_NETWORK is declared in drivers/net/wireless/rayctl.h with the
comment Values for cmd.  status is previously compared to
CCS_COMMAND_COMPLETE, which is declared in the same file with the comment
Values for buffer_status.  Finally, it is possible at this point that cmd
is CCS_START_NETWORK, because it is compared to that value in an enclosing
switch that has CCS_START_NETWORK as one of two case labels around this code.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agozd1211rw: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:03:22 +0000 (22:03 +0000)]
zd1211rw: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agozd1201: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:02:39 +0000 (22:02 +0000)]
zd1201: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl12xx: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:02:15 +0000 (22:02 +0000)]
wl12xx: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoprism54: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:01:55 +0000 (22:01 +0000)]
prism54: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:01:29 +0000 (22:01 +0000)]
orinoco: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:00:57 +0000 (22:00 +0000)]
mwl8k: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas_tf_usb: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:00:38 +0000 (22:00 +0000)]
libertas_tf_usb: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 22:00:03 +0000 (22:00 +0000)]
libertas: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 21:59:38 +0000 (21:59 +0000)]
iwmc3200wifi: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2200: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 21:59:10 +0000 (21:59 +0000)]
ipw2200: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2100: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 21:58:47 +0000 (21:58 +0000)]
ipw2100: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoatmel: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 21:58:05 +0000 (21:58 +0000)]
atmel: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoat76c50x-usb: declare MODULE_FIRMWARE
Ben Hutchings [Sat, 7 Nov 2009 21:56:08 +0000 (21:56 +0000)]
at76c50x-usb: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43-pio: Fix RX error path for rev>=8 devices
Michael Buesch [Sat, 7 Nov 2009 17:54:22 +0000 (18:54 +0100)]
b43-pio: Fix RX error path for rev>=8 devices

This fixes the RX error path for rev>=8 devices.
The wrong register size and definitions were used.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agostaging/wireless: don't build when NET etc. are not enabled
Randy Dunlap [Fri, 6 Nov 2009 23:35:15 +0000 (15:35 -0800)]
staging/wireless: don't build when NET etc. are not enabled

These wireless drivers in staging could be built when
CONFIG_NET=n, CONFIG_NETDEVICES=n, causing this build error:

net/wireless/wext-priv.c: In function 'ioctl_private_call':
net/wireless/wext-priv.c:206: error: implicit declaration of function 'call_commit_handler'

due to faulty selects.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: MAC_ACCESS_REQ cleanup
Ben Cahill [Fri, 6 Nov 2009 22:53:03 +0000 (14:53 -0800)]
iwlwifi: MAC_ACCESS_REQ cleanup

Add txq_id info to "Tx queue requesting wakeup" debug message

Add "Rx queue requesting wakeup" debug message

Move clear of CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ to be after nearby
iwl_write_prph(), since iwl_write_prph() sets it and clears it.  Almost
removed it entirely, but just making sure in case someone removes the
iwl_write_prph()!  Also remove unneeded priv->lock usage; this is now
handled by priv->reg_lock within iwl_clear_bit().

Join a couple of lines that had unneeded line returns.

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>
14 years agoiwlwifi: Fix issue on file transfer stalled in HT mode
Wey-Yi Guy [Fri, 6 Nov 2009 22:53:02 +0000 (14:53 -0800)]
iwlwifi: Fix issue on file transfer stalled in HT mode

Turn on RTS/CTS for HT to prevent uCode TX fifo underrun

This is fix for
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2103

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Jiajia Zheng <jiajia.zheng@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: update write pointers in iwl_irq_tasklet()
Ben Cahill [Fri, 6 Nov 2009 22:53:01 +0000 (14:53 -0800)]
iwlagn: update write pointers in iwl_irq_tasklet()

Follow-up to "update write pointers for all tx queues after wakeup"; that
patch changed iwl_irq_tasklet_legacy(), but not iwl_irq_tasklet(), so
newer devices were not covered.

Comments from original patch:

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>
14 years agoiwlwifi: Add comments about MAC_ACCESS_REQ
Ben Cahill [Fri, 6 Nov 2009 22:53:00 +0000 (14:53 -0800)]
iwlwifi: Add comments about MAC_ACCESS_REQ

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>
14 years agoiwlwifi: Update comments for struct iwl_ssid_ie
Ben Cahill [Fri, 6 Nov 2009 22:52:59 +0000 (14:52 -0800)]
iwlwifi: Update comments for struct iwl_ssid_ie

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>
14 years agoiwlwifi: speed up event log dumps
Ben Cahill [Fri, 6 Nov 2009 22:52:58 +0000 (14:52 -0800)]
iwlwifi: speed up event log dumps

Take advantage of device's auto-increment for SRAM reads to eliminate extra
write address accesses.

Grab/release NIC access before/after entire read sequence, rather than for
each read individually.

After a quick check of dmesg logs, this seems to double Event Log dump speed,
reducing from about 20 milliseconds to about 10 milliseconds for 512 entries
using 3945.

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>
14 years agoiwlwifi: Limit size of Event Log dump
Ben Cahill [Fri, 6 Nov 2009 22:52:57 +0000 (14:52 -0800)]
iwlwifi: Limit size of Event Log dump

If device provides bad values for Event Log parameters (due to being asleep
or SRAM corruption, etc.), the size can be very, very large (e.g. 0xa5a5a5a5),
which can flood system log.

Sanity-check capacity and next_entry values and limit to reasonable size dump.

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>
14 years agoiwlwifi: do not base station's sm_ps setting on AP
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:56 +0000 (14:52 -0800)]
iwlwifi: do not base station's sm_ps setting on AP

Do not use AP's SM_PS setting for our own SM_PS setting.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
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>
14 years agoiwlwifi: drop non-production PCI-IDs
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:55 +0000 (14:52 -0800)]
iwlwifi: drop non-production PCI-IDs

Remove the support for all the PCI_IDs never make into production

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>
14 years agoiwlwifi: fix for channel switch
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:54 +0000 (14:52 -0800)]
iwlwifi: fix for channel switch

Different channel has different configuration, need to pass correct
configuration to uCode when send "channel switch" command to uCode.
Invalid configuration will cause sysassert in uCode and produce
un-expected result.

Even it is a very small windows, but we also need to consider and handle
the case if commit_rxon occurred before the "channel switch
announcement" notification received from uCode.

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>
14 years agoiwlwifi: add FIFO usage for 5000
Johannes Berg [Fri, 6 Nov 2009 22:52:53 +0000 (14:52 -0800)]
iwlwifi: add FIFO usage for 5000

This is part of the code, but the comment doesn't have it,
add pointers to the code and the FIFO usage for 5000 and
up.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove un-used parameter
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:52 +0000 (14:52 -0800)]
iwlwifi: remove un-used parameter

Remove un-used parameter "recovery_rxon" from "priv" data structure

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>
14 years agoiwlwifi: fix FIFO vs. queue confusion
Johannes Berg [Fri, 6 Nov 2009 22:52:51 +0000 (14:52 -0800)]
iwlwifi: fix FIFO vs. queue confusion

When I added that code setting the swq_id, I evidently
did not understand the distinction between FIFO and TX
queue yet and added code to compare a queue ID and a
FIFO number, which is bogus.

However, the code there need not be this specific, it
can just set all queues to the identity mapping which
will be overwritten by the aggregation queue code. As
a bit of defensive coding, don't assign an swq_id to
the command queue so that if we ever use it for frames
we notice quickly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>