linux-2.6-microblaze.git
13 years agomac80211: fix forwarded mesh frame queue mapping
Thomas Pedersen [Fri, 25 Nov 2011 01:15:23 +0000 (17:15 -0800)]
mac80211: fix forwarded mesh frame queue mapping

We can't rely on ieee80211_select_queue() to do its job at this point
since the skb->protocol is not yet known. Instead, factor out and reuse
the queue mapping logic for injected frames.

Also, to mitigate congestion, forwarded frames should be dropped if the
outgoing queue was stopped.  This was not correctly implemented as we
were not checking the right queue.  Furthermore, we were dropping frames
that had arrived to their destination if that queue was stopped.

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: fix switched HWMP frame addresses
Thomas Pedersen [Fri, 25 Nov 2011 01:15:22 +0000 (17:15 -0800)]
mac80211: fix switched HWMP frame addresses

HWMP originator and target addresses were switched on the air but also
on reception, which is why path selection still worked.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: failed forwarded mesh frame addressing
Thomas Pedersen [Fri, 25 Nov 2011 01:15:21 +0000 (17:15 -0800)]
mac80211: failed forwarded mesh frame addressing

Don't write the TA until next hop is actually known, since we might need
the original TA for sending a PERR. Previously we would send a PERR to
ourself if path resolution for a forwarded frame failed.

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 ago{nl,cfg,mac}80211: Allow Setting Multicast Rate in Mesh
Chun-Yeow Yeoh [Fri, 25 Nov 2011 01:15:20 +0000 (17:15 -0800)]
{nl,cfg,mac}80211: Allow Setting Multicast Rate in Mesh

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agohostap_cs: add ID for Canon K30225
Veli-Pekka Peltola [Thu, 24 Nov 2011 19:35:28 +0000 (21:35 +0200)]
hostap_cs: add ID for Canon K30225

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Make __check_htcap_disable static.
Ben Greear [Thu, 24 Nov 2011 19:15:21 +0000 (11:15 -0800)]
mac80211: Make __check_htcap_disable static.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Remove redundant spi driver bus initialization
Lars-Peter Clausen [Thu, 24 Nov 2011 15:29:20 +0000 (16:29 +0100)]
wireless: Remove redundant spi driver bus initialization

In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_driver_register(),
so we can drop the manual assignment.

The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
struct spi_driver _driver = {
.driver = {
- .bus = &spi_bus_type,
},
};
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Dan Williams <dcbw@redhat.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Luciano Coelho <coelho@ti.com>
Cc: libertas-dev@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: call skb_put() before copying the data (trivial)
Eliad Peller [Thu, 24 Nov 2011 14:50:00 +0000 (16:50 +0200)]
mac80211: call skb_put() before copying the data (trivial)

It doesn't have any actual effect here, but we should
skb_put() *before* copying the data.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix TX warning
Johannes Berg [Thu, 24 Nov 2011 13:47:36 +0000 (14:47 +0100)]
mac80211: fix TX warning

Emmanuel reported that my previous patches to enable
handing all fragments to drivers at once triggered
the warning that the SKB queue wasn't empty. This is
happening when we actually queue up some frames and
don't hand them to the driver (queues are stopped).

The reason for it is that my code that splices the
frame(s) over to the pending queue didn't re-init
the local queue, so skb_queue_empty() was false. Fix
this by using the _init versions of the splicing.

Also, convert the warning to WARN_ON_ONCE.

Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Pass BlockAck and BlackAckReq frames to mac80211 in monitor mode
Helmut Schaa [Thu, 24 Nov 2011 08:13:26 +0000 (09:13 +0100)]
rt2x00: Pass BlockAck and BlackAckReq frames to mac80211 in monitor mode

Previously BlockAcks were always dropped by the rt2800 hardware while
BlockAckReqs were always accepted. However, both are only useful on
monitor interfaces at the moment and both are control frames. So
pass them up when mac80211 sets FIF_CONTROL.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix incorrect return of IRQ_HANDLED
Larry Finger [Thu, 24 Nov 2011 03:30:19 +0000 (21:30 -0600)]
rtlwifi: Fix incorrect return of IRQ_HANDLED

The recent discussion regarding an incorrect return of IRQ_HANDLED
from rt2800pci caused me to look at this PCI interrupt routine. I
discovered that changes were needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: do not pass AP VLAN vif pointers to drivers
Felix Fietkau [Wed, 23 Nov 2011 14:09:49 +0000 (21:09 +0700)]
mac80211: do not pass AP VLAN vif pointers to drivers

