dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

2002 Commits

Author SHA1 Message Date
Christian Lamparter caf1eae206 carl9170: improve unicast PS buffering
Using the ieee80211_sta_block allows the PS code
to handle awake->doze->awake transitions of our
clients in a race-free manner.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 15:50:30 -04:00
Adrian Chadd 25f63a5a37 ath9k: fix AR9160 xpaBiasLvlFreq endianness handling
The xpaBiasLvlFreq parameter array is made up of 16 bit words which
aren't byte-swapped like the other 16-bit eeprom parameters are.
It's only used by the AR9160.

Signed-off-by: Adrian Chadd <adrian@freebsd.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 15:50:28 -04:00
Rajkumar Manoharan 92c6f76c6d ath9k: set beacon related ps flags on bss_info change
Requesting beacon sync up to configure beacon timers properly
in hw, has be done after doing beacon config with default values.
Setting the flags in beacon config is causing the device to not
enter into network sleep on idle state.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 15:50:28 -04:00
Rajkumar Manoharan 3782c69d6e ath9k_hw: Fix Tx IQ Calibration hang issue in AR9003 chips
On AR9003 chips, doing three IQ calibrations will possibly cause chip
in stuck state. In noisy environment, chip could receive
a packet during the middle of three calibrations and it causes
the conflict of HW access and the eventual failure. It also
causes IQ calibration outliers which results in poor Tx EVM.

The IQ Cal procedure is after resetting the chip, run IQ cal 3 times
per each cal cycle and find the two closest readings and average of two.
The advantage of running Tx IQ cal more than once is that we can compare
calibration results for the same gain setting over multiple iterations.
Most of the cases the IQ failures were observed after first pass.

For the AR9485 and later chips, Tx IQ Calibration is performed along
with AGC cal. But for pre-AR9485 chips, Tx IQ cal HW has to be separated
from the rest of calibration HW to avoid chip hang. After all
calibrations are done in HW, we can start SW post-processing.
By doing this way, we minimize the SW difference among all chips.

The order of calibration (run IQ cal before other calibration) is also
needed to avoid chip hang for chips before AR9485. This issue was
originally observed with AR9382.

During the issue kernel log was filled with following message
ath: timeout (100000 us) on reg 0xa640: 0x00000001 & 0x00000001 != 0x00000000
ath: timeout (100000 us) on reg 0xa2c4: 0x00158dd9 & 0x00000001 != 0x00000000
ath: Unable to reset channel (2412 MHz), reset status -5
ath: Unable to set channel

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26 15:50:27 -04:00
John W. Linville 429576b97c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-04-26 15:39:10 -04:00
Mohammed Shafi Shajakhan 6dde1aabf6 ath9k: Add TSFOOR interrupt stats in debug info
This helped the developers to fix an issue of chip not entering network
sleep during idle state, previously this was only available as a debug
message

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:20 -04:00
Mohammed Shafi Shajakhan cedc7e3d0c ath9k: remove the unlikely check for autosleep
newer chipsets support auto sleep feature, so remove the
unlikely check which does not seems to help anything

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:19 -04:00
Senthil Balasubramanian b84628eb57 ath9k: Add power save wrappers and modularize hw_pll handler
We should protect hw_pll handler with power save wrappers and
also modularize hw_pll handler properly for better readability.

