Selaa lähdekoodia

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
Wu Gao 8 vuotta sitten
vanhempi
sitoutus
03dd0f68f4
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      core/sap/src/sap_fsm.c

+ 3 - 3
core/sap/src/sap_fsm.c

@@ -3814,13 +3814,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;
 				/*