- 07 Oct, 2014 2 commits
-
-
Rajkumar Manoharan authored
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>
-
Rajkumar Manoharan authored
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>
-
- 01 Oct, 2014 3 commits
-
-
Ben Greear authored
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>
-
Ben Greear authored
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>
-
Ben Greear authored
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>
-
- 29 Sep, 2014 5 commits
-
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
The naming was a bit inconsistent. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Michal Kazior authored
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>
-
Joe Perches authored
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>
-
- 26 Sep, 2014 6 commits
-
-
Kalle Valo authored
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>
-
Kalle Valo authored
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>
-
Kalle Valo authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
- 23 Sep, 2014 10 commits
-
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
- 18 Sep, 2014 10 commits
-
-
Kalle Valo authored
As suggeested by checkpatch: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) In wmi.c I had to change due to sparse warnings copying of struct wmi_mac_addr from form &cmd->peer_macaddr.addr to cmd->peer_macaddr.addr. In ath10k_wmi_set_ap_ps_param() I also added the missing ".addr" to the copy command. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Makes it more readable and fixes checkpatch warnings: drivers/net/wireless/ath/ath10k/debug.c:593: WARNING: quoted string split across lines drivers/net/wireless/ath/ath10k/debug.c:594: WARNING: quoted string split across lines drivers/net/wireless/ath/ath10k/debug.c:595: WARNING: quoted string split across lines drivers/net/wireless/ath/ath10k/debug.c:596: WARNING: quoted string split across lines drivers/net/wireless/ath/ath10k/debug.c:597: WARNING: quoted string split across lines drivers/net/wireless/ath/ath10k/debug.c:599: WARNING: quoted string split across lines drivers/net/wireless/ath/ath10k/debug.c:600: WARNING: quoted string split across lines Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Fixes checkpatch warnings: ath10k/htc.c:49: WARNING: Possible unnecessary 'out of memory' message ath10k/htc.c:810: WARNING: Possible unnecessary 'out of memory' message ath10k/htt.h:1034: CHECK: Please use a blank line after function/struct/union/enum declarations ath10k/htt_rx.c:135: CHECK: Unnecessary parentheses around htt->rx_ring.alloc_idx.vaddr ath10k/htt_rx.c:173: CHECK: Unnecessary parentheses around htt->rx_ring.alloc_idx.vaddr ath10k/pci.c:633: WARNING: macros should not use a trailing semicolon ath10k/wmi.c:3594: WARNING: quoted string split across lines Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Fixes checkpatch warnings: WARNING: else is not generally useful after a break or return Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Fixes a checkpatch warning: WARNING: void function return statements are not generally useful Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Fixes checkpatch warnings: CHECK: No space is necessary after a cast Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Fixes checkpatch warnings: WARNING: Missing a blank line after declarations Please note that some of the cases I fixed by moving the variable declarations to the beginning of the function, which is the preferred style in ath10k. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Fixes checkpatch warnings: CHECK: Please don't use multiple blank lines Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
CHECK: Alignment should match open parenthesis Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Fixes checkpatch warning: ath10k/htt_rx.c:519: CHECK: Alignment should match open parenthesis Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
- 11 Sep, 2014 4 commits
-
-
Michal Kazior authored
The function may return an -ENODEV if debugfs is disabled in kernel. This should originally be guarded by ath10k's Kconfig but it still makes sense to check for the non-NULL errno return value. Reported-by: Matteo Croce <matteo@openwrt.org> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Ben Greear authored
10.1 firmware does not have an official way to cause assert on purpose, but it can be done with carefully crafted WMI command. This is a different kind of crash from the 'hard' crash, which is a bad memory dereference. Different crashes decode in different manners, so this will help the crash-report testing as well as offer better ways to test firmware failure and recovery. kvalo: move the wmi command creation to debug.c, modify the info print Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Add testmode interface for starting and using UTF firmware which is used to run factory tests. This is implemented by adding new state ATH10K_STATE_UTF and user space can enable this state with ATH10K_TM_CMD_UTF_START command. To go back to normal mode user space can send ATH10K_TM_CMD_UTF_STOP. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
We need this function to send wmi packets from testmode.c. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-