Also add a debug message to track chip resets on pll hang condition.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:19 -04:00
Senthil Balasubramanian 9eab61c2bf ath9k: cleanup hw pll work handler
There is no reason why pll work handler should be part of xmit
file. move it to main.c so that reading hw check routines are
all in the same place.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:18 -04:00
Senthil Balasubramanian 5151390669 ath9k: optimize the usage of power save wrappers.
We need not wake up the chip even before mutex lock is acquired and also
that it is required only if we are going to drain the txq. So place the
wrappers accordingly and this change is also useful when there are no
pending frames in the txq as we do not wake up the chip unnecessarily.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:18 -04:00
Senthil Balasubramanian d1c038d620 ath9k_hw: Fix incorrect baseband PLL phase shift for AR9485
we should program the AR9485 baseband PLL phase shift to 6 and
a redundant setting overwrites the correct value. Remove the
incorrect and unwnated register setting.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:17 -04:00
Senthil Balasubramanian 353e5019e0 ath9k: Fix LED gpio for AR93xx chipsets.
The LED gpio is incorrectly programmed for AR9300 and so the led
is not working propelry. AR93xx uses gpio 10 for LED and not the
default.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:17 -04:00
Vasanthakumar Thiagarajan 0a6c9b1b66 ath9k: Fix warning: symbol 'ath9k_platform_id_table' was not declared. Should it be static?
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:17 -04:00
Vasanthakumar Thiagarajan 788f6875fc ath9k: Fix bug in configuring hw timer
Hw next tigger time is configured as current_tsf + (timer_period * 10) which
is wrong, it should be current_tsf + timer_period. The wrong hw timer configuration
would cause btcoex related issues.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:16 -04:00
Sujith Manoharan 767ad6a0a2 ath9k_htc: Remove unused macros and structures
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:15 -04:00
Sujith Manoharan c58ca5b508 ath9k_htc: Use power save wrappers when accessing HW
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:14 -04:00
Sujith Manoharan f0dd49803b ath9k_htc: Fix max A-MPDU size handling
Set the maximum ampdu size of a station correctly
in the target by using the ampdu_factor.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:14 -04:00
Sujith Manoharan 3a0593efd1 ath9k_htc: Fix AMPDU subframe handling
* Register the driver's maximum ampdu subframe limit to mac80211.
* Cleanup the target capabilities structure and fix an endian issue.
* Fix BTCOEX by sending a command to the target when the BT priority
  changes.
* Bump the required firmware version to 1.1

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:14 -04:00
Sujith Manoharan 0ff2b5c05d ath9k: Fix warnings from -Wunused-but-set-variable
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:14 -04:00
Vasanthakumar Thiagarajan bca04689a2 ath9k_hw: Enable AR9340 support
AR9340 is a AR9003 family built-in 2x2 wmac of ar934x SOCs. It is single band
in ar9341 SOC and dual band in ar9344/ar9342 SOCs.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:13 -04:00
Vasanthakumar Thiagarajan 79d1d2b8a3 ath9k_hw: Disable INTR_HOST1_FATAL to avoid interrupt strom with ar9430
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:13 -04:00
Vasanthakumar Thiagarajan ecb1d385ad ath9k_hw: Assign macversion based on devid for built-in wmac
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:12 -04:00
Vasanthakumar Thiagarajan 247eee0e4e ath9k: Add AR9340 platform id to id table
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:12 -04:00
Vasanthakumar Thiagarajan 5d48ae78cf ath9k_hw: Read iq calibration data only for active chains
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:12 -04:00
Vasanthakumar Thiagarajan 2976bc5ebf ath9k_hw: Configure chain switch table and attenuation control only for active chains
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:12 -04:00
Vasanthakumar Thiagarajan 2be7bfe0b4 ath9k_hw: Enable byte Tx/Rx data swap for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:11 -04:00
Vasanthakumar Thiagarajan a969c09184 ath9k_hw: Configure tuning capacitance value for AR9340 as well
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:11 -04:00
Vasanthakumar Thiagarajan 3594beae70 ath9k_hw: Skip internal regulator configuration for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:11 -04:00
Vasanthakumar Thiagarajan 160b7fb4a0 ath9k_hw: Don't configure AR_CH0_THERM for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:11 -04:00
Vasanthakumar Thiagarajan 66953d4385 ath9k_hw: Fix register offset AR_PHY_65NM_CH0_THERM for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:10 -04:00
Vasanthakumar Thiagarajan e758ff8f7f ath9k_hw: Clean up rx/tx chain configuration before AGC/IQ cal
Use hw supported chains instead of hard coded values.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:10 -04:00
Vasanthakumar Thiagarajan 17869f4fe9 ath9k_hw: Configure RF channel freqency for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:10 -04:00
Vasanthakumar Thiagarajan d1395d85fa ath9k_hw: Read spur frequency information from eeprom for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:09 -04:00
Vasanthakumar Thiagarajan d7fd52a80f ath9k_hw: Initialize tx and rx gain table from initvals.h for ar9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:09 -04:00
Vasanthakumar Thiagarajan 070c4d509b ath9k_hw: Don't do ani initialization for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:09 -04:00
Vasanthakumar Thiagarajan d89baac8b4 ath9k_hw: Initialize mode registers from initvals.h for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:09 -04:00
Vasanthakumar Thiagarajan 9aa5a8d5fd ath9k_hw: Add initvals.h for ar9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:09 -04:00
Vasanthakumar Thiagarajan 0b488ac6ec ath9k_hw: Configure pll control register accordingly for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:08 -04:00
Vasanthakumar Thiagarajan f2f5f2a1ce ath9k_hw: Get AHB clock information from ath9k_platform_data
Add a bool in ath9k_platform_data to pass AHB clock speed information.
Driver needs this to configure PLL on some SOCs.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:08 -04:00
Vasanthakumar Thiagarajan 35d5f56125 ath9k_hw: Take care of few host interface register changes for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:08 -04:00
Vasanthakumar Thiagarajan b99a7be47d ath9k_hw: Define devid and mac version for AR9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25 14:50:07 -04:00
Felix Fietkau 93ae2dd223 ath9k: assign keycache slots to unencrypted stations
Frame filtering relies on having a valid destination index (keycache slot),
to keep track of the destination. Assigning a keycache slot (configured
to unencrypted, with no key data attached) improves powersave handling in
AP mode with no encryption.
The dummy keycache entry for a station is cleared, when a real key gets
added.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:38:06 -04:00
Felix Fietkau 5519541d5a ath9k: fix powersave frame filtering/buffering in AP mode
This patch fixes a long standing issue of pending packets in the queue being
sent (and retransmitted many times) to sleeping stations.
This was made worse by aggregation through driver-internal retransmitting
of A-MDPU subframes.
Previously the hardware tx filter was cleared unconditionally for every
single packet - with this patch it uses the IEEE80211_TX_CTL_CLEAR_PS_FILT
for unaggregated frames.
A sta_notify driver op is added to stop aggregation for stations when they
enter powersave mode. Subframes stay buffered inside the driver, to ensure
that the BlockAck window keeps a sane state.
Since the driver uses software aggregation, the clearing of the tx filter
needs to be handled by the driver instead of mac80211 for aggregated frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:38:06 -04:00
Rajkumar Manoharan 8e22ad323f ath9k: Fix beacon generation on foreign channel
While leaving the oper channel, beacon generation is stopped
by mac80211 and beacon slots are marked as inactive.
During the scan, ath9k configures beacon timers
based on IEEE80211_CONF_OFFCHANNEL which inturn generates
beacon alert even though bslot is inactive.

