openwrt/staging/blogic.git
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Mon, 11 Jul 2011 18:46:59 +0000 (14:46 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/ath/ath5k/sysfs.c
net/bluetooth/l2cap_core.c
net/mac80211/wpa.c

13 years agoath9k_htc: Inform stack about tx ack status
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:03 +0000 (18:12 +0530)]
ath9k_htc: Inform stack about tx ack status

Recent firmware changes report tx ack status properly
to driver. Hence updating ath9k_htc driver capabilities.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Remove read-only registers from AR9003 intervals
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:02 +0000 (18:12 +0530)]
ath9k_hw: Remove read-only registers from AR9003 intervals

This patch removes read only registers that cause invalid
address access and also updates index for measurement filter
calibration window size.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Disable power detector calibration for AR9003
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:01 +0000 (18:12 +0530)]
ath9k_hw: Disable power detector calibration for AR9003

The power detector calibration is disabled because this block
doesn't exist in AR9003 based chips and also parallel
calibration is enabled otherwise the calibration will never stop.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Update AR9003 interval to improve 5G Tx EVM
Rajkumar Manoharan [Fri, 8 Jul 2011 12:42:00 +0000 (18:12 +0530)]
ath9k_hw: Update AR9003 interval to improve 5G Tx EVM

The number of temperature reading samples to average
during a Tx packet is decreased to 1 from 2 to improve
5G Tx EVM with chain 0-only mode.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: return -ENOENT when stopping sched_scan while not running
Luciano Coelho [Fri, 8 Jul 2011 08:16:16 +0000 (11:16 +0300)]
cfg80211: return -ENOENT when stopping sched_scan while not running

If we try to stop a scheduled scan while it is not running, we should
return -ENOENT instead of simply ignoring the command and returning
success.  This is more consistent with other parts of the code.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Disable PAPRD based on paprd_ht20_mask for 5GHz
Mohammed Shafi Shajakhan [Fri, 8 Jul 2011 07:31:32 +0000 (13:01 +0530)]
ath9k_hw: Disable PAPRD based on paprd_ht20_mask for 5GHz

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: 4-byte alignment in mwifiex_process_sta_txpd()
Yogesh Ashok Powar [Fri, 8 Jul 2011 00:37:09 +0000 (17:37 -0700)]
mwifiex: 4-byte alignment in mwifiex_process_sta_txpd()

In XMIT path, the skb that we get from the kernel itself is not
aligned with 4-byte boundary on some embedded platforms.

Had it not been the presence of tx_pkt_offset field in txpd, 4 byte
memory alignment was not possible without memmove of entire skb.
And that would have increased MIPS instead of reducing.

With this patch few memory cycles can be saved while fetching
interface header and txpd structure because of 4 bytes memory
alignment.

Reported-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Tested-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: fix minor issue in debugfs command 'info'
Amitkumar Karwar [Fri, 8 Jul 2011 00:33:20 +0000 (17:33 -0700)]
mwifiex: fix minor issue in debugfs command 'info'

Debugfs command 'info' shows wrong interface type. The regression
occurred due to commit eecd8250e (mwifiex: remove MWIFIEX_BSS_MODE_
macros) in which we replaced MWIFIEX_BSS_MODE_* macros by
NL80211_IFTYPE_*, for example,

MWIFIEX_BSS_MODE_IBSS (2) --> NL80211_IFTYPE_ADHOC (1)

The issue is fixed by swapping static character array used to
display interface type information.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: fix regression in WEP security mode
Amitkumar Karwar [Fri, 8 Jul 2011 00:33:19 +0000 (17:33 -0700)]
mwifiex: fix regression in WEP security mode

Htcapinfo is unnecessarily sent in assoc request in WEP security due
to a regression introduced by commit 2be50b8df53 (mwifiex: remove
redundant encryption_mode mapping).
The issue is fixed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: read sc->imask with sc->irqlock held
Pavel Roskin [Thu, 7 Jul 2011 22:14:25 +0000 (18:14 -0400)]
ath5k: read sc->imask with sc->irqlock held

Signed-off-by: Pavel Roskin <proski@gnu.org>
sc->imask may change if ath5k_set_current_imask() races against itself.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: use kstrtoint() to parse numbers coming from sysfs
Pavel Roskin [Thu, 7 Jul 2011 22:14:19 +0000 (18:14 -0400)]
ath5k: use kstrtoint() to parse numbers coming from sysfs

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix formatting errors found by checkpatch.pl
Pavel Roskin [Thu, 7 Jul 2011 22:14:13 +0000 (18:14 -0400)]
ath5k: fix formatting errors found by checkpatch.pl

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix misplaced or extraneous braces found by checkpatch.pl
Pavel Roskin [Thu, 7 Jul 2011 22:14:07 +0000 (18:14 -0400)]
ath5k: fix misplaced or extraneous braces found by checkpatch.pl

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: use parentheses around macro definitions
Pavel Roskin [Thu, 7 Jul 2011 22:14:01 +0000 (18:14 -0400)]
ath5k: use parentheses around macro definitions

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: don't use volatile, it's not needed
Pavel Roskin [Thu, 7 Jul 2011 22:13:55 +0000 (18:13 -0400)]
ath5k: don't use volatile, it's not needed

