From 6b8d2e2947ce393fe9f44c7e3f1409005e1d6bc6 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Wed, 16 Nov 2016 10:51:06 +0800 Subject: qcacld-3.0: Process channel change request only when SAP is started propagation from qcacld-2.0 to qcacld-3.0 When SAP starts (DFS channel) on default interface and a new interface for SAP is created, if eSAP_DFS_CHANNEL_CAC_RADAR_FOUND event is triggered then kernel panic happens. This is because for the new interface SAP is created but not started and due to this channel list is NULL. Fix is to add state check for SAP interface to know if SAP is started or not Change-Id: If613ec3ed0afad8a66d545bcd858fe73640a0273 CRs-Fixed: 1062516 --- core/sap/src/sap_fsm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index f9f730b1a867..84640768137d 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -3805,13 +3805,13 @@ static QDF_STATUS sap_fsm_state_dfs_cac_wait(ptSapContext sap_ctx, for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) { ptSapContext t_sap_ctx; + t_sap_ctx = mac_ctx->sap.sapCtxList[intf].pSapContext; if (((QDF_SAP_MODE == mac_ctx->sap.sapCtxList[intf].sapPersona) || (QDF_P2P_GO_MODE == mac_ctx->sap.sapCtxList[intf].sapPersona)) && - mac_ctx->sap.sapCtxList[intf].pSapContext != NULL) { - t_sap_ctx = - mac_ctx->sap.sapCtxList[intf].pSapContext; + t_sap_ctx != NULL && + t_sap_ctx->sapsMachine != eSAP_DISCONNECTED) { /* SAP to be moved to DISCONNECTING state */ sap_ctx->sapsMachine = eSAP_DISCONNECTING; /* -- cgit v1.2.3