GitHub/LineageOS/android_kernel_samsung_universal7580.git
14 years agowl12xx: Use MODULE_ALIAS macro at correct postion for SPI bus
Ameya Palande [Mon, 5 Jul 2010 14:12:38 +0000 (17:12 +0300)]
wl12xx: Use MODULE_ALIAS macro at correct postion for SPI bus

(Changed title, was "wl1251: Use MODULE_ALIAS macro at correct postion
for SPI bus".  -- JWL)

Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Tue, 6 Jul 2010 18:19:01 +0000 (14:19 -0400)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6

14 years agoiwlwifi: adding enhance sensitivity table entries
Wey-Yi Guy [Mon, 28 Jun 2010 20:05:17 +0000 (13:05 -0700)]
iwlwifi: adding enhance sensitivity table entries

For newer devices (6000g2a and 6000g2b), the sensitivity table send to
uCode require additional table entries to help sensitivity calibration.

All the additional entries has fix data for now, but do expect the value
will be change in the future when device become more stable.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: generic parameter define for _agn device
Wey-Yi Guy [Thu, 24 Jun 2010 21:08:05 +0000 (14:08 -0700)]
iwlwifi: generic parameter define for _agn device

Code clean up to change name from having 5000 as part of name which easy
to confuse and think it is for 5000 series devices to more
generic _agn name since it is being used by multiple _agn devices.

No functional changes.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: debugfs file for txfifo command testing
Wey-Yi Guy [Thu, 24 Jun 2010 20:18:36 +0000 (13:18 -0700)]
iwlwifi: debugfs file for txfifo command testing

Add debugfs file for REPLY_TXFIFO_FLUSH host command testing.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: add support for device tx flush request
Wey-Yi Guy [Thu, 24 Jun 2010 20:18:35 +0000 (13:18 -0700)]
iwlwifi: add support for device tx flush request

"Flush" request can come from two different sources, it can either from
mac80211, or from device when the operation is needed. Here
adding the support for device issue "flush" request.

When receive tx complete with status is TX_STATUS_FAIL_RFKILL_FLUSH,
issue REPLY_TXFIFO_FLUSH command to uCode to flush out all the tx frames
in queues.

In this condition, since mac80211 has no knowledge of "flush" operation,
driver need to stop all the tx queues and wait for the operation
completed before wake up the queues for frames transmission.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: add mac80211 flush callback support
Wey-Yi Guy [Thu, 24 Jun 2010 20:22:36 +0000 (13:22 -0700)]
iwlwifi: add mac80211 flush callback support

Adding flush callback support in the driver. Two type of flush can be
issued by mac80211:
1. drop = true: frame drop is ok, issue REPLY_TXFIFO_FLUSH host command
to uCode to drop all the frames in tx fifo queues; then return the
control back to mac80211
2. drop = false: wait for either all the frames in tx fifo queues been
transmitted, or timeout; then return the control back to mac80211

If the flush request coming from mac80211, mac80211 will make sure there
are no additional frames push down to driver before flush operation is
completed.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: tx fifo queue flush command
Wey-Yi Guy [Thu, 24 Jun 2010 20:18:33 +0000 (13:18 -0700)]
iwlwifi: tx fifo queue flush command

Add host command and structure for tx fifo queue flush

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: add debug print for parsing firmware TLV
Wey-Yi Guy [Tue, 22 Jun 2010 21:31:45 +0000 (14:31 -0700)]
iwlwifi: add debug print for parsing firmware TLV

When parsing TLV during loading firmware, if encounter any TLV error,
log the error message to help debugging.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: fix fw_restart module parameter
Wey-Yi Guy [Mon, 21 Jun 2010 23:52:55 +0000 (16:52 -0700)]
iwlwifi: fix fw_restart module parameter

fw_restart module parameter was broken by the recent check for stuck
queue patch, driver check the fx_restart module parameter
before reload the firmware; but the stuck queue timer kick in after
firmware error and reload the firmware even fw_restart=0. In this case,
driver should not reload the firmware, it is important to help debugging
uCode error.

The only case we can ignore the module parameter is when user request
firmware reload from debugfs, which can bypass the checking and perform
firmware reload all the time.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agominstrel_ht: fix check for downgrading of top2 rate
Ming Lei [Thu, 1 Jul 2010 15:19:50 +0000 (23:19 +0800)]
minstrel_ht: fix check for downgrading of top2 rate

The check should be against current top2 rate, instead of
current top rate.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agominstrel_ht: fix updating rate with best probability
Ming Lei [Thu, 1 Jul 2010 15:18:42 +0000 (23:18 +0800)]
minstrel_ht: fix updating rate with best probability

The throughput should be considered when updating rate
with best probability.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix crash with WEP in ad-hoc mode
Felix Fietkau [Fri, 2 Jul 2010 12:45:22 +0000 (14:45 +0200)]
ath9k: fix crash with WEP in ad-hoc mode

Commit eed8e22f0133e8278b1f8079fcb452f1f9692f9d added support for using
multicast key lookup to support per-vif/sta keys for AP and ad-hoc.
Unfortunately, it also introduced a crash in ad-hoc mode when the sta
pointer is NULL, which happens when setting up an interface with WEP
keys. This patch fixes it by falling back to the assigned key index.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix false positives in the baseband hang check
Felix Fietkau [Thu, 1 Jul 2010 22:09:52 +0000 (00:09 +0200)]
ath9k: fix false positives in the baseband hang check

ath9k_hw_check_alive() occasionally returns false, as the hardware
is still processing data in a specific state. Fix this issue by
repeating the test a few times with longer delay inbetween attempts.
This gets rid of excessive hardware resets that appear frequently on
some AR9132 based devices, but could also happen on AR9280.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Björn Smedman <bjorn.smedman@venatech.se>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: clean up the noise floor calibration code to reduce code duplication
Felix Fietkau [Thu, 1 Jul 2010 22:09:51 +0000 (00:09 +0200)]
ath9k_hw: clean up the noise floor calibration code to reduce code duplication

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: sanitize noise floor values properly on all chips
Felix Fietkau [Thu, 1 Jul 2010 22:09:50 +0000 (00:09 +0200)]
ath9k_hw: sanitize noise floor values properly on all chips

This refactors the noise floor range checks to make them generic,
and adds proper ranges for each supported chip type.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: sync initvals for ar9001 and ar9002 with Atheros
Felix Fietkau [Thu, 1 Jul 2010 22:09:49 +0000 (00:09 +0200)]
ath9k_hw: sync initvals for ar9001 and ar9002 with Atheros

This includes the following changes/fixes:

 - a bugfix for stuck beacon issues
 - timing changes for improved performance
 - AGC setting improvements
 - fixes for high temperature issues on some chips

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: reformat the ar5008, ar9001 and ar9002 initvals to match ar9003
Felix Fietkau [Thu, 1 Jul 2010 22:09:48 +0000 (00:09 +0200)]
ath9k_hw: reformat the ar5008, ar9001 and ar9002 initvals to match ar9003

This format is generated by the initval tool, available at:
git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/initvals-tool.git

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: fix a few inconsistencies in initval array names
Felix Fietkau [Thu, 1 Jul 2010 22:09:47 +0000 (00:09 +0200)]
ath9k_hw: fix a few inconsistencies in initval array names

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Add LED support for AR7010
Sujith [Wed, 30 Jun 2010 09:16:31 +0000 (14:46 +0530)]
ath9k_htc: Add LED support for AR7010

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac82011: Allow selection of minstrel_ht as default rc algorithm
Helmut Schaa [Wed, 30 Jun 2010 06:48:42 +0000 (08:48 +0200)]
mac82011: Allow selection of minstrel_ht as default rc algorithm

Allow selection of minstrel_ht as default rate control algorithm. At
the moment minstrel_ht can only be requested by the driver code but
not selected as default in make menuconfig. Fix this by using
minstrel_ht when minstrel was selected as default and minstrel_ht
is available.

This change won't affect legacy devices as minstrel_ht falls back to
minstrel in that case.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix TSF after reset on AR913x
Felix Fietkau [Wed, 30 Jun 2010 00:07:48 +0000 (02:07 +0200)]
ath9k: fix TSF after reset on AR913x

When issuing a reset, the TSF value is lost in the hardware because of
the 913x specific cold reset. As with some AR9280 cards, the TSF needs
to be preserved in software here.

Additionally, there's an issue that frequently prevents a successful
TSF write directly after the chip reset. In this case, repeating the
TSF write after the initval-writes usually works.

This patch detects failed TSF writes and recovers from them, taking
into account the delay caused by the initval writes.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Björn Smedman <bjorn.smedman@venatech.se>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix compile warning when debug disabled
Ivo van Doorn [Tue, 29 Jun 2010 19:49:50 +0000 (21:49 +0200)]
rt2x00: Fix compile warning when debug disabled

CC [M]  drivers/net/wireless/rt2x00/rt2800lib.o
drivers/net/wireless/rt2x00/rt2800lib.c: In function 'rt2800_ampdu_action':
drivers/net/wireless/rt2x00/rt2800lib.c:2821: warning: unused variable 'rt2x00dev'

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Always set BBP_CSR_CFG_BBP_RW_MODE to 1
Ivo van Doorn [Tue, 29 Jun 2010 19:49:26 +0000 (21:49 +0200)]
rt2x00: Always set BBP_CSR_CFG_BBP_RW_MODE to 1

Latest rt2870 legacy driver also sets BBP_CSR_CFG_BBP_RW_MODE to 1
when reading or writing the EEPROM. This means we can make the
BBP reading and writing completely equal on all platforms.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix antenna initialization
Ivo van Doorn [Tue, 29 Jun 2010 19:49:05 +0000 (21:49 +0200)]
rt2x00: Fix antenna initialization

Legacy driver indicates that BBP1_TX_ANTENNA must be set
to 0 for TXPATH values of 1 and 3. So the previous statement
that nothing should be done for TXPATH = 3, is false.

Furthermore, remove the false BBP3_RX_ANTENNA initialization
when TXPATH is 1 for PCI and SOC devices. This field will always
be overridden in the next switch statement, making this initialization
bogus. History of this line indicates it was there from the beginning,
and was once caught as typo. Instead of replacing the line with the
correct line, the correct line was added...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix IEEE80211_HT_CAP_RX_STBC assignment
Ivo van Doorn [Tue, 29 Jun 2010 19:48:37 +0000 (21:48 +0200)]
rt2x00: Fix IEEE80211_HT_CAP_RX_STBC assignment

IEEE80211_HT_CAP_RX_STBC is a 2 bit flag, and should thus
never be set as normal flag. Instead we must read the number
of RX paths from the EEPROM and set the IEEE80211_HT_CAP_RX_STBC
with the correct value (using the same logic as the number of TX
streams).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix beacon reset on rt2800
Helmut Schaa [Tue, 29 Jun 2010 19:48:06 +0000 (21:48 +0200)]
rt2x00: fix beacon reset on rt2800

When an interface is removed the according beacon entry should be reset.
The current approach to only clear the first word is not enough to stop
the device from sending out the beacon, hence resulting in beacons being
sent out for already removed interfaces.

Fix this by invalidating the entire TXWI in front of the beacon instead
of only the first word.

Also clear all beacons during startup in the same way.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Disable link tuning in AP mode
Helmut Schaa [Tue, 29 Jun 2010 19:47:37 +0000 (21:47 +0200)]
rt2x00: Disable link tuning in AP mode

Since the link tuning is based on average RSSI values taken from all received
frames it doesn't make sense to enable it in AP mode where every associated
station provides independent RSSI values. Furthermore the legacy drivers
don't enable link tuning in AP mode as well.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix beacon updates in rt61pci
Helmut Schaa [Tue, 29 Jun 2010 19:47:10 +0000 (21:47 +0200)]
rt2x00: Fix beacon updates in rt61pci

Fix rt61pci beacon updates in the same way as rt2800pci. rt61pci didn't
update the beacon template after each beacon interval, resulting in the
DTIM count being incorrect (if DTIM period > 1). Fix this by calling
rt2x00lib_beacondone after the current beacon was sent out.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix beacon updates in rt2800pci
Helmut Schaa [Tue, 29 Jun 2010 19:46:43 +0000 (21:46 +0200)]
rt2x00: Fix beacon updates in rt2800pci

rt2800pci didn't update the beacon template after each beacon interval,
resulting in the DTIM count being incorrect (if DTIM period > 1). Fix this
by calling rt2x00lib_beacondone after the current beacon was sent out.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Enable multiBSS in rt2800
Ivo van Doorn [Tue, 29 Jun 2010 19:45:31 +0000 (21:45 +0200)]
rt2x00: Enable multiBSS in rt2800

MAC_BSSID_DW1_BSS_ID_MASK must be set to the mask 3, to
enable 8 BSSID's. The MAC_BSSID_DW1_BSS_BCN_NUM is initialized
to 7 to enable the 8 beacons.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Tested-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Align rt2800 EEPROM validation to Ralink vendor driver.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:44:50 +0000 (21:44 +0200)]
rt2x00: Align rt2800 EEPROM validation to Ralink vendor driver.