Signed-off-by: Pavel Roskin <proski@gnu.org>
The reg variable is only used by __raw_writel() and __raw_readl(), which
should guarantee memory access in the right order.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: use more readable way to clear MAC address
Pavel Roskin [Thu, 7 Jul 2011 22:13:48 +0000 (18:13 -0400)]
ath5k: use more readable way to clear MAC address

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: use DEFINE_PCI_DEVICE_TABLE in led.c, mark users with __devinit
Pavel Roskin [Thu, 7 Jul 2011 22:13:42 +0000 (18:13 -0400)]
ath5k: use DEFINE_PCI_DEVICE_TABLE in led.c, mark users with __devinit

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: use KERN_WARNING in ATH5K_PRINTF
Pavel Roskin [Thu, 7 Jul 2011 22:13:36 +0000 (18:13 -0400)]
ath5k: use KERN_WARNING in ATH5K_PRINTF

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: remove unneeded parentheses after return
Pavel Roskin [Thu, 7 Jul 2011 22:13:30 +0000 (18:13 -0400)]
ath5k: remove unneeded parentheses after return

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: replace spaces with tabs as suggested by checkpatch.pl
Pavel Roskin [Thu, 7 Jul 2011 22:13:24 +0000 (18:13 -0400)]
ath5k: replace spaces with tabs as suggested by checkpatch.pl

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: remove PRIV_ENTRY and PRIV_ASSIGN macros, they obfuscate the code
Pavel Roskin [Thu, 7 Jul 2011 22:13:17 +0000 (18:13 -0400)]
ath5k: remove PRIV_ENTRY and PRIV_ASSIGN macros, they obfuscate the code

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: Implement tx_frames_pending mac80211 callback function
Christian Lamparter [Thu, 7 Jul 2011 21:01:25 +0000 (23:01 +0200)]
carl9170: Implement tx_frames_pending mac80211 callback function

Implementing this callback function will cause mac80211 refrain from
going to powersave state when there are still untransmitted TX frames
in the queues.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet/b43: don't return IRQ_HANDLED if nothing was done
Sebastian Andrzej Siewior [Thu, 7 Jul 2011 19:58:10 +0000 (21:58 +0200)]
net/b43: don't return IRQ_HANDLED if nothing was done

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: define dummy TX power functions
Rafał Miłecki [Thu, 7 Jul 2011 18:06:56 +0000 (20:06 +0200)]
b43: HT-PHY: define dummy TX power functions

Without them we get Oops with NULL pointer

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Restart STA timers only on associated state
Rajkumar Manoharan [Thu, 7 Jul 2011 18:03:39 +0000 (23:33 +0530)]
mac80211: Restart STA timers only on associated state

A panic was observed when the device is failed to resume properly,
and there are no running interfaces. ieee80211_reconfig tries
to restart STA timers on unassociated state.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: do not configure filter before driver is started
Rajkumar Manoharan [Thu, 7 Jul 2011 18:03:38 +0000 (23:33 +0530)]
ath9k_htc: do not configure filter before driver is started

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY: include new PHY in common code
Rafał Miłecki [Thu, 7 Jul 2011 16:58:25 +0000 (18:58 +0200)]
b43: LCN-PHY: include new PHY in common code

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: define firmwares for HT and LCN PHYs
Rafał Miłecki [Thu, 7 Jul 2011 16:58:24 +0000 (18:58 +0200)]
b43: define firmwares for HT and LCN PHYs

We were uploading different firmwares to the hardware until finding
responding one.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow driver to generate P1K for IV32
Johannes Berg [Thu, 7 Jul 2011 16:58:01 +0000 (18:58 +0200)]
mac80211: allow driver to generate P1K for IV32

In order to support pre-populating the P1K cache in
iwlwifi hardware for WoWLAN, we need to calculate
the P1K for the current IV32. Allow drivers to get
the P1K for any given IV32 instead of for a given
packet, but keep the packet-based version around as
an inline.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow drivers to access key sequence counter
Johannes Berg [Thu, 7 Jul 2011 16:58:00 +0000 (18:58 +0200)]
mac80211: allow drivers to access key sequence counter

In order to implement GTK rekeying, the device needs
to be able to encrypt frames with the right PN/IV and
check the PN/IV in RX frames. To be able to tell it
about all those counters, we need to be able to get
them from mac80211, this adds the required API.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: simplify RX PN/IV handling
Johannes Berg [Thu, 7 Jul 2011 16:45:03 +0000 (18:45 +0200)]
mac80211: simplify RX PN/IV handling