This fixes frequent WARN_ONs when using AP VLAN + aggregation, as these vifs
are virtual and not registered with drivers.
Use sta_info_get_bss instead of sta_info_get in aggregation callbacks, so
that these callbacks can find the station entry when called with the AP vif.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: log reason and initiator when rx agg is stopped
Nikolay Martynov [Wed, 23 Nov 2011 02:50:30 +0000 (21:50 -0500)]
mac80211: log reason and initiator when rx agg is stopped

  Add additional debug logging of initiator and reason when rx
aggregation session is stopped

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: trivial: use WLAN_BACK_RECIPIENT instead of hardcoded 0
Nikolay Martynov [Wed, 23 Nov 2011 02:50:29 +0000 (21:50 -0500)]
mac80211: trivial: use WLAN_BACK_RECIPIENT instead of hardcoded 0

  Use WLAN_BACK_RECIPIENT instead of hardcoded 0 for clarity

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: timeout tx agg sessions in way similar to rx agg sessions
Nikolay Martynov [Wed, 23 Nov 2011 02:50:28 +0000 (21:50 -0500)]
mac80211: timeout tx agg sessions in way similar to rx agg sessions

  Currently tx aggregation is not being timed out even if timeout is
specified when aggregation is opened. Tx tid stays active until delba
arrives from recipient (i.e. recipient times out tid when it is
inactive).
  The problem with this approach is that delba can get lost in the air
and tx tid will stay perpetually opened on the originator while closed
on recipient thus all data sent via this tid will be lost.
  This patch implements tx tid timeouting in way very similar to rx tid