Align with the latest versions of the Ralink legacy driver(s).

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>
14 years agort2x00: Correctly detect 93C86 EEPROMs in rt2800pci.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:44:18 +0000 (21:44 +0200)]
rt2x00: Correctly detect 93C86 EEPROMs in rt2800pci.

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>
14 years agoeeprom_93cx6: Add support for 93c86 EEPROMs.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:43:44 +0000 (21:43 +0200)]
eeprom_93cx6: Add support for 93c86 EEPROMs.

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>
14 years agort2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:43:03 +0000 (21:43 +0200)]
rt2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.

Align with the way PCI devices are handled, even though it is not
strictly necessary.

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>
14 years agort2x00: Rename driver write_tx_datadesc callback function.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:42:23 +0000 (21:42 +0200)]
rt2x00: Rename driver write_tx_datadesc callback function.

Now that the {usb,pci} specific write_tx_data functions are no longer
present we can rename the write_tx_datadesc callback function back to
its old name.

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>
14 years agort2x00: Move common txdone handling to rt2x00lib_txdone.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:41:40 +0000 (21:41 +0200)]
rt2x00: Move common txdone handling to rt2x00lib_txdone.

Now that the write_tx_data functions are merged, also merge the relevant
parts of the txdone handling into common code, rather than {usb,pci}
specific code.

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>
14 years agort2x00: Merge PCI and USB versions of write_tx_data into single function.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:41:05 +0000 (21:41 +0200)]
rt2x00: Merge PCI and USB versions of write_tx_data into single function.

