platform/kernel/linux-3.10.git
13 years agoath9k: use the new API for setting tx descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:22 +0000 (21:24 +0200)]
ath9k: use the new API for setting tx descriptors

With the new API, tx descriptors can be written in one single pass
instead of having to re-read and rewrite fields from multiple places.
This makes the code easier to read and also slightly improves performance
on embedded MIPS hardware.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: add a new API for setting tx descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:21 +0000 (21:24 +0200)]
ath9k_hw: add a new API for setting tx descriptors

Instead of using lots of different functions with long argument lists,
pull all the necessary information from one struct. This makes the code
easier to read and eliminates the need for copying data between multiple
linked descriptors.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdesc
Felix Fietkau [Wed, 14 Sep 2011 19:24:20 +0000 (21:24 +0200)]
ath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdesc

Reduces the number of accesses to uncached descriptor memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: call ath9k_hw_set_desc_link for beacon descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:19 +0000 (21:24 +0200)]
ath9k: call ath9k_hw_set_desc_link for beacon descriptors

This ensures that only ath9k_hw_set_desc_link needs to recalculate the tx
descriptor checksum on AR9380+

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: move ath_buf_set_rate to remove a forward declaration
Felix Fietkau [Wed, 14 Sep 2011 19:24:18 +0000 (21:24 +0200)]
ath9k: move ath_buf_set_rate to remove a forward declaration

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: reduce the number of functions that access the tx descriptor
Felix Fietkau [Wed, 14 Sep 2011 19:24:17 +0000 (21:24 +0200)]
ath9k: reduce the number of functions that access the tx descriptor

Makes it easier to clean up the ath9k_hw descriptor API

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove ATH_TX_XRETRY and BUF_XRETRY flags
Felix Fietkau [Wed, 14 Sep 2011 19:24:16 +0000 (21:24 +0200)]
ath9k: remove ATH_TX_XRETRY and BUF_XRETRY flags

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: ensure that rx is not enabled during a reset
Felix Fietkau [Wed, 14 Sep 2011 19:23:03 +0000 (21:23 +0200)]
ath9k: ensure that rx is not enabled during a reset

During a reset, rx buffers are flushed after rx has been disabled. To avoid
race conditions, rx needs to stay disabled during the reset, so avoid any
calls to ath9k_hw_rxena in that case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: make beacon timer initialization more reliable
Felix Fietkau [Wed, 14 Sep 2011 19:23:02 +0000 (21:23 +0200)]
ath9k: make beacon timer initialization more reliable

When starting the AP beacon timer, it assumes that the TSF has recently
been cleared. Set the SC_OP_TSF_RESET flag to ensure that this is always
the case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix enabling interrupts after a hardware error interrupt
Felix Fietkau [Wed, 14 Sep 2011 19:23:01 +0000 (21:23 +0200)]
ath9k: fix enabling interrupts after a hardware error interrupt

The interrupt handler increases the interrupt disable refcount, so the
tasklet needs to always call ath9k_hw_enable_interrupts.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix PS wrappers and enabling LED
Mohammed Shafi Shajakhan [Wed, 14 Sep 2011 09:39:40 +0000 (15:09 +0530)]
ath9k: Fix PS wrappers and enabling LED

in ath_pci_resume it seems we are not enabling LED properly, in addition
we have a PS wrapper fix for this

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: enable LED pin for AR946/8x chipsets
Mohammed Shafi Shajakhan [Wed, 14 Sep 2011 09:39:13 +0000 (15:09 +0530)]
ath9k: enable LED pin for AR946/8x chipsets

now the LED starts working for AR946/8x chipsets

Cc: "Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Do full chip reset on 11A channels for AR9003
Rajkumar Manoharan [Wed, 14 Sep 2011 08:50:30 +0000 (14:20 +0530)]
ath9k_hw: Do full chip reset on 11A channels for AR9003

AR9003 seems to have issues sometimes with fast channel change
in 5GHz and this case is handled specifically for AR9280 by doing
a full reset. Let's do a full reset for 5GHz channles of AR9380
& for all channels of AR9280 pci chips.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: move register definitions to header files
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:19 +0000 (22:38 +0530)]
ath9k_hw: move register definitions to header files

