Commit graph

310533 commits

Author SHA1 Message Date
Johannes Berg 491b26b402 wireless: update wireless URLs
The preferred URL is http://wireless.kernel.org/
rather than http://linuxwireless.org/, update all
URLs to point there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:32 -04:00
Sujith Manoharan 196fb860ce ath9k: Resync beacons properly
After a chip reset, the beacon timers have to re-programmed
correctly for a station in associated state. Use the PS flags
to ensure that this is done after a TSF sync happens, otherwise
the driver ends up using incorrect values for TBTT/DTIM in
powersave mode.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:32 -04:00
Sujith Manoharan 07c15a3ffd ath9k: Fix powersave locking
The 'ps_flags' is used/accessed in a variety of contexts
and requires proper locking. Use 'sc_pm_lock' appropriately.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:32 -04:00
Sujith Manoharan b74713d04e ath9k: Handle fatal interrupts properly
When a fatal interrupt is received or it is detected that the baseband
has hung, the chip has to be reset immediately.  Otherwise, we end up
processing spurious interrupts. Ensure that we bail out properly in
the ISR when the reset work hasn't completed yet.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:31 -04:00
Sujith Manoharan 781b14a315 ath9k: Use atomic operations
The 'sc_flags' variable is being used in a number of places
with no locking whatsoever. This patch converts the usage
of sc_flags to atomic ops.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:31 -04:00
Sujith Manoharan 8da07830e1 ath9k: Move LNA code to antenna.c
And use a helper function to setup antennae after a reset.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:31 -04:00
Sujith Manoharan af68abadac ath9k: Fix work handling
* Currently, there is no synchronization between the reset
  work and the tx-poll work. Fix this and make sure that we
  bail out properly if a reset work is in progress.

* Cleanup the PLL WAR and enable it for AR9340 too and
  use a helper for restarting work/timers after a reset.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:30 -04:00