Now that rt2x00pci_write_tx_data and rt2x00usb_write_tx_data are similar
we can merge them in a single function in rt2x00queue.c.

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>
14 years agort2x00: Move filling of TX URB to rt2x00usb_kick_tx_entry function.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:40:34 +0000 (21:40 +0200)]
rt2x00: Move filling of TX URB to rt2x00usb_kick_tx_entry function.

There is no need to fill the TX URB this early, and moving it to the
rt2x00usb_kick_tx_entry function allows us to merge the PCI and USB
variants of the write_tx_data function.

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>
14 years agort2x00: Fix frame dumping for USB devices.
Gertjan van Wingerde [Tue, 29 Jun 2010 19:40:02 +0000 (21:40 +0200)]
rt2x00: Fix frame dumping for USB devices.

We forgot to clear the SKBDESC_DESC_IN_SKB when the descriptor was removed
from the front of the skb.

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>
14 years agort2x00: Remove unneeded variable
Ivo van Doorn [Tue, 29 Jun 2010 19:39:29 +0000 (21:39 +0200)]
rt2x00: Remove unneeded variable

The update_bssid is set only when BSS_CHANGED_BSSID is used,
but the check if that field is true is done later in the function
but also only when BSS_CHANGED_BSSID is set. This makes the
variable useless, as it can never result in a negative check.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Write the BSSID to register when interface is added
Ivo van Doorn [Tue, 29 Jun 2010 19:38:55 +0000 (21:38 +0200)]
rt2x00: Write the BSSID to register when interface is added

For the Master mode case, we initialized the BSSID as the MAC
address, but never wrote it into the registers. This causes
Hardware crypto to break in Master mode when receiving frames
which require the BSSID to be filled in.

This is safe for STA mode since the BSSID will be initialized
to 00:00:00:00:00 at this point, but will be set to the correct
value later when the device associates.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Implement tx mpdu aggregation
Helmut Schaa [Tue, 29 Jun 2010 19:38:12 +0000 (21:38 +0200)]
rt2x00: Implement tx mpdu aggregation

In order to implement tx mpdu aggregation we only have to implement
the ampdu_action callback such that mac80211 allows negotiation of
blockack sessions.

