summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/Kconfig
AgeCommit message (Collapse)Author
2023-11-27wifi: mac80211: use wiphy locked debugfs helpers for agg_statusJohannes Berg
The read is currently with RCU and the write can deadlock, convert both for the sake of illustration. Make mac80211 depend on cfg80211 debugfs to get the helpers, but mac80211 debugfs without it does nothing anyway. This also required some adjustments in ath9k. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-01-28ath9k: fix build error with LEDS_CLASS=mArnd Bergmann
When CONFIG_ATH9K is built-in but LED support is in a loadable module, both ath9k drivers fails to link: x86_64-linux-ld: drivers/net/wireless/ath/ath9k/gpio.o: in function `ath_deinit_leds': gpio.c:(.text+0x36): undefined reference to `led_classdev_unregister' x86_64-linux-ld: drivers/net/wireless/ath/ath9k/gpio.o: in function `ath_init_leds': gpio.c:(.text+0x179): undefined reference to `led_classdev_register_ext' The problem is that the 'imply' keyword does not enforce any dependency but is only a weak hint to Kconfig to enable another symbol from a defconfig file. Change imply to a 'depends on LEDS_CLASS' that prevents the incorrect configuration but still allows building the driver without LED support. The 'select MAC80211_LEDS' is now ensures that the LED support is actually used if it is present, and the added Kconfig dependency on MAC80211_LEDS ensures that it cannot be enabled manually when it has no effect. Fixes: 197f466e93f5 ("ath9k_htc: Do not select MAC80211_LEDS by default") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210125113654.2408057-1-arnd@kernel.org
2020-08-27ath9k: Do not select MAC80211_LEDS by defaultKrzysztof Kozlowski
The ath9k driver hides all LEDs related code behind CONFIG_MAC80211_LEDS ifdefs so it does not really require the MAC80211_LEDS. The code builds fine. Convert the "select" into "imply" to allow disabling LED trigger when not needed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200820194049.28055-1-krzk@kernel.org
2020-08-27ath9k_htc: Do not select MAC80211_LEDS by defaultKrzysztof Kozlowski
The ath9k_htc driver hides all LEDs related code behind CONFIG_MAC80211_LEDS ifdefs so it does not really require the MAC80211_LEDS. The code builds and works just fine. Convert the "select" into "imply" to allow disabling LED trigger when not needed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200820120444.8809-1-krzk@kernel.org
2020-06-15Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo
ath.git patches for v5.9. Major changes: ath11k * add 6G band support * add spectral scan support
2020-06-14treewide: replace '---help---' in Kconfig files with 'help'Masahiro Yamada
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over '---help---'"), the number of '---help---' has been gradually decreasing, but there are still more than 2400 instances. This commit finishes the conversion. While I touched the lines, I also fixed the indentation. There are a variety of indentation styles found. a) 4 spaces + '---help---' b) 7 spaces + '---help---' c) 8 spaces + '---help---' d) 1 space + 1 tab + '---help---' e) 1 tab + '---help---' (correct indentation) f) 1 tab + 1 space + '---help---' g) 1 tab + 2 spaces + '---help---' In order to convert all of them to 1 tab + 'help', I ran the following commend: $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/' Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-06-09ath: fix wiki website urlFlavio Suligoi
In some ath files, the wiki url is still the old "wireless.kernel.org" instead of the new "wireless.wiki.kernel.org" Signed-off-by: Flavio Suligoi <f.suligoi@asem.it> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200605154112.16277-4-f.suligoi@asem.it
2019-11-21drivers: net: Fix Kconfig indentation, continuedKrzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style. This fixes various indentation mixups (seven spaces, tab+one space, etc). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-09-26drivers: net: Fix Kconfig indentationKrzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Kalle Valo <kvalo@codeaurora.org> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-09-04ath9k: add loader for AR92XX (and older) pci(e)Christian Lamparter
Atheros cards with a AR92XX generation (and older) chip usually store their pci(e) initialization vectors on an external eeprom chip. However these chips technically don't need the eeprom chip attached, the AR9280 Datasheet in section "6.1.2 DEVICE_ID" describes that "... if the EEPROM content is not valid, a value of 0xFF1C returns when read from the register". So, they will show up on the system's pci bus. However in that state, ath9k can't load, since it relies on having the correct pci-id, otherwise it doesn't know what chip it actually is. This happens on many embedded devices like routers and accesspoint since they want to keep the BOM low and store the pci(e) initialization vectors together with the calibration data on the system's FLASH, which is out of reach of the ath9k chip. Furthermore, Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) need to be able to initialize the PCIe wifi device. Normally, this should be done as a pci quirk during the early stages of booting linux. However, this isn't possible for devices which have the init code for the Atheros chip stored on NAND in an UBI volume. Hence, this module can be used to initialize the chip when the user-space is ready to extract the init code. Martin Blumenstingl prodived the following fixes: owl-loader: add support for OWL emulation PCI devices owl-loader: don't re-scan the bus when ath9k_pci_fixup failed owl-loader: use dev_* instead of pr_* logging functions owl-loader: auto-generate the eeprom filename as fallback owl-loader: add a debug message when swapping the eeprom data owl-loader: add missing newlines in log messages Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-06-26ath: fix SPDX tagsKalle Valo
Commit ec8f24b7faaf ("treewide: Add SPDX license identifier - Makefile/Kconfig") marked various Makefiles and Kconfig files within ath directories as GPL-2.0. But these modules and drivers are actually ISC: * ath * ar5523 * ath10k * ath5k * ath6kl * ath9k * wcn36xx * wil6210 Fix SPDX tags accordingly. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-06ath9k: dynack: remove 'experimental' tagLorenzo Bianconi
Remove experimental tag from dynack Kconfig entry since it has been tested on outdoor 25Km links Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-12-07ath9k: move spectral scan support under a separate config symbolMatthias Schiffer
At the moment, spectral scan support, and with it RELAY, is always enabled with ATH9K[_HTC]_DEBUGFS. Spectral scan support is currently the only user of RELAY in ath9k, and it unconditionally reserves a relay channel. Having debugfs support in ath9k is often useful even on very small embedded routers, where we'd rather like to avoid the code size and RAM usage of the relay support. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-13ath9k: move RELAY and DEBUG_FS to ATH9K[_HTC]_DEBUGFSChristian Lamparter
Currently, the common ath9k_common module needs to have a dependency on RELAY and DEBUG_FS in order to built. This is usually not a problem. But for RAM and FLASH starved AR71XX devices, every little bit counts. This patch adds a new symbol CONFIG_ATH9K_COMMON_DEBUG which makes it possible to drop the RELAY and DEBUG_FS dependency there and move it to ATH_(HTC)_DEBUGFS. Note: The shared FFT/spectral code (which is the only user of the relayfs in ath9k*) needs DEBUG_FS to export the relayfs interface to dump the data to userspace. So it makes no sense to have the functions compiled in, if DEBUG_FS is not there. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-09-28ath9k: disable RNG by defaultMiaoqing Pan
ath9k RNG will dominates all the noise sources from the real HW RNG, disable it by default. But we strongly recommand to enable it if the system without HW RNG, especially on embedded systems. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Acked-by: Stephan Mueller <smueller@chronox.de> Acked-by: Stephan Mueller <smueller@chronox.de> Reviewed-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-05-09ath9k: Move TX99 config option under ath9k debuggingHelmut Schaa
Since ATH9K_TX99 depends on ATH9K_DEBUGFS anyway move it there such that "make menuconfig" will indent TX99 support below ath9k debugging. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-12-11ath9k: feeding entropy in kernel from ADC captureMiaoqing Pan
This patch is derived from commit 6301566e0b2d ("ath9k: export HW random number generator"), We evaluated the entropy of the ADC data on QCA9531, QCA9561, QCA955x, and AR9340, and it has sufficient quality random data (at least 10 bits and up to 22 bits of min-entropy for a 32-bit value). We conservatively assume the min-entropy is 10 bits out of 32 bits. Thus, ATH9K_RNG_BUF_SIZE is set to 320 (u32) i.e., 1.25 kilobytes of data is inserted to fill up the pool as soon as the entropy counter becomes 896/4096 (set by random.c). Since ADC was not designed to be a dedicated HW RNG, we do not want to bind it to /dev/hwrng framework directly. This patch feeds the entropy directly from the WiFi driver to the input pool. The ADC register output is only used as a seed for the Linux entropy pool. No conditioning is needed, since all the conditioning is performed by the pool itself. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-19ath9k_common: make sure DEBUG_FS and RELAY enabledOleksij Rempel
currently ath9k_common depends on this components. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-27ath9k_hw: make support for PC-OEM cards optionalFelix Fietkau
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-09-16ath9k: add config for (en|dis)abling ACK timeout estimationLorenzo Bianconi
Add ACK timeout estimation algorithm to ath9k Makefile and Kconfig Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a config option for channel contextSujith Manoharan
Channel contexts are supported only for P2P right now, so make sure that the 'normal' path remains unaffected by using a config option. This will also reduce the size of the driver. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-12ath9k: Remove ath9k rate controlSujith Manoharan
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>
2014-01-13ath9k: Add an option for station statisticsSujith Manoharan
Also, rename node_stat to node_aggr. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-02ath9k: Add a config option for WoWSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-02ath9k: Fix TX99 config option usageSujith Manoharan
Use CONFIG_ATH9K_TX99 to properly enclose the tx99 code and make sure that it is not compiled as part of the driver when it is not selected. Move the tx99 code to a new file tx99.c and also add ATH9K_DEBUGFS as a dependency in Kconfig. This reduces the module size on platforms like OpenWrt where ATH9K_DEBUGFS is selected, but TX99 might be disabled. Cc: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-18ath9k: add TX99 supportLuis R. Rodriguez
TX99 support enables Specific Absorption Rate (SAR) testing. SAR is the unit of measurement for the amount of radio frequency(RF) absorbed by the body when using a wireless device. The RF exposure limits used are expressed in the terms of SAR, which is a measure of the electric and magnetic field strength and power density for transmitters operating at frequencies from 300 kHz to 100 GHz. Regulatory bodies around the world require that wireless device be evaluated to meet the RF exposure limits set forth in the governmental SAR regulations. In the examples below, for more bit rate options see the iw TX bitrate setting documentation: http://wireless.kernel.org/en/users/Documentation/iw#Modifying_transmit_bitrates Example usage: iw phy phy0 interface add moni0 type monitor ip link set dev moni0 up iw dev moni0 set channel 36 HT40+ iw set bitrates mcs-5 4 echo 10 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99_power echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-26ath9k: Fix DEBUG_FS dependency for ath9kSujith Manoharan
Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-07-22ath9k: make rfkill configurableJohannes Berg
When the platform doesn't have rfkill support, i.e. nothing is connected to the rfkill GPIO, there's little value in polling the GPIO. Add a Kconfig option to allow disabling the polling in ath9k. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-07-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds
Pull networking updates from David Miller: "This is a re-do of the net-next pull request for the current merge window. The only difference from the one I made the other day is that this has Eliezer's interface renames and the timeout handling changes made based upon your feedback, as well as a few bug fixes that have trickeled in. Highlights: 1) Low latency device polling, eliminating the cost of interrupt handling and context switches. Allows direct polling of a network device from socket operations, such as recvmsg() and poll(). Currently ixgbe, mlx4, and bnx2x support this feature. Full high level description, performance numbers, and design in commit 0a4db187a999 ("Merge branch 'll_poll'") From Eliezer Tamir. 2) With the routing cache removed, ip_check_mc_rcu() gets exercised more than ever before in the case where we have lots of multicast addresses. Use a hash table instead of a simple linked list, from Eric Dumazet. 3) Add driver for Atheros CQA98xx 802.11ac wireless devices, from Bartosz Markowski, Janusz Dziedzic, Kalle Valo, Marek Kwaczynski, Marek Puzyniak, Michal Kazior, and Sujith Manoharan. 4) Support reporting the TUN device persist flag to userspace, from Pavel Emelyanov. 5) Allow controlling network device VF link state using netlink, from Rony Efraim. 6) Support GRE tunneling in openvswitch, from Pravin B Shelar. 7) Adjust SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF for modern times, from Daniel Borkmann and Eric Dumazet. 8) Allow controlling of TCP quickack behavior on a per-route basis, from Cong Wang. 9) Several bug fixes and improvements to vxlan from Stephen Hemminger, Pravin B Shelar, and Mike Rapoport. In particular, support receiving on multiple UDP ports. 10) Major cleanups, particular in the area of debugging and cookie lifetime handline, to the SCTP protocol code. From Daniel Borkmann. 11) Allow packets to cross network namespaces when traversing tunnel devices. From Nicolas Dichtel. 12) Allow monitoring netlink traffic via AF_PACKET sockets, in a manner akin to how we monitor real network traffic via ptype_all. From Daniel Borkmann. 13) Several bug fixes and improvements for the new alx device driver, from Johannes Berg. 14) Fix scalability issues in the netem packet scheduler's time queue, by using an rbtree. From Eric Dumazet. 15) Several bug fixes in TCP loss recovery handling, from Yuchung Cheng. 16) Add support for GSO segmentation of MPLS packets, from Simon Horman. 17) Make network notifiers have a real data type for the opaque pointer that's passed into them. Use this to properly handle network device flag changes in arp_netdev_event(). From Jiri Pirko and Timo Teräs. 18) Convert several drivers over to module_pci_driver(), from Peter Huewe. 19) tcp_fixup_rcvbuf() can loop 500 times over loopback, just use a O(1) calculation instead. From Eric Dumazet. 20) Support setting of explicit tunnel peer addresses in ipv6, just like ipv4. From Nicolas Dichtel. 21) Protect x86 BPF JIT against spraying attacks, from Eric Dumazet. 22) Prevent a single high rate flow from overruning an individual cpu during RX packet processing via selective flow shedding. From Willem de Bruijn. 23) Don't use spinlocks in TCP md5 signing fast paths, from Eric Dumazet. 24) Don't just drop GSO packets which are above the TBF scheduler's burst limit, chop them up so they are in-bounds instead. Also from Eric Dumazet. 25) VLAN offloads are missed when configured on top of a bridge, fix from Vlad Yasevich. 26) Support IPV6 in ping sockets. From Lorenzo Colitti. 27) Receive flow steering targets should be updated at poll() time too, from David Majnemer. 28) Fix several corner case regressions in PMTU/redirect handling due to the routing cache removal, from Timo Teräs. 29) We have to be mindful of ipv4 mapped ipv6 sockets in upd_v6_push_pending_frames(). From Hannes Frederic Sowa. 30) Fix L2TP sequence number handling bugs, from James Chapman." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1214 commits) drivers/net: caif: fix wrong rtnl_is_locked() usage drivers/net: enic: release rtnl_lock on error-path vhost-net: fix use-after-free in vhost_net_flush net: mv643xx_eth: do not use port number as platform device id net: sctp: confirm route during forward progress virtio_net: fix race in RX VQ processing virtio: support unlocked queue poll net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit Documentation: Fix references to defunct linux-net@vger.kernel.org net/fs: change busy poll time accounting net: rename low latency sockets functions to busy poll bridge: fix some kernel warning in multicast timer sfc: Fix memory leak when discarding scattered packets sit: fix tunnel update via netlink dt:net:stmmac: Add dt specific phy reset callback support. dt:net:stmmac: Add support to dwmac version 3.610 and 3.710 dt:net:stmmac: Allocate platform data only if its NULL. net:stmmac: fix memleak in the open method ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available net: ipv6: fix wrong ping_v6_sendmsg return value ...
2013-07-04Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "The usual stuff from trivial tree" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits) treewide: relase -> release Documentation/cgroups/memory.txt: fix stat file documentation sysctl/net.txt: delete reference to obsolete 2.4.x kernel spinlock_api_smp.h: fix preprocessor comments treewide: Fix typo in printk doc: device tree: clarify stuff in usage-model.txt. open firmware: "/aliasas" -> "/aliases" md: bcache: Fixed a typo with the word 'arithmetic' irq/generic-chip: fix a few kernel-doc entries frv: Convert use of typedef ctl_table to struct ctl_table sgi: xpc: Convert use of typedef ctl_table to struct ctl_table doc: clk: Fix incorrect wording Documentation/arm/IXP4xx fix a typo Documentation/networking/ieee802154 fix a typo Documentation/DocBook/media/v4l fix a typo Documentation/video4linux/si476x.txt fix a typo Documentation/virtual/kvm/api.txt fix a typo Documentation/early-userspace/README fix a typo Documentation/video4linux/soc-camera.txt fix a typo lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment ...
2013-06-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/wireless/ath/ath9k/Kconfig drivers/net/xen-netback/netback.c net/batman-adv/bat_iv_ogm.c net/wireless/nl80211.c The ath9k Kconfig conflict was a change of a Kconfig option name right next to the deletion of another option. The xen-netback conflict was overlapping changes involving the handling of the notify list in xen_netbk_rx_action(). Batman conflict resolution provided by Antonio Quartulli, basically keep everything in both conflict hunks. The nl80211 conflict is a little more involved. In 'net' we added a dynamic memory allocation to nl80211_dump_wiphy() to fix a race that Linus reported. Meanwhile in 'net-next' the handlers were converted to use pre and post doit handlers which use a flag to determine whether to hold the RTNL mutex around the operation. However, the dump handlers to not use this logic. Instead they have to explicitly do the locking. There were apparent bugs in the conversion of nl80211_dump_wiphy() in that we were not dropping the RTNL mutex in all the return paths, and it seems we very much should be doing so. So I fixed that whilst handling the overlapping changes. To simplify the initial returns, I take the RTNL mutex after we try to allocate 'tb'. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-18treewide: Fix typo in printkMasanari Iida
Correct spelling typo in printk within various drivers. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-06-12ath9k: Use minstrel rate control by defaultSujith Manoharan
The ath9k rate control algorithm has various architectural issues that make it a poor fit in scenarios like congested environments etc. An example: https://bugzilla.redhat.com/show_bug.cgi?id=927191 Change the default to minstrel which is more robust in such cases. The ath9k RC code is left in the driver for now, maybe it can be removed altogether later on. Cc: stable@vger.kernel.org Cc: Jouni Malinen <jouni@qca.qualcomm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-11Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/ath/ath9k/debug.c net/mac80211/iface.c
2013-05-22ath9k: Remove MAC_DEBUGSujith Manoharan
This option has not been enabled by default in any distribution, has never been enabled in OpenWrt and no developer has asked for this information in a bug report. Dumping pages of random values doesn't help debugging, remove this option (along with the vmalloc() abuse). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-05-17net/wireless: ATH9K should depend on HAS_DMAGeert Uytterhoeven
If NO_DMA=y: drivers/built-in.o: In function `ath9k_beacon_generate': drivers/net/wireless/ath/ath9k/beacon.c:146: undefined reference to `dma_unmap_single' drivers/net/wireless/ath/ath9k/beacon.c:174: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/beacon.c:176: undefined reference to `dma_mapping_error' drivers/built-in.o: In function `ath9k_beacon_remove_slot': drivers/net/wireless/ath/ath9k/beacon.c:252: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_descdma_setup': drivers/net/wireless/ath/ath9k/init.c:382: undefined reference to `dmam_alloc_coherent' drivers/built-in.o: In function `ath_edma_get_buffers': drivers/net/wireless/ath/ath9k/recv.c:616: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_get_next_rx_buf': drivers/net/wireless/ath/ath9k/recv.c:740: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_rx_edma_cleanup': drivers/net/wireless/ath/ath9k/recv.c:176: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_rx_cleanup': drivers/net/wireless/ath/ath9k/recv.c:340: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_rx_edma_buf_link': drivers/net/wireless/ath/ath9k/recv.c:122: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_rx_tasklet': drivers/net/wireless/ath/ath9k/recv.c:1275: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/recv.c:1277: undefined reference to `dma_mapping_error' drivers/net/wireless/ath/ath9k/recv.c:1283: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_rx_edma_init': drivers/net/wireless/ath/ath9k/recv.c:226: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/recv.c:229: undefined reference to `dma_mapping_error' drivers/built-in.o: In function `ath_rx_init': drivers/net/wireless/ath/ath9k/recv.c:303: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/recv.c:306: undefined reference to `dma_mapping_error' drivers/built-in.o: In function `ath_tx_complete_buf': drivers/net/wireless/ath/ath9k/xmit.c:2088: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_txstatus_setup': drivers/net/wireless/ath/ath9k/xmit.c:2344: undefined reference to `dmam_alloc_coherent' drivers/built-in.o: In function `ath_tx_set_retry': drivers/net/wireless/ath/ath9k/xmit.c:307: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_tx_setup_buffer': drivers/net/wireless/ath/ath9k/xmit.c:1887: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/xmit.c:1889: undefined reference to `dma_mapping_error' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-05-11net/wireless: ATH9K should depend on HAS_DMAGeert Uytterhoeven
If NO_DMA=y: drivers/built-in.o: In function `ath9k_beacon_generate': drivers/net/wireless/ath/ath9k/beacon.c:146: undefined reference to `dma_unmap_single' drivers/net/wireless/ath/ath9k/beacon.c:174: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/beacon.c:176: undefined reference to `dma_mapping_error' drivers/built-in.o: In function `ath9k_beacon_remove_slot': drivers/net/wireless/ath/ath9k/beacon.c:252: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_descdma_setup': drivers/net/wireless/ath/ath9k/init.c:382: undefined reference to `dmam_alloc_coherent' drivers/built-in.o: In function `ath_edma_get_buffers': drivers/net/wireless/ath/ath9k/recv.c:616: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_get_next_rx_buf': drivers/net/wireless/ath/ath9k/recv.c:740: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_rx_edma_cleanup': drivers/net/wireless/ath/ath9k/recv.c:176: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_rx_cleanup': drivers/net/wireless/ath/ath9k/recv.c:340: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_rx_edma_buf_link': drivers/net/wireless/ath/ath9k/recv.c:122: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_rx_tasklet': drivers/net/wireless/ath/ath9k/recv.c:1275: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/recv.c:1277: undefined reference to `dma_mapping_error' drivers/net/wireless/ath/ath9k/recv.c:1283: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_rx_edma_init': drivers/net/wireless/ath/ath9k/recv.c:226: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/recv.c:229: undefined reference to `dma_mapping_error' drivers/built-in.o: In function `ath_rx_init': drivers/net/wireless/ath/ath9k/recv.c:303: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/recv.c:306: undefined reference to `dma_mapping_error' drivers/built-in.o: In function `ath_tx_complete_buf': drivers/net/wireless/ath/ath9k/xmit.c:2088: undefined reference to `dma_unmap_single' drivers/built-in.o: In function `ath_txstatus_setup': drivers/net/wireless/ath/ath9k/xmit.c:2344: undefined reference to `dmam_alloc_coherent' drivers/built-in.o: In function `ath_tx_set_retry': drivers/net/wireless/ath/ath9k/xmit.c:307: undefined reference to `dma_sync_single_for_cpu' drivers/built-in.o: In function `ath_tx_setup_buffer': drivers/net/wireless/ath/ath9k/xmit.c:1887: undefined reference to `dma_map_single' drivers/net/wireless/ath/ath9k/xmit.c:1889: undefined reference to `dma_mapping_error' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-01ath9k: Select RELAY for ATH9K_DEBUGFSSven Eckelmann
The spectral scan support activated through ATH9K_DEBUGFS depends on RELAY for the kernel->userspace communication. Not activating RELAY causes build failures. The RELAY is added as select instead of depend to do it similar like the only other user of RELAY: BLK_DEV_IO_TRACE Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-04ath9k: Fix Kconfig for ATH9K_HTCVladimir Kondratiev
Ath9k consists of 2 different sub-modules: ATH9K and ATH9K_HTC. Both uses common Atheros code from ath.ko and need ATH_COMMON. However, while ATH9K selects ATH_COMMON, ATH9K_HTC does not. As result, if ATH9K_HTC is the only Atheros card selected, compilation fails with unresolved symbols. This patch moves ATH_COMMON selection to the common part for both ATH9K and ATH9K_HTC Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02ath9k: Fix compilation breakageSujith Manoharan
Since ath9k makes use of mac80211's debugfs hooks to maintain station statistics, make ATH9K_DEBUGFS select MAC80211_DEBUGFS. This fixes the issue reported by Fengguang Wu: drivers/net/wireless/ath/ath9k/debug.c: In function 'ath9k_sta_add_debugfs': drivers/net/wireless/ath/ath9k/debug.c:1589:4: error: 'struct ath_node' has no member named 'node_stat' drivers/net/wireless/ath/ath9k/debug.c: In function 'ath9k_sta_remove_debugfs': drivers/net/wireless/ath/ath9k/debug.c:1599:19: error: 'struct ath_node' has no member named 'node_stat' Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-30wireless: allow Atheros card to not depend on ath.koVladimir Kondratiev
There are 2 different things: - sub-menu for "Atheros Wireless cards" family - module ath.ko with common Atheros code Until now, they both used to depend on the same Kconfig variable ATH_COMMON. Thus, being "Atheros card" and "depending on ath.ko" was the same. To allow module to belong to the "Atheros Wireless cards" family but not use ath.ko, 2 conditions above need to be separated. So, this patch introduce new Kconfig variable ATH_CARDS for belonging to the "Atheros Wireless Cards" family; while ATH_COMMON becomes hidden variable to express dependency on common Atheros code in ath.ko. Modules that depend on this common code now express it by setting ATH_COMMON. Right now, ath6kl do not depend on common code and thus do not set ATH_COMMON. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-17ath9k: make CONFIG_ATH9K_DFS_CERTIFIED depend on CFG80211_CERTIFICATION_ONUSLuis R. Rodriguez
Turns out every most standard Linux distributions enable CONFIG_EXPERT, so use the shiny new CFG80211_CERTIFICATION_ONUS which is meant by design to not be enabled by all Linux distributions. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-07ath9k: make MAC sample statistics optionalFelix Fietkau
They're more expensive than some of the other debug options and only used in very rare situations, so it sometimes makes sense to disable them while leaving in debugfs support. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-27ath9k: Modify ATH9K_BTCOEX_SUPPORTSujith Manoharan
ATH9K_BTCOEX_SUPPORT is now used by both ath9k and ath9k_htc to enable BT coexistence. Fix Kbuild to allow this. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19ath9k_hw: make bluetooth coexistence support optional at compile timeFelix Fietkau
Many systems (e.g. embedded systems) do not have wifi modules connected to bluetooth modules, so bluetooth coexistence is irrelevant there. With the addition of MCI support, ath9k picked up quite a bit of extra code that can be compiled out this way. This patch redefines ATH9K_HW_CAP_MCI and adds an inline wrapper for querying the bluetooth coexistence scheme, allowing the compiler to eliminate code that uses it, with only very little use of #ifdef. On MIPS this reduces the total size for the modules by about 20k. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-15ath9k: add DFS radar pulse processingZefir Kurtisi
This initial DFS module provides basic functionality to deal with radar pulses reported by the Atheros DFS HW pulse detector. The reported data is evaluated and basic plausibility checks are performed to filter false pulses. Passing radar pulses are forwarded to pattern detectors which are not yet implemented. (Some modifications to actually use ATH9K_DFS_DEBUGFS based on comments from Julian Calaby <julian.calaby@gmail.com>. -- JWL) Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11ath9k: set ATH9K_PCI to y by defaultDaniel Kuehn
Most ath9k devices are PCI/PCIe based, therefor making PCI/PCIe support default y helps those porting a config from 2.6 kernel series from getting "non-functional" wireless drivers with 3.x kernel series. Signed-off-by: Daniel Kuehn <daniel@kuehn.se> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-27wireless: Default to 'n' for 2 new added devices in Kconfig.Tao Ma
We make oldconfig every time when a new kernel arrives, but if we don't have such a device(I guess this is the most common case for a new device), the default value should be 'n' so that the kernel size we build doesn't grow up too much quickly. For anyone who has the device, it is OK for them to turn it on by themselves. Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-13ath9k: introduce ATH9K_{PCI,AHB} config optionsGabor Juhos
Currently ath9k only available in menuconfig if PCI bus support is enabled. However the driver is required for the built-in wireless MACs of the Atheros AR9130/AR9132 SoCs. These SoCs have no PCI controller, the wireless MAC is connected to the AHB bus on them. Introduce separated config options for the supported buses, in order to allow building of ath9h without PCI bus support. As a bonus, this patch removes the cross-reference of the ATHEROS_AR71XX option which is not present in the kernel. Cc: Luis R. Rodriguez <lrodriguez@atheros.com> Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>