The current rx->queue value is slightly confusing.
It is set to 16 on non-QoS frames, including data,
and then used for sequence number and PN/IV checks.
Until recently, we had a TKIP IV checking bug that
had been introduced in 2008 to fix a seqno issue.
Before that, we always used TID 0 for checking the
PN or IV on non-QoS packets.

Go back to the old status for PN/IV checks using
the TID 0 counter for non-QoS by splitting up the
rx->queue value into "seqno_idx" and "security_idx"
in order to avoid confusion in the future. They
each have special rules on the value used for non-
QoS data frames.

Since the handling is now unified, also revert the
special TKIP handling from my patch
"mac80211: fix TKIP replay vulnerability".

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: LCN-PHY add place for new PHY support
Rafał Miłecki [Thu, 7 Jul 2011 13:25:27 +0000 (15:25 +0200)]
b43: LCN-PHY add place for new PHY support

LCN-PHY was found in 14e4:4727 card. It uses LCN/1 and 0x2064/1 radio.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: use AES_BLOCK_SIZE
Johannes Berg [Wed, 6 Jul 2011 20:02:14 +0000 (22:02 +0200)]
mac80211: use AES_BLOCK_SIZE

mac80211 has a defnition of AES_BLOCK_SIZE and
multiple definitions of AES_BLOCK_LEN. Remove
them all and use crypto/aes.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: read radio ID on new cores
Rafał Miłecki [Wed, 6 Jul 2011 18:27:25 +0000 (20:27 +0200)]
b43: read radio ID on new cores

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: use radio ID reading code to older cores only
Rafał Miłecki [Wed, 6 Jul 2011 18:27:24 +0000 (20:27 +0200)]
b43: use radio ID reading code to older cores only

Newer ones need separated way

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: select BLOCKIO for BCMA
Rafał Miłecki [Wed, 6 Jul 2011 16:05:14 +0000 (18:05 +0200)]
b43: select BLOCKIO for BCMA

We want PIO as fallback for BCMA as well.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: change selecting ucode for newer cores
Rafał Miłecki [Wed, 6 Jul 2011 15:41:55 +0000 (17:41 +0200)]
b43: change selecting ucode for newer cores

Older cores had unique PHY. This is not true anymore for newer ones.
For example core rev 16 can be LP, SSLPN or N (PHY).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: bus: add helpers for getting/setting wldev from/in bus core
Rafał Miłecki [Wed, 6 Jul 2011 13:45:28 +0000 (15:45 +0200)]
b43: bus: add helpers for getting/setting wldev from/in bus core

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: handle BCMA in bus switches
Rafał Miłecki [Wed, 6 Jul 2011 13:45:27 +0000 (15:45 +0200)]
b43: handle BCMA in bus switches

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: use switches for SSB specific code
Rafał Miłecki [Wed, 6 Jul 2011 13:45:26 +0000 (15:45 +0200)]
b43: use switches for SSB specific code

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix CMAC races
Johannes Berg [Wed, 6 Jul 2011 20:00:35 +0000 (22:00 +0200)]
mac80211: fix CMAC races

Just like TKIP and CCMP, CMAC has the PN race.
It might not actually be possible to hit it now
since there aren't multiple ACs for management
frames, but fix it anyway.

Also move scratch buffers onto the stack.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix CCMP races
Johannes Berg [Wed, 6 Jul 2011 19:59:39 +0000 (21:59 +0200)]
mac80211: fix CCMP races

Since we can process multiple packets at the
same time for different ACs, but the PN is
allocated from a single counter, we need to
use an atomic value there. Use atomic64_t to
make this cheaper on 64-bit platforms, other
platforms will support this through software
emulation, see lib/atomic64.c.

We also need to use an on-stack scratch buf
so that multiple packets won't corrupt each
others scratch buffers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix TKIP races, make API easier to use
Johannes Berg [Thu, 7 Jul 2011 20:28:01 +0000 (22:28 +0200)]
mac80211: fix TKIP races, make API easier to use

Our current TKIP code races against itself on TX
since we can process multiple packets at the same
time on different ACs, but they all share the TX
context for TKIP. This can lead to bad IVs etc.

Also, the crypto offload helper code just obtains
the P1K/P2K from the cache, and can update it as
well, but there's no guarantee that packets are
really processed in order.

To fix these issues, first introduce a spinlock
that will protect the IV16/IV32 values in the TX
context. This first step makes sure that we don't
assign the same IV multiple times or get confused
in other ways.

Secondly, change the way the P1K cache works. I
add a field "p1k_iv32" that stores the value of
the IV32 when the P1K was last recomputed, and
if different from the last time, then a new P1K
is recomputed. This can cause the P1K computation
to flip back and forth if packets are processed
out of order. All this also happens under the new
spinlock.