The hardware will handle everything on its own as long as the ampdu
flag in the TXWI struct is set up correctly and we translate the tx
status correctly.

For now, refuse requests to start rx aggregation.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: make ath9k_hw_keysetmac static
John W. Linville [Tue, 29 Jun 2010 19:24:05 +0000 (15:24 -0400)]
ath9k: make ath9k_hw_keysetmac static

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: remove unused function ath9k_hw_keyisvalid
John W. Linville [Tue, 29 Jun 2010 19:20:49 +0000 (15:20 -0400)]
ath9k: remove unused function ath9k_hw_keyisvalid

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add basic tracing to drv_get_survey
John W. Linville [Tue, 29 Jun 2010 18:51:23 +0000 (14:51 -0400)]
mac80211: add basic tracing to drv_get_survey

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove unnecessary check in ieee80211_dump_survey
John W. Linville [Tue, 29 Jun 2010 17:55:04 +0000 (13:55 -0400)]
mac80211: remove unnecessary check in ieee80211_dump_survey

This check is duplicated in drv_get_survey.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix the for_each_sta_info macro
Felix Fietkau [Thu, 24 Jun 2010 23:44:33 +0000 (01:44 +0200)]
mac80211: fix the for_each_sta_info macro

Because of an ambiguity in the for_each_sta_info macro, it can
currently only be used if the third parameter is set to 'sta'.
Fix this by renaming the parameter to '_sta'.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix retry count for A-MPDU rate control status reports
Felix Fietkau [Thu, 24 Jun 2010 23:26:16 +0000 (01:26 +0200)]
ath9k: fix retry count for A-MPDU rate control status reports

The 'bf_retries' field of the ath_buf structure was used for both
software retries (AMPDU subframes) and hardware retries (legacy
frames). This led to a wrong retry count being reported for the A-MPDU
rate control stats.
This patch changes the code to no longer use bf_retries for reporting
retry counts, but instead always using the real on-chip retry count
from the ath_tx_status.
Additionally, if the first subframe of an A-MPDU was not acked, the tx
status report is submitted along with the first acked subframe, which
may not contain the correct rates in the tx info.
This is easily corrected by saving the tx rate info before looping over
subframes, and then copying it back once the A-MPDU status report is
submitted.
In my tests this change improves throughput visibly.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Björn Smedman <bjorn.smedman@venatech.se>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix antenna div gc for <= AR5K_SREV_PHY_2413
Bruno Randolf [Mon, 28 Jun 2010 02:01:48 +0000 (11:01 +0900)]
ath5k: fix antenna div gc for <= AR5K_SREV_PHY_2413

In commit 39d5b2c83ca8904b6826a0713263a4e5a9c0730a "ath5k: update
AR5K_PHY_RESTART_DIV_GC values to match masks" i introduced a regression on PHY
chips older than AR5K_SREV_PHY_5413, which caused signal values to be about
10dB less that before. This patch reverts the AR5K_PHY_RESTART_DIV_GC values to
the same values which were effectively used before (without the bitmask
mistake). This brings signal levels back to normal on these PHY chips.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Add SDIO_DEVICE() for EW-CG1102GC
Magnus Damm [Fri, 25 Jun 2010 09:32:54 +0000 (18:32 +0900)]
b43: Add SDIO_DEVICE() for EW-CG1102GC

This patch enables the EW-CG1102GC SDIO card in the b43 driver.

b43-sdio mmc0:0001:1: Chip ID 14e4:4318
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x0D, vendor 0x4243)
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x09, vendor 0x4243)
ssb: Core 2 found: PCI (cc 0x804, rev 0x0C, vendor 0x4243)
ssb: Core 3 found: PCMCIA (cc 0x80D, rev 0x07, vendor 0x4243)
b43-phy0: Broadcom 4318 WLAN found (core revision 9)
b43-phy0 debug: Found PHY: Analog 3, Type 2, Revision 7
b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 8

Tested with openfwwf-5.2 using a SuperH SDHI host controller.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: use netif_receive_skb in ieee80211_tx_status callpath
John W. Linville [Thu, 24 Jun 2010 18:38:30 +0000 (14:38 -0400)]
mac80211: use netif_receive_skb in ieee80211_tx_status callpath

This avoids the extra queueing from calling netif_rx.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: use netif_receive_skb in ieee80211_rx callpath
John W. Linville [Thu, 24 Jun 2010 18:25:56 +0000 (14:25 -0400)]
mac80211: use netif_receive_skb in ieee80211_rx callpath

This avoids the extra queueing from calling netif_rx.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: add disable rf calibration support for 6000g2a and 6000g2b
Wey-Yi Guy [Mon, 21 Jun 2010 19:15:17 +0000 (12:15 -0700)]
iwlwifi: add disable rf calibration support for 6000g2a and 6000g2b

Radio calibration (chain noise and sensitivity) should be allowed to
be disabled from debugfs if compiled with CONFIG_IWLWIFI_DEBUGFS. For both
6000g2a and 6000g2b, the parameters are missing in "cfg", which cause
user can not disable the radio calibration manually; add the support to
allow the operation.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: reduce severity of disconnected antennas warning
Reinette Chatre [Fri, 18 Jun 2010 23:40:21 +0000 (16:40 -0700)]
iwlagn: reduce severity of disconnected antennas warning

This message is encountered regularly and we need to take a closer look at
the circumstances under which it is printed before presenting errors to
users.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: turn on RTS/CTS after aggregation become operational
Wey-Yi Guy [Fri, 18 Jun 2010 18:33:15 +0000 (11:33 -0700)]
iwlwifi: turn on RTS/CTS after aggregation become operational

