Sfoglia il codice sorgente

qcacld-3.0: Rename SAP identifier sapContext

The Linux Coding Style frowns upon mixed-case names so rename SAP
identifier sapContext to be compliant.

Change-Id: If3d09c63141077247635315186068cabab396612
CRs-Fixed: 2422206
Jeff Johnson 6 anni fa
parent
commit
8329f33bc8
4 ha cambiato i file con 76 aggiunte e 76 eliminazioni
  1. 4 4
      core/sap/inc/sap_api.h
  2. 30 30
      core/sap/src/sap_fsm.c
  3. 7 7
      core/sap/src/sap_internal.h
  4. 35 35
      core/sap/src/sap_module.c

+ 4 - 4
core/sap/inc/sap_api.h

@@ -929,7 +929,7 @@ QDF_STATUS wlansap_deauth_sta(struct sap_context *sap_ctx,
 
 /**
  * wlansap_set_channel_change_with_csa() - Set channel change with CSA
- * @sapContext: Pointer to SAP context
+ * @sap_ctx: Pointer to SAP context
  * @targetChannel: Target channel
  * @target_bw: Target bandwidth
  * @strict: if true switch to the requested channel always, fail
@@ -940,7 +940,7 @@ QDF_STATUS wlansap_deauth_sta(struct sap_context *sap_ctx,
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
+QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
 					       uint32_t targetChannel,
 					       enum phy_ch_width target_bw,
 					       bool strict);
@@ -1047,7 +1047,7 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 
 /**
  * wlansap_channel_change_request() - Send channel change request
- * @sapContext: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @target_channel: Target channel
  *
  * This API is used to send an Indication to SME/PE to change the
@@ -1064,7 +1064,7 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
  *   QDF_STATUS_SUCCESS:  Success
  *
  */
-QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
+QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 					  uint8_t target_channel);
 
 /**

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

@@ -98,13 +98,13 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
    PARAMETERS
 
     IN
-    sapContext: SAP Context
+    sap_ctx: SAP Context
    RETURN VALUE
     DFS Timer start status
    SIDE EFFECTS
    ============================================================================*/
 
-static int sap_stop_dfs_cac_timer(struct sap_context *sapContext);
+static int sap_stop_dfs_cac_timer(struct sap_context *sap_ctx);
 
 /*==========================================================================
    FUNCTION    sapStartDfsCacTimer
@@ -117,13 +117,13 @@ static int sap_stop_dfs_cac_timer(struct sap_context *sapContext);
    PARAMETERS
 
     IN
-    sapContext: SAP Context
+    sap_ctx: SAP Context
    RETURN VALUE
     DFS Timer start status
    SIDE EFFECTS
    ============================================================================*/
 
-static int sap_start_dfs_cac_timer(struct sap_context *sapContext);
+static int sap_start_dfs_cac_timer(struct sap_context *sap_ctx);
 
 /** sap_hdd_event_to_string() - convert hdd event to string
  * @event: eSapHddEvent event type
@@ -275,7 +275,7 @@ sap_is_channel_bonding_etsi_weather_channel(struct sap_context *sap_ctx)
 
 /*
  * sap_get_bonding_channels() - get bonding channels from primary channel.
- * @sapContext: Handle to SAP context.
+ * @sap_ctx: Handle to SAP context.
  * @channel: Channel to get bonded channels.
  * @channels: Bonded channel list
  * @size: Max bonded channels
@@ -283,7 +283,7 @@ sap_is_channel_bonding_etsi_weather_channel(struct sap_context *sap_ctx)
  *
  * Return: Number of sub channels
  */
