diff mbox

[v2,1/5] wcn36xx: abort scan request when 'dequeued' indicator is sent

Message ID 20180417132337.31720-2-daniel@zonque.org (mailing list archive)
State Accepted
Commit 14ca3c98aa12842615a36812f29dc39b60811c93
Delegated to: Kalle Valo
Headers show

Commit Message

Daniel Mack April 17, 2018, 1:23 p.m. UTC
When the firmware sends a WCN36XX_HAL_SCAN_IND_DEQUEUED indication,
the request is apparently no longer valid. Attempts to stop the hardware
scan request subsequently will lead to the following error message, and
the hardware is no longer able to communicate with any AP:

[   57.917186] wcn36xx: ERROR hal_stop_scan_offload response failed err=5

Interpreting this indicator message as scan abortion fixes this.

While at it, add a newline to a debug print.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 drivers/net/wireless/ath/wcn36xx/smd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kalle Valo April 24, 2018, 6:07 a.m. UTC | #1
Daniel Mack <daniel@zonque.org> wrote:

> When the firmware sends a WCN36XX_HAL_SCAN_IND_DEQUEUED indication,
> the request is apparently no longer valid. Attempts to stop the hardware
> scan request subsequently will lead to the following error message, and
> the hardware is no longer able to communicate with any AP:
> 
> [   57.917186] wcn36xx: ERROR hal_stop_scan_offload response failed err=5
> 
> Interpreting this indicator message as scan abortion fixes this.
> 
> While at it, add a newline to a debug print.
> 
> Signed-off-by: Daniel Mack <daniel@zonque.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

5 patches applied to ath-next branch of ath.git, thanks.

14ca3c98aa12 wcn36xx: abort scan request when 'dequeued' indicator is sent
80c764d32122 wcn36xx: cancel pending scan request when interface goes down
89722f5767ac wcn36xx: handle scan cancellation when firmware support is missing
5a425c8b78e5 wcn36xx: send bss_type in scan requests
4836ec42b074 wcn36xx: pass information elements in scan requests
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 297a785d0785..b7964f79d837 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -2140,10 +2140,11 @@  static int wcn36xx_smd_hw_scan_ind(struct wcn36xx *wcn, void *buf, size_t len)
 		return -EIO;
 	}
 
-	wcn36xx_dbg(WCN36XX_DBG_HAL, "scan indication (type %x)", rsp->type);
+	wcn36xx_dbg(WCN36XX_DBG_HAL, "scan indication (type %x)\n", rsp->type);
 
 	switch (rsp->type) {
 	case WCN36XX_HAL_SCAN_IND_FAILED:
+	case WCN36XX_HAL_SCAN_IND_DEQUEUED:
 		scan_info.aborted = true;
 		/* fall through */
 	case WCN36XX_HAL_SCAN_IND_COMPLETED:
@@ -2156,7 +2157,6 @@  static int wcn36xx_smd_hw_scan_ind(struct wcn36xx *wcn, void *buf, size_t len)
 		break;
 	case WCN36XX_HAL_SCAN_IND_STARTED:
 	case WCN36XX_HAL_SCAN_IND_FOREIGN_CHANNEL:
-	case WCN36XX_HAL_SCAN_IND_DEQUEUED:
 	case WCN36XX_HAL_SCAN_IND_PREEMPTED:
 	case WCN36XX_HAL_SCAN_IND_RESTARTED:
 		break;