Sujith Manoharan ef1b6cd9a1 ath9k: Group link monitoring logic
Add link.c and move all the link/connection monitoring
code to it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:30 -04:00
Rajkumar Manoharan 6995fb805e ath9k: improve BT FTP/PAN performance
When BT FTP/PAN transmits while WLAN is idle, the one of 9462 chain
often picks up BT's tx signal and starts receiving. If the current
weight is set to be higher than BT tx, BT tx will be aborted and this
also degrades BT performance. Hence lower WLAN rx priority in this
case only when there are no WLAN traffic.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:30 -04:00
Rajkumar Manoharan 153dccd467 ath9k_hw: fix power state for MCI
Program MCI related power registers only if MCI interrupts
are enabled. This could help to reduce power consumptions when
WLAN alone is enabled in BT coex chips.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:29 -04:00
Rajkumar Manoharan c9ae6ab4c7 ath: do not update cycle counters with sleep mode
When the chip is waking up from sleep state, the cycle counters
might have incorrect readings. So it is better not to update those
readings with software counters.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:29 -04:00
Rajkumar Manoharan 0603143e47 ath9k: BT coex performance tuning for AR9462
Use smaller aggregation limit and increasing aggregation threshold
for osla that could improve wlan performance when there is HID profile.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:29 -04:00
Rajkumar Manoharan 99922a45e9 ath9k_hw: fix BT RF performance
When software rfkill is triggered, before put the chip in reset
state, give LNA and SPDT control to BT to make sure BT can have
good RF performance.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:28 -04:00
Rajkumar Manoharan c8b6fbe1f1 ath9k_hw: configure ar9462 switching regulator
Enable WLAN and BT mode for switching regulator discontinuous
orverride for AR9462 chips.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:28 -04:00
Rajkumar Manoharan 9dc08eceb7 ath9k_hw: program BT to control SPDT
program BT to control SPDT everytime while loading switch table
from eeprom.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:28 -04:00
Rajkumar Manoharan 4fb7175bbd ath9k_hw: fix IQ calibration chain index
The chain index to perform IQ calibration is counted to number of valid
tx chains and then used for indexing chain specific registers. If the
chainmask is set to 0x2 (i.e chain 1 only), still it accesses chain 0
registers for chain 1. So use real chain index instead sequential one.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:28 -04:00
Rajkumar Manoharan 4f6bd1a8df ath9k: cleanup MCI indentation
Fix bad indentation & if nesting to lose about two levels
of unnecessary indentation.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:27 -04:00
Rajkumar Manoharan 5d294a1680 ath9k_hw: update ar9462 initval table to fix rx
The wrong ADC sample phase that happen between awake and
network/full sleep will lead to improper rx noisefloor
calibration.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:27 -04:00
Sujith Manoharan e6930c4b32 ath9k: Use separate operational flags for BTCOEX
Also, use atomic operations to check the flags.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:26 -04:00
Sujith Manoharan 4cb54fa3a2 ath9k: Remove SC_OP_OFFCHANNEL
mac80211's IEEE80211_CONF_OFFCHANNEL can be used directly
to track offchannel state. Also pass the correct boolean
value to ath9k_hw_startpcureceive().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:26 -04:00
Sujith Manoharan 2fd5d35bc8 ath9k_hw: Fix variable usage
Exposed by sparse:
ar9003_mci.c:1134:31: warning: Using plain integer as NULL pointer

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:26 -04:00
Sujith Manoharan 97ba515a20 ath9k: Add MCI interrupt to debugfs statistics
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:25 -04:00
Sujith Manoharan 31604cf0a7 ath9k_hw: Cleanup power mode API
The 'setChip' variable is unused, remove it and
simplify the functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:25 -04:00
Sujith Manoharan 5955b2b0ef ath9k_hw: Fix MCI usage
MCI has to be handled only when BTCOEX is actually enabled.
Check for this condition before calling MCI related functions
from various reset/calibration call-sites.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:25 -04:00
Sujith Manoharan 83c7a52dcc ath9k_hw: Fix AR_RTC_KEEP_AWAKE usage
The default value that is being programmed to AR_RTC_KEEP_AWAKE
is 0x2, there is no need to program it manually in various
functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:24 -04:00
Sujith Manoharan e270e776a0 ath9k: Setup MCI interrupts properly
MCI interrupts have to be enabled only when BTCOEX is
actually in use.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:24 -04:00
Sujith Manoharan d09f5f4cfb ath9k: Handle ASPM properly
ASPM has to be disabled when BTCOEX is in use, do this properly
by calling the bus-specific ASPM init routine after the
BTCOEX scheme has been determined.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:24 -04:00
Sujith Manoharan aaa1ec46b3 ath9k: Prune ath9k_init_device
Instead of cluttering ath9k_init_device() with 'ath_softc'
specific initialization code, use ath9k_init_softc() to
setup driver-specific work routines, timers etc.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:23 -04:00
Arik Nemtsov 2e8d397eee mac80211: add stations after AP start on reconfig
When performing a HW restart for an AP mode interface, add stations back
only after the AP is beaconing. This mimics the normal flow of STA
addition on AP.

Some devices (wlcore) do not support adding stations before beaconing,
so this has the added benefit of making recovery work for them.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:23 -04:00
Chris Yungmann 2b0446c420 brcm80211: brcmsmac: fixed checkpatch and sparse warnings
Fixed checkpatch and sparse warnings related to aiutils.*

Signed-off-by: Chris Yungmann <yungmann.chris@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:23 -04:00
Johannes Berg ebf348fcd0 cfg80211: validate remain-on-channel time better
The remain-on-channel time validation shouldn't
depend on the value of HZ, as it does now with
the check against jiffies, since then you might
use a value that works on one system but not on
another. Fix it by checking against a minimum
that's fixed.

Also add validation of the wait duration for a
management frame TX since this also translates
into remain-on-channel internally.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:22 -04:00
Hauke Mehrtens ccaf8c32d5 ssb: recognize ARM Cortex M3
I found this core on a BCM4322, a PCI card in the Linksys WRT610N V1.
This core is not used by the driver, this patch just makes ssb show the
correct name.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:22 -04:00
Pontus Fuchs 3b08cf6bd2 mac80211: Clear wowlan flag when drv_suspend returns failure
drv_resume can get called without a prior call to drv_suspend.
Consider the following steps:

1. Suspend is started but driver's drv_suspend returns error.
2. Suspend is aborted. local->wowlan flag is left set.
3. Interface is removed.
4. Suspend again. This time open_count is 0 so drv_suspend is
   not called and local->wowlan not cleared.
5. On resume ieee80211_reconfig will call drv_resume since
   local->wowlan is set.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:22 -04:00