Move the register macros to appropriate header files to be in
sync with other register definitions and also a single place
to refer everything.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add support for AR946/8x chipsets.
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:18 +0000 (22:38 +0530)]
ath9k_hw: Add support for AR946/8x chipsets.

This patch adds support for AR946/8x chipets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Split tx/rx gain table initval handling
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:17 +0000 (22:38 +0530)]
ath9k_hw: Split tx/rx gain table initval handling

Split tx/rx gain table initval hanlding part so readability
is better and easy to manage the code.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add initvals and register definitions for AR946/8x chipsets.
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:16 +0000 (22:38 +0530)]
ath9k_hw: Add initvals and register definitions for AR946/8x chipsets.

Add initvals and register modifications required to support AR946/8x chipsets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/cfg80211/mac80211: fix wme docs
Eliad Peller [Sun, 11 Sep 2011 06:46:55 +0000 (09:46 +0300)]
nl80211/cfg80211/mac80211: fix wme docs

Add/fix some missing docs.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
John W. Linville [Fri, 16 Sep 2011 20:20:43 +0000 (16:20 -0400)]
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx

13 years agolibertas: prioritize usb8388_olpc.bin firmware on OLPC machines
Andres Salomon [Fri, 9 Sep 2011 00:35:17 +0000 (17:35 -0700)]
libertas: prioritize usb8388_olpc.bin firmware on OLPC machines

Normally, the v9 firmware will be loaded if it's available.  However, on
OLPC XO-1 machines, the olpc-specific firmware supports extra functionality.
This makes the libertas driver attempt to load the custom firmware first
if the machine is an OLPC machine; if that fails (or it's not an OLPC
machine), fall back to attempting to load the other firmwares.

usb8388_olpc.bin is currently found in the linux-firmware repository.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: fix kernel-doc warning in net/cfg80211.h
Randy Dunlap [Thu, 8 Sep 2011 17:16:50 +0000 (10:16 -0700)]
wireless: fix kernel-doc warning in net/cfg80211.h

Fix kernel-doc warning in net/cfg80211.h:

Warning(include/net/cfg80211.h:1884): No description found for parameter 'registered'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Use the available helper functions to initialize the WCID table
Helmut Schaa [Thu, 8 Sep 2011 12:39:04 +0000 (14:39 +0200)]
rt2x00: Use the available helper functions to initialize the WCID table

Use rt2800_config_wcid and rt2800_delete_wcid_attr to initialize the
WCID table instead of writing to the registers directly.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Forbid aggregation for STAs not programmed into the hw
Helmut Schaa [Thu, 8 Sep 2011 12:38:36 +0000 (14:38 +0200)]
rt2x00: Forbid aggregation for STAs not programmed into the hw

If a STA is not known by the hw (i.e. has no WCID assigned) don't allow
aggregation since this might mess up tx status reports and we won't be
able to distinguish the reports of multiple WCID-less STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Make use of sta_add/remove callbacks in rt2800
Helmut Schaa [Thu, 8 Sep 2011 12:38:01 +0000 (14:38 +0200)]
rt2x00: Make use of sta_add/remove callbacks in rt2800

This allows us to assign a WCID to each STA even for STAs without
crypto key.

To achieve this search for an unused WCID in the HW WCID table and
assign it to the according STA. When configuring a pairwise key for this
STA we don't need to write the MAC address and BSSIDX anymore but just
update the crypto related fields in the WCID_ATTR table.

This has two advantages:

1) Setting a new key for an already available STA (PTK rekeying) is
slightly less expensive and should improve performance in situations
where a lot of rekeying happens (e.g. a huge number of stations and/or
a small rekeying interval)

2) The TXWI now gets a WCID assigned for unencrypted frames which will
be reflected in the corresponding tx status report. This should make tx
status reports in unencrypted AP mode more reliable as we can
distinguish between multiple key-less STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add WCID to HT TX descriptor
Helmut Schaa [Thu, 8 Sep 2011 12:37:19 +0000 (14:37 +0200)]
rt2x00: Add WCID to HT TX descriptor

