summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/init.c
AgeCommit message (Collapse)AuthorFilesLines
2015-03-13ath9k: Fix PLL powersave for AR9485Sujith Manoharan1-1/+7
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>
2015-02-03ath9k: Fix wow init/deinitSujith Manoharan1-0/+1
Registering the card as a wakeup source needs to be done once, during initialization. When the WOW configuration changes, the card's status as wakeup source needs to be changed too and this is done via the set_wakeup() callback. Also, make sure the device is removed properly using ath9k_deinit_wow(). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-27ath9k and ath9k_htc: rename variable "led_blink"Hong Xu1-2/+2
ath9k and ath9k_htc use the variable name "led_blink" to indicate whether the module parameter "blink" is on. This name is easy to conflict with other variables, and has caused a compiler error found by kbuild test bot. The compiler error is as following: drivers/net/wireless/ath/ath9k/ath9k_htc.o:(.data+0x47c): multiple definition of `led_blink' drivers/net/wireless/ath/ath9k/ath9k.o:(.bss+0x20): first defined here Fixes: 3a939a671225 ("ath9k_htc: Add a module parameter to disable blink") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Hong Xu <hong@topbug.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2014-12-01ath9k: prevent early IRQs from accessing hardwareFelix Fietkau1-4/+5
IRQs are suppressed if ah == NULL and ATH_OP_INVALID being set in common->op_flags. Close a short time window between those two. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-19Merge commit '4e6ce4dc7ce71d0886908d55129d5d6482a27ff9' of ↵John W. Linville1-25/+30
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-11-17ath9k: Fix LED configurationSujith Manoharan1-0/+3
On some x86 platforms, the LED gpio is active high instead of active low. Identify such cards and modify the GPIO usage to make sure LED works properly. Cc: Russell Hu <rhu@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-17ath9k: ath9k_op_ps_wakeup() can be statickbuild test robot1-3/+3
drivers/net/wireless/ath/ath9k/init.c:91:6: sparse: symbol 'ath9k_op_ps_wakeup' was not declared. Should it be static? drivers/net/wireless/ath/ath9k/init.c:96:6: sparse: symbol 'ath9k_op_ps_restore' was not declared. Should it be static? drivers/net/wireless/ath/ath9k/init.c:101:19: sparse: symbol 'ath9k_ps_ops' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-12ath9k: add ath_ps_ops bindingsOleksij Rempel1-0/+16
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-12ath9k: add ath_hw to ath_spec_scan_privOleksij Rempel1-0/+1
spectral code mostly depends on ath_hw, not on ath_softc Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-12ath9k: move spec_config to ath_spec_scan_privOleksij Rempel1-6/+6
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-12ath9k: add support for reporting tx power to mac80211Felix Fietkau1-11/+14
Track it per channel context instead of in the softc Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-27ath9k: allow disabling bands via platform dataFelix Fietkau1-0/+2
Some devices have multiple bands enables in the EEPROM data, even though they are only calibrated for one. Allow platform data to disable unsupported bands. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-27ath9k: add support for endian swap of eeprom from platform dataFelix Fietkau1-0/+2
On some devices (especially little-endian ones), the flash EEPROM data has a different endian, which needs to be detected. Add a flag to the platform data to allow overriding that behavior Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-27ath9k_hw: make support for PC-OEM cards optionalFelix Fietkau1-0/+3
The initvals use up quite a bit of space, and PC-OEM support is typically not needed on embedded systems Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-23ath9k: Enable HW queue control only for MCCSujith Manoharan1-25/+30
Enabling HW queue control for normal (non-mcc) mode causes problems with queue management, resulting in traffic stall. Since it is mainly required for fairness in MCC mode, disable it for the general case. Bug: https://dev.openwrt.org/ticket/18164 Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09ath9k: Use a subroutine to assign HW queuesSujith Manoharan1-1/+1
Reduces code duplication. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09ath9k: Add CTWindow supportSujith Manoharan1-2/+3
Since CTWindow can be used for improving discoverability, fill this field in the NoA Attribute properly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Fix interface limitsSujith Manoharan1-2/+4
There is no reason why managed/p2p interfaces have to be limited to one. IBSS is the only type that needs a restriction. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add ath9k_offchannel_initSujith Manoharan1-0/+1
This patch adds a routine to setup the offchannel instance in ath_softc. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a routine for initializing channel contextsSujith Manoharan1-4/+2
Setup the offchannel/sched timers and the chanctx work inside the new function. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Isolate ath9k_use_chanctx module parameterSujith Manoharan1-25/+38
This patch ensures that the module parameter "use_chanctx" is visible only when CONFIG_ATH9K_CHANNEL_CONTEXT is selected. Also register the channel context callbacks with mac80211 only when it is explicitly enabled and compile them out of the driver when CONFIG_ATH9K_CHANNEL_CONTEXT is not selected. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Isolate P2P powersave routinesSujith Manoharan1-6/+3
Use CONFIG_ATH9K_CHANNEL_CONTEXT to conditionally compile P2P-PS code. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Handle failure to allocate HW timerSujith Manoharan1-1/+3
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a debug level for channel contextSujith Manoharan1-0/+2
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-01ath9k: Increase max listen intervalRajkumar Manoharan1-1/+1
Earlier the listen interval is used to decide switching between operating and off-channels during bgscan and to improve throughput, the listen interval is reduced to 1. After optimiztion in scan state machine, listen period is not used for decision making and hence reverting it back to original value. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Advertise multichannel supportRajkumar Manoharan1-2/+20
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: use separate HW queue for each channel contextRajkumar Manoharan1-1/+9
Use seperate tx queue for each AC in each channel context and expose these information to mac80211 to avoid stopping one channel context leads to stopping the entire traffic for that AC even on other contexts. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Add recovery mechanism for hw TSF timerFelix Fietkau1-0/+1
Configure the TSF based hardware timer for a channel switch. Also set up backup software timer, in case the gen timer fails. This could be caused by a hardware reset. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Add p2p go NoA attributeFelix Fietkau1-0/+2
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Move beacon config to channel contextRajkumar Manoharan1-0/+1
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Implement channel context opsFelix Fietkau1-0/+1
Add channel context operations (add, remove, change, assign and unassign) to enable support for multiple channels. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Implement remain-on-channal supportFelix Fietkau1-0/+1
Add remain on channel support in order to enable multi-channel concurrency. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Implement hw_scan supportFelix Fietkau1-2/+7
Implement hw_scan support for enabling multi-channel cuncurrency. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Add channel context worker threadFelix Fietkau1-0/+2
The channel context worker is used to switch to next requested channel context. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Move txpower limit to channel contextFelix Fietkau1-3/+2
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Add channel context structureFelix Fietkau1-0/+1
The channel context structure is defined to enable multi-channel concurrency support. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-29ath9k: Fix interface combinations for multi-channel concurrencyRajkumar Manoharan1-4/+21
Currently mac80211 does not support WDS and DFS with channel context drivers. So advertise these features only when the driver is not supporting channel context and modparam "use_chanctx" is introduced for preparing channel context support in ath9k. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-13Merge branch 'master' of ↵John W. Linville1-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-05-08ath9k: Allow platform override without EEPROM overrideHelmut Schaa1-1/+1
Add a new platform data flag "use_eeprom" that indicates that the eeprom found on the card itself should be used instead of the one present in the platform data. This allows to override the MAC address of a PCI card while preserving the eeprom data from the card itself. The default behavior is preserved. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-06ath9k: Advertise support for AP mode channel width changesRajkumar Manoharan1-1/+2
This will enable AP mode to change channel width dynamically based on 20/40 intolerance report sent by associated client. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-25ath9k: fix race in setting ATH_OP_INVALIDRajkumar Manoharan1-0/+3
The commit "ath9k: move sc_flags to ath_common" moved setting ATH_OP_INVALID flag below ieee80211_register_hw. This is causing the flag never being cleared randomly as the drv_start is called prior to setting flag. Fix this by setting the flag prior to register_hw. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22ath9k: implement p2p client powersave supportFelix Fietkau1-0/+6
Use generic TSF timers to trigger powersave state changes based information from the P2P NoA attribute. Opportunistic Powersave is not handled, because the driver does not support powersave at the moment. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22ath9k: support only one P2P interfaceFelix Fietkau1-2/+2
Preparation for adding P2P powersave and multi-channel support. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-09ath9k: Enable DFS only when ATH9K_DFS_CERTIFIEDJanusz Dziedzic1-0/+2
Add DFS interface combination only when CONFIG_ATH9K_DFS_CERTIFIED is set. In other case user can run CAC/beaconing without proper handling of pulse events (without radar detection activated). Reported-by: Cedric Voncken <cedric.voncken@acksys.fr> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28ath9k: move ath9k_reload_chainmask_settings to commonOleksij Rempel1-15/+1
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28ath9k: move setup_ht_cap to common-initOleksij Rempel1-60/+2
and rename it to ath9k_cmn_setup_ht_cap Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28ath9k: move ath9k_init_channels_rates to common-initOleksij Rempel1-159/+13
and rename it to ath9k_cmn_init_channels_rates. sbands are move to ath_common as well. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-25ath9k: Enable U-APSD AP mode supportJouni Malinen1-0/+1
mac80211 handles the actual operations, so ath9k can just indicate support for this. Based on initial tests, this combination seems to work fine. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-13Merge branch 'master' of ↵John W. Linville1-1/+7
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-02-13ath9k: Remove ath9k rate controlSujith Manoharan1-13/+1
There is no benefit in retaining the legacy rate control module in the driver codebase. It is known to be buggy and has less than optimal performance in real-world environments compared with minstrel. The only reason that it was kept when we made the switch to minstrel as default was that it showed higher throughput numbers in a clean/ideal environment. This is no longer the case and minstrel can push ath9k to the same throughput levels. In TCP, with 3-stream cards, more than 295 Mbps can be obtained in open air, with 2-stream cards, 210 Mbps is easily reached. To test performance issues, instead of using a broken rate control module, it is better to use the fixed-rate interface provided by mac80211 anyway. The ath9k RC has not received any bug fixes in years and is just bit-rotting away - this patch removes it. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>