summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/init.c
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: add fast-xmit supportFelix Fietkau2015-08-061-0/+1
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: advertise p2p dev support when chanctxJanusz.Dziedzic@tieto.com2015-08-061-1/+6
| | | | | | | | | | | | Advertise p2p device support when ath9k loaded with use_chanctx=1. This will fix problem, when first interface is an AP and next we would like to run p2p_find. Before p2p find (scan phase) failed with EOPNOTSUPP. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mac80211: convert HW flags to unsigned long bitmapJohannes Berg2015-06-101-12/+12
| | | | | | | | | | | | | | | As we're running out of hardware capability flags pretty quickly, convert them to use the regular test_bit() style unsigned long bitmaps. This introduces a number of helper functions/macros to set and to test the bits, along with new debugfs code. The occurrences of an explicit __clear_bit() are intentional, the drivers were never supposed to change their supported bits on the fly. We should investigate changing this to be a per-frame flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* ath9k: add multi_read to be compatible with ath9k_htcOleksij Rempel2015-03-301-0/+11
| | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: allow 40MHz radar detection widthZefir Kurtisi2015-03-161-1/+2
| | | | | Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* ath9k: Initialize pll_pwrsave for AR9462/AR9565Sujith Manoharan2015-03-131-0/+1
| | | | | | | | 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-131-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>
* ath9k: Fix wow init/deinitSujith Manoharan2015-02-031-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>
* ath9k and ath9k_htc: rename variable "led_blink"Hong Xu2015-01-271-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>
* ath9k: prevent early IRQs from accessing hardwareFelix Fietkau2014-12-011-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>
* Merge commit '4e6ce4dc7ce71d0886908d55129d5d6482a27ff9' of ↵John W. Linville2014-11-191-25/+30
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * ath9k: Enable HW queue control only for MCCSujith Manoharan2014-10-231-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>
* | ath9k: Fix LED configurationSujith Manoharan2014-11-171-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>
* | ath9k: ath9k_op_ps_wakeup() can be statickbuild test robot2014-11-171-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>
* | ath9k: add ath_ps_ops bindingsOleksij Rempel2014-11-111-0/+16
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: add ath_hw to ath_spec_scan_privOleksij Rempel2014-11-111-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>
* | ath9k: move spec_config to ath_spec_scan_privOleksij Rempel2014-11-111-6/+6
| | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: add support for reporting tx power to mac80211Felix Fietkau2014-11-111-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>
* | ath9k: allow disabling bands via platform dataFelix Fietkau2014-10-271-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>
* | ath9k: add support for endian swap of eeprom from platform dataFelix Fietkau2014-10-271-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>
* | ath9k_hw: make support for PC-OEM cards optionalFelix Fietkau2014-10-271-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>
* ath9k: Use a subroutine to assign HW queuesSujith Manoharan2014-09-091-1/+1
| | | | | | | Reduces code duplication. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add CTWindow supportSujith Manoharan2014-09-091-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>
* ath9k: Fix interface limitsSujith Manoharan2014-08-281-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>
* ath9k: Add ath9k_offchannel_initSujith Manoharan2014-08-281-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>
* ath9k: Add a routine for initializing channel contextsSujith Manoharan2014-08-281-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>
* ath9k: Isolate ath9k_use_chanctx module parameterSujith Manoharan2014-08-281-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>
* ath9k: Isolate P2P powersave routinesSujith Manoharan2014-08-281-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>
* ath9k: Handle failure to allocate HW timerSujith Manoharan2014-08-281-1/+3
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add a debug level for channel contextSujith Manoharan2014-08-281-0/+2
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Increase max listen intervalRajkumar Manoharan2014-07-011-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>
* ath9k: Advertise multichannel supportRajkumar Manoharan2014-06-191-2/+20
| | | | | Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: use separate HW queue for each channel contextRajkumar Manoharan2014-06-191-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>
* ath9k: Add recovery mechanism for hw TSF timerFelix Fietkau2014-06-191-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>
* ath9k: Add p2p go NoA attributeFelix Fietkau2014-06-191-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>
* ath9k: Move beacon config to channel contextRajkumar Manoharan2014-06-191-0/+1
| | | | | Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Implement channel context opsFelix Fietkau2014-06-191-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>
* ath9k: Implement remain-on-channal supportFelix Fietkau2014-06-191-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>
* ath9k: Implement hw_scan supportFelix Fietkau2014-06-191-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>
* ath9k: Add channel context worker threadFelix Fietkau2014-06-191-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>
* ath9k: Move txpower limit to channel contextFelix Fietkau2014-06-191-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>
* ath9k: Add channel context structureFelix Fietkau2014-06-191-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>
* ath9k: Fix interface combinations for multi-channel concurrencyRajkumar Manoharan2014-05-291-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>
* Merge branch 'master' of ↵John W. Linville2014-05-131-0/+3
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * ath9k: fix race in setting ATH_OP_INVALIDRajkumar Manoharan2014-04-241-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>
* | ath9k: Allow platform override without EEPROM overrideHelmut Schaa2014-05-071-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>
* | ath9k: Advertise support for AP mode channel width changesRajkumar Manoharan2014-05-061-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>
* | ath9k: implement p2p client powersave supportFelix Fietkau2014-04-221-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>
* | ath9k: support only one P2P interfaceFelix Fietkau2014-04-221-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>
* ath9k: Enable DFS only when ATH9K_DFS_CERTIFIEDJanusz Dziedzic2014-04-091-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>
OpenPOWER on IntegriCloud