When sending an unencrypted frame to a STA the driver might want to pass
a suitable WCID since we don't have a key index to allow tx status
reports to get properly assigned to the correct STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add WCID to crypto struct
Helmut Schaa [Thu, 8 Sep 2011 12:36:45 +0000 (14:36 +0200)]
rt2x00: Add WCID to crypto struct

When a WCID was already assigned to a STA the key configuration
functions need to use the same WCID for configuring the keys. Hence, add
the WCID to the crypo configuration structure.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Introduce sta_add/remove callbacks
Helmut Schaa [Thu, 8 Sep 2011 12:36:04 +0000 (14:36 +0200)]
rt2x00: Introduce sta_add/remove callbacks

This implements a basic sta_add and sta_remove callback. Introduce a new
structure rt2x00_sta and ask mac80211 to allocate it as private part of
its ieee80211_sta. rt2x00_sta only contains the WCID for now.

The sta_add callback allows the driver to assign a WCID to a station
that is currently being added. The same wcid is also passed to the
sta_remove callback one mac80211 removes this STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Move bssidx calculation into its own function
Helmut Schaa [Thu, 8 Sep 2011 12:34:22 +0000 (14:34 +0200)]
rt2x00: Move bssidx calculation into its own function

This will be used by a later patch. No functional changes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Update device channel in case of HW channel switch supported
Shahar Levi [Thu, 8 Sep 2011 05:44:05 +0000 (08:44 +0300)]
mac80211: Update device channel in case of HW channel switch supported

The hw.conf.channel value is not updated properly for drivers that
support HW channel switch.  Since the switch is done entirely by the
driver and we don't call ieee80211_hw_config(), this value remains
untouched.  This patch fixes that by setting the new channel directly in
ieee80211_chswitch_work().

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Mark all mesh stations as QoS capable
Javier Cardona [Thu, 8 Sep 2011 00:49:54 +0000 (17:49 -0700)]
mac80211: Mark all mesh stations as QoS capable

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Mesh data frames must have the QoS header
Javier Cardona [Thu, 8 Sep 2011 00:49:53 +0000 (17:49 -0700)]
mac80211: Mesh data frames must have the QoS header

Per sec 7.1.3.5 of draft 12.0 of 802.11s, mesh frames indicate the
presence of the mesh control header in their QoS header.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Start implementing QoS support for mesh interfaces
Javier Cardona [Thu, 8 Sep 2011 00:49:52 +0000 (17:49 -0700)]
mac80211: Start implementing QoS support for mesh interfaces

In order to support QoS in mesh, we need to assign queue mapping only
after the next hop has been resolved, both for forwarded and locally
originated frames.  Also, now that this is fixed, remove the XXX comment
in ieee80211_select_queue().

Also, V-Shy Ho reported that the queue mapping was not being applied to
the forwarded frame (fwd_skb instead of skb).  Fixed that as well.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Avoid unnecessary uncached
Helmut Schaa [Wed, 7 Sep 2011 18:11:26 +0000 (20:11 +0200)]
rt2x00: Avoid unnecessary uncached

Reading the TX desciptor words from coherent memory is always uncached
and potentially slow. Hence, don't read the TX descriptor prior to
writing it since we update all fields anyway.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Update some TX descriptor
Helmut Schaa [Wed, 7 Sep 2011 18:11:03 +0000 (20:11 +0200)]
rt2x00: Update some TX descriptor

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Remove incorrect led blink
Helmut Schaa [Wed, 7 Sep 2011 18:10:45 +0000 (20:10 +0200)]
rt2x00: Remove incorrect led blink

rt2800 devices are not capable of configuring arbitrary LED on/off
periods. The LED_CFG register fields ON_PERIOD and OFF_PERIOD are only
used by the hw when the LED mode is set to "blink upon TX".

Hence, remove the blink callback. This will result in software emulation
for LED blinking.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add LED_CFG register description
Helmut Schaa [Wed, 7 Sep 2011 18:10:25 +0000 (20:10 +0200)]
rt2x00: Add LED_CFG register description

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Minor optimizazion in txdone path
Helmut Schaa [Wed, 7 Sep 2011 18:10:02 +0000 (20:10 +0200)]
rt2x00: Minor optimizazion in txdone path