ath9k fails to disable beacon alert while moving to offchannel
if none of the beacon slot is active. This is causing beacon
transmission on foreign channel. This patch enables swba
based on active bslots.

This issue was reported with two vifs (AP+STA) and triggered
scan in STA vif in unassociated state.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:38:05 -04:00
Rajkumar Manoharan cea3235cf5 ath9k_htc: Fix free slot value for cab queue
ath9k_htc_tx_get_slot can return zero as valid index.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@Atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:38:05 -04:00
Rajkumar Manoharan e5facc75fa ath9k_htc: Cleanup HTC debugfs
Move the ath9k_htc debugfs under ieee80211 to be inline
with ath9k driver and it also helps to simplify debug code.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:38:03 -04:00
Rajkumar Manoharan 00bca7e2f2 ath9k_htc: Add debugfs support to change debug mask
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:38:03 -04:00
Luis R. Rodriguez 2290a9c35d ath: fix 0x6C for beaconing/passive scan flags based on country IE
The 0x6C regulatory domain is just like the 0x6A regulatory
domain but differs in that 0x6C will allow adhoc and active
scan on its channels only if we are associated to an AP
with a country IE that allows those channels. The
ath_reg_apply_beaconing_flags() does just this -- we respect
the manufacturer's intent on only enabling beaconing modes
of operation if and only if blessed by the country IE.

Cc: David Quan <david.quan@atheros.com>
Cc: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:38:02 -04:00
Felix Fietkau 2232d31bf1 ath9k: fix the return value of ath_stoprecv
The patch 'ath9k_hw: fix stopping rx DMA during resets' added code to detect
a condition where rx DMA was stopped, but the MAC failed to enter the idle
state. This condition requires a hardware reset, however the return value
of ath_stoprecv was 'true' in that case, which allowed it to skip the reset
when issuing a fast channel change.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Paul Stewart <pstew@google.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19 15:22:52 -04:00
Senthil Balasubramanian 34a0a2025c ath: Add a missing world regulatory domain 0x6C
Some customers use 0x6C world regulatory domain and this patch
adds the support.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14 15:35:14 -04:00