Commit graph

249317 commits

Author SHA1 Message Date
John W. Linville
d859898114 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/ath/ath5k/sysfs.c
	net/bluetooth/l2cap_core.c
	net/mac80211/wpa.c
2011-07-11 14:46:59 -04:00
Rajkumar Manoharan
8ae2e12f15 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>
2011-07-08 11:47:57 -04:00
Rajkumar Manoharan
1fa1238e50 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>
2011-07-08 11:47:56 -04:00
Rajkumar Manoharan
43d9325b24 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>
2011-07-08 11:47:56 -04:00
Rajkumar Manoharan
6fea2b15cc 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>
2011-07-08 11:47:55 -04:00
Luciano Coelho
1a84ff7564 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>
2011-07-08 11:47:54 -04:00
Mohammed Shafi Shajakhan
331c5ea2d9 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>
2011-07-08 11:47:17 -04:00
Yogesh Ashok Powar
e156103cee 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>
2011-07-08 11:47:16 -04:00
Amitkumar Karwar
38869d79e5 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>
2011-07-08 11:47:15 -04:00
Amitkumar Karwar
e6faada5da mwifiex: fix regression in WEP security mode
Htcapinfo is unnecessarily sent in assoc request in WEP security due
to a regression introduced by commit 2be50b8df5 (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>
2011-07-08 11:47:15 -04:00
Pavel Roskin
4fc5401c14 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>
2011-07-08 11:47:14 -04:00
Pavel Roskin
e2df64c1d7 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>
2011-07-08 11:47:13 -04:00
Pavel Roskin
e4bbf2f541 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>
2011-07-08 11:44:32 -04:00
Pavel Roskin
d2c7f7730e 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>
2011-07-08 11:44:31 -04:00
Pavel Roskin
633d006ee6 ath5k: use parentheses around macro definitions
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:44:31 -04:00
Pavel Roskin
2753f87a57 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>
2011-07-08 11:44:31 -04:00
Pavel Roskin
2724a74a26 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>
2011-07-08 11:44:30 -04:00
Pavel Roskin
25380d8068 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>
2011-07-08 11:44:30 -04:00
Pavel Roskin
ef82763d8d ath5k: use KERN_WARNING in ATH5K_PRINTF
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:44:29 -04:00
Pavel Roskin
fdd55d14b7 ath5k: remove unneeded parentheses after return
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:44:29 -04:00
Pavel Roskin
0a5d381348 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>
2011-07-08 11:44:28 -04:00
Pavel Roskin
b988a887a4 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>
2011-07-08 11:42:27 -04:00
Christian Lamparter
69f7235fe6 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>
2011-07-08 11:42:26 -04:00
Sebastian Andrzej Siewior
cae561473e 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>
2011-07-08 11:42:25 -04:00
Rafał Miłecki
21a18f284b 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>
2011-07-08 11:42:25 -04:00
Rajkumar Manoharan
676b58c274 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>
2011-07-08 11:42:25 -04:00
Rajkumar Manoharan
565dfefbe1 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>
2011-07-08 11:42:24 -04:00
Rafał Miłecki
58eb7ff3dc 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>
2011-07-08 11:42:24 -04:00
Rafał Miłecki
8b9bda759e 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>
2011-07-08 11:42:24 -04:00
Johannes Berg
42d9879550 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>
2011-07-08 11:42:23 -04:00
Johannes Berg
3ea542d3c2 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>
2011-07-08 11:42:22 -04:00
Johannes Berg
9e26297a56 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>
2011-07-08 11:42:21 -04:00
Rafał Miłecki
1d738e64f3 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>
2011-07-08 11:11:25 -04:00
Johannes Berg
0cd20a278e 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>
2011-07-08 11:11:24 -04:00
Rafał Miłecki
544e5d8bcd 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>
2011-07-08 11:11:23 -04:00
Rafał Miłecki
3fd48508d0 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>
2011-07-08 11:11:22 -04:00
Rafał Miłecki
8c8b964c20 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>
2011-07-08 11:11:22 -04:00
Rafał Miłecki
6ff1e5cf70 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>
2011-07-08 11:11:21 -04:00
Rafał Miłecki
74abacb6b5 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>
2011-07-08 11:11:21 -04:00
Rafał Miłecki
42c9a45896 b43: handle BCMA in bus switches
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:11:20 -04:00
Rafał Miłecki
6cbab0d913 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>
2011-07-08 11:11:20 -04:00
Johannes Berg
75396ae6d4 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>
2011-07-08 11:11:20 -04:00
Johannes Berg
aba83a0b30 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>
2011-07-08 11:11:19 -04:00
Johannes Berg
523b02ea23 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>
2011-07-08 11:11:19 -04:00
Rafał Miłecki
397915c307 b43: implement BCMA bus ops
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08 11:11:18 -04:00
Rafał Miłecki
d1507051bf 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>
2011-07-08 11:11:17 -04:00
John W. Linville
e441a5eab9 Merge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx 2011-07-08 11:05:20 -04:00
Arik Nemtsov
f1a46384ad 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>
2011-07-08 09:39:47 +03:00
Gertjan van Wingerde
5f0dd296a0 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>
2011-07-07 13:21:00 -04:00
Gertjan van Wingerde
acb56120d2 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>
2011-07-07 13:21:00 -04:00