Browse Source

qcacld-3.0: Rename pSapCtx to sap_ctx

The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename pSapCtx to sap_ctx to align with the
Coding Style.

Change-Id: I9402132fc20cbb7e9041ec9f112eaa2af258a0d4
CRs-Fixed: 2118452
Jeff Johnson 7 years ago
parent
commit
e13d806b89
4 changed files with 218 additions and 218 deletions
  1. 43 43
      core/sap/inc/sap_api.h
  2. 25 25
      core/sap/src/sap_ch_select.c
  3. 2 2
      core/sap/src/sap_internal.h
  4. 148 148
      core/sap/src/sap_module.c

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

@@ -805,7 +805,7 @@ struct sap_context *wlansap_open(void);
 
 /**
  * wlansap_close - close per-BSS SAP
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  *
  * Called during BSS close procedure. SAP will clean up all the
  * internal resources.
@@ -815,11 +815,11 @@ struct sap_context *wlansap_open(void);
  *                             access would cause a page fault
  *         QDF_STATUS_SUCCESS: Success
  */
-QDF_STATUS wlansap_close(struct sap_context *pSapCtx);
+QDF_STATUS wlansap_close(struct sap_context *sap_ctx);
 
 /**
  * wlansap_start - start per-BSS SAP
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @mode: Device mode
  * @addr: MAC address of the SAP
  * @session_id: Pointer to the session id
@@ -831,13 +831,13 @@ QDF_STATUS wlansap_close(struct sap_context *pSapCtx);
  *         QDF_STATUS_E_FAULT: BSS could not be started
  *         QDF_STATUS_SUCCESS: Success
  */
-QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_start(struct sap_context *sap_ctx,
 			 enum tQDF_ADAPTER_MODE mode,
 			 uint8_t *addr, uint32_t session_id);
 
 /**
  * wlansap_stop() - stop per-BSS SAP
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  *
  * Called as part of the BSS stop procedure. SAP will use this call
  * to perform all activities needed to stop the BSS.
@@ -846,17 +846,17 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
  *         QDF_STATUS_E_FAULT: BSS could not be stopped
  *         QDF_STATUS_SUCCESS: Success
  */
-QDF_STATUS wlansap_stop(struct sap_context *pSapCtx);
+QDF_STATUS wlansap_stop(struct sap_context *sap_ctx);
 
 /**
  * sap_cleanup_channel_list() - cleanup channel list.
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  *
  * Frees up the memory allocated to the channel list.
  *
  * Return: None
  */
-void sap_cleanup_channel_list(struct sap_context *pSapCtx);
+void sap_cleanup_channel_list(struct sap_context *sap_ctx);
 
 /**
  * sap_is_auto_channel_select() - is channel AUTO_CHANNEL_SELECT
@@ -874,13 +874,13 @@ typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent,
 /**
  * wlansap_is_channel_in_nol_list() - This API checks if channel is
  * in nol list
- * @pSapCtx: SAP context pointer
+ * @sap_ctx: SAP context pointer
  * @channelNumber: channel number
  * @chanBondState: channel bonding state
  *
  * Return: True if the channel is in the NOL list, false otherwise
  */
