]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: Correct the DMA direction for management tx buffers
authorRakesh Pillai <pillair@codeaurora.org>
Tue, 21 Jan 2020 07:12:28 +0000 (12:42 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Sun, 26 Jan 2020 14:28:20 +0000 (16:28 +0200)
commit4995877c4df5189682a69a738bc2e7e31996961d
tree1dc7da43d5ad498b02b3eff9e073790fba1578b7
parentbf0460ca0d6e5a0c3f85ec4006e8b5c99339628f
ath10k: Correct the DMA direction for management tx buffers

The management packets, send to firmware via WMI, are
mapped using the direction DMA_TO_DEVICE. Currently in
case of wmi cleanup, these buffers are being unmapped
using an incorrect DMA direction. This can cause unwanted
behavior when the host driver is handling a restart
of the wlan firmware.

We might see a trace like below

[<ffffff8008098b18>] __dma_inv_area+0x28/0x58
[<ffffff8001176734>] ath10k_wmi_mgmt_tx_clean_up_pending+0x60/0xb0 [ath10k_core]
[<ffffff80088c7c50>] idr_for_each+0x78/0xe4
[<ffffff80011766a4>] ath10k_wmi_detach+0x4c/0x7c [ath10k_core]
[<ffffff8001163d7c>] ath10k_core_stop+0x58/0x68 [ath10k_core]
[<ffffff800114fb74>] ath10k_halt+0xec/0x13c [ath10k_core]
[<ffffff8001165110>] ath10k_core_restart+0x11c/0x1a8 [ath10k_core]
[<ffffff80080c36bc>] process_one_work+0x16c/0x31c

Fix the incorrect DMA direction during the wmi
management tx buffer cleanup.

Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1

Fixes: f8b1062e685 ("ath10k: handle mgmt tx completion event")
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/wmi.c