If RTS/CTS protection is needed for HT, wait until get operational
notification from mac80211, then inform uCode to switch to RTS/CTS
through RXON command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: read rfkill during resume
Johannes Berg [Fri, 18 Jun 2010 08:38:56 +0000 (01:38 -0700)]
iwlwifi: read rfkill during resume

When resuming from hibernate or suspend,
the status of the rfkill switch isn't
known since it might have been toggled
while the system was asleep. Therefore,
we need to read out the status at resume
time to make sure the system knows about
an up-to-date status.

Reported-by: Mark Tung <mark.y.tung@intel.com>
Tested-by: Mark Tung <mark.y.tung@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: update LQ for bcast station on channel change
Daniel Halperin [Mon, 14 Jun 2010 20:10:29 +0000 (13:10 -0700)]
iwlwifi: update LQ for bcast station on channel change

The rate table in the bcast LQ is computed only when the station is
allocated, and chooses the lowest rate for the band. Because of when this
occurs, this is the 2.4 GHz band and uses the 0x420a (CCK, 1 Mbps) rate. In 5 GHz
beaconing mode, this rate will prevent beacons from being sent and any other
packets from being received.

We can fix this by re-initializing the bcast station's LQ command when the
channel is changed.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: add a mechanism to disable plcp error checking
Wey-Yi Guy [Thu, 17 Jun 2010 22:25:00 +0000 (15:25 -0700)]
iwlwifi: add a mechanism to disable plcp error checking

For some devices, especially the upcoming new devices, the plcp error
rate is different. Before the correct error rate can be determine, also
for the debugging purpose; add the mechanism to disable plcp error checking
which cause radio reset happen.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: enable DC calibration based on config parameter
Wey-Yi Guy [Tue, 15 Jun 2010 23:14:53 +0000 (16:14 -0700)]
iwlwifi: enable DC calibration based on config parameter

Different devices have different calibration requirement,
some need DC calibration and some don't; make it a cfg parameter
for easy management.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: name change from signal protection flag
Wey-Yi Guy [Fri, 18 Jun 2010 18:33:16 +0000 (11:33 -0700)]
iwlwifi: name change from signal protection flag

This bit need to be set for both RTS/CTS or CTS-to-self protection, if
CTS-to-self is used, then uCode will  check the RXON_FLG_SELF_CTS_EN
status. Change the name from TX_CMD_FLG_RTS_CTS_MSK to TX_CMD_FLAG_PROT_REQUIRE_MSK
to match the behavior of the bit setting.

Also update comments to reflect which hardware uses which of the TX command
flags.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoMerge branch 'wireless-2.6' into wireless-next-2.6
Reinette Chatre [Fri, 25 Jun 2010 21:47:02 +0000 (14:47 -0700)]
Merge branch 'wireless-2.6' into wireless-next-2.6

14 years agoiwlwifi: set TX_CMD_FLAG_PROT_REQUIRE_MSK in tx_flag
Wey-Yi Guy [Fri, 18 Jun 2010 18:33:17 +0000 (11:33 -0700)]
iwlwifi: set TX_CMD_FLAG_PROT_REQUIRE_MSK in tx_flag

When building tx command, always set TX_CMD_FLAG_PROT_REQUIRE_MSK
for 5000 series and up.

Without setting this bit the firmware will not examine the RTS/CTS setting
and thus not send traffic with the appropriate protection. RTS/CTS is is
required for HT traffic in a noisy environment where, without this setting,
connections will stall on some hardware as documented in the patch that
initially attempted to address this:

    commit 1152dcc28c66a74b5b3f1a3ede0aa6729bfd48e4
    Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
    Date:   Fri Jan 15 13:42:58 2010 -0800

    iwlwifi: Fix throughput stall issue in HT mode for 5000

    Similar to 6000 and 1000 series, RTS/CTS is the recommended
    protection mechanism for 5000 series in HT mode based on the HW design.
    Using RTS/CTS will better protect the inner exchange from interference,
    especially in highly-congested environment, it also prevent uCode encounter
    TX FIFO underrun and other HT mode related performance issues.

For 3945 and 4965, different flags are used for RTS/CTS or CTS-to-Self
protection.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: fix multicast
Johannes Berg [Fri, 18 Jun 2010 10:41:25 +0000 (03:41 -0700)]
iwlwifi: fix multicast

commit 3474ad635db371b0d8d0ee40086f15d223d5b6a4
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Apr 29 04:43:05 2010 -0700

    iwlwifi: apply filter flags directly

broke multicast. The reason, it turns out, is that
the code previously checked if ALLMULTI _changed_,
which the new code no longer did, and normally it
_never_ changes. Had somebody changed it manually,
the code prior to my patch there would have been
broken already.

The reason is that we always, unconditionally, ask
the device to pass up all multicast frames, but the
new code made it depend on ALLMULTI which broke it
since now we'd pass up multicast frames depending
on the default filter in the device, which isn't
necessarily what we want (since we don't program it
right now).

Fix this by simply not checking allmulti as we have
allmulti behaviour enabled already anyway.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoath9k: Wakeup the chip in an appropriate place in ath_paprd_calibrate()
Vasanthakumar Thiagarajan [Thu, 24 Jun 2010 11:09:27 +0000 (04:09 -0700)]
ath9k: Wakeup the chip in an appropriate place in ath_paprd_calibrate()

Move ath9k_ps_wakeup() down just before accessing hw registers.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove unused paprd_txok
Vasanthakumar Thiagarajan [Thu, 24 Jun 2010 09:42:46 +0000 (02:42 -0700)]
ath9k: Remove unused paprd_txok

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix bug in paprd
Vasanthakumar Thiagarajan [Thu, 24 Jun 2010 09:42:44 +0000 (02:42 -0700)]
ath9k: Fix bug in paprd

It is possbile that the transmission of paprd test frame
might not get completed in 100ms if tx is stuck. Freeing
this skb upon timeout in ath_paprd_calibrate() will result
in accessing already freed memory when the associated pending
buffer is drained in txq. This patch fixes this issue.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2500usb: fallback to SW encryption for TKIP+AES
Ondrej Zary [Wed, 23 Jun 2010 10:57:15 +0000 (12:57 +0200)]
rt2500usb: fallback to SW encryption for TKIP+AES

HW crypto in rt2500usb does not seem to support keys with different ciphers,
which breaks TKIP+AES mode. Fall back to software encryption to fix it.

This should fix long-standing problems with rt2500usb and WPA, such as:
http://rt2x00.serialmonkey.com/phpBB/viewtopic.php?f=4&t=4834
https://bugzilla.redhat.com/show_bug.cgi?id=484888

Also tested that it does not break WEP, TKIP-only and AES-only modes.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: Add option to adjust transmit power
Juuso Oikarinen [Wed, 23 Jun 2010 09:12:38 +0000 (12:12 +0300)]
nl80211: Add option to adjust transmit power

This patch adds transmit power setting type and transmit power level attributes
to NL80211_CMD_SET_WIPHY in order to facilitate adjusting of the transmit power
level of the device.

The added attributes allow selection of automatic, limited or fixed transmit
power level, with the level definable in signed mBm format.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units
Juuso Oikarinen [Wed, 23 Jun 2010 09:12:37 +0000 (12:12 +0300)]
cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units

In preparation for a TX power setting interface in the nl80211, change the
.set_tx_power function to use mBm units instead of dBm for greater accuracy and
smaller power levels.

Also, already in advance move the tx_power_setting enumeration to nl80211.

This change affects the .tx_set_power function prototype. As a result, the
corresponding changes are needed to modules using it. These are mac80211,
iwmc3200wifi and rndis_wlan.

Cc: Samuel Ortiz <samuel.ortiz@intel.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoat76c50x-usb: Extract bssid from authentication frame
Sebastian Smolorz [Tue, 22 Jun 2010 14:55:17 +0000 (16:55 +0200)]
at76c50x-usb: Extract bssid from authentication frame

The driver at76c50x-usb is unable to authenticate with an AP since
kernel 2.6.31 for the following reason: The join command of the firmware
needs to be sent with the right bssid before any transmission can start.
Before kernel 2.6.31 mac80211 informed its drivers about the changing
bssid early enough for at76c50x-usb but during the development of 2.6.31
mac80211's behaviour changed. Now a new bssid is set after the
association.

This patch changes the tx routine of the driver at76c50x-usb in such a
way that a new bssid is extracted from an authentication frame and the
join command with that bssid is processed.

Signed-off-by: Sebastian Smolorz <sesmo@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoat76c50x-usb: Move function at76_join() several lines up
Sebastian Smolorz [Tue, 22 Jun 2010 14:53:37 +0000 (16:53 +0200)]
at76c50x-usb: Move function at76_join() several lines up

This patch does a simple code move of at76_join() so that
at76_mac80211_tx() follows at76_join() in the driver's source file.

This is a preparatory patch for the following patch where we need
to call at76_join() from at76_mac80211_tx() in order to
authenticate successfully with a bssid.

Signed-off-by: Sebastian Smolorz <sesmo@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: avoid scheduling while atomic in mesh_rx_plink_frame
John W. Linville [Mon, 21 Jun 2010 21:14:07 +0000 (17:14 -0400)]
mac80211: avoid scheduling while atomic in mesh_rx_plink_frame

While mesh_rx_plink_frame holds sta->lock...

mesh_rx_plink_frame ->
mesh_plink_inc_estab_count ->
ieee80211_bss_info_change_notify

...but ieee80211_bss_info_change_notify is allowed to sleep.  A driver
taking advantage of that allowance can cause a scheduling while
atomic bug.  Similar paths exist for mesh_plink_dec_estab_count,
so work around those as well.

http://bugzilla.kernel.org/show_bug.cgi?id=16099

Also, correct a minor kerneldoc comment error (mismatched function names).

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
14 years agominstrel_ht: move minstrel_mcs_groups declaration to header file
John W. Linville [Thu, 24 Jun 2010 17:03:14 +0000 (13:03 -0400)]
minstrel_ht: move minstrel_mcs_groups declaration to header file

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
14 years agowireless: mark reg_mutex as static
John W. Linville [Thu, 24 Jun 2010 15:26:31 +0000 (11:26 -0400)]
wireless: mark reg_mutex as static

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agominstrel_ht: make *idx unsigned in minstrel_downgrade_rate
John W. Linville [Thu, 24 Jun 2010 15:18:38 +0000 (11:18 -0400)]
minstrel_ht: make *idx unsigned in minstrel_downgrade_rate

net/mac80211/rc80211_minstrel_ht.c:440:46: warning: incorrect type in argument 2 (different signedness)
net/mac80211/rc80211_minstrel_ht.c:440:46:    expected int *idx
net/mac80211/rc80211_minstrel_ht.c:440:46:    got unsigned int *<noident>
net/mac80211/rc80211_minstrel_ht.c:446:46: warning: incorrect type in argument 2 (different signedness)
net/mac80211/rc80211_minstrel_ht.c:446:46:    expected int *idx
net/mac80211/rc80211_minstrel_ht.c:446:46:    got unsigned int *<noident>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
14 years agomac80211: don't shadow mgmt variable in ieee80211_rx_h_action
John W. Linville [Thu, 24 Jun 2010 15:13:56 +0000 (11:13 -0400)]
mac80211: don't shadow mgmt variable in ieee80211_rx_h_action

net/mac80211/rx.c:2059:39: warning: symbol 'mgmt' shadows an earlier one
net/mac80211/rx.c:1916:31: originally declared here

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agortl8180: mark rtl8180_beacon_work static
John W. Linville [Thu, 24 Jun 2010 15:08:37 +0000 (11:08 -0400)]
rtl8180: mark rtl8180_beacon_work static

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix bug in starting ani
Vasanthakumar Thiagarajan [Wed, 23 Jun 2010 13:49:21 +0000 (06:49 -0700)]
ath9k: Fix bug in starting ani

There are few places where ANI is started without checking
if it is right to start. This might lead to a case where ani
timer would be left undeleted and cause improper memory acccess
during module unload. This bug is clearly exposed with
paprd support where the driver detects tx hang and does a
chip reset. During this reset ani is (re)started without checking
if it needs to be started. This would leave a timer scheduled
even after all the resources are freed and cause a panic.

This patch introduces a bit in sc_flags to indicate if ani
needs to be started in sw_scan_start() and ath_reset().
This would fix the following panic. This issue is easily seen
with ar9003 + paprd.

 BUG: unable to handle kernel paging request at 0000000000003f38
[<ffffffff81075391>] ? __queue_work+0x41/0x50
[<ffffffff8106afaa>] run_timer_softirq+0x17a/0x370
[<ffffffff81088be8>] ? tick_dev_program_event+0x48/0x110
[<ffffffff81061f69>] __do_softirq+0xb9/0x1f0
[<ffffffff810ba060>] ? handle_IRQ_event+0x50/0x160
[<ffffffff8100af5c>] call_softirq+0x1c/0x30
[<ffffffff8100c9f5>] do_softirq+0x65/0xa0
[<ffffffff81061e25>] irq_exit+0x85/0x90
[<ffffffff8155e095>] do_IRQ+0x75/0xf0
[<ffffffff815570d3>] ret_from_intr+0x0/0x11
<EOI>
[<ffffffff812fd67b>] ? acpi_idle_enter_simple+0xe4/0x119
[<ffffffff812fd674>] ? acpi_idle_enter_simple+0xdd/0x119
[<ffffffff81441c87>] cpuidle_idle_call+0xa7/0x140
[<ffffffff81008da3>] cpu_idle+0xb3/0x110
[<ffffffff81550722>] start_secondary+0x1ee/0x1f5

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: declare MODULE_FIRMWARE for ath9k_htc
John W. Linville [Wed, 23 Jun 2010 18:20:45 +0000 (14:20 -0400)]
ath9k: declare MODULE_FIRMWARE for ath9k_htc

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: mark lbs_ret_802_11d_domain_info static
John W. Linville [Wed, 23 Jun 2010 14:33:45 +0000 (10:33 -0400)]
libertas: mark lbs_ret_802_11d_domain_info static

Probably little risk of namespace polution, but good practice... :-)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Add a module parameter to disable led blinking.
Vivek Natarajan [Tue, 22 Jun 2010 06:22:37 +0000 (11:52 +0530)]
ath9k: Add a module parameter to disable led blinking.

Some vendors require the LED to be ON always irrespective of any
radio activity. Introducing a module parameter to disable blinking,
so that one can choose between always on or led blink during
activity.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add an extra delay when reseting AR_RTC_RESET
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:51 +0000 (18:38 -0400)]
ath9k_hw: add an extra delay when reseting AR_RTC_RESET

Without this we could start trying to work with the device without
it being fully functional yet and loose some packets upon resume.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: dynamically choose the SERDES array for low power
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:50 +0000 (18:38 -0400)]
ath9k_hw: dynamically choose the SERDES array for low power

The array we use will vary depending on whether or not we are
to go to lower power or not. The default values (iniPcieSerdes)
are a copy or what go into the registers through the INI files.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaks
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:49 +0000 (18:38 -0400)]
ath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaks

This can be useful during testing of new ASPM tweaks which often
have to be done through the PCI Serializer-Deserializer (SERDES).

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: move LowPower array writes to ar9003_hw_configpcipowersave()
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:48 +0000 (18:38 -0400)]
ath9k_hw: move LowPower array writes to ar9003_hw_configpcipowersave()

The LowPower array writes disables the PLL when ASPM is enabled.
The host driver makes quite a few calls to ath9k_hw_configpcipowersave()
and these same calls also need to ensure the PLL is off when they issue
it.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: fix ASPM setting for AR9003
Luis R. Rodriguez [Mon, 21 Jun 2010 22:38:47 +0000 (18:38 -0400)]
ath9k_hw: fix ASPM setting for AR9003

The AR_WA register should not be read when in sleep state so
add a variable we can stash its value into for when we need
to set it. Additionally the AR_WA_D3_TO_L1_DISABLE_REAL
(bit 16) needs to be removed.

Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com>
signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: Added 11d support using cfg80211
Kiran Divekar [Sat, 5 Jun 2010 06:20:42 +0000 (23:20 -0700)]
Libertas: Added 11d support using cfg80211