We can save an indirect function call + some instructions for fetching
the actual function pointer by passing the driver specific txwi pointer
directly from rt2800pci/rt2800usb to rt2800lib instead of using the
rt2800_drv_get_txwi callback.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: verify format of uAPSD information
Johannes Berg [Wed, 7 Sep 2011 09:50:48 +0000 (11:50 +0200)]
cfg80211: verify format of uAPSD information

The format is intended to be like the subfields
in the QoS Info field, verify that is the case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix compilation when debug flags is unset
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:25 +0000 (09:31 -0700)]
iwlagn: fix compilation when debug flags is unset

Trivial fixes to allow compilation without warnings when debug
compilation flag isn't set.
Also fix the compilation when debugfs flag isn't set.
Fix a warning: unused priv pointer on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: remove lines from the wrong place
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:24 +0000 (09:31 -0700)]
iwlagn: remove lines from the wrong place

Few lines for program bt_ch_announce being place in the wrong place. Remove those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: enable 11n support for "_d" sku
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:23 +0000 (09:31 -0700)]
iwlagn: enable 11n support for "_d" sku

"_d" SKU is 11n enabled device

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: disply queue read/write pointer when stuck
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:22 +0000 (09:31 -0700)]
iwlagn: disply queue read/write pointer when stuck

When driver detect queue stuck, display current read/write pointer before
perform frimware reload.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: iwl-trans.c can't dereference iwl_priv any more
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:21 +0000 (09:31 -0700)]
iwlagn: iwl-trans.c can't dereference iwl_priv any more

This reaches encapsulation for this file. In order to reach this:
 * move priv->valid_context to iwl_shared
 * move the last_rejected initialization to the upper layer
 * define a wrapper iwl_nic_config in the upper layer that calls to
   cfg->lib->ops->nic_config

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: move traffic_log back to upper layer
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:20 +0000 (09:31 -0700)]
iwlagn: move traffic_log back to upper layer

The traffic log debugfs handlers were mistakenly moved to the
transport layer because they print the pointers of the Tx / Rx
queues. The pointers of the queues can be fetched by another debugfs
handler.
So bring the traffic log back to the upper layer and remove the part
that reads the Tx / Rx queues' pointers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: clean up of transport layer
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:19 +0000 (09:31 -0700)]
iwlagn: clean up of transport layer

Move a few declarations needed by the transport layer to iwl-shared.h
Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport
header file.
Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since
these structs are used in the API to the transport layer.
Move get_cmd_string to the upper layer with a declaration in
iwl-shared.h.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: remove priv dereferences from the transport layer
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:18 +0000 (09:31 -0700)]
iwlagn: remove priv dereferences from the transport layer

Another round of clean up on the transport layer.
Define a wrapper around wiphy_rfkill_set_hw_state to prevent the
transport layer from accessing priv->hw.
Also move wait_command_queue to the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: merge iwl_pci_down and iwl_pci_remove
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:17 +0000 (09:31 -0700)]
iwlagn: merge iwl_pci_down and iwl_pci_remove

The latter was the only place that called the first. The two
functions were split when the iwl_pci_probe called iwl_pci_down
upon failure in the probe. Since iwl_pci_probe undoes its work by
itself, there is no need to split between iwl_pci_down, and
iwl_pci_remove.

Thanks to Pavel Roskin for pointing that out.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: only perform necessary calibration at init time
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:16 +0000 (09:31 -0700)]
iwlagn: only perform necessary calibration at init time

During init time, only the necessary calibration should be performed. This
not only save time, also avoid uCode crash because lack of necessary information.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix magnitude/phase average in TxIQ Calibration
Rajkumar Manoharan [Tue, 6 Sep 2011 16:29:51 +0000 (21:59 +0530)]
ath9k_hw: Fix magnitude/phase average in TxIQ Calibration

The commit "ath9k_hw: Fix Tx IQ Calibration hang issue in
AR9003 chips" did not consider more than one potential sample
while calculating magnitude/phase average if more than one
sample has the same value which could affect post-processing
of outlier detection that causes an undesirable Tx IQ
correction value will be assigned to tx gain settings where
outlier happens.

