Преглед на файлове

qcacld-3.0: Restrict channel switch only to the intended interface

Ensure that application triggered channel switch impacts only the
interface of interest. eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START
gets used for both radar detected channel switch and application
triggered channel switch using ioctl or nl commands. On radar
detected channel switch, if radar was detected by one of the SAP
interface, all SAP interfaces in the driver would vacate the
channel. In application triggered channel switch, only the
interface of interest should vacate the channel.

Change-Id: I8eee8bde89ae44eec31c1bd35a99a78e517b4a5e
CRs-Fixed: 969323
Chandrasekaran, Manishekar преди 9 години
родител
ревизия
8104abd5a9
променени са 3 файла, в които са добавени 23 реда и са изтрити 4 реда
  1. 19 0
      core/sap/src/sap_fsm.c
  2. 1 0
      core/sap/src/sap_fsm_ext.h
  3. 3 4
      core/sap/src/sap_module.c

+ 19 - 0
core/sap/src/sap_fsm.c

@@ -3594,6 +3594,25 @@ static QDF_STATUS sap_fsm_state_started(ptSapContext sap_ctx,
 						(void *) temp_sap_ctx);
 						(void *) temp_sap_ctx);
 			}
 			}
 		}
 		}
+	} else if (eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START == msg) {
+		enum tQDF_ADAPTER_MODE persona;
+
+		if (!sap_ctx) {
+			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+					FL("Invalid sap_ctx"));
+			return qdf_status;
+		}
+
+		persona = mac_ctx->sap.sapCtxList[sap_ctx->sessionId].
+								sapPersona;
+
+		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
+				FL("app trigger chan switch: mode:%d vdev:%d"),
+				persona, sap_ctx->sessionId);
+
+		if ((QDF_SAP_MODE == persona) || (QDF_P2P_GO_MODE == persona))
+			qdf_status = wlansap_dfs_send_csa_ie_request(
+					(void *) sap_ctx);
 	} else {
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  FL("in state %s, invalid event msg %d"),
 			  FL("in state %s, invalid event msg %d"),

+ 1 - 0
core/sap/src/sap_fsm_ext.h

@@ -54,6 +54,7 @@ typedef enum {
 	eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START,
 	eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START,
 	eSAP_OPERATING_CHANNEL_CHANGED,
 	eSAP_OPERATING_CHANNEL_CHANGED,
 	eSAP_CHANNEL_SELECTION_RETRY,
 	eSAP_CHANNEL_SELECTION_RETRY,
+	eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START,
 
 
 	eSAP_NO_MSG
 	eSAP_NO_MSG
 } eSapMsg_t;
 } eSapMsg_t;

+ 3 - 4
core/sap/src/sap_module.c

@@ -1558,12 +1558,12 @@ wlansap_set_channel_change_with_csa(void *p_cds_gctx, uint32_t targetChannel,
 			sap_cac_reset_notify(hHal);
 			sap_cac_reset_notify(hHal);
 
 
 			/*
 			/*
-			 * Post the eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START
+			 * Post the eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START
 			 * to SAP state machine to process the channel
 			 * to SAP state machine to process the channel
 			 * request with CSA IE set in the beacons.
 			 * request with CSA IE set in the beacons.
 			 */
 			 */
 			sapEvent.event =
 			sapEvent.event =
-				eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START;
+				eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START;
 			sapEvent.params = 0;
 			sapEvent.params = 0;
 			sapEvent.u1 = 0;
 			sapEvent.u1 = 0;
 			sapEvent.u2 = 0;
 			sapEvent.u2 = 0;
@@ -1586,8 +1586,7 @@ wlansap_set_channel_change_with_csa(void *p_cds_gctx, uint32_t targetChannel,
 	}
 	}
 
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s: Posted eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START"
-		  "successfully to sap_fsm for Channel = %d",
+		  "%s: Posted eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START successfully to sap_fsm for Channel = %d",
 		  __func__, targetChannel);
 		  __func__, targetChannel);
 
 
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;