summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ray_cs: Add include guardsRasmus Villemoes2014-08-282-4/+6
| | | | | | | | | | | The files ray_cs.h and rayctl.h both contain two thirds of what appears to be an include guard using the macro name RAYLINK_H (both lack the #define). Since RAYLINK_H is not defined anywhere, the #ifndefs are confusing no-ops. Add proper include guards using different macro names. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: only map wrapper if its address is availableHauke Mehrtens2014-08-282-4/+11
| | | | | | | | The Chipcommon B core does not have a wrap address and it would fail here. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: use firmware API revision from GET_HW_SPEC responseAmitkumar Karwar2014-08-282-1/+8
| | | | | | | | | | | Newer firmware returns API revision in GET_HW_SPEC command response. We will make use of it instead of parsing this information from FW release number. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: rename macro and variables related to API revisionAmitkumar Karwar2014-08-287-20/+20
| | | | | | | | | | We will remove 'fw' prefix from these variable and macro names and make them generic. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: fix left_len calculation issueAmitkumar Karwar2014-08-281-1/+2
| | | | | | | | | | | | | | While updating 'left_len' in each iteration, we should subtract last TLV length not the accumulated length of TLVs parsed till now. This bug in parsing logic is exposed by newer firmware which adds two TLVs in GET_HW_SPEC command response. Earlier firmwares used to add only one TLV. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: advertise support for TDLSCsaba Kiraly2014-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | Based on a quick test with AR9271, TDLS seems to be working fine. Tests were done with 2 Atheros AR9271 based devices with firmware 1.3 (sha1 8d49f928aa40ac53c729189bff1333cd373a7fb5), associated with a WAP54G access point. TDLS worked fine both in WPA2 mode and without encryption. Stations maintained ping flood traffic between each other and towards the AP without significant losses. Not tested with AR7010. TDLS was enabled in earlier patches the same way for other Atheros drivers: ath9k (fd6562344dea2b8b2a5d644cf971f4e56004500a), and carl9170 (d1f3de71a584a82ee4e84505fce9acccf40215ff). Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* MAINTAINTERS: The NFC list is subscribers-onlyDan Carpenter2014-08-281-1/+1
| | | | | | | It's not moderated, it's subscribers-only. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville2014-08-2830-2199/+4128
|\
| * ath10k: make target endianess more explicitMichal Kazior2014-08-272-137/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some copy engine structures are target specific and are uploaded to the device during init/configuration. This also cleans up a bit diag_mem_read/write implicit byteswap mess leaving only diag_access_read/write with an implicit endianess byteswap. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: dont duplicate service-pipe mappingMichal Kazior2014-08-271-44/+33
| | | | | | | | | | | | | | | | | | The mapping is already defined in a structure. It makes little sense to duplicate information stored in it within a function. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: move pci init structuresMichal Kazior2014-08-271-96/+96
| | | | | | | | | | | | | | | | | | It doesn't make much sense to have copy engine configuration structures spread across the whole source file. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix fw crash dumpingMichal Kazior2014-08-261-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent crash dump patches introduced a regression. If debugfs was disabled upon crash user could only see the following: [ 793.880000] ath10k: firmware crashed! (uuid n/a) [ 793.890000] ath10k: qca988x hw2.0 (0x4100016c, 0x043202ff) fw 10.1.467.2-1 api 2 htt 2.1 [ 793.890000] ath10k: debug 0 debugfs 0 tracing 0 dfs 1 The report was missing register dump. Fix it by printing registers regardless if crash_data is present or not. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: improve logging to include dev idMichal Kazior2014-08-2615-781/+833
| | | | | | | | | | | | | | | | | | This makes it a lot easier to log and debug messages if there's more than 1 ath10k device on a system. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: flush hif buffers before recoveryMichal Kazior2014-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Transport buffers weren't flushed and processed before queueing hw recovery request to mac80211. This could in theory result in an unwanted htt/wmi rx events being processed while mac80211 recovers the device and possibly interfere or even crash the system. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove ar_pci->startedMichal Kazior2014-08-252-12/+0
| | | | | | | | | | | | | | | | | | There are basically no more uses for ar_pci->started. It is also perfectly safe to call hif_stop without hif_start now. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: ignore ar_pci->started in pipe cleanupMichal Kazior2014-08-251-8/+0
| | | | | | | | | | | | | | | | | | Structures used by these functions are now guaranteed to remain accessible until driver is unregistered. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: update comment regarding warm resetMichal Kazior2014-08-251-5/+4
| | | | | | | | | | | | | | | | | | The old comment was a little out of date. HTT Rx ring is a more relevant problem when stopping transport layer. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: rework posting pci rx buffersMichal Kazior2014-08-254-161/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | It was possible on a host system running low on memory to end up with no rx buffers on pci pipes. This makes the driver more robust as it won't fail to start if it can't allocate all rx buffers right away. If it is fatal then upper layers will notice trouble anyway. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove early irq handlingMichal Kazior2014-08-252-125/+48
| | | | | | | | | | | | | | | | | | | | It's not really necessary to have a dedicated irq handler just for the sake of catching early fw crashes anymore. It is now safe to use one handler even during early stages of device boot up. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: make sure to really disable irqsMichal Kazior2014-08-251-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two corner cases. One is a race between disabling copy engine interrupts and unhandled pending interrupts on the host. This could end up with a runaway tasklet and consequently memory leak of a few copy engine rx buffers. The other one is an unexpected (and non-maskable via device CSR) MSI fw indication interrupt during teardown. This could trigger the same problem as the first corner case. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: split ce irq/handler setupMichal Kazior2014-08-253-68/+21
| | | | | | | | | | | | | | | | | | | | It doesn't make much sense to overwrite send_cb and recv_cb callbacks over and over again whenever transport starts. Just make sure to unmask copy engine interrupts when starting. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: setup irq method in probeMichal Kazior2014-08-252-35/+39
| | | | | | | | | | | | | | | | | | It doesn't make sense to re-init irqs completely whenever transport is started/stopped. Do it just once upon probing/removing. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix legacy irq workaroundMichal Kazior2014-08-251-3/+4
| | | | | | | | | | | | | | | | | | Wrong register was being set up. This could prevent firmware from booting in some rare cases when using legacy interrupts. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: move fw init printMichal Kazior2014-08-251-5/+1
| | | | | | | | | | | | | | | | | | Firmware probing is done only once when driver is registered and firmware version is guaranteed to remain the same until driver is unregistered. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: print more driver info when firmware crashesKalle Valo2014-08-254-18/+22
| | | | | | | | | | | | | | Sometimes users forget to include important info like firmware version, so better to print all the info. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: rename ath10k_pci_hif_dump_area() to ath10k_pci_fw_crashed_dump()Kalle Valo2014-08-251-5/+5
| | | | | | | | | | | | | | Better to have a clear name for the function. While at it, clear up the title for the register dump. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: provide firmware crash info via debugfsBen Greear2014-08-256-13/+302
| | | | | | | | | | | | | | | | | | | | | | | | Store the firmware registers and other relevant data to a firmware crash dump file and provide it to user-space via debugfs. Should help with figuring out why the firmware crashed. kvalo: remove dbglog support, rework and refactor the code to avoid ifdefs and otherwise simplify it as well Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add ath10k_pci_diag_* helpersKalle Valo2014-08-251-17/+38
| | | | | | | | | | | | | | ath10k_pci_diag_read32() is for reading u32 from a device and ath10k_pci_diag_read_hi() is a helper for reading data using "host interest" table. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix a conflict bug in wmi service bitmapMichal Kazior2014-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Service mapping for main firmware branch was incorrectly used for 10.x firmware and vice-versa. This caused wmi_services in debugfs to print wrong values. This fixes commit cff990ce7ddd6 ("ath10k: fix wmi service bitmap debug") where for some reason there was either a conflict that wasn't resolved properly or git had a bad day. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: fix %d confusingly prefixed with 0x in format stringsHans Wennborg2014-08-252-2/+2
| | | | | | | | | | Signed-off-by: Hans Wennborg <hans@hanshq.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: unregister spectral before macSimon Wunderlich2014-08-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | If spectral is unregistered after mac80211, the relayfs file has already been removed recursively by mac/cfg80211, and spectral tries to remove the file once more, thus leading to double free problems. Better clean up spectral before to avoid that problem. Reported-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Add SDIO device ID for QCA6234X SupportSrinivas Kandagatla2014-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | This patch adds device ID 402 to support QCA6234X found in APQ8064 SOC in IFC6410 board. Tested with mainline mmci sdio driver. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix typo in error messageBen Greear2014-08-141-1/+1
| | | | | | | | | | | | | | tranmist -> transmit Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: improve vdev map handlingBen Greear2014-08-141-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Check vdev map has space before calling ffs, fix invalid cleanup in failure to create vdev case. Open-code the BIT() logic since BIT does not properly handle 64-bit bitfields and future patches will make use of larger bitfields. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove htc->stoppedMichal Kazior2014-08-123-28/+6
| | | | | | | | | | | | | | | | This is not necessary anymore. There are no more uncontrolled htc tx entry points. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: group some pci probing helpersMichal Kazior2014-08-121-57/+77
| | | | | | | | | | | | | | | | Make probe/remove functions shorter and easier to understand. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove pci features varMichal Kazior2014-08-122-41/+1
| | | | | | | | | | | | | | | | | | | | | | | | The ATH10K_PCI_FEATURE_MSI_X was originally introduced to support both chips QCA988Xv1 and QCA988Xv2. Since v1 isn't supported anymore it doesn't make sense to keep the feature flag around. Since this is the last one remove the whole thing. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove target soc ps codeMichal Kazior2014-08-123-265/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The soc powersave was disabled by default. It never was fully tested. Some hw apparently had problems with it and the implementation itself had a possible race. Just remove the refcounting and simply wake up the device when probing and put to sleep when removing. kvalo: make ath10k_pci_wake() and _sleep() static Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: embed ar_pci inside arMichal Kazior2014-08-126-25/+19
| | | | | | | | | | | | | | | | | | | | Use the common convention of embedding private structures inside parent structures. This reduces allocations and simplifies pci probing code. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: introduce a stricter scan state machineMichal Kazior2014-08-125-137/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This aims at fixing some rare scan bugs related to firmware reporting unexpected scan event sequences. One such bug was if spectral scan phyerr reporting prevented firmware from properly propagating scan events to host. This led to scan timeout. After that next scan would trigger scan completed event first (before scan started event) leading to ar->scan.in_progress and timeout timer states to be overwritten incorrectly and making the very next scan to hang forever. Reported-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: simplify scan debug printsMichal Kazior2014-08-121-29/+38
| | | | | | | | | | | | | | | | This also reduces the cruft of printing scan event names in capitals. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix wmi service bitmap debugMichal Kazior2014-08-124-119/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 10.x and main firmware branches have conflicting WMI service bitmap definitions. This also fixes WMI services parsing on big-endian hosts and changes debugfs output to be more human friendly. kvalo: remove braces and the last semicolon from SVCSTR() Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: convert a driver to use module_usb_driver()Himangi Saraogi2014-08-041-20/+1
| | | | | | | | | | | | | | | | | | | | This converts a driver in drivers/net/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add spectral scan featureSimon Wunderlich2014-08-0410-1/+908
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the spectral scan feature for ath10k. The spectral scan is triggered by configuring a mode through a debugfs control file. Samples can be gathered via another relay debugfs file. Essentially, to try it out: ip link set dev wlan0 up echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl echo trigger > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl iw dev wlan0 scan echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl cat /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0 > samples This feature is still experimental. Based on the original RFC patch of Sven Eckelmann. Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath: Move spectral debugfs structs to shared headerSven Eckelmann2014-08-042-69/+90
| | | | | | | | | | | | | | | | | | | | The ath9k and ath10k will share the definitions of the debugfs spectral structures and enums. Having them in the same place helps to avoid conflicts. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: improve channel switchingMichal Kazior2014-08-021-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases during heavy tx vdev stop-start would timeout on vdev synchronization causing traffic to stall for a few seconds. Instead of stop-starting use a dedicated vdev restart command and down vdevs explicitly before doing so. This gets rid of the synchronization warnings/timeouts and makes channel switching smoother during traffic. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: extend debug code for RX pathJanusz Dziedzic2014-07-291-2/+39
| | | | | | | | | | | | | | | | Print sequence number, AMSDU_MORE flag and AC when additional debug enabled in RX path. This is usefull for debugging purpose. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix aggregated 4addr RxMichal Kazior2014-07-291-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A-MSDU 4addr frames weren't reconstructed properly and in some cases this resulted in a warning: br0: received packet on wlan0.sta1 with own address as source address Since this was only related to A-MSDU it would trigger when more intense traffic was generated. Reported-by: Vu Hai NGUYEN <vh.nguyen@actiasodielec.fr> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add support for 10.2 firmwareMichal Kazior2014-07-286-30/+678
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 10.2 firmware is a successor of 10.1 firmware (formerly identified as 10.x). Both share a lot but have some slight ABI differences that need to be taken care of. The 10.2 firmware introduces some new features but those can be added in subsequent patches. This patch makes ath10k boot and work with 10.2 with comparable functionality to 10.1. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: improve 'hard' simulate fw crashBen Greear2014-07-281-1/+4
| | | | | | | | | | | | | | | | | | Different firmware may support different numbers of vdevs. Use value that is always out of range for all firmware. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>