Cc: Kai Shi <kaishi@qca.qualcomm.com>
Reported-by: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Paul Stewart <pstew@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Move cycle conters under cc_lock
Rajkumar Manoharan [Tue, 6 Sep 2011 15:30:07 +0000 (21:00 +0530)]
ath9k: Move cycle conters under cc_lock

This patch protects cycle counters access by cc_lock
and also prints current sample index.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Take the samples in unassociated state
Rajkumar Manoharan [Tue, 6 Sep 2011 15:30:06 +0000 (21:00 +0530)]
ath9k: Take the samples in unassociated state

Currently the samples debugfs which maintains the snapshorts of
mac/bb only on associated state. Hence to cover issues on idle
state, the samples are taken whenever the driver is ready.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: further optimise buffer expiry timer
Johannes Berg [Tue, 6 Sep 2011 12:13:06 +0000 (14:13 +0200)]
mac80211: further optimise buffer expiry timer

Juuso optimised the timer to not run all the
time in commit 3393a608c4979a94d1887efc05b7.
However, after that it will still run once
more even if all frames just expired. Fixing
that also makes the function return value a
little clearer in the process.

Also, while at it, change the return value
to bool (instead of int).

Cc: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: implement few random missing ops
Rafał Miłecki [Sun, 4 Sep 2011 21:23:53 +0000 (23:23 +0200)]
b43: N-PHY: implement few random missing ops

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: split workarounds into per-PHY-ver functions
Rafał Miłecki [Sun, 4 Sep 2011 21:23:52 +0000 (23:23 +0200)]
b43: N-PHY: split workarounds into per-PHY-ver functions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: replace some hacks with nice tables ops
Rafał Miłecki [Sun, 4 Sep 2011 21:23:51 +0000 (23:23 +0200)]
b43: N-PHY: replace some hacks with nice tables ops

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: use helper for checking IPA
Rafał Miłecki [Sun, 4 Sep 2011 21:18:22 +0000 (23:18 +0200)]
b43: N-PHY: use helper for checking IPA

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add ssid config to bss information in AP-mode
Arik Nemtsov [Sun, 4 Sep 2011 08:11:32 +0000 (11:11 +0300)]
mac80211: add ssid config to bss information in AP-mode

Set SSID information from nl80211 beacon parameters. Advertise changes
in SSID to low level drivers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: load TX gain table on init
Rafał Miłecki [Sun, 4 Sep 2011 07:11:46 +0000 (09:11 +0200)]
b43: LCN-PHY: load TX gain table on init

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: add my copyrights and myself as the module author
Rafał Miłecki [Sat, 3 Sep 2011 19:01:02 +0000 (21:01 +0200)]
b43: add my copyrights and myself as the module author

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: drop Copyright for not really copyrightable info
Rafał Miłecki [Sat, 3 Sep 2011 19:01:01 +0000 (21:01 +0200)]
b43: drop Copyright for not really copyrightable info

As discussed in "Licensing wlc_phy_radio.h and brcm80211" (Message-ID:
<AANLkTinQMRGkOvi4e4JMsHGV_BF_4Rf5oHCtZgQjwQ1g@mail.gmail.com>) content
of that file is not copyrightable, just names and numbers.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agominstrel_ht: fix Open BA session request floods
Christian Lamparter [Sat, 3 Sep 2011 07:06:20 +0000 (09:06 +0200)]
minstrel_ht: fix Open BA session request floods

Minstrel HT tries very hard to establish a BA session with
each peer once there's some data on the way. However the
stack does not inform minstrel if an aggregation session
is already in place, so it keeps trying and wastes good
cycles in the tx status path.

[ 8149.946393] Open BA session requested for $AP tid 0
[ 8150.048765] Open BA session requested for $AP tid 0
[ 8150.174509] Open BA session requested for $AP tid 0
[ 8150.274376] Open BA session requested for $AP tid 0
...

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: implement .get_antenna and .set_antenna
Felix Fietkau [Fri, 2 Sep 2011 23:40:27 +0000 (01:40 +0200)]
ath9k: implement .get_antenna and .set_antenna

On MIMO chips this can be used to enable/disable hardware chains, ensuring
that the MCS information is updated accordingly.
On non-MIMO chips with rx diversity (e.g. 9285), this configures the rx
input antenna.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: merge reset related functions
Felix Fietkau [Fri, 2 Sep 2011 23:40:26 +0000 (01:40 +0200)]
ath9k: merge reset related functions

reduces unnecessary code duplication. Also takes the sc_pcu_lock within
ath_reset instead of callsites, which makes it possible to always cancel
all queued work items before the reset, possibly fixing a few race
conditions (work items vs reset) along with it.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: always call ath_reset from workqueue context
Felix Fietkau [Fri, 2 Sep 2011 23:40:25 +0000 (01:40 +0200)]
ath9k: always call ath_reset from workqueue context

This makes it much easier to add further rework to avoid race conditions
between reset and other work items.
Move other functions to make ath_reset static.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: move a few functions around
Felix Fietkau [Fri, 2 Sep 2011 23:40:24 +0000 (01:40 +0200)]
ath9k: move a few functions around

Helps with making ath_reset static in the next commit

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: eliminate common->{rx,tx}_chainmask
Felix Fietkau [Fri, 2 Sep 2011 23:40:23 +0000 (01:40 +0200)]
ath9k: eliminate common->{rx,tx}_chainmask

we already have ah->{rx,tx}chainmask for the same purpose

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: stop tx before doing hw config and rate update
Rajkumar Manoharan [Fri, 2 Sep 2011 08:21:59 +0000 (13:51 +0530)]
mac80211: stop tx before doing hw config and rate update

The assumption is that during the hw config, transmission was
already stopped by mac80211. Sometimes the AP can be switching
b/w the ht modes due to intolerant or etc where STA is in
the middle of transmission. In such scenario, buffer overflow
was observed at driver side. And also before updating the rate
control, the frames are continued to xmited with older rates.
This patch ensures that the frames are always xmitted with
updated rates and avoid buffer overflow.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: implement enabling TX power control
Rafał Miłecki [Thu, 1 Sep 2011 20:49:57 +0000 (22:49 +0200)]
b43: N-PHY: implement enabling TX power control

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Stop forwarding mesh traffic when tx queues are full
Javier Cardona [Tue, 6 Sep 2011 20:05:21 +0000 (13:05 -0700)]
mac80211: Stop forwarding mesh traffic when tx queues are full

Tx flow control for non-mesh modes of operation only needs to act on the
net device queues: when the hardware queues are full we stop accepting
traffic from the net device.  In mesh, however, we also need to stop
forwarding traffic.  This patch checks the hardware queues before
attempting to forward a mesh frame.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: check if mesh frame is in RMC after decrypt
Thomas Pedersen [Thu, 1 Sep 2011 19:32:14 +0000 (12:32 -0700)]
mac80211: check if mesh frame is in RMC after decrypt

To check whether a frame is in the RMC, we need access to the mesh
header.  This header is encrypted in encrypted data frames, so make this
check after the frame has been decrypted.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: make ieee80211_send_bar available for drivers
Felix Fietkau [Sat, 20 Aug 2011 13:53:55 +0000 (15:53 +0200)]
mac80211: make ieee80211_send_bar available for drivers

To properly maintain the peer's block ack window, the driver needs to be
able to control the new starting sequence number that is sent along with
the BlockAckReq frame.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: reorder code to obsolete forward declaration
Sven Neumann [Tue, 30 Aug 2011 21:38:54 +0000 (23:38 +0200)]
cfg80211: reorder code to obsolete forward declaration

Reorder functions to remove the need for a forward declaration
introduced by the last commit.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: hold reg_mutex when updating regulatory
Sven Neumann [Tue, 30 Aug 2011 21:38:53 +0000 (23:38 +0200)]
cfg80211: hold reg_mutex when updating regulatory

The function wiphy_update_regulatory() uses the static variable
last_request and thus needs to be called with reg_mutex held.
This is the case for all users in reg.c, but the function was
exported for use by wiphy_register(), from where it is called
without the lock being held.

