[RFC PATCH 1/3] ath10k: ignore diagnose pipes in ath10k_pci_ce_recv_data()/_send_done()

Kalle Valo kvalo at qca.qualcomm.com
Thu Sep 11 13:31:41 PDT 2014


As ath10k_pci_diag_read_mem() uses polling to receive data from CE, the CE callbacks
have to ignore the pipe used for diagnose reads. Otherwise ath10k crashes due
to NULL dereference and polling reads timeout.

Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/pci.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index baeb98e78b1f..154451ab3e3c 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -819,6 +819,9 @@ static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state)
 	unsigned int nbytes;
 	unsigned int transfer_id;
 
+	if (ce_state->id == 7)
+		return;
+
 	while (ath10k_ce_completed_send_next(ce_state, &transfer_context,
 					     &ce_data, &nbytes,
 					     &transfer_id) == 0) {
@@ -844,6 +847,9 @@ static void ath10k_pci_ce_recv_data(struct ath10k_ce_pipe *ce_state)
 	unsigned int transfer_id;
 	unsigned int flags;
 
+	if (ce_state->id == 7)
+		return;
+
 	while (ath10k_ce_completed_recv_next(ce_state, &transfer_context,
 					     &ce_data, &nbytes, &transfer_id,
 					     &flags) == 0) {




More information about the ath10k mailing list