Finally, because there are argument differences,
split up the ieee80211_get_tkip_key() API into
ieee80211_get_tkip_p1k() and ieee80211_get_tkip_p2k()
and give them the correct arguments.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: implement BCMA bus ops
Rafał Miłecki [Wed, 6 Jul 2011 17:03:46 +0000 (19:03 +0200)]
b43: implement BCMA bus ops

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: make b43_wireless_init bus generic
Rafał Miłecki [Tue, 5 Jul 2011 21:54:07 +0000 (23:54 +0200)]
b43: make b43_wireless_init bus generic

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Fri, 8 Jul 2011 15:05:20 +0000 (11:05 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx

13 years agowl12xx: start/stop queues according to global per-AC counters
Arik Nemtsov [Thu, 7 Jul 2011 11:25:23 +0000 (14:25 +0300)]
wl12xx: start/stop queues according to global per-AC counters

Split tx_queue_count to count per-AC skb's queued, instead of relying on
the skb-queue len. The skb queues used were only valid in STA-mode, as
AP-mode uses per-link queues.

This fixes a major regression in AP-mode, caused by the patch
"wl12xx: implement Tx watermarks per AC". With that patch applied, we
effectively had no regulation of Tx queues in AP-mode. Therefore a
sustained high rate of Tx could cause exhaustion of the skb memory pool.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agort2x00: Implement tx_frames_pending mac80211 callback function.
Gertjan van Wingerde [Wed, 6 Jul 2011 21:00:21 +0000 (23:00 +0200)]
rt2x00: Implement tx_frames_pending mac80211 callback function.

Implementing this callback function will cause mac80211 refrain from
going to powersave state when there are still untransmitted TX frames
in the queues.
This would exactly mimic the behaviour of the legacy vendor driver which
also doesn't go in powersave mode if there are still TX frames that are not
transmitted.
This should make powersaving and rt2x00 a better couple.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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: Properly identify rt2800usb devices.
Gertjan van Wingerde [Wed, 6 Jul 2011 20:59:19 +0000 (22:59 +0200)]
rt2x00: Properly identify rt2800usb devices.

Sitecom WLA4000 (USB ID 0x0df6:0x0060) is an RT3072 chipset.
Sitecom WLA5000 (USB ID 0x0df6:0x0062) is an RT3572 chipset.

Signed-off-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 device ID for RT539F device.
Gertjan van Wingerde [Wed, 6 Jul 2011 20:58:55 +0000 (22:58 +0200)]
rt2x00: Add device ID for RT539F device.

Reported-by: Wim Vander Schelden <wim@fixnum.org>
Signed-off-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: Reduce window of a queue's tx lock.
Gertjan van Wingerde [Wed, 6 Jul 2011 20:57:37 +0000 (22:57 +0200)]
rt2x00: Reduce window of a queue's tx lock.

Currently a lot of actions that can be done without the queue's tx lock
being held are done inside the locked area.
Move them out to have a leaner and meaner code that operates while the
tx lock is being held.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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: Don't use queue entry as parameter when creating TX descriptor.
Gertjan van Wingerde [Wed, 6 Jul 2011 20:57:00 +0000 (22:57 +0200)]
rt2x00: Don't use queue entry as parameter when creating TX descriptor.

The functions that create the tx descriptor structure do not operate on
a queue entry at all. Signal this fact in the code by not providing a
queue entry as a parameter, but the rt2x00 device structure and the skb
directly.

This patch is a preparation for reducing the time a queue is locked for
a tx operation.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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: Serialize TX operations on a queue.
Gertjan van Wingerde [Wed, 6 Jul 2011 20:56:24 +0000 (22:56 +0200)]
rt2x00: Serialize TX operations on a queue.

The rt2x00 driver gets frequent occurrences of the following error message
when operating under load:
phy0 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the
non-full queue 2.

This is caused by simultaneous attempts from mac80211 to send a frame via
rt2x00, which are not properly serialized inside rt2x00queue_write_tx_frame,
causing the second frame to fail sending with the above mentioned error
message.

Fix this by introducing a per-queue spinlock to serialize the TX operations
on that queue.

Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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 agobcma: detect PCI core working in hostmode
Rafał Miłecki [Tue, 5 Jul 2011 17:48:26 +0000 (19:48 +0200)]
bcma: detect PCI core working in hostmode

We must not init it like clientmode one, it would break device (tested
by Hauke on BCM4718). Add stub hostmode driver for now.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix TKIP replay vulnerability
Johannes Berg [Thu, 7 Jul 2011 16:24:54 +0000 (18:24 +0200)]
mac80211: fix TKIP replay vulnerability

Unlike CCMP, the presence or absence of the QoS
field doesn't change the encryption, only the
TID is used. When no QoS field is present, zero
is used as the TID value. This means that it is
possible for an attacker to take a QoS packet
with TID 0 and replay it as a non-QoS packet.

Unfortunately, mac80211 uses different IVs for
checking the validity of the packet's TKIP IV
when it checks TID 0 and when it checks non-QoS
packets. This means it is vulnerable to this
replay attack.

To fix this, use the same replay counter for
TID 0 and non-QoS packets by overriding the
rx->queue value to 0 if it is 16 (non-QoS).

This is a minimal fix for now. I caused this
issue in

commit 1411f9b531f0a910cd1c85a337737c1e6ffbae6a
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Thu Jul 10 10:11:02 2008 +0200

    mac80211: fix RX sequence number check

while fixing a sequence number issue (there,
a separate counter needs to be used).

Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix ie memory allocation for scheduled scans
Luciano Coelho [Thu, 7 Jul 2011 12:18:27 +0000 (15:18 +0300)]
mac80211: fix ie memory allocation for scheduled scans

We were not allocating memory for the IEs passed in the scheduled_scan
request and this was causing memory corruption (buffer overflow).

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: fix init regression of hostmode PCI core
Rafał Miłecki [Tue, 5 Jul 2011 15:25:32 +0000 (17:25 +0200)]
ssb: fix init regression of hostmode PCI core

Our workarounds seem to be clientmode PCI specific. Using SPROM
workaround on SoC resulted in Oops:

Data bus error, epc == 8017ed58, ra == 80225838
 Oops[#1]:
 Cpu 0
 $ 0   : 00000000 10008000 b8000000 00000001
 $ 4   : 80293b5c 00000caa ffffffff 00000000
 $ 8   : 0000000a 00000003 00000001 696d6d20
 $12   : ffffffff 00000000 00000000 ffffffff
 $16   : 802d0140 b8004800 802c0000 00000000
 $20   : 00000000 802c0000 00000000 802d04d4
 $24   : 00000018 80151a00
 $28   : 81816000 81817df8 8029bda0 80225838
 Hi    : 00000000
 Lo    : 00000000
 epc   : 8017ed58 ssb_ssb_read16+0x48/0x60
   Not tainted
 ra    : 80225838 ssb_pcicore_init+0x54/0x3b4

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: modify SDIO aggregation Tx/Rx buffer size
Amitkumar Karwar [Wed, 6 Jul 2011 01:01:11 +0000 (18:01 -0700)]
mwifiex: modify SDIO aggregation Tx/Rx buffer size

The SDIO aggregation buffer size has been modified to an optimum
value which gives good throughput results.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoipw2100: Fix command list for debugging
Jean Delvare [Tue, 5 Jul 2011 22:27:06 +0000 (00:27 +0200)]
ipw2100: Fix command list for debugging

There is a stray "undefined" string in the array, get rid of it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: support GTK rekey offload
Johannes Berg [Tue, 5 Jul 2011 14:35:41 +0000 (16:35 +0200)]
mac80211: support GTK rekey offload

This adds the necessary mac80211 APIs to support
GTK rekey offload, mirroring the functionality
from cfg80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/nl80211: support GTK rekey offload
Johannes Berg [Tue, 5 Jul 2011 14:35:40 +0000 (16:35 +0200)]
cfg80211/nl80211: support GTK rekey offload

In certain circumstances, like WoWLAN scenarios,
devices may implement (partial) GTK rekeying on
the device to avoid waking up the host for it.

In order to successfully go through GTK rekeying,
the KEK, KCK and the replay counter are required.

Add API to let the supplicant hand the parameters
to the driver which may store it for future GTK
rekey operations.

Note that, of course, if GTK rekeying is done by
the device, the EAP frame must not be passed up
to userspace, instead a rekey event needs to be
sent to let userspace update its replay counter.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow driver to iterate keys
Johannes Berg [Tue, 5 Jul 2011 14:35:39 +0000 (16:35 +0200)]
mac80211: allow driver to iterate keys

When in suspend/wowlan, devices might implement crypto
offload differently (more features), and might require
reprogramming keys for the WoWLAN (as it is the case
for Intel devices that use another uCode image). Thus
allow the driver to iterate all keys in this context.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: remove unnecessary read of PCI_CAP_ID_EXP
Jon Mason [Thu, 30 Jun 2011 15:42:47 +0000 (10:42 -0500)]
iwlwifi: remove unnecessary read of PCI_CAP_ID_EXP

The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Wed, 6 Jul 2011 19:03:16 +0000 (15:03 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx

13 years agossb: use pci_dev->subsystem_{vendor,device}
Sergei Shtylyov [Fri, 1 Jul 2011 18:34:42 +0000 (22:34 +0400)]
ssb: use pci_dev->subsystem_{vendor,device}

The SSB code reads PCI subsystem IDs from the PCI configuration registers while
they are already stored by the PCI subsystem in the 'subsystem_{vendor|device}'
fields of 'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: use pci_dev->revision
Sergei Shtylyov [Fri, 1 Jul 2011 18:33:08 +0000 (22:33 +0400)]
ssb: use pci_dev->revision

The SSB code reads PCI revision ID from the PCI configuration register while
it's already stored by the PCI subsystem in the 'revision' field  of 'struct
pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: Add RX side DMA memory barrier
Michael Büsch [Mon, 4 Jul 2011 17:51:11 +0000 (19:51 +0200)]
b43: Add RX side DMA memory barrier

This adds a memory barrier to ensure the writes to the ring memory
are committed before the DMA ring pointer is updated.
We do a similar thing on the TX side already.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoNFC: add Documentation/networking/nfc.txt
Aloisio Almeida Jr [Fri, 1 Jul 2011 22:31:38 +0000 (19:31 -0300)]
NFC: add Documentation/networking/nfc.txt

Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoNFC: pn533: add NXP pn533 nfc device driver
Aloisio Almeida Jr [Fri, 1 Jul 2011 22:31:37 +0000 (19:31 -0300)]
NFC: pn533: add NXP pn533 nfc device driver

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoNFC: add the NFC socket raw protocol
Lauro Ramos Venancio [Fri, 1 Jul 2011 22:31:36 +0000 (19:31 -0300)]
NFC: add the NFC socket raw protocol

This socket protocol is used to perform data exchange with NFC
targets.

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoNFC: add NFC socket family
Aloisio Almeida Jr [Fri, 1 Jul 2011 22:31:35 +0000 (19:31 -0300)]
NFC: add NFC socket family

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoNFC: add nfc generic netlink interface
Lauro Ramos Venancio [Fri, 1 Jul 2011 22:31:34 +0000 (19:31 -0300)]
NFC: add nfc generic netlink interface

The NFC generic netlink interface exports the NFC control operations
to the user space.

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoNFC: add nfc subsystem core
Lauro Ramos Venancio [Fri, 1 Jul 2011 22:31:33 +0000 (19:31 -0300)]
NFC: add nfc subsystem core

The NFC subsystem core is responsible for providing the device driver
interface. It is also responsible for providing an interface to the control
operations and data exchange.

Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow driver to impose WoWLAN restrictions
Johannes Berg [Fri, 1 Jul 2011 22:02:01 +0000 (00:02 +0200)]
mac80211: allow driver to impose WoWLAN restrictions

If the driver can't support WoWLAN in the current
state, this patch allows it to return 1 from the
suspend callback to do the normal deconfiguration
instead of using suspend/resume calls. Note that
if it does this, resume won't be called.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: PCI revision ID register is 8-bit wide
Sergei Shtylyov [Fri, 1 Jul 2011 18:35:28 +0000 (22:35 +0400)]
ssb: PCI revision ID register is 8-bit wide

The SSB code reads PCI revision ID register as 16-bit entity while the register
is actually 8-bit only (the next 8 bits are the programming interface register).
Fix the read and make the 'rev' field of 'struct ssb_boardinfo' 8-bit as well,
to match the register size.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192de: Fix error exit from hw_init
Larry Finger [Fri, 1 Jul 2011 13:56:11 +0000 (08:56 -0500)]
rtlwifi: rtl8192de: Fix error exit from hw_init

In routine rtl92de_hw_init(), there are two places where a failure is
not handled correctly.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192de: Replace loops calling udelay with single mdelay
Larry Finger [Fri, 1 Jul 2011 13:50:48 +0000 (08:50 -0500)]
rtlwifi: rtl8192de: Replace loops calling udelay with single mdelay

There are a number of loops to implement delays. These are replaced with
single calls to mdelay().

The need for a fix was noted by Andrew Morton <akpm@linux-foundation.org>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: use carl9170 queue enums
Christian Lamparter [Fri, 1 Jul 2011 13:28:22 +0000 (15:28 +0200)]
carl9170: use carl9170 queue enums

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192de: Remove comparison of boolean with true
Larry Finger [Thu, 30 Jun 2011 21:47:11 +0000 (16:47 -0500)]
rtlwifi: rtl8192de: Remove comparison of boolean with true

Tests of a boolean against "true" are not needed as non-zero is sufficient..

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192{ce,cu,se} Remove irq_enabled
Mike McCormack [Thu, 30 Jun 2011 21:46:14 +0000 (16:46 -0500)]
rtlwifi: rtl8192{ce,cu,se} Remove irq_enabled

This should be unnecessary if synchronize_irq is used.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192de: Remove irq_enabled boolean
Larry Finger [Thu, 30 Jun 2011 21:44:47 +0000 (16:44 -0500)]
rtlwifi: rtl8192de: Remove irq_enabled boolean

Prepare rtl8192de for the removal of irq_enaqbled.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agodrivers/net/wireless/rtlwifi/rtl8192de/phy.c: fix udelay() usage
Andrew Morton [Thu, 30 Jun 2011 21:28:50 +0000 (16:28 -0500)]
drivers/net/wireless/rtlwifi/rtl8192de/phy.c: fix udelay() usage

ERROR: "__bad_udelay" [drivers/net/wireless/rtlwifi/rtl8192de/rtl8192de.ko] undefined!

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix smatch complains
Christian Lamparter [Thu, 30 Jun 2011 19:08:43 +0000 (21:08 +0200)]
mac80211: fix smatch complains

mlme.c
l.757 ieee80211_dynamic_ps_enable_work(11)
variable dereferenced before check 'sdata'

mesh_pathtbl.c
l.650 mesh_path_del(20) double lock 'bottom_half'
l.663 mesh_path_del(33) double unlock 'bottom_half'

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: allow PSM if the 5 GHz band is selected
Christian Lamparter [Thu, 30 Jun 2011 18:34:54 +0000 (20:34 +0200)]
carl9170: allow PSM if the 5 GHz band is selected

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: enable IEEE80211_HW_NEED_DTIM_PERIOD
Christian Lamparter [Thu, 30 Jun 2011 18:31:34 +0000 (20:31 +0200)]
carl9170: enable IEEE80211_HW_NEED_DTIM_PERIOD

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: import 1.9.4 firmware headers
Christian Lamparter [Thu, 30 Jun 2011 18:27:47 +0000 (20:27 +0200)]
carl9170: import 1.9.4 firmware headers

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

 * update copyright boilerplate

 * add some more strategic __aligned(4).

 * WoWLAN

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet, wireless: Don't return uninitialized in __cfg80211_stop_sched_scan()
Jesper Juhl [Wed, 29 Jun 2011 20:49:33 +0000 (22:49 +0200)]
net, wireless: Don't return uninitialized in __cfg80211_stop_sched_scan()

If the 'driver_initiated' function argument to
__cfg80211_stop_sched_scan() is not 0 then we'll return an
uninitialized 'err' from the function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Skip tailroom reservation for full HW-crypto devices with race fix
Yogesh Ashok Powar [Tue, 28 Jun 2011 13:11:37 +0000 (18:41 +0530)]
mac80211: Skip tailroom reservation for full HW-crypto devices with race fix

Based on inputs from Johannes Berg <johannes@sipsolutions.net>
from http://article.gmane.org/gmane.linux.kernel.wireless.general/68193
and http://article.gmane.org/gmane.linux.kernel.wireless.general/71702

In xmit path, devices that do full hardware crypto (including
MMIC and ICV) need no tailroom. For such devices, tailroom
reservation can be skipped if all the keys are programmed into
the hardware (i.e software crypto is not used for any of the
keys) and none of the keys wants software to generate Michael
MIC and IV.

v2: Added check for IV along with MMIC.
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Tested-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Cc: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
v3: Fixing races to avoid WARNING: at net/mac80211/wpa.c:397
    ccmp_encrypt_skb+0xc4/0x1f0
Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
v4: Added links with message ID

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl12xx: always initialize AP-mode max power level
Arik Nemtsov [Mon, 27 Jun 2011 19:06:34 +0000 (22:06 +0300)]
wl12xx: always initialize AP-mode max power level

Sometimes we only get the Tx power level via op->config when the FW is
off. Record the received power level when this happens and use it to
initialize the firmware during boot.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: initialize max_power levels for 11a channels
Arik Nemtsov [Mon, 27 Jun 2011 19:06:33 +0000 (22:06 +0300)]
wl12xx: initialize max_power levels for 11a channels

Set the maximum FW supported power levels for 11a channels.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: implement cancel_hw_scan() callback
Eliad Peller [Mon, 27 Jun 2011 10:06:45 +0000 (13:06 +0300)]
wl12xx: implement cancel_hw_scan() callback

After implementing cancel_hw_scan(), there is no more need to
flush scan_complete_work on suspend.

scan_complete_work enqueues a new scan_work, that might lead
to the following warning (if the device was already suspended):

WARNING: at drivers/mmc/core/core.c:169 mmc_wait_for_req+0x1ac/0x2c8()
Backtrace:
[<c004b50c>] (dump_backtrace+0x0/0x110)
[<c04fda50>] (dump_stack+0x0/0x1c)
[<c008f700>] (warn_slowpath_common+0x0/0x6c)
[<c008f76c>] (warn_slowpath_null+0x0/0x2c)
[<c034b058>] (mmc_wait_for_req+0x0/0x2c8)
[<c034f804>] (mmc_io_rw_extended+0x0/0x1e4)
[<c0350b5c>] (sdio_io_rw_ext_helper+0x0/0x1ac)
[<c0350e00>] (sdio_memcpy_fromio+0x0/0x2c)
[<bf194464>] (wl1271_sdio_raw_read+0x0/0x1bc [wl12xx_sdio])
[<bf15ac14>] (wl1271_cmd_wait_for_event_or_timeout+0x0/0x19c [wl12xx])
[<bf15adb0>] (wl1271_cmd_wait_for_event+0x0/0x30 [wl12xx])
[<bf15b7dc>] (wl1271_cmd_disconnect+0x0/0x14c [wl12xx])
[<bf158fd0>] (wl1271_unjoin+0x0/0x48 [wl12xx])
[<bf159070>] (wl1271_op_config+0x0/0x490 [wl12xx])
[<bf105084>] (ieee80211_hw_config+0x0/0x14c [mac80211])
[<bf113120>] (ieee80211_recalc_idle+0x0/0x4c [mac80211])
[<bf109a70>] (__ieee80211_scan_completed+0x0/0x1ac [mac80211])
[<bf109fd4>] (ieee80211_scan_work+0x0/0x484 [mac80211])
[<c00a197c>] (worker_thread+0x0/0x1e8)
[<c00a5874>] (kthread+0x0/0x90)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add stop_scan command
Eliad Peller [Mon, 27 Jun 2011 10:06:44 +0000 (13:06 +0300)]
wl12xx: add stop_scan command

define wl1271_scan_stop() to cancel an ongoing hw scan.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: configure suspend/resume only if associated/started
Eliad Peller [Mon, 27 Jun 2011 10:06:43 +0000 (13:06 +0300)]
wl12xx: configure suspend/resume only if associated/started

Configure the device (to wowlan) only if the sta/ap
is associated/started.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: one SDIO initialization is enough
Ohad Ben-Cohen [Sun, 26 Jun 2011 15:00:11 +0000 (18:00 +0300)]
wl12xx: one SDIO initialization is enough

Skip manual device power on in case runtime PM is enabled for
our device.

This eliminates a secondary & redundant SDIO init sequence.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agortlwifi: rtl8192cu: Add new USB ID for Netgear WNA1000M
Yoann DI-RUZZA [Fri, 1 Jul 2011 13:47:17 +0000 (08:47 -0500)]
rtlwifi: rtl8192cu: Add new USB ID for Netgear WNA1000M

Signed-off-by: Yoann DI-RUZZA <y.diruzza@lim.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix tx throughput drops for AR9003 chips with AES encryption
Rajkumar Manoharan [Fri, 1 Jul 2011 13:07:33 +0000 (18:37 +0530)]
ath9k: Fix tx throughput drops for AR9003 chips with AES encryption

While sending aggregated frames in AES, the AR5416 chips
required additional padding b/w subframes. This workaround
is not needed for edma (AR9003 family) chips. With this patch
~4Mbps thoughput improvement was observed in clear environment.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: add NEC WL300NU-AG usbid
Christian Lamparter [Thu, 30 Jun 2011 19:06:17 +0000 (21:06 +0200)]
carl9170: add NEC WL300NU-AG usbid

Cc: stable@kernel.org
Reported-by: Mark Davis
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: fix deadlock with rfkill/sched_scan by adding new mutex
Luciano Coelho [Thu, 30 Jun 2011 05:32:41 +0000 (08:32 +0300)]
cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex

There was a deadlock when rfkill-blocking a wireless interface,
because we were locking the rdev mutex on NETDEV_GOING_DOWN to stop
sched_scans that were eventually running.  The rfkill block code was
already holding a mutex under rdev:

kernel: =======================================================
kernel: [ INFO: possible circular locking dependency detected ]
kernel: 3.0.0-rc1-00049-g1fa7b6a #57
kernel: -------------------------------------------------------
kernel: kworker/0:1/4525 is trying to acquire lock:
kernel: (&rdev->mtx){+.+.+.}, at: [<ffffffff8164c831>] cfg80211_netdev_notifier_call+0x131/0x5b0
kernel:
kernel: but task is already holding lock:
kernel: (&rdev->devlist_mtx){+.+.+.}, at: [<ffffffff8164dcef>] cfg80211_rfkill_set_block+0x4f/0xa0
kernel:
kernel: which lock already depends on the new lock.

To fix this, add a new mutex specifically for sched_scan, to protect
the sched_scan_req element in the rdev struct, instead of using the
global rdev mutex.

Reported-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix incorrect use of drvdata in PCI suspend/resume code
Pavel Roskin [Wed, 29 Jun 2011 19:39:43 +0000 (15:39 -0400)]
ath5k: fix incorrect use of drvdata in PCI suspend/resume code

Signed-off-by: Pavel Roskin <proski@gnu.org>
Cc: <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>