Added 11d support for libertas driver using cfg80211. This is based on Holger
Shurig's initial work to add cfg80211 support libertas.
(https://patchwork.kernel.org/patch/64286/)

Please let us know, if there are any improvements comments.

Code is added to send 11d enable command to firmware while
initialisation and pass 11d specific information to firmware
when notifier handler is called by cfg80211.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: fix WARN_ON issues in cfg80211 support
Kiran Divekar [Sat, 5 Jun 2010 06:20:37 +0000 (23:20 -0700)]
Libertas: fix WARN_ON issues in cfg80211 support

In following scenarios WARN_ON() in cfg80211 code was triggered.
a) Driver unload or card removal.
b) Disconnect from infra network
c) Adhoc start/join
d) Adhoc stop
Added following fixes to avoid WARN_ON() in cfg80211 code.
a) Ensured that cfg80211_disconnected() function defined in cfg80211
code will be called only in infra mode.
b) Solved timing issue by moving cfg80211_disconnected() call inside
lbs_cfg_disconnect().
c) Updated "wdev->ssid" in driver code after Adhoc join/start
d) Removed unnecessory cfg80211_disconnected() call in lbs_remove_card.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoLibertas: cfg80211 support
Kiran Divekar [Mon, 14 Jun 2010 16:31:26 +0000 (22:01 +0530)]
Libertas: cfg80211 support

Holger Schurig's patch (https://patchwork.kernel.org/patch/64286/)
is rebased to latest wireless-testing tree.

(Includes patches from me originally posted as "libertas: fix build
error due to undefined symbol" and "libertas: unmangle capability
value". -- JWL)

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Add interface for driver to temporarily disable dynamic ps
Juuso Oikarinen [Mon, 21 Jun 2010 05:59:39 +0000 (08:59 +0300)]
mac80211: Add interface for driver to temporarily disable dynamic ps

This mechanism introduced in this patch applies (at least) for hardware
designs using a single shared antenna for both WLAN and BT. In these designs,
the antenna must be toggled between WLAN and BT.

In those hardware, managing WLAN co-existence with Bluetooth requires WLAN
full power save whenever there is Bluetooth activity in order for WLAN to be
able to periodically relinquish the antenna to be used for BT. This is because
BT can only access the shared antenna when WLAN is idle or asleep.

Some hardware, for instance the wl1271, are able to indicate to the host
whenever there is BT traffic. In essence, the hardware will send an indication
to the host whenever there is, for example, SCO traffic or A2DP traffic, and
will send another indication when the traffic is over.

The hardware gets information of Bluetooth traffic via hardware co-existence
control lines - these lines are used to negotiate the shared antenna
ownership. The hardware will give the antenna to BT whenever WLAN is sleeping.

This patch adds the interface to mac80211 to facilitate temporarily disabling
of dynamic power save as per request of the WLAN driver. This interface will
immediately force WLAN to full powersave, hence allowing BT coexistence as
described above.

In these kind of shared antenna desings, when WLAN powersave is fully disabled,
Bluetooth will not work simultaneously with WLAN at all. This patch does not
address that problem. This interface will not change PSM state, so if PSM is
disabled it will remain so. Solving this problem requires knowledge about BT
state, and is best done in user-space.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix compile warning in scan.c.
Gertjan van Wingerde [Sun, 20 Jun 2010 18:28:07 +0000 (20:28 +0200)]
mac80211: Fix compile warning in scan.c.

Fix the following compile warning:

CC [M]  net/mac80211/scan.o
net/mac80211/scan.c: In function 'ieee80211_request_internal_scan':
net/mac80211/scan.c:749:23: warning: comparison between 'enum nl80211_band' and 'enum ieee80211_band'

caused by the local variable band not being of the proper 'ieee80211_band' type.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Clarify logged message after fatal DMA error and switch to PIO mode
Larry Finger [Sat, 19 Jun 2010 13:29:08 +0000 (08:29 -0500)]
b43: Clarify logged message after fatal DMA error and switch to PIO mode

The message following fatal DMA errors fails to indicate properly that the
driver has switched to PIO mode.

Signed-off-by: Larry Finger <Larry.Finger@wfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove non-exist reference
Wey-Yi Guy [Tue, 15 Jun 2010 00:13:14 +0000 (17:13 -0700)]
iwlwifi: remove non-exist reference

Remove the reference to non-exist function in iwlcore

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: code cleanup to remove un-necessary "goto"
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:56 +0000 (17:09 -0700)]
iwlwifi: code cleanup to remove un-necessary "goto"

Break out of loop and log the error message when encounter error; this is
better approach than using "goto".

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move calibration from iwlcore to iwlagn
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:55 +0000 (17:09 -0700)]
iwlwifi: move calibration from iwlcore to iwlagn

All the calibrations are "agn" only functions, move from iwlcore to
iwlagn.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move _agn statistics related structure
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:54 +0000 (17:09 -0700)]
iwlwifi: move _agn statistics related structure

agn and 3945 has different statistics_notif data structure; since 3945
has it statistics_notif data structure inside the _3945 portion of
iwl_priv, it make sense to move the agn statistics_notif into _agn
portion.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move agn specific rx related code to iwl-agn-rx.c
Wey-Yi Guy [Tue, 15 Jun 2010 00:09:53 +0000 (17:09 -0700)]
iwlwifi: move agn specific rx related code to iwl-agn-rx.c

To avoid having unnecessary functions in iwlcore.ko, those that
are not shared by agn and 3945, move agn specific rx related code
to iwl-agn-rx.c.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: display ucode SW Error in hex
Jay Sternberg [Mon, 14 Jun 2010 21:40:40 +0000 (14:40 -0700)]
iwlwifi: display ucode SW Error in hex

errors are defined in hex but displayed as decimal.  displaying as hex
debugging easier and eliminated having to manually convert.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: return ucode errors from station management
Johannes Berg [Mon, 14 Jun 2010 15:32:38 +0000 (08:32 -0700)]
iwlwifi: return ucode errors from station management

When station management calls to ucode return
an error we could previously do nothing, but
now that almost all calls are synchronous we
can actually let the error bubble up. Use EIO
as the error as it best indicates a problem
with the device.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>