-bool wlansap_is_channel_in_nol_list(struct sap_context *pSapCtx,
+bool wlansap_is_channel_in_nol_list(struct sap_context *sap_ctx,
 				    uint8_t channelNumber,
 				    ePhyChanBondState chanBondState);
 
@@ -899,7 +899,7 @@ bool wlansap_is_channel_leaking_in_nol(struct sap_context *sap_ctx,
 
 /**
  * wlansap_start_bss() - start BSS
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @pSapEventCallback: Callback function in HDD called by SAP to inform HDD
  *                        about SAP results
  * @pConfig: Pointer to configuration structure passed down from
@@ -915,13 +915,13 @@ bool wlansap_is_channel_leaking_in_nol(struct sap_context *sap_ctx,
  *                             access would cause a page fault
  *         QDF_STATUS_SUCCESS: Success
  */
-QDF_STATUS wlansap_start_bss(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 			     tpWLAN_SAPEventCB pSapEventCallback,
 			     tsap_Config_t *pConfig, void *pUsrContext);
 
 /**
  * wlansap_stop_bss() - stop BSS.
- * @pSapCtx: Pointer to SAP context
+ * @sap_ctx: Pointer to SAP context
  *
  * This api function provides SAP FSM event eSAP_HDD_STOP_INFRA_BSS for
  * stopping AP BSS
@@ -931,7 +931,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *pSapCtx,
  *                             access would cause a page fault
  *         QDF_STATUS_SUCCESS: Success
  */
-QDF_STATUS wlansap_stop_bss(struct sap_context *pSapCtx);
+QDF_STATUS wlansap_stop_bss(struct sap_context *sap_ctx);
 
 /**
  * wlan_sap_update_next_channel() - Update next channel configured using vendor
@@ -988,18 +988,18 @@ QDF_STATUS wlan_sap_get_pre_cac_vdev_id(tHalHandle handle, uint8_t *vdev_id);
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 /**
  * wlansap_check_cc_intf() - Get interfering concurrent channel
- * @pSapCtx: SAP context pointer
+ * @sap_ctx: SAP context pointer
  *
  * Determine if a Concurrent Channel is interfering.
  *
  * Return: Channel number of the interfering channel, or 0 if none.
  */
-uint16_t wlansap_check_cc_intf(struct sap_context *pSapCtx);
+uint16_t wlansap_check_cc_intf(struct sap_context *sap_ctx);
 #endif
 
 /**
  * wlansap_set_mac_acl() - set MAC list entry in ACL.
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @pConfig: Pointer to SAP config.
  *
  * This api function provides SAP to set mac list entry in accept list as well
@@ -1010,12 +1010,12 @@ uint16_t wlansap_check_cc_intf(struct sap_context *pSapCtx);
  *                             access would cause a page fault
  *         QDF_STATUS_SUCCESS: Success
  */
-QDF_STATUS wlansap_set_mac_acl(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_set_mac_acl(struct sap_context *sap_ctx,
 			       tsap_Config_t *pConfig);
 
 /**
  * wlansap_disassoc_sta() - initiate disassociation of station.
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @p_del_sta_params: pointer to station deletion parameters
  *
  * This api function provides for Ap App/HDD initiated disassociation of station
@@ -1023,7 +1023,7 @@ QDF_STATUS wlansap_set_mac_acl(struct sap_context *pSapCtx,
  * Return: The QDF_STATUS code associated with performing the operation
  *         QDF_STATUS_SUCCESS:  Success
  */
-QDF_STATUS wlansap_disassoc_sta(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_disassoc_sta(struct sap_context *sap_ctx,
 				struct tagCsrDelStaParams *p_del_sta_params);
 
 /**
@@ -1036,7 +1036,7 @@ QDF_STATUS wlansap_disassoc_sta(struct sap_context *pSapCtx,
  *
  * Return: The QDF_STATUS code associated with performing the operation
  */
-QDF_STATUS wlansap_deauth_sta(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_deauth_sta(struct sap_context *sap_ctx,
 			      struct tagCsrDelStaParams *pDelStaParams);
 
 /**
@@ -1059,7 +1059,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 
 /**
  * wlansap_set_key_sta() - set keys for a stations.
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @pSetKeyInfo : tCsrRoamSetKey structure for the station
  *
  * This api function provides for Ap App/HDD to set key for a station.
@@ -1067,7 +1067,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
  * Return: The QDF_STATUS code associated with performing the operation
  *         QDF_STATUS_SUCCESS:  Success
  */
-QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_set_key_sta(struct sap_context *sap_ctx,
 			       tCsrRoamSetKey *pSetKeyInfo);
 
 /**
@@ -1086,16 +1086,16 @@ QDF_STATUS wlan_sap_getstation_ie_information(struct sap_context *sap_ctx,
 
 /**
  * wlansap_clear_acl() - Clear all ACLs
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  *
  * Return: QDF_STATUS. If success the ACLs were cleared, otherwise an
  *    error occurred.
  */
-QDF_STATUS wlansap_clear_acl(struct sap_context *pSapCtx);
+QDF_STATUS wlansap_clear_acl(struct sap_context *sap_ctx);
 
 /**
  * wlansap_get_acl_accept_list() - Get ACL accept list
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @pAcceptList: Pointer to the buffer to store the ACL accept list
  * @nAcceptList: Pointer to the location to store the number of
  *    entries in the ACL accept list.
@@ -1103,13 +1103,13 @@ QDF_STATUS wlansap_clear_acl(struct sap_context *pSapCtx);
  * Return: QDF_STATUS. If success the data was returned, otherwise an
  *    error occurred.
  */
-QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *sap_ctx,
 				       struct qdf_mac_addr *pAcceptList,
 				       uint8_t *nAcceptList);
 
 /**
  * wlansap_get_acl_deny_list() - Get ACL deny list
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @pDenyList: Pointer to the buffer to store the ACL deny list
  * @nDenyList: Pointer to the location to store the number of
  *    entries in the ACL deny list.
@@ -1117,28 +1117,28 @@ QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *pSapCtx,
  * Return: QDF_STATUS. If success the data was returned, otherwise an
  *    error occurred.
  */
-QDF_STATUS wlansap_get_acl_deny_list(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_get_acl_deny_list(struct sap_context *sap_ctx,
 				     struct qdf_mac_addr *pDenyList,
 				     uint8_t *nDenyList);
 
 /**
  * wlansap_set_acl_mode() - Set the SAP ACL mode
- * @pSapCtx: The SAP context pointer
+ * @sap_ctx: The SAP context pointer
  * @mode: the desired ACL mode
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS wlansap_set_acl_mode(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_set_acl_mode(struct sap_context *sap_ctx,
 				eSapMacAddrACL mode);
 
 /**
  * wlansap_get_acl_mode() - Get the SAP ACL mode
- * @pSapCtx: The SAP context pointer
+ * @sap_ctx: The SAP context pointer
  * @mode: Pointer where to return the current ACL mode
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS wlansap_get_acl_mode(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_get_acl_mode(struct sap_context *sap_ctx,
 				eSapMacAddrACL *mode);
 
 /**
@@ -1159,7 +1159,7 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 
 /**
  * wlansap_send_action() - send action frame
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @pBuf: Pointer of the action frame to be transmitted
  * @len: Length of the action frame in @pBuf
  * @wait: Unused
@@ -1170,13 +1170,13 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
  * Return: The QDF_STATUS code associated with performing the operation
 *          QDF_STATUS_SUCCESS:  Success and error code otherwise
  */
-QDF_STATUS wlansap_send_action(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_send_action(struct sap_context *sap_ctx,
 			       const uint8_t *pBuf, uint32_t len,
 			       uint16_t wait, uint16_t channel_freq);
 
 /**
  * wlansap_remain_on_channel() - set remain on channel
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @channel: Channel on which driver has to listen
  * @duration: Duration for which driver has to listen on specified channel
  * @callback: Callback function to be called once Listen is done.
@@ -1189,14 +1189,14 @@ QDF_STATUS wlansap_send_action(struct sap_context *pSapCtx,
  * Return: The QDF_STATUS code associated with performing the operation
  *         QDF_STATUS_SUCCESS:  Success and error code otherwise
  */
-QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_remain_on_channel(struct sap_context *sap_ctx,
 				     uint8_t channel, uint32_t duration,
 				     remainOnChanCallback callback,
 				     void *pContext, uint32_t *scan_id);
 
 /**
  * wlansap_cancel_remain_on_channel() - cancel remain on channel
- * @pSapCtx: Pointer to the SAP context
+ * @sap_ctx: Pointer to the SAP context
  * @scan_id: Scan ID returned by wlansap_remain_on_channel()
  *
  * This api cancel previous remain on channel request.
@@ -1204,12 +1204,12 @@ QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx,
  * Return: The QDF_STATUS code associated with performing the operation
  *         QDF_STATUS_SUCCESS:  Success and error code otherwise
  */
-QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *sap_ctx,
 					    uint32_t scan_id);
 
 /**
  * wlansap_register_mgmt_frame() - register management frame
- * @pSapCtx: Pointer to SAP context
+ * @sap_ctx: Pointer to SAP context
  * @frame_type: frame type that needs to be registered with PE.
  * @match_data: pointer to data which should be matched after @frame_type
  *              is matched.
@@ -1221,14 +1221,14 @@ QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *pSapCtx,
  * Return: The QDF_STATUS code associated with performing the operation
  *         QDF_STATUS_SUCCESS:  Success and error code otherwise
  */
-QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *sap_ctx,
 				       uint16_t frame_type,
 				       uint8_t *match_data,
 				       uint16_t match_len);
 
 /**
  * wlansap_de_register_mgmt_frame() - de register management frame
- * @pSapCtx: Pointer to SAP context
+ * @sap_ctx: Pointer to SAP context
  * @frame_type: frame type that needs to be de-registered with PE.
  * @match_data: pointer to data which should be matched after @frame_type
  *              is matched.
@@ -1239,7 +1239,7 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
  * Return: The QDF_STATUS code associated with performing the operation
  *         QDF_STATUS_SUCCESS:  Success and error code otherwise
  */
-QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *sap_ctx,
 					  uint16_t frame_type,
 					  uint8_t *match_data,
 					  uint16_t match_len);

+ 25 - 25
core/sap/src/sap_ch_select.c

@@ -71,12 +71,12 @@
 		((extRssi < rssi) ? true : false) \
 	)
 
-#define SET_ACS_BAND(acs_band, pSapCtx) \
+#define SET_ACS_BAND(acs_band, sap_ctx) \
 { \
-	if (pSapCtx->acs_cfg->start_ch <= 14 && \
-		pSapCtx->acs_cfg->end_ch <= 14) \
+	if (sap_ctx->acs_cfg->start_ch <= 14 && \
+		sap_ctx->acs_cfg->end_ch <= 14) \
 		acs_band = eCSR_DOT11_MODE_11g; \
-	else if (pSapCtx->acs_cfg->start_ch >= 14)\
+	else if (sap_ctx->acs_cfg->start_ch >= 14)\
 		acs_band = eCSR_DOT11_MODE_11a; \
 	else \
 		acs_band = eCSR_DOT11_MODE_abg; \
@@ -416,7 +416,7 @@ static void sap_process_avoid_ie(tHalHandle hal,
    RETURN VALUE
     NULL
    ============================================================================*/
-void sap_update_unsafe_channel_list(tHalHandle hal, struct sap_context *pSapCtx)
+void sap_update_unsafe_channel_list(tHalHandle hal, struct sap_context *sap_ctx)
 {
 	uint16_t i, j;
 	uint16_t unsafe_channel_list[NUM_CHANNELS];
@@ -445,7 +445,7 @@ void sap_update_unsafe_channel_list(tHalHandle hal, struct sap_context *pSapCtx)
 	/* Try to find unsafe channel */
 #if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
 	for (i = 0; i < NUM_CHANNELS; i++) {
-		if (pSapCtx->dfs_ch_disable == true) {
+		if (sap_ctx->dfs_ch_disable == true) {
 			if (wlan_reg_is_dfs_ch(mac_ctx->pdev,
 					safe_channels[i].channelNumber)) {
 				safe_channels[i].isSafe = false;
@@ -484,28 +484,28 @@ void sap_update_unsafe_channel_list(tHalHandle hal, struct sap_context *pSapCtx)
 
 #endif /* FEATURE_WLAN_CH_AVOID */
 
-void sap_cleanup_channel_list(struct sap_context *pSapCtx)
+void sap_cleanup_channel_list(struct sap_context *sap_ctx)
 {
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
 		  "Cleaning up the channel list structure");
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_FATAL,
 			  "SAP Context is NULL");
 		return;
 	}
 
-	pSapCtx->SapChnlList.numChannel = 0;
-	if (pSapCtx->SapChnlList.channelList) {
-		qdf_mem_free(pSapCtx->SapChnlList.channelList);
-		pSapCtx->SapChnlList.channelList = NULL;
+	sap_ctx->SapChnlList.numChannel = 0;
+	if (sap_ctx->SapChnlList.channelList) {
+		qdf_mem_free(sap_ctx->SapChnlList.channelList);
+		sap_ctx->SapChnlList.channelList = NULL;
 	}
 
-	pSapCtx->SapAllChnlList.numChannel = 0;
-	if (pSapCtx->SapAllChnlList.channelList) {
-		qdf_mem_free(pSapCtx->SapAllChnlList.channelList);
-		pSapCtx->SapAllChnlList.channelList = NULL;
+	sap_ctx->SapAllChnlList.numChannel = 0;
+	if (sap_ctx->SapAllChnlList.channelList) {
+		qdf_mem_free(sap_ctx->SapAllChnlList.channelList);
+		sap_ctx->SapAllChnlList.channelList = NULL;
 	}
 }
 
@@ -611,7 +611,7 @@ uint8_t sap_select_preferred_channel_from_channel_list(uint8_t best_chnl,
     IN
     halHandle          : Pointer to tHalHandle
    *pSpectInfoParams  : Pointer to tSapChSelSpectInfo structure
-     pSapCtx           : Pointer to SAP Context
+     sap_ctx           : Pointer to SAP Context
 
    RETURN VALUE
     bool:  Success or FAIL
@@ -620,7 +620,7 @@ uint8_t sap_select_preferred_channel_from_channel_list(uint8_t best_chnl,
    ============================================================================*/
 static bool sap_chan_sel_init(tHalHandle halHandle,
 			      tSapChSelSpectInfo *pSpectInfoParams,
-			      struct sap_context *pSapCtx)
+			      struct sap_context *sap_ctx)
 {
 	tSapSpectChInfo *pSpectCh = NULL;
 	uint8_t *pChans = NULL;
@@ -656,13 +656,13 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
 	pChans = pMac->scan.base_channels.channelList;
 
 #if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
-	if (pSapCtx->dfs_ch_disable == true)
+	if (sap_ctx->dfs_ch_disable == true)
 		include_dfs_ch = false;
 #endif
 	sme_cfg_get_int(halHandle, WNI_CFG_DFS_MASTER_ENABLED,
 			&dfs_master_cap_enabled);
 	if (dfs_master_cap_enabled == 0 ||
-	    ACS_DFS_MODE_DISABLE == pSapCtx->dfs_mode)
+	    ACS_DFS_MODE_DISABLE == sap_ctx->dfs_mode)
 		include_dfs_ch = false;
 
 	/* Fill the channel number in the spectrum in the operating freq band */
@@ -672,7 +672,7 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
 		chSafe = true;
 
 		/* check if the channel is in NOL blacklist */
-		if (sap_dfs_is_channel_in_nol_list(pSapCtx, *pChans,
+		if (sap_dfs_is_channel_in_nol_list(sap_ctx, *pChans,
 						   PHY_SINGLE_CHANNEL_CENTERED)) {
 			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 				  "In %s, Ch %d is in NOL list", __func__,
@@ -708,7 +708,7 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
 
 		/* OFDM rates are not supported on channel 14 */
 		if (*pChans == 14 &&
-		    eCSR_DOT11_MODE_11b != pSapCtx->csr_roamProfile.phyMode) {
+		    eCSR_DOT11_MODE_11b != sap_ctx->csr_roamProfile.phyMode) {
 			continue;
 		}
 
@@ -2317,7 +2317,7 @@ static void sap_sort_chl_weight_ht40_5_g(tSapChSelSpectInfo *pSpectInfoParams)
    PARAMETERS
 
     IN
-    pSapCtx                : Pointer to the struct sap_context *structure
+    sap_ctx                : Pointer to the struct sap_context *structure
     pSpectInfoParams       : Pointer to the tSapChSelSpectInfo structure
 
    RETURN VALUE
@@ -2325,7 +2325,7 @@ static void sap_sort_chl_weight_ht40_5_g(tSapChSelSpectInfo *pSpectInfoParams)
 
    SIDE EFFECTS
    ============================================================================*/
-static void sap_sort_chl_weight_all(struct sap_context *pSapCtx,
+static void sap_sort_chl_weight_all(struct sap_context *sap_ctx,
 				    tSapChSelSpectInfo *pSpectInfoParams,
 				    uint32_t operatingBand,
 				    v_REGDOMAIN_t domain)
@@ -2339,7 +2339,7 @@ static void sap_sort_chl_weight_all(struct sap_context *pSapCtx,
 	pSpectCh = pSpectInfoParams->pSpectCh;
 #ifdef SOFTAP_CHANNEL_RANGE
 
-	switch (pSapCtx->acs_cfg->ch_width) {
+	switch (sap_ctx->acs_cfg->ch_width) {
 	case CH_WIDTH_40MHZ:
 		if (eCSR_DOT11_MODE_11g == operatingBand)
 			sap_sort_chl_weight_ht40_24_g(pSpectInfoParams, domain);

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

@@ -332,7 +332,7 @@ wlansap_roam_callback
 QDF_STATUS SapFsm(struct sap_context *sapContext, ptWLAN_SAPEvent sapEvent,
 			 uint8_t *status);
 
-uint8_t sap_select_channel(tHalHandle halHandle, struct sap_context *pSapCtx,
+uint8_t sap_select_channel(tHalHandle halHandle, struct sap_context *sap_ctx,
 			   tScanResultHandle pScanResult);
 
 QDF_STATUS
@@ -372,7 +372,7 @@ sap_search_mac_list(struct qdf_mac_addr *macList, uint8_t num_mac,
 
 #ifdef FEATURE_WLAN_CH_AVOID
 void sap_update_unsafe_channel_list(tHalHandle hal,
-				    struct sap_context *pSapCtx);
+				    struct sap_context *sap_ctx);
 #endif /* FEATURE_WLAN_CH_AVOID */
 
 QDF_STATUS sap_init_dfs_channel_nol_list(struct sap_context *sapContext);

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

@@ -253,13 +253,13 @@ void wlansap_context_put(struct sap_context *ctx)
 
 struct sap_context *wlansap_open(void)
 {
-	struct sap_context *pSapCtx;
+	struct sap_context *sap_ctx;
 	QDF_STATUS status;
 
 	/* dynamically allocate the sapContext */
-	pSapCtx = qdf_mem_malloc(sizeof(*pSapCtx));
+	sap_ctx = qdf_mem_malloc(sizeof(*sap_ctx));
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer from p_cds_gctx", __func__);
 		return NULL;
@@ -269,19 +269,19 @@ struct sap_context *wlansap_open(void)
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, FL("Enter"));
 
 	/* Save the SAP context pointer */
-	status = wlansap_save_context(pSapCtx);
+	status = wlansap_save_context(sap_ctx);
 	if (QDF_IS_STATUS_ERROR(status)) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			"%s: failed to save SAP context", __func__);
-		qdf_mem_free(pSapCtx);
+		qdf_mem_free(sap_ctx);
 		return NULL;
 	}
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, FL("Exit"));
 
-	return pSapCtx;
+	return sap_ctx;
 } /* wlansap_open */
 
-QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_start(struct sap_context *sap_ctx,
 			 enum tQDF_ADAPTER_MODE mode,
 			 uint8_t *addr, uint32_t session_id)
 {
@@ -292,7 +292,7 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "wlansap_start invoked successfully");
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
@@ -301,27 +301,27 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
 	/*------------------------------------------------------------------------
 	    For now, presume security is not enabled.
 	   -----------------------------------------------------------------------*/
-	pSapCtx->ucSecEnabled = WLANSAP_SECURITY_ENABLED_STATE;
+	sap_ctx->ucSecEnabled = WLANSAP_SECURITY_ENABLED_STATE;
 
 	/*------------------------------------------------------------------------
 	    Now configure the roaming profile links. To SSID and bssid.
 	   ------------------------------------------------------------------------*/
 	/* We have room for two SSIDs. */
-	pSapCtx->csr_roamProfile.SSIDs.numOfSSIDs = 1;   /* This is true for now. */
-	pSapCtx->csr_roamProfile.SSIDs.SSIDList = pSapCtx->SSIDList;     /* Array of two */
-	pSapCtx->csr_roamProfile.SSIDs.SSIDList[0].SSID.length = 0;
-	pSapCtx->csr_roamProfile.SSIDs.SSIDList[0].handoffPermitted = false;
-	pSapCtx->csr_roamProfile.SSIDs.SSIDList[0].ssidHidden =
-		pSapCtx->SSIDList[0].ssidHidden;
-
-	pSapCtx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1; /* This is true for now. */
-	pSapCtx->csr_roamProfile.BSSIDs.bssid = &pSapCtx->bssid;
-	pSapCtx->csr_roamProfile.csrPersona = mode;
-	qdf_mem_copy(pSapCtx->self_mac_addr, addr, QDF_MAC_ADDR_SIZE);
-	qdf_event_create(&pSapCtx->sap_session_opened_evt);
+	sap_ctx->csr_roamProfile.SSIDs.numOfSSIDs = 1;   /* This is true for now. */
+	sap_ctx->csr_roamProfile.SSIDs.SSIDList = sap_ctx->SSIDList;     /* Array of two */
+	sap_ctx->csr_roamProfile.SSIDs.SSIDList[0].SSID.length = 0;
+	sap_ctx->csr_roamProfile.SSIDs.SSIDList[0].handoffPermitted = false;
+	sap_ctx->csr_roamProfile.SSIDs.SSIDList[0].ssidHidden =
+		sap_ctx->SSIDList[0].ssidHidden;
+
+	sap_ctx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1; /* This is true for now. */
+	sap_ctx->csr_roamProfile.BSSIDs.bssid = &sap_ctx->bssid;
+	sap_ctx->csr_roamProfile.csrPersona = mode;
+	qdf_mem_copy(sap_ctx->self_mac_addr, addr, QDF_MAC_ADDR_SIZE);
+	qdf_event_create(&sap_ctx->sap_session_opened_evt);
 
 	/* Now configure the auth type in the roaming profile. To open. */
-	pSapCtx->csr_roamProfile.negotiatedAuthType = eCSR_AUTH_TYPE_OPEN_SYSTEM;        /* open is the default */
+	sap_ctx->csr_roamProfile.negotiatedAuthType = eCSR_AUTH_TYPE_OPEN_SYSTEM;        /* open is the default */
 
 	hal = (tHalHandle) CDS_GET_HAL_CB();
 	if (!hal) {
@@ -334,14 +334,14 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
 	 * Anytime when you call sap_open_session, please call
 	 * sap_set_session_param to fill sap context parameters
 	 */
-	qdf_ret_status = sap_open_session(hal, pSapCtx, session_id);
+	qdf_ret_status = sap_open_session(hal, sap_ctx, session_id);
 	if (QDF_STATUS_SUCCESS != qdf_ret_status) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			"Error: In %s calling sap_open_session status = %d",
 			__func__, qdf_ret_status);
 		return QDF_STATUS_E_FAILURE;
 	}
-	qdf_ret_status = sap_set_session_param(hal, pSapCtx, session_id);
+	qdf_ret_status = sap_set_session_param(hal, sap_ctx, session_id);
 	if (QDF_STATUS_SUCCESS != qdf_ret_status) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			"In %s calling sap_set_session_param status = %d",
@@ -349,13 +349,13 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
 		return QDF_STATUS_E_FAILURE;
 	}
 	/* Register with scan component */
-	pSapCtx->req_id = ucfg_scan_register_requester(pmac->psoc, "SAP",
-					sap_scan_event_callback, pSapCtx);
+	sap_ctx->req_id = ucfg_scan_register_requester(pmac->psoc, "SAP",
+					sap_scan_event_callback, sap_ctx);
 
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_stop(struct sap_context *pSapCtx)
+QDF_STATUS wlansap_stop(struct sap_context *sap_ctx)
 {
 	tHalHandle hal;
 	tpAniSirGlobal pmac;
@@ -364,7 +364,7 @@ QDF_STATUS wlansap_stop(struct sap_context *pSapCtx)
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
 		  "wlansap_stop invoked successfully ");
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
@@ -377,60 +377,60 @@ QDF_STATUS wlansap_stop(struct sap_context *pSapCtx)
 		return QDF_STATUS_E_FAULT;
 	}
 	if (QDF_STATUS_SUCCESS !=
-			sap_close_session(hal, pSapCtx, NULL, false)) {
+			sap_close_session(hal, sap_ctx, NULL, false)) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  FL("sap session can't be closed"));
 		return QDF_STATUS_E_FAULT;
 	}
-	ucfg_scan_unregister_requester(pmac->psoc, pSapCtx->req_id);
-	sap_free_roam_profile(&pSapCtx->csr_roamProfile);
+	ucfg_scan_unregister_requester(pmac->psoc, sap_ctx->req_id);
+	sap_free_roam_profile(&sap_ctx->csr_roamProfile);
 
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_close(struct sap_context *pSapCtx)
+QDF_STATUS wlansap_close(struct sap_context *sap_ctx)
 {
 	tHalHandle hal;
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "wlansap_close invoked");
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 	/* Cleanup SAP control block */
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, FL("Enter"));
-	sap_cleanup_channel_list(pSapCtx);
+	sap_cleanup_channel_list(sap_ctx);
 	hal = CDS_GET_HAL_CB();
 	if (!hal)
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  FL("hal is NULL, so lets skip global sap cleanup"));
-	else if (pSapCtx->sessionId != CSR_SESSION_ID_INVALID)
+	else if (sap_ctx->sessionId != CSR_SESSION_ID_INVALID)
 		/* empty queues/lists/pkts if any */
-		sap_clear_session_param(hal, pSapCtx, pSapCtx->sessionId);
+		sap_clear_session_param(hal, sap_ctx, sap_ctx->sessionId);
 	/*
-	 * wlansap_context_put will release actual pSapCtx memory
+	 * wlansap_context_put will release actual sap_ctx memory
 	 * allocated during wlansap_open
 	 */
-	wlansap_context_put(pSapCtx);
+	wlansap_context_put(sap_ctx);
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, FL("Exit"));
 
 	return QDF_STATUS_SUCCESS;
 } /* wlansap_close */
 
-bool wlansap_is_channel_in_nol_list(struct sap_context *pSapCtx,
+bool wlansap_is_channel_in_nol_list(struct sap_context *sap_ctx,
 				    uint8_t channelNumber,
 				    ePhyChanBondState chanBondState)
 {
-	if (!pSapCtx) {
+	if (!sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "%s: Invalid SAP pointer from pCtx", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
-	return sap_dfs_is_channel_in_nol_list(pSapCtx, channelNumber,
+	return sap_dfs_is_channel_in_nol_list(sap_ctx, channelNumber,
 					      chanBondState);
 }
 
@@ -484,7 +484,7 @@ bool wlansap_is_channel_leaking_in_nol(struct sap_context *sap_ctx,
 }
 
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
-uint16_t wlansap_check_cc_intf(struct sap_context *pSapCtx)
+uint16_t wlansap_check_cc_intf(struct sap_context *sap_ctx)
 {
 	tHalHandle hHal;
 	uint16_t intf_ch;
@@ -496,7 +496,7 @@ uint16_t wlansap_check_cc_intf(struct sap_context *pSapCtx)
 		return 0;
 	}
 	intf_ch = sme_check_concurrent_channel_overlap(hHal, 0, 0,
-						       pSapCtx->cc_switch_mode);
+						       sap_ctx->cc_switch_mode);
 	return intf_ch;
 }
 #endif
@@ -648,7 +648,7 @@ static inline bool wlan_sap_validate_channel_switch(tHalHandle hal,
 	return true;
 }
 #endif
-QDF_STATUS wlansap_start_bss(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 			     tpWLAN_SAPEventCB pSapEventCallback,
 			     tsap_Config_t *pConfig, void *pUsrContext)
 {
@@ -658,52 +658,52 @@ QDF_STATUS wlansap_start_bss(struct sap_context *pSapCtx,
 	tpAniSirGlobal pmac = NULL;
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "wlansap_start_bss: sapContext=%pK", pSapCtx);
+		  "wlansap_start_bss: sapContext=%pK", sap_ctx);
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "%s: Invalid SAP pointer",
 			  __func__);
 		return QDF_STATUS_E_FAULT;
 	}
-	pSapCtx->sapsMachine = eSAP_DISCONNECTED;
+	sap_ctx->sapsMachine = eSAP_DISCONNECTED;
 
 	/* Channel selection is auto or configured */
-	pSapCtx->channel = pConfig->channel;
-	pSapCtx->dfs_mode = pConfig->acs_dfs_mode;
-	pSapCtx->ch_params.ch_width = pConfig->ch_params.ch_width;
-	pSapCtx->ch_params.center_freq_seg0 =
+	sap_ctx->channel = pConfig->channel;
+	sap_ctx->dfs_mode = pConfig->acs_dfs_mode;
+	sap_ctx->ch_params.ch_width = pConfig->ch_params.ch_width;
+	sap_ctx->ch_params.center_freq_seg0 =
 		pConfig->ch_params.center_freq_seg0;
-	pSapCtx->ch_params.center_freq_seg1 =
+	sap_ctx->ch_params.center_freq_seg1 =
 		pConfig->ch_params.center_freq_seg1;
-	pSapCtx->ch_params.sec_ch_offset =
+	sap_ctx->ch_params.sec_ch_offset =
 		pConfig->ch_params.sec_ch_offset;
-	pSapCtx->ch_width_orig = pConfig->ch_width_orig;
+	sap_ctx->ch_width_orig = pConfig->ch_width_orig;
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
-	pSapCtx->cc_switch_mode = pConfig->cc_switch_mode;
+	sap_ctx->cc_switch_mode = pConfig->cc_switch_mode;
 #endif
-	pSapCtx->auto_channel_select_weight =
+	sap_ctx->auto_channel_select_weight =
 		 pConfig->auto_channel_select_weight;
-	pSapCtx->pUsrContext = pUsrContext;
-	pSapCtx->enableOverLapCh = pConfig->enOverLapCh;
-	pSapCtx->acs_cfg = &pConfig->acs_cfg;
-	pSapCtx->dfs_cac_offload = pConfig->dfs_cac_offload;
-	pSapCtx->isCacEndNotified = false;
+	sap_ctx->pUsrContext = pUsrContext;
+	sap_ctx->enableOverLapCh = pConfig->enOverLapCh;
+	sap_ctx->acs_cfg = &pConfig->acs_cfg;
+	sap_ctx->dfs_cac_offload = pConfig->dfs_cac_offload;
+	sap_ctx->isCacEndNotified = false;
 	/* Set the BSSID to your "self MAC Addr" read the mac address
 		from Configuation ITEM received from HDD */
-	pSapCtx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
-	qdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
-		     pSapCtx->self_mac_addr, sizeof(struct qdf_mac_addr));
+	sap_ctx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
+	qdf_mem_copy(sap_ctx->csr_roamProfile.BSSIDs.bssid,
+		     sap_ctx->self_mac_addr, sizeof(struct qdf_mac_addr));
 
 	/* Save a copy to SAP context */
-	qdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
+	qdf_mem_copy(sap_ctx->csr_roamProfile.BSSIDs.bssid,
 		     pConfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
-	qdf_mem_copy(pSapCtx->self_mac_addr,
+	qdf_mem_copy(sap_ctx->self_mac_addr,
 		     pConfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
 
 	/* copy the configuration items to csrProfile */
 	sapconvert_to_csr_profile(pConfig, eCSR_BSS_TYPE_INFRA_AP,
-			       &pSapCtx->csr_roamProfile);
+			       &sap_ctx->csr_roamProfile);
 	hHal = (tHalHandle) CDS_GET_HAL_CB();
 	if (NULL == hHal) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
@@ -745,41 +745,41 @@ QDF_STATUS wlansap_start_bss(struct sap_context *pSapCtx,
 	pmac->sap.SapDfsInfo.sap_ch_switch_mode =
 			pConfig->sap_chanswitch_mode;
 
-	pmac->sap.sapCtxList[pSapCtx->sessionId].pSapContext = pSapCtx;
-	pmac->sap.sapCtxList[pSapCtx->sessionId].sapPersona =
-		pSapCtx->csr_roamProfile.csrPersona;
-	pmac->sap.sapCtxList[pSapCtx->sessionId].sessionID =
-		pSapCtx->sessionId;
+	pmac->sap.sapCtxList[sap_ctx->sessionId].pSapContext = sap_ctx;
+	pmac->sap.sapCtxList[sap_ctx->sessionId].sapPersona =
+		sap_ctx->csr_roamProfile.csrPersona;
+	pmac->sap.sapCtxList[sap_ctx->sessionId].sessionID =
+		sap_ctx->sessionId;
 
 	/* Copy MAC filtering settings to sap context */
-	pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
-	qdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac,
+	sap_ctx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
+	qdf_mem_copy(sap_ctx->acceptMacList, pConfig->accept_mac,
 		     sizeof(pConfig->accept_mac));
-	pSapCtx->nAcceptMac = pConfig->num_accept_mac;
-	sap_sort_mac_list(pSapCtx->acceptMacList, pSapCtx->nAcceptMac);
-	qdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
+	sap_ctx->nAcceptMac = pConfig->num_accept_mac;
+	sap_sort_mac_list(sap_ctx->acceptMacList, sap_ctx->nAcceptMac);
+	qdf_mem_copy(sap_ctx->denyMacList, pConfig->deny_mac,
 		     sizeof(pConfig->deny_mac));
-	pSapCtx->nDenyMac = pConfig->num_deny_mac;
-	sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
-	pSapCtx->beacon_tx_rate = pConfig->beacon_tx_rate;
+	sap_ctx->nDenyMac = pConfig->num_deny_mac;
+	sap_sort_mac_list(sap_ctx->denyMacList, sap_ctx->nDenyMac);
+	sap_ctx->beacon_tx_rate = pConfig->beacon_tx_rate;
 
 	/* Fill in the event structure for FSM */
 	sapEvent.event = eSAP_HDD_START_INFRA_BSS;
 	sapEvent.params = 0;    /* pSapPhysLinkCreate */
 
 	/* Store the HDD callback in SAP context */
-	pSapCtx->pfnSapEventCallback = pSapEventCallback;
+	sap_ctx->pfnSapEventCallback = pSapEventCallback;
 
 	/* Handle event */
-	qdf_status = sap_fsm(pSapCtx, &sapEvent);
+	qdf_status = sap_fsm(sap_ctx, &sapEvent);
 fail:
 	if (QDF_IS_STATUS_ERROR(qdf_status))
-		sap_free_roam_profile(&pSapCtx->csr_roamProfile);
+		sap_free_roam_profile(&sap_ctx->csr_roamProfile);
 
 	return qdf_status;
 } /* wlansap_start_bss */
 
-QDF_STATUS wlansap_set_mac_acl(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_set_mac_acl(struct sap_context *sap_ctx,
 			       tsap_Config_t *pConfig)
 {
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
@@ -787,37 +787,37 @@ QDF_STATUS wlansap_set_mac_acl(struct sap_context *pSapCtx,
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "wlansap_set_mac_acl");
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 	/* Copy MAC filtering settings to sap context */
-	pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
+	sap_ctx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
 
-	if (eSAP_DENY_UNLESS_ACCEPTED == pSapCtx->eSapMacAddrAclMode) {
-		qdf_mem_copy(pSapCtx->acceptMacList,
+	if (eSAP_DENY_UNLESS_ACCEPTED == sap_ctx->eSapMacAddrAclMode) {
+		qdf_mem_copy(sap_ctx->acceptMacList,
 			     pConfig->accept_mac,
 			     sizeof(pConfig->accept_mac));
-		pSapCtx->nAcceptMac = pConfig->num_accept_mac;
-		sap_sort_mac_list(pSapCtx->acceptMacList,
-			       pSapCtx->nAcceptMac);
-	} else if (eSAP_ACCEPT_UNLESS_DENIED == pSapCtx->eSapMacAddrAclMode) {
-		qdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
+		sap_ctx->nAcceptMac = pConfig->num_accept_mac;
+		sap_sort_mac_list(sap_ctx->acceptMacList,
+			       sap_ctx->nAcceptMac);
+	} else if (eSAP_ACCEPT_UNLESS_DENIED == sap_ctx->eSapMacAddrAclMode) {
+		qdf_mem_copy(sap_ctx->denyMacList, pConfig->deny_mac,
 			     sizeof(pConfig->deny_mac));
-		pSapCtx->nDenyMac = pConfig->num_deny_mac;
-		sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
+		sap_ctx->nDenyMac = pConfig->num_deny_mac;
+		sap_sort_mac_list(sap_ctx->denyMacList, sap_ctx->nDenyMac);
 	}
 
 	return qdf_status;
 } /* wlansap_set_mac_acl */
 
-QDF_STATUS wlansap_stop_bss(struct sap_context *pSapCtx)
+QDF_STATUS wlansap_stop_bss(struct sap_context *sap_ctx)
 {
 	tWLAN_SAPEvent sapEvent;        /* State machine event */
 	QDF_STATUS qdf_status;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
@@ -828,93 +828,93 @@ QDF_STATUS wlansap_stop_bss(struct sap_context *pSapCtx)
 	sapEvent.params = 0;
 
 	/* Handle event */
-	qdf_status = sap_fsm(pSapCtx, &sapEvent);
+	qdf_status = sap_fsm(sap_ctx, &sapEvent);
 
 	return qdf_status;
 }
 
 /* This routine will set the mode of operation for ACL dynamically*/
-QDF_STATUS wlansap_set_acl_mode(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_set_acl_mode(struct sap_context *sap_ctx,
 				eSapMacAddrACL mode)
 {
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
-	pSapCtx->eSapMacAddrAclMode = mode;
+	sap_ctx->eSapMacAddrAclMode = mode;
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_get_acl_mode(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_get_acl_mode(struct sap_context *sap_ctx,
 				eSapMacAddrACL *mode)
 {
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
-	*mode = pSapCtx->eSapMacAddrAclMode;
+	*mode = sap_ctx->eSapMacAddrAclMode;
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *sap_ctx,
 				       struct qdf_mac_addr *pAcceptList,
 				       uint8_t *nAcceptList)
 {
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
-	memcpy(pAcceptList, pSapCtx->acceptMacList,
-	       (pSapCtx->nAcceptMac * QDF_MAC_ADDR_SIZE));
-	*nAcceptList = pSapCtx->nAcceptMac;
+	memcpy(pAcceptList, sap_ctx->acceptMacList,
+	       (sap_ctx->nAcceptMac * QDF_MAC_ADDR_SIZE));
+	*nAcceptList = sap_ctx->nAcceptMac;
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_get_acl_deny_list(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_get_acl_deny_list(struct sap_context *sap_ctx,
 				     struct qdf_mac_addr *pDenyList,
 				     uint8_t *nDenyList)
 {
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer from p_cds_gctx", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
-	memcpy(pDenyList, pSapCtx->denyMacList,
-	       (pSapCtx->nDenyMac * QDF_MAC_ADDR_SIZE));
-	*nDenyList = pSapCtx->nDenyMac;
+	memcpy(pDenyList, sap_ctx->denyMacList,
+	       (sap_ctx->nDenyMac * QDF_MAC_ADDR_SIZE));
+	*nDenyList = sap_ctx->nDenyMac;
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_clear_acl(struct sap_context *pSapCtx)
+QDF_STATUS wlansap_clear_acl(struct sap_context *sap_ctx)
 {
 	uint8_t i;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		return QDF_STATUS_E_RESOURCES;
 	}
 
-	for (i = 0; i < (pSapCtx->nDenyMac - 1); i++) {
-		qdf_mem_zero((pSapCtx->denyMacList + i)->bytes,
+	for (i = 0; i < (sap_ctx->nDenyMac - 1); i++) {
+		qdf_mem_zero((sap_ctx->denyMacList + i)->bytes,
 			     QDF_MAC_ADDR_SIZE);
 	}
 
-	sap_print_acl(pSapCtx->denyMacList, pSapCtx->nDenyMac);
-	pSapCtx->nDenyMac = 0;
+	sap_print_acl(sap_ctx->denyMacList, sap_ctx->nDenyMac);
+	sap_ctx->nDenyMac = 0;
 
-	for (i = 0; i < (pSapCtx->nAcceptMac - 1); i++) {
-		qdf_mem_zero((pSapCtx->acceptMacList + i)->bytes,
+	for (i = 0; i < (sap_ctx->nAcceptMac - 1); i++) {
+		qdf_mem_zero((sap_ctx->acceptMacList + i)->bytes,
 			     QDF_MAC_ADDR_SIZE);
 	}
 
-	sap_print_acl(pSapCtx->acceptMacList, pSapCtx->nAcceptMac);
-	pSapCtx->nAcceptMac = 0;
+	sap_print_acl(sap_ctx->acceptMacList, sap_ctx->nAcceptMac);
+	sap_ctx->nAcceptMac = 0;
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -1139,28 +1139,28 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_disassoc_sta(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_disassoc_sta(struct sap_context *sap_ctx,
 				struct tagCsrDelStaParams *p_del_sta_params)
 {
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
 	sme_roam_disconnect_sta(CDS_GET_HAL_CB(),
-				pSapCtx->sessionId, p_del_sta_params);
+				sap_ctx->sessionId, p_del_sta_params);
 
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_deauth_sta(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_deauth_sta(struct sap_context *sap_ctx,
 			      struct tagCsrDelStaParams *pDelStaParams)
 {
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 	QDF_STATUS qdf_status = QDF_STATUS_E_FAULT;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer", __func__);
 		return qdf_status;
@@ -1168,7 +1168,7 @@ QDF_STATUS wlansap_deauth_sta(struct sap_context *pSapCtx,
 
 	qdf_ret_status =
 		sme_roam_deauth_sta(CDS_GET_HAL_CB(),
-				    pSapCtx->sessionId, pDelStaParams);
+				    sap_ctx->sessionId, pDelStaParams);
 
 	if (qdf_ret_status == QDF_STATUS_SUCCESS) {
 		qdf_status = QDF_STATUS_SUCCESS;
@@ -1425,7 +1425,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_set_key_sta(struct sap_context *sap_ctx,
 			       tCsrRoamSetKey *pSetKeyInfo)
 {
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
@@ -1433,7 +1433,7 @@ QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx,
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 	uint32_t roamId = 0xFF;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer",
 			  __func__);
@@ -1447,7 +1447,7 @@ QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx,
 		return QDF_STATUS_E_FAULT;
 	}
 	qdf_ret_status =
-		sme_roam_set_key(hHal, pSapCtx->sessionId, pSetKeyInfo,
+		sme_roam_set_key(hHal, sap_ctx->sessionId, pSetKeyInfo,
 				 &roamId);
 
 	if (qdf_ret_status == QDF_STATUS_SUCCESS)
@@ -1489,14 +1489,14 @@ QDF_STATUS wlan_sap_getstation_ie_information(struct sap_context *sap_ctx,
 	return qdf_status;
 }
 
-QDF_STATUS wlansap_send_action(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_send_action(struct sap_context *sap_ctx,
 			       const uint8_t *pBuf, uint32_t len,
 			       uint16_t wait, uint16_t channel_freq)
 {
 	void *hHal = NULL;
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer",
 			  __func__);
@@ -1510,7 +1510,7 @@ QDF_STATUS wlansap_send_action(struct sap_context *pSapCtx,
 	}
 
 	qdf_ret_status =
-		sme_send_action(hHal, pSapCtx->sessionId, pBuf, len, 0,
+		sme_send_action(hHal, sap_ctx->sessionId, pBuf, len, 0,
 		0, channel_freq);
 
 	if (QDF_STATUS_SUCCESS == qdf_ret_status) {
@@ -1523,7 +1523,7 @@ QDF_STATUS wlansap_send_action(struct sap_context *pSapCtx,
 	return QDF_STATUS_E_FAULT;
 }
 
-QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_remain_on_channel(struct sap_context *sap_ctx,
 				     uint8_t channel, uint32_t duration,
 				     remainOnChanCallback callback,
 				     void *pContext, uint32_t *scan_id)
@@ -1531,7 +1531,7 @@ QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx,
 	void *hHal = NULL;
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer",
 			  __func__);
@@ -1544,7 +1544,7 @@ QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx,
 		return QDF_STATUS_E_FAULT;
 	}
 
-	qdf_ret_status = sme_remain_on_channel(hHal, pSapCtx->sessionId,
+	qdf_ret_status = sme_remain_on_channel(hHal, sap_ctx->sessionId,
 				channel, duration, callback, pContext,
 				true, scan_id);
 
@@ -1558,13 +1558,13 @@ QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx,
 	return QDF_STATUS_E_FAULT;
 }
 
-QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *sap_ctx,
 					    uint32_t scan_id)
 {
 	void *hHal = NULL;
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer",
 			  __func__);
@@ -1578,7 +1578,7 @@ QDF_STATUS wlansap_cancel_remain_on_channel(struct sap_context *pSapCtx,
 	}
 
 	qdf_ret_status =
-		sme_cancel_remain_on_channel(hHal, pSapCtx->sessionId,
+		sme_cancel_remain_on_channel(hHal, sap_ctx->sessionId,
 		scan_id);
 
 	if (QDF_STATUS_SUCCESS == qdf_ret_status) {
@@ -1723,7 +1723,7 @@ QDF_STATUS wlan_sap_get_pre_cac_vdev_id(tHalHandle handle, uint8_t *vdev_id)
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *sap_ctx,
 				       uint16_t frameType,
 				       uint8_t *matchData,
 				       uint16_t matchLen)
@@ -1731,7 +1731,7 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
 	void *hHal = NULL;
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer from pCtx",
 			  __func__);
@@ -1744,7 +1744,7 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
 		return QDF_STATUS_E_FAULT;
 	}
 
-	qdf_ret_status = sme_register_mgmt_frame(hHal, pSapCtx->sessionId,
+	qdf_ret_status = sme_register_mgmt_frame(hHal, sap_ctx->sessionId,
 						 frameType, matchData,
 						 matchLen);
 
@@ -1758,7 +1758,7 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx,
 	return QDF_STATUS_E_FAULT;
 }
 
-QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx,
+QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *sap_ctx,
 					  uint16_t frameType,
 					  uint8_t *matchData,
 					  uint16_t matchLen)
@@ -1766,7 +1766,7 @@ QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx,
 	void *hHal = NULL;
 	QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	if (NULL == pSapCtx) {
+	if (NULL == sap_ctx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer from pCtx",
 			  __func__);
@@ -1780,7 +1780,7 @@ QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx,
 	}
 
 	qdf_ret_status =
-		sme_deregister_mgmt_frame(hHal, pSapCtx->sessionId, frameType,
+		sme_deregister_mgmt_frame(hHal, sap_ctx->sessionId, frameType,
 					  matchData, matchLen);
 
 	if (QDF_STATUS_SUCCESS == qdf_ret_status) {