summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: merge noisefloor load implementationsFelix Fietkau2010-07-126-181/+114
| | | | | | | | | | | | | | | | | AR5008+ and AR9003 currently use two separate implementations of the ath9k_hw_loadnf function. There are three main differences: - PHY registers for AR9003 are different - AR9003 always uses 3 chains, earlier versions are more selective - The AR9003 variant contains a fix for NF load timeouts This patch merges the two implementations into one, storing the register array in the ath_hw struct. The fix for NF load timeouts is not just relevant for AR9003, but also important for earlier hardware, so it's better to just keep one common implementation. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: validate the TID in the tx status informationFelix Fietkau2010-07-121-0/+8
| | | | | | | | | Occasionally the hardware can send out tx status information with the wrong TID. In that case, the BA status cannot be trusted and the aggregate must be retransmitted. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: report the TID in the tx status on AR5008-AR9002Felix Fietkau2010-07-123-3/+4
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: prevent a fast channel change after a rx DMA stuck issueFelix Fietkau2010-07-121-1/+3
| | | | | | | | | | | | | | | If the receive path gets stuck, a full hardware reset is necessary to recover from it. If this happens during a scan, the whole scan might fail, as each channel change bypasses the full reset sequence. Fix this by resetting the fast channel change flag if stopping the receive path fails. This will reduce the number of error messages that look like this: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x40000020 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix an off-by-one error in the PDADC boundaries calculationFelix Fietkau2010-07-121-1/+1
| | | | | | | | | | PDADC values were only generated for values surrounding the target index, however not for the target index itself, leading to a minor error in the generated curve. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix a sign error in the IQ calibration codeFelix Fietkau2010-07-121-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix antenna diversity on AR9285Felix Fietkau2010-07-125-8/+8
| | | | | | | | | | | | | On AR9285, the antenna switch configuration register uses more than just 16 bits. Because of an arbitrary mask applied to the EEPROM value that stores this configuration, diversity was broken in some cases, leading to a significant degradation in signal strength. Fix this by changing the callback to return a 32 bit value and remove the arbitrary mask. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix a buffer leak in A-MPDU completionFelix Fietkau2010-07-071-0/+5
| | | | | | | | | | | | When ath_tx_complete_aggr() is called, it's responsible for returning all buffers in the linked list. This was not done when the STA lookup failed, leading to a race condition that could leak a few buffers when a STA just disconnected. Fix this by immediately returning all buffers to the free list in this case. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix a potential buffer leak in the STA teardown pathFelix Fietkau2010-07-071-26/+26
| | | | | | | | | | | | It looks like it might be possible for a TID to be paused, while still holding some queued buffers, however ath_tx_node_cleanup currently only iterates over active TIDs. Fix this by always checking every allocated TID for the STA that is being cleaned up. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix crash with WEP in ad-hoc modeFelix Fietkau2010-07-021-0/+4
| | | | | | | | | | | | 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>
* ath9k: fix false positives in the baseband hang checkFelix Fietkau2010-07-023-2/+28
| | | | | | | | | | | | | 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>
* ath9k_hw: clean up the noise floor calibration code to reduce code duplicationFelix Fietkau2010-07-025-96/+31
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: sanitize noise floor values properly on all chipsFelix Fietkau2010-07-028-95/+120
| | | | | | | | 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>
* ath9k_hw: sync initvals for ar9001 and ar9002 with AtherosFelix Fietkau2010-07-022-113/+117
| | | | | | | | | | | | 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>
* ath9k_hw: reformat the ar5008, ar9001 and ar9002 initvals to match ar9003Felix Fietkau2010-07-023-6957/+6983
| | | | | | | | 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>
* ath9k_hw: fix a few inconsistencies in initval array namesFelix Fietkau2010-07-023-9/+9
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Add LED support for AR7010Sujith2010-06-304-4/+56
| | | | | Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix TSF after reset on AR913xFelix Fietkau2010-06-301-2/+14
| | | | | | | | | | | | | | | | | | 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>
* ath9k: make ath9k_hw_keysetmac staticJohn W. Linville2010-06-292-3/+1
| | | | | Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: remove unused function ath9k_hw_keyisvalidJohn W. Linville2010-06-292-12/+0
| | | | | Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix retry count for A-MPDU rate control status reportsFelix Fietkau2010-06-281-3/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'wireless-2.6' into wireless-next-2.6Reinette Chatre2010-06-252-1/+11
|\
| * ath9k: Fix bug in starting aniVasanthakumar Thiagarajan2010-06-232-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ath9k: Wakeup the chip in an appropriate place in ath_paprd_calibrate()Vasanthakumar Thiagarajan2010-06-241-1/+1
| | | | | | | | | | | | | | 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>
* | ath9k: Remove unused paprd_txokVasanthakumar Thiagarajan2010-06-242-5/+2
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix bug in paprdVasanthakumar Thiagarajan2010-06-243-4/+16
| | | | | | | | | | | | | | | | | | | | | | 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>
* | ath9k: declare MODULE_FIRMWARE for ath9k_htcJohn W. Linville2010-06-231-3/+12
| | | | | | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Add a module parameter to disable led blinking.Vivek Natarajan2010-06-234-4/+14
| | | | | | | | | | | | | | | | | | | | 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>
* | ath9k_hw: add an extra delay when reseting AR_RTC_RESETLuis R. Rodriguez2010-06-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | ath9k_hw: dynamically choose the SERDES array for low powerLuis R. Rodriguez2010-06-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | 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>
* | ath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaksLuis R. Rodriguez2010-06-233-1/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | ath9k_hw: move LowPower array writes to ar9003_hw_configpcipowersave()Luis R. Rodriguez2010-06-232-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ath9k_hw: fix ASPM setting for AR9003Luis R. Rodriguez2010-06-234-6/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ath9k_htc: Update supported product listSujith2010-06-182-14/+15
| | | | | | | | | | | | | | | | This patch adds USB IDs for some more supported devices. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Fix ampdu_action callbackSujith2010-06-154-92/+45
| | | | | | | | | | | | | | | | | | Now that ampdu_action() can sleep, remove all the driver hacks and just issue WMI commands to the target. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: avoid setting cwmin/cwmax to 0 for IBSS for AR9003Luis R. Rodriguez2010-06-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IBSS requires the cwmin and cwmax to be respected when we reset the txqueues on AR9003 otherwise the distribution of beacons will be balanced towards the AR9003 card first preventing equal contention for air time for other peers on the IBSS. Without this IBSS will work but only the AR9003 card will be be issuing beacons on the IBSS. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove ATH9K_CAP_DSFelix Fietkau2010-06-142-21/+0
| | | | | | | | | | | | | | | | This capability check is no longer used, so it can be removed along with the now-obsolete ath9k_hw_getcapability function. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k/ath9k_htc: remove redundand checks for dual-stream tx supportFelix Fietkau2010-06-142-10/+4
| | | | | | | | | | | | | | mac80211 already masks the HT sta capabilities based on hardware support Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove ATH9K_CAP_MCAST_KEYSRCHFelix Fietkau2010-06-144-44/+3
| | | | | | | | | | | | | | | | | | The driver always sets this to enabled, but this can be simplified with a small change to ah->sta_id1_defaults instead. This change also removes the now-obsolete ath9k_hw_setcapability function. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove ATH9K_CAP_TKIP_SPLITFelix Fietkau2010-06-144-14/+1
| | | | | | | | | | | | | | This is only used as a workaround for an issue in one specific hw revision. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove ATH9K_CAP_TKIP_MICFelix Fietkau2010-06-144-34/+0
| | | | | | | | | | | | | | TKIP MIC support is always enabled anyway. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove ATH9K_CAP_TXPOWFelix Fietkau2010-06-144-23/+2
| | | | | | | | | | | | | | | | replace calls that read this capability with accesses to ath9k_hw's regulatory data. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove ATH9K_CAP_CIPHERFelix Fietkau2010-06-144-45/+16
| | | | | | | | | | | | | | All of the ciphers that are tested for are always supported Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: enable AR9003 PCI IDsLuis R. Rodriguez2010-06-141-0/+1
| | | | | | | | | | | | | | | | All AR9003 features are now complete so enable AR9003 support. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: implement PA predistortion supportFelix Fietkau2010-06-144-3/+137
| | | | | | | | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: add functions for controlling PA predistortion calibrationFelix Fietkau2010-06-145-1/+746
| | | | | | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: add support for parsing PA predistortion related EEPROM fieldsFelix Fietkau2010-06-145-5/+18
| | | | | | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: add register definitions related to PA predistortionFelix Fietkau2010-06-141-17/+207
| | | | | | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove a useless function for setting the mac addressFelix Fietkau2010-06-144-13/+0
| | | | | | | | | | | | | | | | | | ath9k_hw_setmac() only copies the mac address it is called with into common->macaddr, yet in all call sites, the supplied mac address pointer is already common->macaddr. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: add a debugfs entry for ignoring CCA on the extension channel in HT40Felix Fietkau2010-06-142-1/+5
| | | | | | | | | | | | | | | | | | Debugfs requires a u32 for bool knobs though so we turn the ath9k_hw knob into a u32 as well. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud