aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
Commit message (Collapse)AuthorAge
* ath9k: fix per-packet tx power configurationLorenzo Bianconi2015-05-03
| | | | | | | | | | Do not use ieee80211_vif pointer in ath_get_rate_txpower() since it has been overwritten by setup_frame_info() and it will result in a corrupted tx power configuration. Set per-packet tx power in setup_frame_info() according to current vif tx power. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: add extra GPIO led supportMiaoqing Pan2015-04-07
| | | | | | | | | ar9550 or later chips, the AR_GPIO_IN_OUT register only can control GPIO[0:3]. For the extra GPIO, use standard GPIO calls instead of WMAC internal registers. Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k_htc: check seq number instead of cmd id for timeoutFred Chou2015-04-07
| | | | | | | | As the driver may send multiple wmi commands with identical cmd id, it is more robust to check seq number for timeout instead. Signed-off-by: Fred Chou <fred.chou.nd@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2015-04-02
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/usb/asix_common.c drivers/net/usb/sr9800.c drivers/net/usb/usbnet.c include/linux/usb/usbnet.h net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c The TCP conflicts were overlapping changes. In 'net' we added a READ_ONCE() to the socket cached RX route read, whilst in 'net-next' Eric Dumazet touched the surrounding code dealing with how mini sockets are handled. With USB, it's a case of the same bug fix first going into net-next and then I cherry picked it back into net. Signed-off-by: David S. Miller <davem@davemloft.net>
| * ath9k: disable TPC support again (for now)Felix Fietkau2015-03-16
| | | | | | | | | | | | | | | | | | TPC support has been observed to cause some tx power fluctuations on some devices with at least AR934x and AR938x chips. Disable it for now until the bugs have been found and fixed Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * ath9k: fix tracking of enabled AP beaconsFelix Fietkau2015-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | sc->nbcnvifs tracks assigned beacon slots, not enabled beacons. Therefore, it cannot be used to decide if cur_conf->enable_beacon (bool) should be updated, or if beacons have been enabled already. With the current code (depending on the order of calls), beacons often do not get enabled in an AP+STA setup. To fix tracking of enabled beacons, convert cur_conf->enable_beacon to a bitmask of enabled beacon slots. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: use REG_RMW and rmw buffer in ath9k_hw_def_set_gainOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: use REG_RMW and rmw buffer in ath9k_hw_4k_set_board_valuesOleksij Rempel2015-03-30
| | | | | | | | | | | | | | | | replace REG_WRITE to REG_RMW and place every thing in one RMW buffer. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: use REG_RMW and rmw buffer in ath9k_hw_4k_set_gainOleksij Rempel2015-03-30
| | | | | | | | | | | | | | | | | | it is possible to reduce time needed for this function by rplacing REG_WRITE with REG_RMW (plus dummy 0) and putt all commands in same buffer. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ath9k_hw_4k_set_board_values: use rmw bufferOleksij Rempel2015-03-30
| | | | | | | | | | | | | | it will reduce exution time from 14ms to 2ms on ar9271 Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ath9k_hw_analog_shift_rmw: use REG_RMWOleksij Rempel2015-03-30
| | | | | | | | | | | | | | | | use REG_RMW in ath9k_hw_analog_shift_rmw. It will double execution speed on usb bus. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ath9k_hw_4k_set_board_values: use rmw bufferOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: use rmw buffer in ath9k_hw_set_operating_mode and ath9k_hw_resetOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ath9k_hw_set_4k_power_cal_tabl: use rmw bufferOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: write buffer related optimisation in ar5008_hw_set_channel_regsOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ath9k_hw_loadnf: use REG_RMWOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: use one shot read in ath9k_hw_update_mibstatsOleksij Rempel2015-03-30
| | | | | | | | | | | | | | this will reduce some overhead on usb bus. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ar9271_hw_pa_cal: use REG_READ_ARRAYOleksij Rempel2015-03-30
| | | | | | | | | | | | | | | | | | insted of reading each register separatly and waste 4ms on each operation, we can use one shot read. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: add new function ath9k_hw_read_arrayOleksij Rempel2015-03-30
| | | | | | | | | | | | | | | | REG_READ generate most overhead on usb bus. It send and read micro packages and reduce usb bandwidth. To reduce this overhead we should read in batches. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: add multi_read to be compatible with ath9k_htcOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ar9271_hw_pa_cal: use RMW bufferOleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ar9271_hw_pa_cal: use proper makroses.Oleksij Rempel2015-03-30
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: ar9271_hw_pa_cal - use defs instead of magin numbersOleksij Rempel2015-03-30
| | | | | | | | | | | | | | | | This function uses mixed styles for register names/numbers which is make harder reading and optimisation. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k_htc: add new WMI_REG_RMW_CMDID commandOleksij Rempel2015-03-30
| | | | | | | | | | | | | | | | | | | | | | | | Since usb bus add extra delay on each request, a command with read + write requests is too expensive. We can dramtically reduce usb load by moving this command to firmware. In my tests, this patch will reduce channel scan time for about 5-10 seconds. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Fix AIC compilation errorSujith Manoharan2015-03-21
| | | | | | | | | | | | | | | | | | | | AIC needs to be registered only when BTCOEX is enabled. This fixes the error reported by kbuild: >> ERROR: "ar9003_hw_attach_aic_ops" [drivers/net/wireless/ath/ath9k/ath9k_hw.ko] undefined! Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Start AIC calibration during MCI resetSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | When a MCI reset is done, make sure that AIC is started. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Handle MCI_STATE_AIC_CALSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | Add the main AIC calibration function to handle MCI_STATE_AIC_CAL. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Handle MCI_STATE_AIC_STARTSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | This patch adds a function to handle the MCI message MCI_STATE_AIC_START. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Handle MCI_STATE_AIC_CAL_RESETSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | Add a routine to handle the MCI_STATE_AIC_CAL_RESET message. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Disable AIC by defaultSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | | | Since various MCI messages need to be handled, along with driver-level support in upper layers, disable AIC for now. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Process the AIC calibration resultsSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | This patch adds support for post-processing the AIC calibration results. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Finish AIC calibrationSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | Set the appropriate bits in the HW after AIC calibration is done. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Handle MCI_STATE_AIC_CAL_SINGLESujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | | | This patch adds routines to handle the MCI message AIC_CAL_SINGLE, starting the required HW calibration. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Add register definitions for AICSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | Various registers to control and check AIC status. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Register private AIC opsSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | | | AIC can be disabled or enabled on a per-card basis using MCI configuration, so register a function to check its status. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Add initial structures for AICSujith Manoharan2015-03-20
| | | | | | | | | | | | | | | | These are necessary for implementing AIC, supported by chips like WB222. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: allow 40MHz radar detection widthZefir Kurtisi2015-03-16
| | | | | | | | | | Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: add DFS support for extension channelZefir Kurtisi2015-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In HT40 modes, pulse events on primary and extension channel are processed individually. If valid, a pulse event will be fed into the detector * for primary frequency, or * for extension frequency (+/-20MHz based on HT40-mode) * or both With that, a 40MHz radar will result in two individual radar events. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: make ath_frame_info fit into reduced-size rate_driver_dataFlorian Westphal2015-03-13
| | | | | | | | | | | | | | | | pre-requisite to shrink size of ieee80211_tx_info which in turn is needed to shrink skb->cb to 40 bytes again. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Fix RTT chainmask usageSujith Manoharan2015-03-13
| | | | | | | | | | | | | | | | | | Since the RTT registers need to be configured for all valid chains irrespective of the runtime chainmask, use the actual chainmask of the chip. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Check allowed PCIE powersave configurationSujith Manoharan2015-03-13
| | | | | | | | | | | | | | | | | | | | When assigning the initvals for PCIE sleep/awake registers, check the configuration that has been assigned to pll_pwrsave during initialization. Also, display a warning if we don't have valid arrays. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Initialize pll_pwrsave for AR9462/AR9565Sujith Manoharan2015-03-13
| | | | | | | | | | | | | | | | Cards based on AR9462/AR9565 support more PCIE power save mechanisms, so register them correctly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Fix PLL powersave for AR9485Sujith Manoharan2015-03-13
| | | | | | | | | | | | | | | | | | Use the value in ah->config.pll_pwrsave to determine which array needs to be loaded. Also, initialize pll_pwrsave to 1 by default. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | ath9k: Add PCIE powersave macrosSujith Manoharan2015-03-13
| | | | | | | | | | | | | | | | These will be used to handle chip-specific power save configuration. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* | Merge tag 'wireless-drivers-next-for-davem-2015-03-06' of ↵David S. Miller2015-03-06
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Major changes: brcmfmac: * sdio improvements * add a debugfs file so users can provide us all the revinfo we could ask for iwlwifi: * add triggers for firmware dump collection * remove support for -9.ucode * new statitics API * rate control improvements ath9k: * add per-vif TX power capability * BT coexistance fixes ath10k: * qca6174: enable STA transmit beamforming (TxBF) support * disable multi-vif power save by default bcma: * enable support for PCIe Gen 2 host devices Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ath9k: Fix issues in the main btcoex timerSujith Manoharan2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ath9k_mci_update_rssi() is required only for cards that use MCI scheme. Make sure that it is not called for 3-wire cards. * Call ath9k_ps_wakeup() early since register accesses are made in ath9k_mci_update_rssi(). * Fix usage of btcoex_lock to handle no_stomp_timer. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | ath9k: Handle timers for MCISujith Manoharan2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | Make sure that the btcoex timers are started/stopped properly for both 3-wire and MCI schemes. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | ath9k: Fix wlan-active gpio for the AR9003 familySujith Manoharan2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | When disabling BTCOEX, clearing the wlanactive gpio line is required only for pre-AR9003 cards. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | ath9k: Fix MCI scheme initializationSujith Manoharan2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit "ath9k_hw: remove ATH_BTCOEX_CFG_MCI" removed MCI as a separate coex scheme, but we need it to avoid fiddling with GPIO registers during ath9k_init_btcoex() that are meant only for 3-wire cards. Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
| * | ath9k: Initialize MCI state correctlySujith Manoharan2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MCI configuration values are assigned in ath9k_hw_btcoex_init_mci() which are used by the MCI reset routine. When initializing BTCOEX/MCI, ath_mci_setup() ends up using uninitialized data. Fix this by setting up the configuration parameters before issuing a MCI reset. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>