Fix this by making wiphy_update_regulatory() private and introducing
regulatory_update() as a wrapper that acquires and holds the lock.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'wl12xx-next' into for-linville
Luciano Coelho [Wed, 14 Sep 2011 08:32:15 +0000 (11:32 +0300)]
Merge branch 'wl12xx-next' into for-linville

13 years agocfg80211: print bandwidth in chan_reg_rule_print_dbg()
Pavel Roskin [Thu, 1 Sep 2011 15:54:12 +0000 (11:54 -0400)]
cfg80211: print bandwidth in chan_reg_rule_print_dbg()

Two spaces and the second "KHz" suggest that the code author meant to
print the bandwidth but forgot it.  The code appears in commit e702d3cf
already with two spaces and "KHz" in place of the bandwidth.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: ath9k_hw_set_txpowerlimit sets previous txpower
Bill Jordan [Wed, 31 Aug 2011 21:51:00 +0000 (17:51 -0400)]
ath9k: ath9k_hw_set_txpowerlimit sets previous txpower

In commit 9c204b46c7af93e334114bea1f5eeaa6fea9ba07
(ath9k_hw: do not limit initial tx power to 20 dbm),
setting of txpower was broken.

This patch fixes it by initializing reg_pwr from the new
power limit, not the previous value.

Signed-off-by: Bill Jordan <bjordan@rajant.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: add conditions for few operations
Rafał Miłecki [Wed, 31 Aug 2011 21:36:21 +0000 (23:36 +0200)]
b43: LCN-PHY: add conditions for few operations

It was not possible to guess the conditions from MMIO dumps. Take them
from brcmsmac code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: rename functions, get rid of magic names
Rafał Miłecki [Wed, 31 Aug 2011 21:36:20 +0000 (23:36 +0200)]
b43: LCN-PHY: rename functions, get rid of magic names

We've compared b43 with brcmsmac and took functions names from the
later.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: upload additional 0x7 table
Rafał Miłecki [Wed, 31 Aug 2011 21:36:19 +0000 (23:36 +0200)]
b43: LCN-PHY: upload additional 0x7 table

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: rewrite 0x7 table at the end of init
Rafał Miłecki [Wed, 31 Aug 2011 21:36:18 +0000 (23:36 +0200)]
b43: LCN-PHY: rewrite 0x7 table at the end of init

This is not implemented in brcmsmac, but was noticed in (newer) wl. Can
be workaround for some hardware bug.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: put tables functions in correct file
Rafał Miłecki [Wed, 31 Aug 2011 21:36:17 +0000 (23:36 +0200)]
b43: LCN-PHY: put tables functions in correct file

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: minor fixes
Rafał Miłecki [Wed, 31 Aug 2011 21:36:16 +0000 (23:36 +0200)]
b43: LCN-PHY: minor fixes

The biggest change is reversing order of reading 32-bit table value.
MMIO dumps has shown it's done that way for LCN-PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add new chipset support
zero.lin [Wed, 31 Aug 2011 18:43:52 +0000 (20:43 +0200)]
rt2x00: Add new chipset support

Signed-off-by: zero.lin <zero.lin@ralinktech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/cfg80211: add match filtering for sched_scan
Luciano Coelho [Wed, 31 Aug 2011 13:01:48 +0000 (16:01 +0300)]
nl80211/cfg80211: add match filtering for sched_scan

Introduce filtering for scheduled scans to reduce the number of
unnecessary results (which cause useless wake-ups).

Add a new nested attribute where sets of parameters to be matched can
be passed when starting a scheduled scan.  Only scan results that
match any of the sets will be returned.

At this point, the set consists of a single parameter, an SSID.  This
can be easily extended in the future to support more complex matches.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/cfg80211: add WIPHY_FLAG_AP_UAPSD flag
Eliad Peller [Wed, 31 Aug 2011 08:29:43 +0000 (11:29 +0300)]
nl80211/cfg80211: add WIPHY_FLAG_AP_UAPSD flag

add WIPHY_FLAG_AP_UAPSD flag to indicate uapsd support on
AP mode.

Advertise it to userspace by including a new
NL80211_ATTR_SUPPORT_AP_UAPSD attribute.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: signedness bug in iwl_trans_pcie_tx_agg_alloc()
Dan Carpenter [Wed, 31 Aug 2011 06:38:30 +0000 (09:38 +0300)]
iwlwifi: signedness bug in iwl_trans_pcie_tx_agg_alloc()

unsigned shorts and unsigned chars are never == -1.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix double assign in iwl_start_tx_ba_trans_ready()
Dan Carpenter [Wed, 31 Aug 2011 06:37:42 +0000 (09:37 +0300)]
iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready()

"vif" is assigned twice.  We can remove the first one.

This silences a Smatch warning that "ctx" could be one step past the
end of the priv->contexts[] array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix rx latency of 11a mode
Rajkumar Manoharan [Wed, 31 Aug 2011 05:17:30 +0000 (10:47 +0530)]
ath9k_hw: Fix rx latency of 11a mode

Rx latecy to start signal(usec) of 11a is 41 not 37 and
also corrected the rx delay in quarter rate.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: handle allocation failures in mesh_pathtbl_init()
Dan Carpenter [Tue, 30 Aug 2011 19:16:15 +0000 (22:16 +0300)]
mac80211: handle allocation failures in mesh_pathtbl_init()

The calls to kzalloc() weren't checked here and it upsets the static
checkers.  Obviously they're not super likely to fail, but we might
as well add some error handling.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add flag to indicate HW only Tx-agg setup support
Arik Nemtsov [Tue, 30 Aug 2011 06:32:38 +0000 (09:32 +0300)]
mac80211: add flag to indicate HW only Tx-agg setup support

When this flag is set, Tx A-MPDU sessions will not be started by
mac80211. This flag is required for devices that support Tx A-MPDU setup
in hardware.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Remove unnecessary OOM logging messages
Joe Perches [Mon, 29 Aug 2011 21:17:41 +0000 (14:17 -0700)]
wireless: Remove unnecessary OOM logging messages

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorfkill: Remove unnecessary OOM logging messages
Joe Perches [Mon, 29 Aug 2011 21:17:34 +0000 (14:17 -0700)]
rfkill: Remove unnecessary OOM logging messages

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove unnecessary OOM logging messages
Joe Perches [Mon, 29 Aug 2011 21:17:31 +0000 (14:17 -0700)]
mac80211: Remove unnecessary OOM logging messages

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Consolidate mesh path duplicated functions
Javier Cardona [Mon, 29 Aug 2011 20:23:09 +0000 (13:23 -0700)]
mac80211: Consolidate mesh path duplicated functions

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Consolidate {mesh,mpp}_path_flush into one function
Javier Cardona [Mon, 29 Aug 2011 20:23:08 +0000 (13:23 -0700)]
mac80211: Consolidate {mesh,mpp}_path_flush into one function

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Don't iterate twice over all mpaths when once in sufficient
Javier Cardona [Mon, 29 Aug 2011 20:23:07 +0000 (13:23 -0700)]
mac80211: Don't iterate twice over all mpaths when once in sufficient

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove redundant mesh path expiration checks
Javier Cardona [Mon, 29 Aug 2011 20:23:06 +0000 (13:23 -0700)]
mac80211: Remove redundant mesh path expiration checks

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Improve mpath state locking
Javier Cardona [Mon, 29 Aug 2011 20:23:05 +0000 (13:23 -0700)]
mac80211: Improve mpath state locking

No need to take the mpath state lock when an mpath is removed.
Also, no need checking the lock when reading mpath flags.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Remove mesh paths when an interface is removed
Javier Cardona [Mon, 29 Aug 2011 20:23:04 +0000 (13:23 -0700)]
mac80211: Remove mesh paths when an interface is removed

When an interface is removed, the mesh paths associated with it should
also be removed.

This fixes a bug we observed when reloading a device driver module
without reloading mac80211s.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix RCU pointer dereference in mesh_path_discard_frame()
Javier Cardona [Mon, 29 Aug 2011 20:23:03 +0000 (13:23 -0700)]
mac80211: Fix RCU pointer dereference in mesh_path_discard_frame()

Reported by Pedro Larbig (ASPj)

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>