summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
Commit message (Collapse)AuthorAgeFilesLines
* ath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdescFelix Fietkau2011-09-161-2/+1
| | | | | | | Reduces the number of accesses to uncached descriptor memory. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: call ath9k_hw_set_desc_link for beacon descriptorsFelix Fietkau2011-09-161-0/+1
| | | | | | | | This ensures that only ath9k_hw_set_desc_link needs to recalculate the tx descriptor checksum on AR9380+ Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: move ath_buf_set_rate to remove a forward declarationFelix Fietkau2011-09-161-142/+141
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: reduce the number of functions that access the tx descriptorFelix Fietkau2011-09-162-35/+57
| | | | | | | Makes it easier to clean up the ath9k_hw descriptor API Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: remove ATH_TX_XRETRY and BUF_XRETRY flagsFelix Fietkau2011-09-164-29/+13
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: ensure that rx is not enabled during a resetFelix Fietkau2011-09-162-4/+5
| | | | | | | | | During a reset, rx buffers are flushed after rx has been disabled. To avoid race conditions, rx needs to stay disabled during the reset, so avoid any calls to ath9k_hw_rxena in that case. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: make beacon timer initialization more reliableFelix Fietkau2011-09-161-0/+1
| | | | | | | | | When starting the AP beacon timer, it assumes that the TSF has recently been cleared. Set the SC_OP_TSF_RESET flag to ensure that this is always the case. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix enabling interrupts after a hardware error interruptFelix Fietkau2011-09-161-4/+5
| | | | | | | | The interrupt handler increases the interrupt disable refcount, so the tasklet needs to always call ath9k_hw_enable_interrupts. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix PS wrappers and enabling LEDMohammed Shafi Shajakhan2011-09-161-2/+2
| | | | | | | | in ath_pci_resume it seems we are not enabling LED properly, in addition we have a PS wrapper fix for this Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: enable LED pin for AR946/8x chipsetsMohammed Shafi Shajakhan2011-09-162-0/+3
| | | | | | | | now the LED starts working for AR946/8x chipsets Cc: "Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Do full chip reset on 11A channels for AR9003Rajkumar Manoharan2011-09-161-3/+5
| | | | | | | | | | AR9003 seems to have issues sometimes with fast channel change in 5GHz and this case is handled specifically for AR9280 by doing a full reset. Let's do a full reset for 5GHz channles of AR9380 & for all channels of AR9280 pci chips. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: move register definitions to header filesSenthil Balasubramanian2011-09-162-26/+25
| | | | | | | | | Move the register macros to appropriate header files to be in sync with other register definitions and also a single place to refer everything. Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Add support for AR946/8x chipsets.Senthil Balasubramanian2011-09-167-36/+362
| | | | | | | This patch adds support for AR946/8x chipets. Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Split tx/rx gain table initval handlingSenthil Balasubramanian2011-09-161-180/+210
| | | | | | | | Split tx/rx gain table initval hanlding part so readability is better and easy to manage the code. Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Add initvals and register definitions for AR946/8x chipsets.Senthil Balasubramanian2011-09-166-18/+3883
| | | | | | | Add initvals and register modifications required to support AR946/8x chipsets. Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix magnitude/phase average in TxIQ CalibrationRajkumar Manoharan2011-09-141-4/+13
| | | | | | | | | | | | | | | | The commit "ath9k_hw: Fix Tx IQ Calibration hang issue in AR9003 chips" did not consider more than one potential sample while calculating magnitude/phase average if more than one sample has the same value which could affect post-processing of outlier detection that causes an undesirable Tx IQ correction value will be assigned to tx gain settings where outlier happens. Cc: Kai Shi <kaishi@qca.qualcomm.com> Reported-by: Paul Stewart <pstew@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Paul Stewart <pstew@google.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Move cycle conters under cc_lockRajkumar Manoharan2011-09-141-3/+6
| | | | | | | | This patch protects cycle counters access by cc_lock and also prints current sample index. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Take the samples in unassociated stateRajkumar Manoharan2011-09-141-0/+5
| | | | | | | | | Currently the samples debugfs which maintains the snapshorts of mac/bb only on associated state. Hence to cover issues on idle state, the samples are taken whenever the driver is ready. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: implement .get_antenna and .set_antennaFelix Fietkau2011-09-144-8/+99
| | | | | | | | | | On MIMO chips this can be used to enable/disable hardware chains, ensuring that the MCS information is updated accordingly. On non-MIMO chips with rx diversity (e.g. 9285), this configures the rx input antenna. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: merge reset related functionsFelix Fietkau2011-09-141-176/+127
| | | | | | | | | | reduces unnecessary code duplication. Also takes the sc_pcu_lock within ath_reset instead of callsites, which makes it possible to always cancel all queued work items before the reset, possibly fixing a few race conditions (work items vs reset) along with it. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: always call ath_reset from workqueue contextFelix Fietkau2011-09-145-13/+26
| | | | | | | | | This makes it much easier to add further rework to avoid race conditions between reset and other work items. Move other functions to make ath_reset static. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: move a few functions aroundFelix Fietkau2011-09-141-68/+69
| | | | | | | Helps with making ath_reset static in the next commit Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: eliminate common->{rx,tx}_chainmaskFelix Fietkau2011-09-149-38/+27
| | | | | | | we already have ah->{rx,tx}chainmask for the same purpose Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: ath9k_hw_set_txpowerlimit sets previous txpowerBill Jordan2011-09-131-2/+2
| | | | | | | | | | | | In commit 9c204b46c7af93e334114bea1f5eeaa6fea9ba07 (ath9k_hw: do not limit initial tx power to 20 dbm), setting of txpower was broken. This patch fixes it by initializing reg_pwr from the new power limit, not the previous value. Signed-off-by: Bill Jordan <bjordan@rajant.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix rx latency of 11a modeRajkumar Manoharan2011-09-131-2/+5
| | | | | | | | Rx latecy to start signal(usec) of 11a is 41 not 37 and also corrected the rx delay in quarter rate. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix checks for first subframe delimiter paddingFelix Fietkau2011-09-132-2/+3
| | | | | | | | | | | The commit "ath9k_hw: Fix exceed transmission burst-time of 5GHz" added a padding of 60 delimiters on the first subframe to work around an issue on AR9380, but it lacked the checks to prevent it from being applied to pre-AR9380, enterprise AR9380 or AR9580+ Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix the last register write for ar5416 addacFelix Fietkau2011-09-131-1/+1
| | | | | | | | The previous register used in these initvals was probably accidentally copied over from the AR9100 values. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: drop an unused column in AR5008-AR9002 initvalsFelix Fietkau2011-09-134-1912/+1934
| | | | | | | | It was used for the defunct 'turbo' mode which was never implemented in the driver. Saves ~7.5k uncompressed Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: do not apply the 2.4 ghz ack timeout workaround to ctsFelix Fietkau2011-09-131-2/+3
| | | | | | | | | | | It is only used to workaround interoperability issues related to longer delays in receiving the block ack, so it is not necessary to apply it to the CTS exchange. Should improve throughput slightly, especially when there are lots of retransmissions. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: defer ath_tx_setup_buffer setup to the first tx attempt during aggrFelix Fietkau2011-08-301-39/+66
| | | | | | | | | | With sequence number and buffer allocation deferred to when they're needed for the first time, it becomes much easier to start dropping packets from the tid queue if necessary, e.g. when latency suddenly increases. This can lead to some future improvements in buffer management for better latency. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: move seqno allocation in the tx path to ath_tx_setup_bufferFelix Fietkau2011-08-301-19/+23
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: move the sequence number from ath_frame_info to ath_bufFelix Fietkau2011-08-302-33/+24
| | | | | | | | | It is only necessary for BAW tracking and moving it to the ath_buf makes it easier to add further improvements, such as deferring seqno allocation in the aggregation path. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: clean up the aggregation tid queueFelix Fietkau2011-08-303-37/+45
| | | | | | | | | Use a sk_buff_head instead containing skbs instead of a list_head containing ath_bufs. This makes it easier to decouple the aggregation code from the ath_buf struct Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use u8 for the tx key indexFelix Fietkau2011-08-305-5/+5
| | | | | | | This saves some space in struct ath_frame_info Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix a smatch warningsLarry Finger2011-08-292-1/+2
| | | | | | | | | | | | | Smatch shows the following warnings: CHECK drivers/net/wireless/ath/ath9k/htc_drv_main.c drivers/net/wireless/ath/ath9k/htc_drv_main.c +1315 ath9k_htc_configure_filter(27) warn: inconsistent returns mutex:&priv->mutex: locked (1303) unlocked (1315) CHECK drivers/net/wireless/ath/ath9k/ar9003_eeprom.c drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +3321 ar9300_eeprom_restore_internal(20) warn: returning -1 instead of -ENOMEM is sloppy Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add debugfs support for mac/baseband samplesRajkumar Manoharan2011-08-296-14/+369
| | | | | | | | | | | | | | This patch keep track of number of samples that includes DMA debugs registers, PCU observe, CR, channel noise, cycle conters, noisefloor history buffer and last N number of tx and rx descriptor status. These samples are grouped in table manner which dumping in debgufs. Debugfs file location: <debugfs_mnt>/ieee80211/phy#/ath9k/samples Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix regression in sending aggregated packetsFelix Fietkau2011-08-291-1/+4
| | | | | | | | | | | The recent commit "ath9k: Send legacy rated frames as unaggregated" introduced a check to ensure that packets with non-MCS rates set in the rate series will not be aggregated. However, it failed to check if the rate series is valid before testing the flags, thus breaking aggregation for normal MCS-only packets if the last series is unset. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix eifs/usec timeout for AR9287 v1.3+Rajkumar Manoharan2011-08-292-2/+10
| | | | | | | | | | For AR9287 v1.3+ chips, MAC runs at 117MHz. But the initvals IFS parameters are loaded based on 44/88MHz clockrate. So eifs/usec from ini should not be used for AR9287 v1.3+. The mentioned values are tested on 2 chain HT40 mode. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Set default slottime as 9usRajkumar Manoharan2011-08-291-1/+1
| | | | | | | | Initialize 9us slot time as that is what is used mostly (for non-ERP cases) and also to be in sync with initvals. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: minor cleanup in aniMohammed Shafi Shajakhan2011-08-292-5/+2
| | | | | | | removed a function declaration, removed a variable, renamed a variable Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use appropriate debug maskMohammed Shafi Shajakhan2011-08-291-1/+1
| | | | | | | | in the Rx path of the driver it would be better to use ATH_DBG_ANY rather than ATH_DBG_XMIT for printing debug messages Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add missing AR9340 in ath_mac_bb_namesFlorian Fainelli2011-08-291-0/+1
| | | | | | | | AR9340 is not listed in ath_mac_bb_names, which leads to such a message: ieee80211 phy0: Atheros AR???? Rev:0 mem=0xb8100000, irq=2 Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add AR9580 supportLuis R. Rodriguez2011-08-261-0/+1
| | | | | | | | | | | This has been tested in STA and AP mode by Florian. Cc: David Quan <dquan@qca.qualcomm.com> Cc: Kathy Giori <kgiori@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Tested-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: add AR9580 supportLuis R. Rodriguez2011-08-265-0/+1770
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here are the AR9580 1.0 initvals checksums using the Atheros initvals-tools [1]. This is useful for when we udate the initvals again with other values. It ensures that we match the same initvals used internally. The tool is documented on the wiki [2]. $ ./initvals -f ar9580-1p0 0x00000000e912711f ar9580_1p0_modes_fast_clock 0x000000004a488fc7 ar9580_1p0_radio_postamble 0x00000000f3888b02 ar9580_1p0_baseband_core 0x0000000003f783bb ar9580_1p0_mac_postamble 0x0000000094be244a ar9580_1p0_low_ob_db_tx_gain_table 0x0000000094be244a ar9580_1p0_high_power_tx_gain_table 0x0000000090be244a ar9580_1p0_lowest_ob_db_tx_gain_table 0x00000000ed9eaac6 ar9580_1p0_baseband_core_txfir_coeff_japan_2484 0x00000000c4d66d1b ar9580_1p0_mac_core 0x00000000e8e9043a ar9580_1p0_mixed_ob_db_tx_gain_table 0x000000003521a300 ar9580_1p0_wo_xlna_rx_gain_table 0x00000000301fc841 ar9580_1p0_soc_postamble 0x00000000a9a06b3a ar9580_1p0_high_ob_db_tx_gain_table 0x00000000a15ccf1b ar9580_1p0_soc_preamble 0x0000000029495000 ar9580_1p0_rx_gain_table 0x0000000037ac0ee8 ar9580_1p0_radio_core 0x00000000603a1b80 ar9580_1p0_baseband_postamble 0x000000003d8b4396 ar9580_1p0_pcie_phy_clkreq_enable_L1 0x00000000398b4396 ar9580_1p0_pcie_phy_clkreq_disable_L1 0x00000000397b4396 ar9580_1p0_pcie_phy_pll_on_clkreq [1] git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/initvals-tool.git [2] http://wireless.kernel.org/en/users/Drivers/ath9k_hw/initvals-tool Cc: David Quan <dquan@qca.qualcomm.com> Cc: Kathy Giori <kgiori@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Tested-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Add get_stats call backMohammed Shafi Shajakhan2011-08-261-0/+17
| | | | | | | currently this call back is used only in debugfs of mac80211 Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: remove replicated null check in ath_pci_aspm_initJohn W. Linville2011-08-261-6/+2
| | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Send legacy rated frames as unaggregatedRajkumar Manoharan2011-08-261-1/+21
| | | | | | | | | | | Currently the aggregation is formed till the aggregation limit is reached and the rate lookup is done for the first frame alone. But there can be a legacy rated frames in tid queue. This patch limits the subframe addition based on presence of legacy rate and sends the legacy rated frames as unaggregated one. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Disable Walsh spatial spreading for 2 chainsRajkumar Manoharan2011-08-242-2/+2
| | | | | | | | | | | | | | The Walsh bit is disabled for regulatory consideration. FCC limit for walsh enable is lower than that for walsh disable. So disabling walsh bit will not limit tx power/affect tx power even in cases where we are not FCC limited (most client cards). If the tx power is not FCC limited, then enabling/disabling walsh bit will not affect Avg. EVM/overall performance in any visible manner. Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Change rate control to use legacy rate as last MRRRajkumar Manoharan2011-08-241-7/+27
| | | | | | | | | | | | | | In congested network, having all rate reties at MCS rates is failing to transmit the frame offenly. By the time reaching the success rate set, the application gets timed out. One such scenario is that authentication time out during 4-Way handshake. This patch uses a legacy rate as last retry sequnce for unaggregated frames or if the first selected rate's PER is ~80% of max limit. And also observed from the tx status that the frame was trasmitted successfully by using legacy rates. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix descriptor status of TxOpExceededRajkumar Manoharan2011-08-241-2/+2
| | | | | | Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud