summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bcma: fill core details for every deviceRafał Miłecki2014-10-273-3/+8
| | | | | | | | | | We were setting things like dma_dev, IRQ, etc. during core registration only. We need such info for cores handled internally (e.g. ChipCommon) as well. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge tag 'for-linville-20141024' of git://github.com/kvalo/athJohn W. Linville2014-10-2724-1373/+2258
|\ | | | | | | | | Conflicts: drivers/net/wireless/ath/wil6210/wil6210.h
| * ath10k: split ce pipe init/alloc furtherMichal Kazior2014-10-233-69/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | Calling init to reinit ce pipe state would also re-set all static structure links and setting (which don't change over driver lifecycle). Make it so alloc links structures and initializes static data and init part to setup state variables and clear stuff. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: mask/unmask msi fw irqMichal Kazior2014-10-232-22/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was the final missing bit to making sure the device doesn't assert interrupts to host. This should fix possible race when target crashes during driver teardown. This also removes an early warm reset workaround during pci probing. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: re-disable interrupts after target initMichal Kazior2014-10-231-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | If MSI isn't configured device ROM program expects legacy interrupts to be enabled before it can fully boot. Don't forget to disable legacy interrupts after that. While at it re-use the legacy irq enabling helper instead of calling ath10k_pci_write32(). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: use bss_info as txpower sourceMichal Kazior2014-10-212-20/+75
| | | | | | | | | | | | | | | | | | | | | | | | This simply changes the source for txpower setup. It does not make ath10k use different txpower values for different vifs. This will make it easier to implement chanctx in ath10k in the future. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: simplify computation of mgmt rx bandMichal Kazior2014-10-211-16/+16
| | | | | | | | | | | | | | | | | | | | Using global channel won't work with chanctx. Try to determine the channel from the information provided in the wmi event itself alone. This should be sufficient. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: clean up sta auth/assoc codeMichal Kazior2014-10-211-79/+42
| | | | | | | | | | | | | | | | The code can be symmetrical so make it so. This makes it easier to understand and work with. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: skip some commands on reassocMichal Kazior2014-10-211-23/+29
| | | | | | | | | | | | | | | | | | | | It doesn't make much sense to reconfigure peer completely upon reassociation. This will make it easier to have a more uniform association code across different modes. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: clean up assoc codeMichal Kazior2014-10-211-48/+46
| | | | | | | | | | | | | | | | | | | | There's no need to pass bss_conf explicitly as it is accessible via vif pointer. This requires slight changes in function prototypes. While at it clean up listen interval workaround/command. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: retrieve calibration data from fileKalle Valo2014-10-214-13/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A frequent request have been to be able to provide calibration data from a file as some of the AP devices store the calibration data on an MTD partition. This patchset adds support for that and also makes it easier to add Device Tree support later on. The calibration data is found by using the id string provided by dev_name() using this format: cal-<bus>-<id>.bin With PCI the id string contains bus, slot and func values. For example for a PCI device in bus 2 slot 0, ath10k will try to retrieve a calibration data from a file: /lib/firmware/ath10k/cal-pci-0000:02:00.0.bin The calibration data sequence is: 1. Check with request_firmware() if there's a calibration file ("cal-<bus>-<id>.bin") on the filesystem for this device. If yes, use that. If not, goto 2 2. Check if otp.bin is able to successfully load the calibration data from OTP. If yes, use that. If not, goto 3. 4. Print an error message that no calibration data found and stop driver initialization for this device. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: refactor ath10k_init_download_firmware()Kalle Valo2014-10-211-15/+12
| | | | | | | | | | | | This is preparation for being able to download calibration data from a file. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add back enum ath10k_busKalle Valo2014-10-213-0/+19
| | | | | | | | | | | | | | | | | | Commit 3a0861fffd223 ("ath10k: remove ath10k_bus") removed enum ath10k_bus because it was not used for anything at the time. But now it's needed for for retrieving the right calibration data file so add it back. Only new addition is ath10k_bus_str(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix kernel panic while shutting down APRajkumar Manoharan2014-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on GFP flag given to DMA coherent allocation, the behaviour of dma_free_coherent is changed. This behavioural diffrence is noticeable in ARM platform. If DMA memory is allocated with GFP_KERNEL, free coherent can not be called inside spin lock. This is causing kernel crash in ARM platforms. Fix this by changing GFP flag to atomic. This is most likely a regression from commit 64badcb6d645 ("ath10k: workaround fw beaconing bug"). Cc: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add tracing for frame transmissionRajkumar Manoharan2014-10-084-0/+53
| | | | | | | | | | | | | | | | Add tracing support to forward management and data frames to user space for packet inspection. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix WMI scan command lengthJanusz Dziedzic2014-10-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix WMI scan command length we setup when scan request. This fix issue with 636 firmware when scan always failed with message: ath10k_pci 0000:02:00.0: wmi start scan ath10k_pci 0000:02:00.0: wmi stop scan reqid 1 req_type 0 vdev/scan_id 0 ath10k_pci 0000:02:00.0: failed to stop wmi scan: -11 ath10k_pci 0000:02:00.0: failed to stop scan: -11 ath10k_pci 0000:02:00.0: failed to start hw scan: -110 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: advertise all possible firmware(-api) filesBartosz Markowski2014-10-082-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This is required if we take into account possibility to load the driver from initrd (RAM disk), so in other words: very early in the boot process, before the file system is visible. In such case we need to have the firmware files accessible from ram disk too, and this patch guarantee this. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: don't create bssid peer for ibssJanusz Dziedzic2014-10-081-18/+10
| | | | | | | | | | | | | | | | | | | | It's not really necessary to create bssid peer for bssid. Self-address peer is sufficient. This prevents some firmware revisions from crashing. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: warn on unhandled htt eventsMichal Kazior2014-10-081-2/+2
| | | | | | | | | | | | | | | | It makes a lot more sense to print these kinds of problems as a warning instead of a debug. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add tracing for tx infoRajkumar Manoharan2014-10-073-0/+62
| | | | | | | | | | | | | | | | | | The tx info such as msdu_id, frame len, vdev id and tid are reported to user space by tracepoint. This is useful for collecting tx statistics. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add tracing for rx descriptorRajkumar Manoharan2014-10-072-0/+33
| | | | | | | | | | | | | | | | | | Upon the reception of frame, the descriptor status are reported to user space by tracepoint. This is useful for collecting rx statistics. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add tracing for ath10k_htt_pktlogRajkumar Manoharan2014-10-075-2/+46
| | | | | | | | | | | | | | | | This is useful for collecting pktlog statistics of tx, rx and rate information, so add tracing for the API call. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add support to configure pktlog filterRajkumar Manoharan2014-10-075-1/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to configure packet log filters (tx, rx, rate control) via debugfs. To disable htt pktlog events set the filters to 0. ex: To enable pktlog for all filters echo 0x1f > /sys/kernel/debug/ieee80211/phy*/ath10k/pktlog_filter To disable pktlog echo 0 > /sys/kernel/debug/ieee80211/phy*/ath10k/pktlog_filter Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: use 64-bit vdev mapBen Greear2014-10-013-12/+15
| | | | | | | | | | | | | | | | This can allow more than 32 stations to be supported without over-running the bitmap. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: support ethtool statsBen Greear2014-10-013-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | Add support for reading firmware stats through the ethtool API. This may be easier for applications to manipulate compared to parsing a text based debugfs file. kvalo: remove unneeded ifdefs, call ath10k_debug_fw_stats_request() and added simple error handling Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add firmware crash countersBen Greear2014-10-013-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add three counters related to firmware crashes or resets. Usage: # cat /sys/kernel/debug/ieee80211/phy0/ath10k/fw_reset_stats fw_crash_counter 2 fw_warm_reset_counter 43 fw_cold_reset_counter 0 # kvalo: split into it's own patch, add debugfs file and add locking Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix fw stats processingMichal Kazior2014-09-293-95/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If stat data exceeds wmi-htc buffer limits firmware splits it into many wmi stats update events which are delivered in a ping-pong fashion triggered by wmi stats request command. Since there's only an implicit start-of-data and no end-of-data indications the driver has to perform some trickery to get complete stat data. kvalo: use %zu to fix a compiler warning and fix a typo in a comment Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: request fw_stats once on openMichal Kazior2014-09-291-31/+79
| | | | | | | | | | | | | | | | Stats were requested and processed for each read call. This caused inconsistent readings. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: rename fw_stats related stuffMichal Kazior2014-09-295-26/+25
| | | | | | | | | | | | | | The naming was a bit inconsistent. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: split wmi stats parsingMichal Kazior2014-09-294-141/+180
| | | | | | | | | | | | | | | | | | | | | | | | The parsing function was rather complex. Simplify by splitting it up into firmware branch specific implementations. While at it move the parsing code into wmi.c where it belongs. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath: change logging functions to return voidJoe Perches2014-09-297-56/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The return values are not used by callers of these functions so change the functions to return void. Other miscellanea: o add __printf verification to wil6210 logging functions No format/argument mismatches found Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add cal_data debugfs fileKalle Valo2014-09-262-0/+84
| | | | | | | | | | | | | | | | | | | | | | Provide calibration data used by the firmware to user space via a debugfs file. This makes it easier to debug calibration related problems. Example: sudo cp /sys/kernel/debug/ieee80211/phy0/ath10k/cal_data 1.cal Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add diag_read() to hif opsKalle Valo2014-09-264-29/+67
| | | | | | | | | | | | | | | | | | | | | | | | diag_read() is used for reading from firmware memory via the diagnose window. First user will be cal_data debugfs file. To serialise diagnostic window access and make it safe to use while firmware is running take ce_lock both in ath10k_pci_diag_write_mem() and ath10k_pci_diag_read_mem(). Because of that all the CE calls had to be changed to _nolock variants. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: don't enable interrupts for the diagnostic windowKalle Valo2014-09-261-1/+4
| | | | | | | | | | | | | | | | | | The diagnostic window (CE7) uses polling and is not initiliased to retrieve interrupts so disable interrupts altogether for CE7. Otherwise ath10k crashes when using the diagnostic window while the firmware is running due to NULL dereference and polling reads timeout. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add debug dump for pci rxMichal Kazior2014-09-261-0/+6
| | | | | | | | | | | | | | | | This makes it easier to debug the device-target communication at a very low level. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: dump hex bytes with dev string prefixMichal Kazior2014-09-261-1/+16
| | | | | | | | | | | | | | | | This makes it easier to debug hex dumps on systems with more than a single ath10k device. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: print wmi version infoMichal Kazior2014-09-261-2/+6
| | | | | | | | | | | | | | | | HTT version is already printed so print WMI version as well for consistency. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: re-work scan start command buildingMichal Kazior2014-09-232-172/+119
| | | | | | | | | | | | | | | | This gets rid of the ugly scan structure building and uses a saner way to do it. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: unify wmi event function namesMichal Kazior2014-09-231-9/+9
| | | | | | | | | | | | | | | | Make all wmi event functions match the same naming style, i.e. ath10k_wmi_event_<name>. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: clean up phyerr codeMichal Kazior2014-09-234-149/+66
| | | | | | | | | | | | | | | | Make the phyerr structures more compact and easier to understand. Also add constness. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: deduplicate wmi service ready logicMichal Kazior2014-09-235-129/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic responsible for processing the event is no different across different firmware binaries. The difference that needs to be dealt with is the ABI of data structures. The intermediate structure uses __le32 to avoid extra memory allocations to byteswap variable-length substructures (i.e. host mem chunks). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: relocate wmi attach/deatch functionsMichal Kazior2014-09-231-39/+38
| | | | | | | | | | | | | | | | | | Init functions should be placed at the end of files in most cases to avoid forward declarations for static functions. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: deduplicate host mem chunk codeMichal Kazior2014-09-232-99/+34
| | | | | | | | | | | | | | | | Simplify the code by deduplicating structure definitions and code. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: deduplicate wmi_channel codeMichal Kazior2014-09-232-41/+37
| | | | | | | | | | | | | | | | The structure is being set up in 2 places. Deduplicate the code by creating a helper. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove unused pdev_set_channel commandMichal Kazior2014-09-232-43/+0
| | | | | | | | | | | | | | | | | | This command is not used anymore and most firmware revisions do not seem to handle it well. Channel switching is done via vdev restarting. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix tx/rx chainmask initMichal Kazior2014-09-232-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | Firmware reports the number of RF chains so use that for initialization of supp_{tx,rx}_chainmask instead of using a macro for 3x3 chips. This should make tx/rx chainmask reports correct for chips other than 3x3. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: workaround fw beaconing bugMichal Kazior2014-09-234-43/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some firmware revisions don't wait for beacon tx completion before sending another SWBA event. This could lead to hardware using old (freed) beacon data in some cases, e.g. tx credit starvation combined with missed TBTT. This is very very rare. On non-IOMMU-enabled hosts this could be a possible security issue because hw could beacon some random data on the air. On IOMMU-enabled hosts DMAR faults would occur in most cases and target device would crash. Since there are no beacon tx completions (implicit nor explicit) propagated to host the only workaround for this is to allocate a DMA-coherent buffer for a lifetime of a vif and use it for all beacon tx commands. Worst case for this approach is some beacons may become corrupted, e.g. garbled IEs or out-of-date TIM bitmap. Keep the original beacon-related code as-is in case future firmware revisions solve this problem so that the old path can be easily re-enabled with a fw_feature flag. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | Merge tag 'ntb-3.18' of git://github.com/jonmason/ntbLinus Torvalds2014-10-193-123/+501
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull ntb (non-transparent bridge) updates from Jon Mason: "Add support for Haswell NTB split BARs, a debugfs entry for basic debugging info, and some code clean-ups" * tag 'ntb-3.18' of git://github.com/jonmason/ntb: ntb: Adding split BAR support for Haswell platforms ntb: use errata flag set via DID to implement workaround ntb: conslidate reading of PPD to move platform detection earlier ntb: move platform detection to separate function NTB: debugfs device entry
| * | ntb: Adding split BAR support for Haswell platformsDave Jiang2014-10-173-60/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | On the Haswell platform, a split BAR option to allow creation of 2 32bit BARs (4 and 5) from the 64bit BAR 4. Adding support for this new option. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
| * | ntb: use errata flag set via DID to implement workaroundDave Jiang2014-10-172-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a module parameter, we should detect the errata via PCI DID and then set an appropriate flag. This will be used for additional errata later on. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>