-static uint8_t sap_get_bonding_channels(struct sap_context *sapContext,
+static uint8_t sap_get_bonding_channels(struct sap_context *sap_ctx,
 					uint8_t channel,
 					uint8_t *channels, uint8_t size,
 					ePhyChanBondState chanBondState)
@@ -775,11 +775,11 @@ sap_validate_chan(struct sap_context *sap_context,
 		if (con_ch && (sap_context->cc_switch_mode !=
 			       QDF_MCC_TO_SCC_SWITCH_DISABLE)) {
 			/*
-			 * For ACS request ,the sapContext->channel is 0,
+			 * For ACS request ,the sap_ctx->channel is 0,
 			 * we skip below overlap checking. When the ACS
-			 * finish and SAPBSS start, the sapContext->channel
+			 * finish and SAPBSS start, the sap_ctx->channel
 			 * will not be 0. Then the overlap checking will be
-			 * reactivated.If we use sapContext->channel = 0
+			 * reactivated.If we use sap_ctx->channel = 0
 			 * to perform the overlap checking, an invalid overlap
 			 * channel con_ch could becreated. That may cause
 			 * SAP start failed.
@@ -1225,7 +1225,7 @@ QDF_STATUS sap_set_session_param(mac_handle_t mac_handle,
 	mac_ctx->sap.sapCtxList[sapctx->sessionId].sapPersona =
 				sapctx->csr_roamProfile.csrPersona;
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
-		"%s: Initializing sapContext = %pK with session = %d", __func__,
+		"%s: Initializing sap_ctx = %pK with session = %d", __func__,
 		sapctx, session_id);
 
 	return QDF_STATUS_SUCCESS;
@@ -1250,7 +1250,7 @@ QDF_STATUS sap_clear_session_param(mac_handle_t mac_handle,
 	qdf_mem_zero(sapctx, sizeof(*sapctx));
 	sapctx->sessionId = WLAN_UMAC_VDEV_ID_MAX;
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
-		"%s: Initializing State: %d, sapContext value = %pK", __func__,
+		"%s: Initializing State: %d, sap_ctx value = %pK", __func__,
 		sapctx->fsm_state, sapctx);
 
 	return QDF_STATUS_SUCCESS;
@@ -3285,29 +3285,29 @@ void sap_print_acl(struct qdf_mac_addr *macList, uint8_t size)
 	return;
 }
 
-QDF_STATUS sap_is_peer_mac_allowed(struct sap_context *sapContext,
+QDF_STATUS sap_is_peer_mac_allowed(struct sap_context *sap_ctx,
 				   uint8_t *peerMac)
 {
-	if (eSAP_ALLOW_ALL == sapContext->eSapMacAddrAclMode)
+	if (eSAP_ALLOW_ALL == sap_ctx->eSapMacAddrAclMode)
 		return QDF_STATUS_SUCCESS;
 
 	if (sap_search_mac_list
-		    (sapContext->acceptMacList, sapContext->nAcceptMac, peerMac, NULL))
+		    (sap_ctx->acceptMacList, sap_ctx->nAcceptMac, peerMac, NULL))
 		return QDF_STATUS_SUCCESS;
 
 	if (sap_search_mac_list
-		    (sapContext->denyMacList, sapContext->nDenyMac, peerMac, NULL)) {
+		    (sap_ctx->denyMacList, sap_ctx->nDenyMac, peerMac, NULL)) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "In %s, Peer " MAC_ADDRESS_STR " in deny list",
 			  __func__, MAC_ADDR_ARRAY(peerMac));
 		return QDF_STATUS_E_FAILURE;
 	}
 	/* A new station CAN associate, unless in deny list. Less stringent mode */
-	if (eSAP_ACCEPT_UNLESS_DENIED == sapContext->eSapMacAddrAclMode)
+	if (eSAP_ACCEPT_UNLESS_DENIED == sap_ctx->eSapMacAddrAclMode)
 		return QDF_STATUS_SUCCESS;
 
 	/* A new station CANNOT associate, unless in accept list. More stringent mode */
-	if (eSAP_DENY_UNLESS_ACCEPTED == sapContext->eSapMacAddrAclMode) {
+	if (eSAP_DENY_UNLESS_ACCEPTED == sap_ctx->eSapMacAddrAclMode) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "In %s, Peer " MAC_ADDRESS_STR
 			  " denied, Mac filter mode is eSAP_DENY_UNLESS_ACCEPTED",
@@ -3318,8 +3318,8 @@ QDF_STATUS sap_is_peer_mac_allowed(struct sap_context *sapContext,
 	/* The new STA is neither in accept list nor in deny list. In this case, deny the association
 	 * but send a wifi event notification indicating the mac address being denied
 	 */
-	if (eSAP_SUPPORT_ACCEPT_AND_DENY == sapContext->eSapMacAddrAclMode) {
-		sap_signal_hdd_event(sapContext, NULL, eSAP_UNKNOWN_STA_JOIN,
+	if (eSAP_SUPPORT_ACCEPT_AND_DENY == sap_ctx->eSapMacAddrAclMode) {
+		sap_signal_hdd_event(sap_ctx, NULL, eSAP_UNKNOWN_STA_JOIN,
 				     (void *) peerMac);
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "In %s, Peer " MAC_ADDRESS_STR
@@ -3618,7 +3618,7 @@ uint8_t sap_indicate_radar(struct sap_context *sap_ctx)
  */
 void sap_dfs_cac_timer_callback(void *data)
 {
-	struct sap_context *sapContext;
+	struct sap_context *sap_ctx;
 	tWLAN_SAPEvent sap_event;
 	mac_handle_t mac_handle = data;
 	struct mac_context *mac;
@@ -3629,8 +3629,8 @@ void sap_dfs_cac_timer_callback(void *data)
 		return;
 	}
 	mac = MAC_CONTEXT(mac_handle);
-	sapContext = sap_find_cac_wait_session(mac_handle);
-	if (!sapContext) {
+	sap_ctx = sap_find_cac_wait_session(mac_handle);
+	if (!sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			"%s: no SAP contexts in wait state", __func__);
 		return;
@@ -3642,7 +3642,7 @@ void sap_dfs_cac_timer_callback(void *data)
 	 * destroy timer here.
 	 */
 	if (mac->sap.SapDfsInfo.is_dfs_cac_timer_running == true) {
-		if (!sapContext->dfs_cac_offload)
+		if (!sap_ctx->dfs_cac_offload)
 			qdf_mc_timer_destroy(
 				&mac->sap.SapDfsInfo.sap_dfs_cac_timer);
 		mac->sap.SapDfsInfo.is_dfs_cac_timer_running = false;
@@ -3653,14 +3653,14 @@ void sap_dfs_cac_timer_callback(void *data)
 	 */
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
 			"sapdfs: Sending eSAP_DFS_CHANNEL_CAC_END for target_channel = %d on sapctx[%pK]",
-			sapContext->channel, sapContext);
+			sap_ctx->channel, sap_ctx);
 
 	sap_event.event = eSAP_DFS_CHANNEL_CAC_END;
 	sap_event.params = 0;
 	sap_event.u1 = 0;
 	sap_event.u2 = 0;
 
-	sap_fsm(sapContext, &sap_event);
+	sap_fsm(sap_ctx, &sap_event);
 }
 
 /*
@@ -3842,7 +3842,7 @@ uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle)
  * is_concurrent_sap_ready_for_channel_change() - to check all saps are ready
  *						  for channel change
  * @mac_handle: Opaque handle to the global MAC context
- * @sapContext: sap context for which this function has been called
+ * @sap_ctx: sap context for which this function has been called
  *
  * This function will find the concurrent sap context apart from
  * passed sap context and return its channel change ready status
@@ -3851,7 +3851,7 @@ uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle)
  * Return: true if other SAP personas are ready to channel switch else false
  */
 bool is_concurrent_sap_ready_for_channel_change(mac_handle_t mac_handle,
-						struct sap_context *sapContext)
+						struct sap_context *sap_ctx)
 {
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 	struct sap_context *sap_context;
@@ -3864,18 +3864,18 @@ bool is_concurrent_sap_ready_for_channel_change(mac_handle_t mac_handle,
 		    && mac->sap.sapCtxList[intf].sap_context) {
 			sap_context =
 				mac->sap.sapCtxList[intf].sap_context;
-			if (sap_context == sapContext) {
+			if (sap_context == sap_ctx) {
 				QDF_TRACE(QDF_MODULE_ID_SAP,
 					  QDF_TRACE_LEVEL_ERROR,
 					  FL("sapCtx matched [%pK]"),
-					  sapContext);
+					  sap_ctx);
 				continue;
 			} else {
 				QDF_TRACE(QDF_MODULE_ID_SAP,
 					  QDF_TRACE_LEVEL_ERROR,
 					  FL
 						  ("concurrent sapCtx[%pK] didn't matche with [%pK]"),
-					  sap_context, sapContext);
+					  sap_context, sap_ctx);
 				return sap_context->is_sap_ready_for_chnl_chng;
 			}
 		}

+ 7 - 7
core/sap/src/sap_internal.h

@@ -289,11 +289,11 @@ uint8_t sap_select_channel(mac_handle_t mac_handle, struct sap_context *sap_ctx,
 			   tScanResultHandle pScanResult);
 
 QDF_STATUS
-sap_signal_hdd_event(struct sap_context *sapContext,
+sap_signal_hdd_event(struct sap_context *sap_ctx,
 		  struct csr_roam_info *pCsrRoamInfo,
 		  eSapHddEvent sapHddevent, void *);
 
-QDF_STATUS sap_fsm(struct sap_context *sapContext, ptWLAN_SAPEvent sap_event);
+QDF_STATUS sap_fsm(struct sap_context *sap_ctx, ptWLAN_SAPEvent sap_event);
 
 eSapStatus
 sapconvert_to_csr_profile(tsap_config_t *pconfig_params,
@@ -303,7 +303,7 @@ sapconvert_to_csr_profile(tsap_config_t *pconfig_params,
 void sap_free_roam_profile(struct csr_roam_profile *profile);
 
 QDF_STATUS
-sap_is_peer_mac_allowed(struct sap_context *sapContext, uint8_t *peerMac);
+sap_is_peer_mac_allowed(struct sap_context *sap_ctx, uint8_t *peerMac);
 
 void
 sap_sort_mac_list(struct qdf_mac_addr *macList, uint8_t size);
@@ -328,9 +328,9 @@ void sap_update_unsafe_channel_list(mac_handle_t mac_handle,
 				    struct sap_context *sap_ctx);
 #endif /* FEATURE_WLAN_CH_AVOID */
 
-QDF_STATUS sap_init_dfs_channel_nol_list(struct sap_context *sapContext);
+QDF_STATUS sap_init_dfs_channel_nol_list(struct sap_context *sap_ctx);
 
-bool sap_dfs_is_channel_in_nol_list(struct sap_context *sapContext,
+bool sap_dfs_is_channel_in_nol_list(struct sap_context *sap_ctx,
 				    uint8_t channelNumber,
 				    ePhyChanBondState chanBondState);
 void sap_dfs_cac_timer_callback(void *data);
@@ -345,7 +345,7 @@ void sap_dfs_cac_timer_callback(void *data);
 void sap_cac_reset_notify(mac_handle_t mac_handle);
 
 bool is_concurrent_sap_ready_for_channel_change(mac_handle_t mac_handle,
-						struct sap_context *sapContext);
+						struct sap_context *sap_ctx);
 
 bool sap_is_conc_sap_doing_scc_dfs(mac_handle_t mac_handle,
 				   struct sap_context *given_sapctx);
@@ -360,7 +360,7 @@ uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle);
  *
  * Return: The QDF_STATUS code associated with performing the operation.
  */
-QDF_STATUS sap_channel_sel(struct sap_context *sapContext);
+QDF_STATUS sap_channel_sel(struct sap_context *sap_ctx);
 
 /**
  * sap_validate_chan - Function validate the channel and forces SCC

+ 35 - 35
core/sap/src/sap_module.c

@@ -221,7 +221,7 @@ struct sap_context *sap_create_ctx(void)
 	struct sap_context *sap_ctx;
 	QDF_STATUS status;
 
-	/* dynamically allocate the sapContext */
+	/* dynamically allocate the sap_ctx */
 	sap_ctx = qdf_mem_malloc(sizeof(*sap_ctx));
 	if (!sap_ctx)
 		return NULL;
@@ -670,7 +670,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 	struct mac_context *pmac = NULL;
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-		  FL("sapContext=%pK"), sap_ctx);
+		  FL("sap_ctx=%pK"), sap_ctx);
 
 	if (!sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
@@ -1285,7 +1285,7 @@ static void sap_start_csa_restart(struct mac_context *mac,
 #endif
 /**
  * wlansap_set_channel_change_with_csa() - Set channel change with CSA
- * @sapContext: Pointer to SAP context
+ * @sap_ctx: Pointer to SAP context
  * @targetChannel: Target channel
  * @target_bw: Target bandwidth
  * @strict: if true switch to the requested channel always,
@@ -1297,7 +1297,7 @@ static void sap_start_csa_restart(struct mac_context *mac,
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
+QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
 					       uint32_t targetChannel,
 					       enum phy_ch_width target_bw,
 					       bool strict)
@@ -1308,7 +1308,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 	QDF_STATUS status;
 	bool sta_sap_scc_on_dfs_chan;
 
-	if (!sapContext) {
+	if (!sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 
@@ -1329,9 +1329,9 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 	}
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
 		"%s: sap chan:%d target:%d conn on 5GHz:%d",
-		__func__, sapContext->channel, targetChannel,
+		__func__, sap_ctx->channel, targetChannel,
 		policy_mgr_is_any_mode_active_on_band_along_with_session(
-			mac->psoc, sapContext->sessionId, POLICY_MGR_BAND_5));
+			mac->psoc, sap_ctx->sessionId, POLICY_MGR_BAND_5));
 
 	sta_sap_scc_on_dfs_chan =
 		policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(mac->psoc);
@@ -1339,13 +1339,13 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 	 * Now, validate if the passed channel is valid in the
 	 * current regulatory domain.
 	 */
-	if (sapContext->channel != targetChannel &&
+	if (sap_ctx->channel != targetChannel &&
 		((wlan_reg_get_channel_state(mac->pdev, targetChannel) ==
 			CHANNEL_STATE_ENABLE) ||
 		(wlan_reg_get_channel_state(mac->pdev, targetChannel) ==
 			CHANNEL_STATE_DFS &&
 		(!policy_mgr_is_any_mode_active_on_band_along_with_session(
-			mac->psoc, sapContext->sessionId,
+			mac->psoc, sap_ctx->sessionId,
 			POLICY_MGR_BAND_5) ||
 			sta_sap_scc_on_dfs_chan)))) {
 		/*
@@ -1355,7 +1355,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 		if (!strict) {
 			valid = wlan_sap_validate_channel_switch(mac_handle,
 								 targetChannel,
-								 sapContext);
+								 sap_ctx);
 			if (!valid) {
 				QDF_TRACE(QDF_MODULE_ID_SAP,
 					  QDF_TRACE_LEVEL_ERROR,
@@ -1367,18 +1367,18 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 		/*
 		 * Post a CSA IE request to SAP state machine with
 		 * target channel information and also CSA IE required
-		 * flag set in sapContext only, if SAP is in SAP_STARTED
+		 * flag set in sap_ctx only, if SAP is in SAP_STARTED
 		 * state.
 		 */
-		if (sapContext->fsm_state == SAP_STARTED) {
-			status = wlansap_update_csa_channel_params(sapContext,
+		if (sap_ctx->fsm_state == SAP_STARTED) {
+			status = wlansap_update_csa_channel_params(sap_ctx,
 					targetChannel);
 			if (status != QDF_STATUS_SUCCESS)
 				return status;
 
 			status = policy_mgr_set_hw_mode_before_channel_switch(
 						mac->psoc,
-						sapContext->sessionId,
+						sap_ctx->sessionId,
 						targetChannel);
 			/*
 			 * If status is QDF_STATUS_E_FAILURE that mean HW mode
@@ -1445,7 +1445,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 			mac->sap.SapDfsInfo.cac_state =
 					eSAP_DFS_DO_NOT_SKIP_CAC;
 			sap_cac_reset_notify(mac_handle);
-			sap_start_csa_restart(mac, sapContext);
+			sap_start_csa_restart(mac, sap_ctx);
 		} else {
 			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Failed to request Channel Change, since SAP is not in SAP_STARTED state",
@@ -1703,7 +1703,7 @@ void wlansap_get_sec_channel(uint8_t sec_ch_offset,
 		  __func__, sec_ch_offset, *sec_channel);
 }
 
-QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
+QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 					  uint8_t target_channel)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
@@ -1717,7 +1717,7 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
 		return QDF_STATUS_E_FAULT;
 	}
 
-	if (!sapContext) {
+	if (!sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
@@ -1729,7 +1729,7 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
 		return QDF_STATUS_E_FAULT;
 	}
 
-	phy_mode = sapContext->csr_roamProfile.phyMode;
+	phy_mode = sap_ctx->csr_roamProfile.phyMode;
 
 	/* Update phy_mode if the target channel is in the other band */
 	if (WLAN_CHAN_IS_5GHZ(target_channel) &&
@@ -1742,17 +1742,17 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
 		  "%s: phy_mode: %d, target_channel: %d new phy_mode: %d",
-		  __func__, sapContext->csr_roamProfile.phyMode,
+		  __func__, sap_ctx->csr_roamProfile.phyMode,
 		  target_channel, phy_mode);
-	sapContext->csr_roamProfile.phyMode = phy_mode;
+	sap_ctx->csr_roamProfile.phyMode = phy_mode;
 
-	if (sapContext->csr_roamProfile.ChannelInfo.numOfChannels == 0 ||
-	    !sapContext->csr_roamProfile.ChannelInfo.ChannelList) {
+	if (sap_ctx->csr_roamProfile.ChannelInfo.numOfChannels == 0 ||
+	    !sap_ctx->csr_roamProfile.ChannelInfo.ChannelList) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			FL("Invalid channel list"));
 		return QDF_STATUS_E_FAULT;
 	}
-	sapContext->csr_roamProfile.ChannelInfo.ChannelList[0] = target_channel;
+	sap_ctx->csr_roamProfile.ChannelInfo.ChannelList[0] = target_channel;
 	/*
 	 * We are getting channel bonding mode from sapDfsInfor structure
 	 * because we've implemented channel width fallback mechanism for DFS
@@ -1761,35 +1761,35 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
 	ch_params = &mac_ctx->sap.SapDfsInfo.new_ch_params;
 	wlan_reg_set_channel_params(mac_ctx->pdev, target_channel,
 			0, ch_params);
-	sapContext->ch_params = *ch_params;
+	sap_ctx->ch_params = *ch_params;
 	/* Update the channel as this will be used to
 	 * send event to supplicant
 	 */
-	sapContext->channel = target_channel;
+	sap_ctx->channel = target_channel;
 	wlansap_get_sec_channel(ch_params->sec_ch_offset, target_channel,
-				(uint8_t *)(&sapContext->secondary_ch));
-	sapContext->csr_roamProfile.ch_params.ch_width = ch_params->ch_width;
-	sapContext->csr_roamProfile.ch_params.sec_ch_offset =
+				(uint8_t *)(&sap_ctx->secondary_ch));
+	sap_ctx->csr_roamProfile.ch_params.ch_width = ch_params->ch_width;
+	sap_ctx->csr_roamProfile.ch_params.sec_ch_offset =
 						ch_params->sec_ch_offset;
-	sapContext->csr_roamProfile.ch_params.center_freq_seg0 =
+	sap_ctx->csr_roamProfile.ch_params.center_freq_seg0 =
 						ch_params->center_freq_seg0;
-	sapContext->csr_roamProfile.ch_params.center_freq_seg1 =
+	sap_ctx->csr_roamProfile.ch_params.center_freq_seg1 =
 						ch_params->center_freq_seg1;
-	sap_dfs_set_current_channel(sapContext);
+	sap_dfs_set_current_channel(sap_ctx);
 
 	status = sme_roam_channel_change_req(MAC_HANDLE(mac_ctx),
-					     sapContext->bssid,
+					     sap_ctx->bssid,
 					     ch_params,
-					     &sapContext->csr_roamProfile);
+					     &sap_ctx->csr_roamProfile);
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
 		"%s: chan:%d phy_mode %d width:%d offset:%d seg0:%d seg1:%d",
-		__func__, sapContext->channel, phy_mode, ch_params->ch_width,
+		__func__, sap_ctx->channel, phy_mode, ch_params->ch_width,
 		ch_params->sec_ch_offset, ch_params->center_freq_seg0,
 		ch_params->center_freq_seg1);
 
 	if (QDF_IS_STATUS_SUCCESS(status))
-		sap_signal_hdd_event(sapContext, NULL,
+		sap_signal_hdd_event(sap_ctx, NULL,
 				     eSAP_CHANNEL_CHANGE_EVENT,
 				     (void *) eSAP_STATUS_SUCCESS);