GitHub/moto-9609/android_kernel_motorola_exynos9610.git
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 years agoiwlwifi: don't double-activate queue 4
Johannes Berg [Fri, 6 Nov 2009 22:52:50 +0000 (14:52 -0800)]
iwlwifi: don't double-activate queue 4

The fourth queue (command queue) is already activated in
the loop above that also maps it to the command FIFO and
therefore doesn't need to be marked as activated again.
Also change the TODO comment to be accurate -- we need
to initialise the _queues_, not FIFOs, and map them to
device FIFOs.

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>
15 years agoiwlwifi: no periodic Tx/IQ calibration for 6x00/6x50 series
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:49 +0000 (14:52 -0800)]
iwlwifi: no periodic Tx/IQ calibration for 6x00/6x50 series

For both 6x00 and 6x50 series devices, periodic Tx IQ calibration is
disabled in uCode, driver do not need to set the periodic Tx/IQ calibration
bit in calibration command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: use configured valid rx chain for scan
Shanyu Zhao [Fri, 6 Nov 2009 22:52:48 +0000 (14:52 -0800)]
iwlwifi: use configured valid rx chain for scan

Use configured valid rx chains in scan command instead of ANT_ABC, correcting
valid rx chain configuration of 4965, should be ANT_ABC instead of ANT_AB.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: use only one chain for scan in PS
Shanyu Zhao [Fri, 6 Nov 2009 22:52:47 +0000 (14:52 -0800)]
iwlwifi: use only one chain for scan in PS

When doing scan in power saving mode, choose only 1 valid RX chain instead of
turning all chains on.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: print rx_on config to help debug
Wey-Yi Guy [Fri, 6 Nov 2009 22:52:46 +0000 (14:52 -0800)]
iwlwifi: print rx_on config to help debug

To help debug rx related issues, if IWL_DEBUG_RADIO flag is set, print
the rxon configuration when rxon host command send to 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>
15 years agoiwlwifi: allocate 128 bytes linear buffer for rx skb
Zhu Yi [Fri, 6 Nov 2009 22:52:45 +0000 (14:52 -0800)]
iwlwifi: allocate 128 bytes linear buffer for rx skb

Allocate 128 bytes linear buffer for rx skb. The first 64 bytes is
reserved for mac80211 usage (for radiotap header expansion, etc).
The frame header starts from the second 64 bytes.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: change debug message to error in failure case
Reinette Chatre [Fri, 6 Nov 2009 22:52:44 +0000 (14:52 -0800)]
iwlwifi: change debug message to error in failure case

Since these messages indicate failure we would be interested in seeing them
always.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Rewrite TX bounce buffer handling
Michael Buesch [Fri, 6 Nov 2009 17:32:44 +0000 (18:32 +0100)]
b43: Rewrite TX bounce buffer handling

Do not mess with the original skb, but allocate an independent bouncebuffer.
This protects against bad interference with mac80211's assumptions about
the skb (which already caused bugs).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 11 Nov 2009 19:38:16 +0000 (11:38 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.h

15 years agoCAN: use dev_get_by_index_rcu
stephen hemminger [Tue, 10 Nov 2009 07:54:56 +0000 (07:54 +0000)]
CAN: use dev_get_by_index_rcu

Use new function to avoid doing read_lock().

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoIPV4: use rcu to walk list of devices in IGMP
stephen hemminger [Tue, 10 Nov 2009 07:54:55 +0000 (07:54 +0000)]
IPV4: use rcu to walk list of devices in IGMP

This also needs to be optimized for large number of devices.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodecnet: use RCU to find network devices
stephen hemminger [Tue, 10 Nov 2009 07:54:53 +0000 (07:54 +0000)]
decnet: use RCU to find network devices

When showing device statistics use RCU rather than read_lock(&dev_base_lock)
Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agos390: use RCU to walk list of network devices
stephen hemminger [Tue, 10 Nov 2009 07:54:52 +0000 (07:54 +0000)]
s390: use RCU to walk list of network devices

This is similar to other cases where for_each_netdev_rcu
can be used when gathering information.

By inspection, don't have platform or cross-build environment
to validate.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: use rcu for network scheduler API
stephen hemminger [Tue, 10 Nov 2009 07:54:49 +0000 (07:54 +0000)]
net: use rcu for network scheduler API

Use RCU to walk list of network devices in qdisc dump.
This could be optimized for large number of devices.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovlan: eliminate use of dev_base_lock
stephen hemminger [Tue, 10 Nov 2009 07:54:48 +0000 (07:54 +0000)]
vlan: eliminate use of dev_base_lock

Do not need to use read_lock(&dev_base_lock), use RCU instead.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: add netdev_continue_rcu
stephen hemminger [Tue, 10 Nov 2009 07:54:47 +0000 (07:54 +0000)]
netdev: add netdev_continue_rcu

This adds an RCU macro for continuing search, useful for some
network devices like vlan.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoIPv6: use ipv6_addr_v4mapped()
Brian Haley [Mon, 9 Nov 2009 12:05:53 +0000 (12:05 +0000)]
IPv6: use ipv6_addr_v4mapped()

Change udp6_portaddr_hash() to use ipv6_addr_v4mapped()
inline instead of ipv6_addr_type().

Signed-off-by: Brian Haley <brian.haley@hp.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoparisc: led: Use for_each_netdev_rcu()
Eric Dumazet [Mon, 9 Nov 2009 18:07:28 +0000 (18:07 +0000)]
parisc: led: Use for_each_netdev_rcu()

Use for_each_netdev_rcu() and dont lock dev_base_lock anymore

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosit: Clean up DF code by copying from IPIP
Herbert Xu [Mon, 9 Nov 2009 08:42:01 +0000 (08:42 +0000)]
sit: Clean up DF code by copying from IPIP

This patch rearranges the SIT DF bit handling using the new IPIP DF
code.  The only externally visible effect should be the case where
PMTU is enabled and the MTU is exactly 1280 bytes.  In this case the
previous code would send packets out with DF off while the new code
would set the DF bit.  This is inline with RFC 4213.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks,
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Allow inet6_dump_addr() to handle more than 64 addresses
Eric Dumazet [Mon, 9 Nov 2009 07:40:17 +0000 (07:40 +0000)]
ipv6: Allow inet6_dump_addr() to handle more than 64 addresses

Apparently, inet6_dump_addr() is not able to handle more than
64 ipv6 addresses per device. We must break from inner loops
in case skb is full, or else cursor is put at the end of list.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: speedup inet6_dump_ifinfo()
Eric Dumazet [Mon, 9 Nov 2009 12:11:28 +0000 (12:11 +0000)]
ipv6: speedup inet6_dump_ifinfo()

When handling large number of netdevice, inet6_dump_ifinfo()
is very slow because it has O(N^2) complexity.

Instead of scanning one single list, we can use the 256 sub lists
of the dev_index hash table, and RCU lookups.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: netlink_getname, packet_getname -- use DECLARE_SOCKADDR guard
Cyrill Gorcunov [Sun, 8 Nov 2009 05:51:19 +0000 (05:51 +0000)]
net: netlink_getname, packet_getname -- use DECLARE_SOCKADDR guard

Use guard DECLARE_SOCKADDR in a few more places which allow
us to catch if the structure copied back is too big.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>