Chun-Yeow Yeoh 8c06e8c08e mac80211: Add missing mesh parameter dot11MeshForwarding for debugfs
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:21 -04:00
Johannes Berg 1c4cb928e1 mac80211: print info when disabling HT
Make mac80211 print a message when it disables
HT due to the connection using WEP/TKIP or due
to the AP not supporting WMM/QoS.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:19:01 -04:00
Stanislaw Gruszka a8ce85442e mac80211: configure 11b/g channel access rules for legacy APs
For each EDCA TX queue change default settings (in STA mode) to conform
old 802.11b/g channel access rules. This is needed for drivers that do
not have QoS enable/disable "switch" (like rt2x00) to make them work
properly with legacy APs.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:19:00 -04:00
Vivek Natarajan d202caff28 ath9k: Ensure a fair beacon distribution in IBSS mode
Configure CWmin based on slot time for IBSS mode. This helps
in increasing the beacon distribution of ath9k to accepted
levels in 11a mode.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:19:00 -04:00
Zero.Lin cff3d1f093 rt2x00:Add RT5392 chipset support
Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:19:00 -04:00
Stanislaw Gruszka d7fbcada37 iwl4965: claim RSN IBSS support
Similar like other drivers including iwl3945, do not configure group
keys to the hardware (on Ad-Hoc mode) to make IBSS RSN work.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:18 -04:00
Stanislaw Gruszka 6851dff3e6 rt2x00: claim RSN IBSS support
Similar like other drivers, do not configure group keys to the hardware
(on Ad-Hoc mode) to make IBSS RSN work.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:18 -04:00
Zefir Kurtisi 620a55687b ath9k: fix/add bits for spectral scanning
Updates for spectral scanning register modification for AR93x:
 * fix bits for spectral_scan_count
 * add bits for new parameters

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:18 -04:00
Alex Hung 27e49ca955 rfkill: Add the capability to switch all devices of all type in __rfkill_switch_all().
__rfkill_switch_all() switches the state of devices of a given type; however,
it does not switch devices of all type (RFKILL_TYPE_ALL). As a result, it
ignores the keycode "KEY_RFKILL" from another module, i.e. eeepc-wmi.

This fix is to make __rfkill_switch_all() to be able to switch not only
devices of a given type but also all devices.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:17 -04:00
Johannes Berg e8c9bd5b8d cfg80211: clarify set_channel APIs
Now that we've removed all uses of the set_channel
API except for the monitor channel and in libertas,
clarify this. Split the libertas mesh use into a
new libertas_set_mesh_channel() operation, just to
keep backward compatibility, and rename the normal
set_channel() to set_monitor_channel().

Also describe the desired set_monitor_channel()
semantics more clearly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:17 -04:00
John W. Linville 7c9c46c16d Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-drv.c
2012-06-06 14:40:06 -04:00
John W. Linville 2d4524ac18 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2012-06-06 13:57:05 -04:00
Stanislav Yakovlev fdbfff7340 net/wireless: ipw2200: introduce ipw_read_eeprom function
We separate reading of device's eeprom content from writing it back
to the device's sram.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 17:15:49 -04:00
Avinash Patil 605b73af32 mwifiex: support NL80211_HIDDEN_SSID_ZERO_LEN for uAP
mwifiex uAP supports NL80211_HIDDEN_SSID_ZERO_LEN type of hidden
SSID only. NL80211_HIDDEN_SSID_ZERO_CONTENTS is not supported.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 17:15:47 -04:00
Avinash Patil aa4bbbe448 mwifiex: invalidate bss config before setting channel for uAP
Mark bss_config parameters as invalid before setting AP channel.
This prevents from setting invalid parameters while setting AP
channel to FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 17:15:45 -04:00
Johannes Berg cc1d2806bf cfg80211: provide channel to join_mesh function
Just like the AP mode patch, instead of setting
the channel and then joining the mesh network,
provide the channel to join the network on to
the join_mesh() function.

Like in AP mode, you can also give the channel
to the join-mesh nl80211 command now.

Unlike AP mode, it picks a default channel if
none was given.

As libertas uses mesh mode interfaces but has
no join_mesh callback and we can't simply break
it, keep some compatibility code for that case
and configure the channel directly for it.

In the non-libertas case, where we store the
channel until join, allow setting it while the
interface is down.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:18 -04:00
Johannes Berg 685d12a192 cfg80211: disallow setting channel on WDS interfaces
If it worked (Felix says it doesn't right now), the
typical use-case for WDS interfaces would be to be
slaved to AP mode interfaces. Therefore, it isn't
necessary to set the channel on WDS interfaces. As
they don't support powersave or anything like that,
they also couldn't use a different channel anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:17 -04:00