timeouting.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: change function bus_stop parameter
Franky Lin [Wed, 23 Nov 2011 01:21:59 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_stop parameter

Change parameter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_stop. This is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: remove function brcmf_bus_get_device
Franky Lin [Wed, 23 Nov 2011 01:21:58 +0000 (17:21 -0800)]
brcm80211: fmac: remove function brcmf_bus_get_device

brcmf_bus_get_device is no longer necessary. Use dongle device pointer
saved in brcmf_pub directly. This is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: change function bus_init parameter
Franky Lin [Wed, 23 Nov 2011 01:21:57 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_init parameter

Change parameter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_init. This is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: change function bus_txdata parameter
Franky Lin [Wed, 23 Nov 2011 01:21:56 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_txdata parameter

Change parameter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_txdata. This is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: change function bus_txctl parameter
Franky Lin [Wed, 23 Nov 2011 01:21:55 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_txctl parameter

Change paramter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_txctl. This is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: change function bus_rxctl parameter
Franky Lin [Wed, 23 Nov 2011 01:21:54 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_rxctl parameter

brcmf_sdbrcm_bus_rxctl acts as an interface function of bus layer.
Change parameter from struct brcmf_sdio to device pointer in order to
provide a more compatible interface for different bus layers. This
is part of the fullmac bus interface refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: stop using brcmf_pub in brcmf_sdbrcm_bus_watchdog
Franky Lin [Wed, 23 Nov 2011 01:21:53 +0000 (17:21 -0800)]
brcm80211: fmac: stop using brcmf_pub in brcmf_sdbrcm_bus_watchdog

structure brcmf_pub contains context for generic layer and should
not be used in brcmf_sdbrcm_bus_watchdog. This patch is part of
fullmac bus interface refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: move busstate to struct brcmf_bus
Franky Lin [Wed, 23 Nov 2011 01:21:52 +0000 (17:21 -0800)]
brcm80211: fmac: move busstate to struct brcmf_bus

busstate keeps track of the bus (USB/SDIO) status and is used by
both generic layer and bus layer. Move it to brcmf_bus helps to clean
up the interface. This patch is part of fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: introduce common bus interface struct brcmf_bus
Franky Lin [Wed, 23 Nov 2011 01:21:51 +0000 (17:21 -0800)]
brcm80211: fmac: introduce common bus interface struct brcmf_bus

struct brcmf_bus will contain function porinter, bus specific
private structure pointer and interface context of generic layer
and bus layer. It will be the only shared structure between generic
and bus layer. This patch is part of fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: rename structure brcmf_bus to brcmf_sdio
Franky Lin [Wed, 23 Nov 2011 01:21:50 +0000 (17:21 -0800)]
brcm80211: fmac: rename structure brcmf_bus to brcmf_sdio

Rename sdio bus structure brcmf_bus to brcmf_sdio for preparation
of USB bus support. This patch is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: remove unused parameter of brcmf_sdbrcm_probe
Franky Lin [Wed, 23 Nov 2011 01:21:49 +0000 (17:21 -0800)]
brcm80211: fmac: remove unused parameter of brcmf_sdbrcm_probe

bus_no, slot, func and bustype are no longer needed by brcmf_sdbrcm_probe.
This patch removes them.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: remove function brcmf_c_init
Franky Lin [Wed, 23 Nov 2011 01:21:48 +0000 (17:21 -0800)]
brcm80211: fmac: remove function brcmf_c_init

brcmf_c_init only init brcmf_msg_level used for debug. It's no longer
needed as brcmf_msg_level doesn't cause trouble to multiple instances.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: move module init/exit to sdio layer
Franky Lin [Wed, 23 Nov 2011 01:21:47 +0000 (17:21 -0800)]
brcm80211: fmac: move module init/exit to sdio layer

This patch is part of the fullmac bus interface refactoring series.
It moves the module init/exit code to bus layer.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: discard packet received when net device not registered
Franky Lin [Wed, 23 Nov 2011 01:21:46 +0000 (17:21 -0800)]
brcm80211: fmac: discard packet received when net device not registered

A new feature in the dongle firmware requires a handshake during
firmware intialization. The request is sent in event packets which the
host driver is not able to handle before any net device registered.
Discard those packets as the context for handling it is missing.
The initialization handler will be added as part of feature support
code in the future.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: rename wait queue name to match using function
Arend van Spriel [Wed, 23 Nov 2011 01:21:45 +0000 (17:21 -0800)]
brcm80211: fmac: rename wait queue name to match using function

The wait queue request_packet_wait was used in request_chain function
and for sake of consistency it has been renamed to request_chain_wait.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer()
Arend van Spriel [Wed, 23 Nov 2011 01:21:44 +0000 (17:21 -0800)]
brcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer()

The check for alignment is not valid anymore and can be removed. The
function is collapsed with brcmf_sdioh_request_packet() as a consequence
because it did not add much functionality any longer.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: smac: added support for mac80211 filter flags
Alwin Beukers [Wed, 23 Nov 2011 01:21:43 +0000 (17:21 -0800)]
brcm80211: smac: added support for mac80211 filter flags

Added support for handling FIF_PROMISC_IN_BSS, FIF_FCSFAIL,
FIF_CONTROL, FIF_OTHER_BSS and FIF_PSPOLL.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: smac: fix channel frequency
Alwin Beukers [Wed, 23 Nov 2011 01:21:42 +0000 (17:21 -0800)]
brcm80211: smac: fix channel frequency

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: change firmware/nvram name to be more generic
Franky Lin [Wed, 23 Nov 2011 01:21:41 +0000 (17:21 -0800)]
brcm80211: fmac: change firmware/nvram name to be more generic

The nvram file contains info for firmware which varies with different
hardware designs. Use more common firmware/nvram file names instead
of those in Linux firmware repository to avoid misunderstanding.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: simplify the brcmf_sdioh_request_buffer() function
Arend van Spriel [Wed, 23 Nov 2011 01:21:40 +0000 (17:21 -0800)]
brcm80211: fmac: simplify the brcmf_sdioh_request_buffer() function

The function is only called with sk_buff parameter being non-zero so
the prototype does not need to support passing a char buffer any longer.
When the function is called with a NULL sk_buff parameter it returns
-EINVAL now.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: remove width parameter from brcmf_sdioh_request_buffer
Arend van Spriel [Wed, 23 Nov 2011 01:21:39 +0000 (17:21 -0800)]
brcm80211: fmac: remove width parameter from brcmf_sdioh_request_buffer

The function brcmf_sdioh_request_buffer() was requiring a parameter in
its prototype that was not used within the function. It has been
removed consequently.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: separate receiving skb chain from other receive path
Arend van Spriel [Wed, 23 Nov 2011 01:21:38 +0000 (17:21 -0800)]
brcm80211: fmac: separate receiving skb chain from other receive path

In the receive path the buffer used to store the receive data from the
device can be a chain of sk_buff. It has been separated to allow the
use of skb queues.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: smac: remove skb next pointer usage from the driver
Arend van Spriel [Wed, 23 Nov 2011 01:21:37 +0000 (17:21 -0800)]
brcm80211: smac: remove skb next pointer usage from the driver

In two places the next pointer was used to process a sk_buff chain
but it will always get a single sk_buff so this has been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcm80211: fmac: cleanup receive path using proper skb_queue functions
Arend van Spriel [Wed, 23 Nov 2011 01:21:36 +0000 (17:21 -0800)]
brcm80211: fmac: cleanup receive path using proper skb_queue functions

In the receive path there was still code using the next pointer to
access all packets in skb_queue. This patch fixes that.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: don't indicate probe resp change in IBSS mode
Arik Nemtsov [Tue, 22 Nov 2011 17:33:18 +0000 (19:33 +0200)]
mac80211: don't indicate probe resp change in IBSS mode

Due the a fall-through in the switch statement, the IBSS mode got a
report for AP_RPOBE_RESPONSE change on reconfig. Change this to an AP
only notification.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: cosmetic change in calibration debug log
Mohammed Shafi Shajakhan [Tue, 22 Nov 2011 14:45:56 +0000 (20:15 +0530)]
ath9k_hw: cosmetic change in calibration debug log

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix minimum CTL power for each runtime mode
Rajkumar Manoharan [Tue, 22 Nov 2011 13:22:00 +0000 (18:52 +0530)]
ath9k_hw: Fix minimum CTL power for each runtime mode

The conformance test limits (CTL) for each regulatory domains
(FCC/ETSI/MKK) are programmed for each runtime modes (11B,11G,
HT20 and HT40) in EEPROM. The lowest ctledge power value of a
particular running mode should not be used while computing
ctledge power for a different running mode.(i.e 11G's min ctledge
power should not be used while computing ctledge power for HT20).

Currently, the code does not handle this properly which would
result in incorrect txpowers in certain cases. So reset the
twiceMaxEdgePower to the default while computing min ctlegepower
for every mode.

Cc: David Quan <dquan@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: improve ath_tx_aggr_stop to avoid TID stuck in cleanup state
Nikolay Martynov [Mon, 21 Nov 2011 22:32:06 +0000 (17:32 -0500)]
ath9k: improve ath_tx_aggr_stop to avoid TID stuck in cleanup state

When tx agg is being stopped TID is flushed using ath_tx_flush_tid. It
is possible that ath_tx_flush_tid completelly flushes TID (if all
packets in this TID have already been retried). If this happened
ath_tx_aggr_stop would leave TID in cleanup state permanently.
Fix this by making ath_tx_flush_tid remove AGGR_ADDBA_COMPLETE and
AGGR_CLEANUP flags from TID status if TID is empty.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: dereference RCU protected probe_resp pointer correctly
Arik Nemtsov [Sat, 19 Nov 2011 08:51:26 +0000 (10:51 +0200)]
mac80211: dereference RCU protected probe_resp pointer correctly

This fixes a sparse warning:

cfg.c:502:13: warning: incorrect type in assignment (different address spaces)
cfg.c:502:13:    expected struct sk_buff *old
cfg.c:502:13:    got struct sk_buff [noderef] <asn:4>*probe_resp

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix duration calculation for QoS NOACK frames
Simon Wunderlich [Mon, 21 Nov 2011 20:34:30 +0000 (21:34 +0100)]
mac80211: fix duration calculation for QoS NOACK frames

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Add NoAck per tid support
Simon Wunderlich [Fri, 18 Nov 2011 13:20:44 +0000 (14:20 +0100)]
mac80211: Add NoAck per tid support

This patch contains the processing changes in mac80211.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Add NoAck per tid support
Simon Wunderlich [Fri, 18 Nov 2011 13:20:43 +0000 (14:20 +0100)]
wireless: Add NoAck per tid support

This patch contains the configuration changes in nl80211/cfg80211.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove debugfs noack test
Simon Wunderlich [Fri, 18 Nov 2011 13:20:42 +0000 (14:20 +0100)]
mac80211: remove debugfs noack test

This feature has been superseded by the NoAck per Queue feature.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: squash warning in _usb_read_sync
John W. Linville [Mon, 21 Nov 2011 21:37:26 +0000 (16:37 -0500)]
rtlwifi: squash warning in _usb_read_sync

drivers/net/wireless/rtlwifi/usb.c: In function ‘_usb_read_sync’:
drivers/net/wireless/rtlwifi/usb.c:102:6: warning: ‘status’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/usb.c:102:6: note: ‘status’ was declared here

My compiler is dumb, but better to eliminate the warning than to have
anyone waste time evaluating this again...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
John W. Linville [Tue, 22 Nov 2011 19:05:46 +0000 (14:05 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux

Conflicts:
drivers/net/wireless/iwlegacy/iwl-debugfs.c
drivers/net/wireless/iwlegacy/iwl-rx.c
drivers/net/wireless/iwlegacy/iwl-scan.c
drivers/net/wireless/iwlegacy/iwl-tx.c
include/net/bluetooth/bluetooth.h

13 years agomac80211: fix RCU warnings in mesh
Johannes Berg [Mon, 21 Nov 2011 10:23:50 +0000 (11:23 +0100)]
mac80211: fix RCU warnings in mesh

Sparse RCU checking reports two warnings in the mesh
path table code. These are due to questionable uses of
rcu_dereference.

To fix the first one, get rid of mesh_gate_add() and
just make mesh_path_add_gate() do the correct deref.

To fix the second one, simply remove rcu_dereference()
in mesh_gate_del() -- it already gets a proper pointer
as indicated by the prototype (no __rcu annotation)
and confirmed by the code.

Cc: Javier Cardona <javier@cozybit.com>
Cc: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: work around a sparse issue
Johannes Berg [Mon, 21 Nov 2011 10:09:22 +0000 (11:09 +0100)]
cfg80211: work around a sparse issue

sparse reports:
net/wireless/util.c:499:30: error: cannot size expression
net/wireless/util.c:503:30: error: cannot size expression

This is evidently due to the EXPORT_SYMBOL() of the
bridge_tunnel_header and rfc1042 header variables.
Move them to the end of the file to work around the
sparse issue. The error itself from sparse can be
ignored safely, but since sparse stops parsing at
errors, other issues after this would go undetected.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: use ieee80211_free_txskb
Christian Lamparter [Sat, 19 Nov 2011 18:30:20 +0000 (19:30 +0100)]
carl9170: use ieee80211_free_txskb

In the past, it was fine to simply call
dev_kfree_skb when it was impossible to
transmit a skb. However, with the new
tx status API:
"mac80211: implement wifi TX status"
Every loose skb needs to be handed back
to mac80211.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54: use ieee80211_free_txskb
Christian Lamparter [Sat, 19 Nov 2011 18:25:02 +0000 (19:25 +0100)]
p54: use ieee80211_free_txskb

In the past, it was fine to simply call
dev_kfree_skb when it was impossible to
transmit a skb. However, with the new
tx status API:
"mac80211: implement wifi TX status"
Every loose skb needs to be handed back
to mac80211.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: remove unused macro
Jussi Kivilinna [Sat, 19 Nov 2011 11:04:26 +0000 (13:04 +0200)]
rndis_wlan: remove unused macro

NET_TYPE_11FB actually has never been used.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: add reporting of PMKSA candidate events
Jussi Kivilinna [Sat, 19 Nov 2011 11:04:21 +0000 (13:04 +0200)]
rndis_wlan: add reporting of PMKSA candidate events

Convert old WEXT reporting to use new cfg80211_pmksa_candidate_notify().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: add missing __packed
Jussi Kivilinna [Sat, 19 Nov 2011 11:04:16 +0000 (13:04 +0200)]
rndis_wlan: add missing __packed

Some structures were missing __packed.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: pass channel info to cfg80211_roamed()
Jussi Kivilinna [Sat, 19 Nov 2011 11:04:11 +0000 (13:04 +0200)]
rndis_wlan: pass channel info to cfg80211_roamed()

cfg80211_roamed() now has channel parameter so add passing current channel
info.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: split getting current channel to separate function
Jussi Kivilinna [Sat, 19 Nov 2011 11:04:05 +0000 (13:04 +0200)]
rndis_wlan: split getting current channel to separate function

Split getting current channel channel from hardware to separate function
as this function will be needed later in patch 'pass channel info to
cfg80211_roamed()'.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Support ht-cap over-rides.
Ben Greear [Fri, 18 Nov 2011 19:32:00 +0000 (11:32 -0800)]
mac80211: Support ht-cap over-rides.

This implements ht-cap over-rides for mac80211 drivers.
HT may be disabled, making an /a/b/g/n station act like an
a/b/g station.  HT40 may be disabled forcing the station to
be HT20 even if the AP and local hardware support HT40.

MAX-AMSDU may be disabled.
AMPDU-Density may be increased.
AMPDU-Factor may be decreased.

This has been successfully tested with ath9k using patched
wpa_supplicant and iw.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Support ht-capabilities over-rides.
Ben Greear [Fri, 18 Nov 2011 19:31:59 +0000 (11:31 -0800)]
wireless: Support ht-capabilities over-rides.

This allows users to disable features such as HT, HT40,
and to modify the MCS, AMPDU, and AMSDU settings for
drivers that support it.

The MCS, AMPDU, and AMSDU features that may be disabled are
are reported in the phy-info netlink message as a mask.

Attemping to disable features that are not supported will
take no affect, but will not return errors.  This is to aid
backwards compatibility in user-space apps that may not be
clever enough to deal with parsing the the capabilities mask.

This patch only enables the infrastructure.  An additional
patch will enable the feature in mac80211.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/mac80211: Revert "move information element parsing logic to cfg80211"
Johannes Berg [Fri, 18 Nov 2011 15:54:50 +0000 (16:54 +0100)]
cfg80211/mac80211: Revert "move information element parsing logic to cfg80211"

No other driver ever ended up using this, and
the commit forgot to move the prototype so no
driver could have used it. Revert it, if any
driver shows up and needs it it can be moved
again, but until then it's more efficient to
have it in mac80211 where the only user is.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: make get_vlan logic more common
Johannes Berg [Fri, 18 Nov 2011 15:23:01 +0000 (16:23 +0100)]
nl80211: make get_vlan logic more common

get_vlan() sets the output parameter even if it
returns an error, which is a bit odd. Instead,
convert it to use ERR_PTR.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: add flags for off-channel capabilities
Johannes Berg [Fri, 18 Nov 2011 14:33:48 +0000 (15:33 +0100)]
cfg80211: add flags for off-channel capabilities

Currently mac80211 implements these for all devices,
but given restrictions of some devices that isn't
really true, so prepare for being able to remove the
capability for some mac80211 devices.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: minor cleanup to mesh state locking
Johannes Berg [Fri, 18 Nov 2011 14:27:31 +0000 (15:27 +0100)]
mac80211: minor cleanup to mesh state locking

First time I tried smatch, and it says:
mesh_hwmp.c +870 mesh_queue_preq(21) error: double lock 'bottom_half:'
mesh_hwmp.c +873 mesh_queue_preq(24) error: double unlock 'bottom_half:'
mesh_hwmp.c +886 mesh_queue_preq(37) error: double unlock 'bottom_half:'

Which is indeed true -- there's no point in disabling BHs
again if we just did that a few lines earlier, so remove.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwl-debug: Shrink object by using dev_err and deduplicating formats
Joe Perches [Fri, 18 Nov 2011 01:46:15 +0000 (17:46 -0800)]
iwl-debug: Shrink object by using dev_err and deduplicating formats

Using dev_err instead of dev_printk(KERN_ERR uses fewer
arguments and is a bit smaller.

Deduplicating formats used by IWL_DEBUG_QUIET_RFKILL also
makes the object a bit smaller.

Neatened the macros, used ##__VA_ARGS__.

$ size drivers/net/wireless/iwlwifi/built-in.o*
   text    data     bss     dec     hex filename
 462652    8646   92576  563874   89aa2 drivers/net/wireless/iwlwifi/built-in.o.new
 467557    8646   92592  568795   8addb drivers/net/wireless/iwlwifi/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: remove redundancy
Wey-Yi Guy [Fri, 18 Nov 2011 00:05:13 +0000 (16:05 -0800)]
iwlwifi: remove redundancy

just use iwl_bus, remove the redundancy

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: tid_data is taken twice in iwl_trans_pcie_tx_agg_alloc
Emmanuel Grumbach [Fri, 18 Nov 2011 00:05:12 +0000 (16:05 -0800)]
iwlwifi: tid_data is taken twice in iwl_trans_pcie_tx_agg_alloc

Remove this redundancy.

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 agoiwlwifi: fix endianity issues in debug prints
Emmanuel Grumbach [Fri, 18 Nov 2011 00:05:11 +0000 (16:05 -0800)]
iwlwifi: fix endianity issues in debug prints

Use the CPUed version of the variables when printing data from the
BA notification.

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 agoiwlwifi: improve the prints in the reclaim path
Emmanuel Grumbach [Fri, 18 Nov 2011 00:05:10 +0000 (16:05 -0800)]
iwlwifi: improve the prints in the reclaim path

Some information was redundation, other was missing.

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 agoiwlwifi: check the HW when a queue is stuck
Emmanuel Grumbach [Fri, 18 Nov 2011 00:05:09 +0000 (16:05 -0800)]
iwlwifi: check the HW when a queue is stuck

Add more information when a queue is stuck and actually get
information from the scheduler instead of looking at internal
variables.

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 agobrcm80211: smac: Use kmemdup rather than duplicating its implementation
Thomas Meyer [Thu, 17 Nov 2011 22:43:40 +0000 (23:43 +0100)]
brcm80211: smac: Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Acked-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Remove redundant code from PCI interrupt
Larry Finger [Thu, 17 Nov 2011 18:14:45 +0000 (12:14 -0600)]
rtlwifi: Remove redundant code from PCI interrupt

The interrupt routine for PCI devices has a special exit that
executes the same instructions as does the normal exit.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192cu: Fix endianian issues
Larry Finger [Thu, 17 Nov 2011 18:14:44 +0000 (12:14 -0600)]
rtlwifi: rtl8192cu: Fix endianian issues

Driver rtlwifi fails on a big-endian host.

These changes have been tested on a Mac PowerBook G4, which has
a PPC processor.

Although this patch touches some of the code that will affect endian
issues on PCI hardware through drivers rtl8192ce, rtl8192se, and
rtl8192de, these have not been tested due to lack of suitable hardware.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192cu: Change firmware upload to use block writes
Larry Finger [Thu, 17 Nov 2011 18:14:43 +0000 (12:14 -0600)]
rtlwifi: rtl8192cu: Change firmware upload to use block writes

Driver rtl8192cu writes the firmware with 32-bit asynchronous writes. This
design is OK for USB 2.0 adapters, but the current implementation of
xhcu-hcd has a limited ring size, which is exceeded. By converting to
synchronous block writes, this error is avoided.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192cu: Allow retries for USB I/O
George [Thu, 17 Nov 2011 18:14:42 +0000 (12:14 -0600)]
rtlwifi: rtl8192cu: Allow retries for USB I/O

The USB driver does not retry reads - allow 10 tries.

Signed-off-by: George <george0505@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: add testmode to the list of supported commands
Kalle Valo [Thu, 17 Nov 2011 17:06:10 +0000 (19:06 +0200)]
nl80211: add testmode to the list of supported commands

User space might want to test if driver supports testmode. Adding testmode
to the list of supported commands makes this easier.

I omitted testmode_dump() in purpose. I assume all drivers implementing
testmode_dump() will also implement testmode_cmd().

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove unused ASSOC_AP flag
Johannes Berg [Thu, 17 Nov 2011 15:23:29 +0000 (16:23 +0100)]
mac80211: remove unused ASSOC_AP flag

WLAN_STA_ASSOC_AP indicates that the station entry
is for an AP we're associated to but isn't used so
remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: transmit fragment list to drivers
Johannes Berg [Wed, 16 Nov 2011 15:02:47 +0000 (16:02 +0100)]
mac80211: transmit fragment list to drivers

Drivers can usually handle fragmented packets
much easier when they get the entire list of
fragments at once. The only thing they need to
do is keep enough space on the queues for up
to ten fragments of a single MSDU.

This allows them to implement this with a new
operation tx_frags.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: make TX LED handling independent of fragmentation
Johannes Berg [Wed, 16 Nov 2011 14:28:57 +0000 (15:28 +0100)]
mac80211: make TX LED handling independent of fragmentation

This just prepares for passing the entire fragment
list to the driver. No significant changes, but the
TX throughput is calculated slightly differently
now and we blink only once for each MSDU.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: move fragment flag adjustment
Johannes Berg [Wed, 16 Nov 2011 14:28:56 +0000 (15:28 +0100)]
mac80211: move fragment flag adjustment

Instead of adjusting the fragment flags at
TX time, adjust them at fragmentation time.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: use skb list for fragments
Johannes Berg [Wed, 16 Nov 2011 14:28:55 +0000 (15:28 +0100)]
mac80211: use skb list for fragments

We are currently linking the skbs by using skb->next
directly. This works, but the preferred way is to use
a struct sk_buff_head instead. That also prepares for
passing that to drivers directly.

While at it I noticed we calculate the duration for
fragments twice -- remove one of them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: trivial: reorder rx_tasklet processing
Zefir Kurtisi [Wed, 16 Nov 2011 10:09:44 +0000 (11:09 +0100)]
ath9k: trivial: reorder rx_tasklet processing

DFS events are reported as PHY errors and need to be processed
with a correct timestamp set before ath9k_skb_preprocess() is
called and the frame is possibly dropped.

This patch puts the rxs->mactime calculation before the skb
is preprocessed to prepare for DFS event reporting.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: pass DFS region to drivers through reg_notifier()
Luis R. Rodriguez [Tue, 11 Oct 2011 17:59:03 +0000 (10:59 -0700)]
cfg80211: pass DFS region to drivers through reg_notifier()

This grants drivers access to the DFS region that a
regulatory domain belongs to.

Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: process regulatory DFS region for countries
Luis R. Rodriguez [Tue, 11 Oct 2011 17:59:02 +0000 (10:59 -0700)]
cfg80211: process regulatory DFS region for countries

The wireless-regdb now has support for mapping a country to
one DFS region. CRDA sends this to us now so process it
so we can provide that hint to drivers. This will later be
used by code for processing DFS in a way that meets the
criteria for the DFS region the country belongs to.

Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'for-linville' of git://github.com/sgruszka/iwlegacy
John W. Linville [Mon, 21 Nov 2011 21:00:56 +0000 (16:00 -0500)]
Merge branch 'for-linville' of git://github.com/sgruszka/iwlegacy

13 years agomwifiex: add support for Marvell sd8797 device
Bing Zhao [Thu, 17 Nov 2011 04:40:35 +0000 (20:40 -0800)]
mwifiex: add support for Marvell sd8797 device

This patch supports Marvell chipset 88W8797 (Avastar) with
SDIO interface.

The corresponding firmware image file is located at:
"mrvl/sd8797_uapsta.bin"

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54spi: Remove FIXME in op_stop
Michael Büsch [Wed, 16 Nov 2011 22:51:20 +0000 (23:51 +0100)]
p54spi: Remove FIXME in op_stop

Don't use the interruptible variant of mutex_lock(). It doesn't really
need to be interruptible. This avoids nasty error handling.

Signed-off-by: Michael Buesch <m@bues.ch>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: call ieee80211_recalc_idle() after sending packets
Felix Fietkau [Wed, 16 Nov 2011 12:34:55 +0000 (13:34 +0100)]
mac80211: call ieee80211_recalc_idle() after sending packets

Some drivers (e.g. ath9k) assume that it's safe to go into low-power mode
immediately after the idle state changes. To support that, mac80211 even
calls drv_flush() before that happens.
In some instances, mac80211 sent a packet right after recalculating the
idle state, this patch fixes that.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: use strlcpy routine in .get_drvinfo
Rick Jones [Tue, 15 Nov 2011 18:40:49 +0000 (10:40 -0800)]
wireless: use strlcpy routine in .get_drvinfo

Convert various seemingly still compiled wireless drivers' .get_drvinfo
routines to use the preferred strlcpy() routine.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agominstrel_ht: Remove unused function parameters
Patrick Kelle [Tue, 15 Nov 2011 15:44:48 +0000 (16:44 +0100)]
minstrel_ht: Remove unused function parameters

Remove unused function parameters in the following functions:
minstrel_calc_rate_ewma()
minstrel_ht_calc_tp()
minstrel_aggr_check()
minstrel_ht_set_rate()

Signed-off-by: Patrick Kelle <patrick.kelle81@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: memory leak in mesh_queue_preq()
Dan Carpenter [Tue, 15 Nov 2011 06:33:31 +0000 (09:33 +0300)]
mac80211: memory leak in mesh_queue_preq()

We recently introduced a return here, but we need to call kfree
first.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: use kfree_skb() instead of kfree()
Dan Carpenter [Tue, 15 Nov 2011 06:33:09 +0000 (09:33 +0300)]
mac80211: use kfree_skb() instead of kfree()

sk_buff structs should be freed using kfree_skb().

This was introduced recently in 029458212 "mac80211: Save probe
response data for bss".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Get rid of search loop for rate group index
Helmut Schaa [Mon, 14 Nov 2011 14:28:20 +0000 (15:28 +0100)]
mac80211: Get rid of search loop for rate group index

Finding the group index for a specific rate is done by looping through
all groups and returning if the correct one is found. This code is
called for each tx'ed frame and thus it makes sense to reduce its
runtime.

Do this by calculating the group index by this formula based on the SGI
and HT40 flags as well as the stream number:

idx = (HT40 * 2 * MINSTREL_MAX_STREAMS) +
      (SGI * MINSTREL_MAX_STREAMS) +
      (streams - 1)

Hence, the groups are ordered by th HT40 flag first, then by the SGI
flag and afterwards by the number of used streams.

This should reduce the runtime of minstrel_ht_get_group_idx
considerable.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Check rate->idx before rate->count
Helmut Schaa [Mon, 14 Nov 2011 14:28:19 +0000 (15:28 +0100)]
mac80211: Check rate->idx before rate->count

The drivers are not required to fill in rate->count if rate->idx is set
to -1. Hence, we should first check rate->idx before accessing
rate->count.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove crypto special case for auth frames
Johannes Berg [Mon, 14 Nov 2011 14:02:44 +0000 (15:02 +0100)]
mac80211: remove crypto special case for auth frames

The shared key authentication frame that needs to be
encrypted (the third one in the shared key handshake)
is directly encrypted in ieee80211_send_auth and the
IEEE80211_TX_INTFL_DONT_ENCRYPT is set. All others
are not encrypted, so the only way to get to this is
erroneously on no-monitor AP side.

Remove the special case for authentication frames to
fix the AP shared key side when operating without
cooked monitor interfaces -- with cooked monitor the
IEEE80211_TX_INTFL_DONT_ENCRYPT also gets set, so we
never get here -- an AP never encrypts auth frames.

Without this patch, an AP operating in WEP mode with
my no-monitor patches would erroneously encrypt all
authentication frames, instead of none.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobrcmsmac: Use current logging styles
Joe Perches [Sun, 13 Nov 2011 19:41:04 +0000 (11:41 -0800)]
brcmsmac: Use current logging styles

Add and use pr_fmt and pr_<level>
Remove useless double parentheses from macros.
Remove function names from format strings, add to pr_debug use.
Coalesce formats.
Remove uncompileable undeclared variable in a DMA_NONE use.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoNFC: Fix indentation in nci.h file
Ilan Elias [Sun, 13 Nov 2011 08:14:30 +0000 (10:14 +0200)]
NFC: Fix indentation in nci.h file

Fix indentation in nci.h file.

Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: set btcoex weights for AR9462
Rajkumar Manoharan [Sat, 12 Nov 2011 14:05:48 +0000 (19:35 +0530)]
ath9k_hw: set btcoex weights for AR9462

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Cleanup btcoex wlan weights
Rajkumar Manoharan [Sat, 12 Nov 2011 14:05:47 +0000 (19:35 +0530)]
ath9k_hw: Cleanup btcoex wlan weights

Remove all wlan weight macros and group it together for better
understanding & readability. It makes the code reusable for
AR9462 wlan weights.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>