ath10k: htt: don't use txdone_fifo with SDIO
authorAlagu Sankar <alagusankar@silex-india.com>
Fri, 19 Apr 2019 07:28:49 +0000 (10:28 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 23 Apr 2019 13:23:39 +0000 (16:23 +0300)
HTT High Latency (ATH10K_DEV_TYPE_HL) does not use txdone_fifo at all, we don't
even initialise it by skipping ath10k_htt_tx_alloc_buf() in
ath10k_htt_tx_start(). Because of this using QCA6174 SDIO
ath10k_htt_rx_tx_compl_ind() will crash when it accesses unitialised
txdone_fifo. So skip txdone_fifo when using High Latency mode.

Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1.

Co-developed-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/htt_rx.c

index 1acc622d218333ac131666536b1077fb1b9ee808..f22840bbc389603f626a525933f1e287254a13f4 100644 (file)
@@ -2277,7 +2277,9 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar,
                 *  Note that with only one concurrent reader and one concurrent
                 *  writer, you don't need extra locking to use these macro.
                 */
-               if (!kfifo_put(&htt->txdone_fifo, tx_done)) {
+               if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) {
+                       ath10k_txrx_tx_unref(htt, &tx_done);
+               } else if (!kfifo_put(&htt->txdone_fifo, tx_done)) {
                        ath10k_warn(ar, "txdone fifo overrun, msdu_id %d status %d\n",
                                    tx_done.msdu_id, tx_done.status);
                        ath10k_txrx_tx_unref(htt, &tx_done);