ソースを参照

qcacld-3.0: Remove the old SAP/CSR flow

Remove the old SAP-CSR flow for start bss, stop bss and
channel change req processing which is disabled currently
under the SAP_CP_CLEANUP macro.

Cleanup the redundant checks in the deauth, disassoc
response processing in CSR.

Change-Id: I5a360fc267688b51ca645551108b65646a3c8c1a
CRs-Fixed: 3164259
Surya Prakash Sivaraj 3 年 前
コミット
edc56c445f

+ 0 - 3
Kbuild

@@ -3639,9 +3639,6 @@ cppflags-$(CONFIG_CRYPTO_COMPONENT) += -DWLAN_CONV_CRYPTO_SUPPORTED \
 cppflags-$(CONFIG_FEATURE_WLAN_FT_IEEE8021X) += -DFEATURE_WLAN_FT_IEEE8021X
 cppflags-$(CONFIG_FEATURE_WLAN_FT_PSK) += -DFEATURE_WLAN_FT_PSK
 
-#Enable SAP cleanup flow
-cppflags-y += -DSAP_CP_CLEANUP
-
 #Enable host 11d scan
 cppflags-$(CONFIG_HOST_11D_SCAN) += -DHOST_11D_SCAN
 

+ 1 - 2
core/hdd/inc/wlan_hdd_assoc.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -269,7 +270,6 @@ bool hdd_is_any_sta_connected(struct hdd_context *hdd_ctx);
  * hdd_sme_roam_callback() - hdd sme roam callback
  * @context: pointer to adapter context
  * @roam_info: pointer to roam info
- * @roam_id: roam id
  * @roam_status: roam status
  * @roam_result: roam result
  *
@@ -277,7 +277,6 @@ bool hdd_is_any_sta_connected(struct hdd_context *hdd_ctx);
  */
 QDF_STATUS hdd_sme_roam_callback(void *context,
 				 struct csr_roam_info *roam_info,
-				 uint32_t roam_id,
 				 eRoamCmdStatus roam_status,
 				 eCsrRoamResult roam_result);
 

+ 0 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -4840,7 +4840,6 @@ bool hdd_adapter_is_ap(struct hdd_adapter *adapter);
 QDF_STATUS hdd_common_roam_callback(struct wlan_objmgr_psoc *psoc,
 				    uint8_t session_id,
 				    struct csr_roam_info *roam_info,
-				    uint32_t roam_id,
 				    eRoamCmdStatus roam_status,
 				    eCsrRoamResult roam_result);
 

+ 5 - 18
core/hdd/src/wlan_hdd_assoc.c

@@ -1403,7 +1403,6 @@ static void hdd_change_peer_state_after_set_key(struct hdd_adapter *adapter,
  * hdd_roam_set_key_complete_handler() - Update the security parameters
  * @adapter: pointer to adapter
  * @roam_info: pointer to roam info
- * @roam_id: roam id
  * @roam_status: roam status
  * @roam_result: roam result
  *
@@ -1412,7 +1411,6 @@ static void hdd_change_peer_state_after_set_key(struct hdd_adapter *adapter,
 static QDF_STATUS
 hdd_roam_set_key_complete_handler(struct hdd_adapter *adapter,
 				  struct csr_roam_info *roam_info,
-				  uint32_t roam_id,
 				  eRoamCmdStatus roam_status,
 				  eCsrRoamResult roam_result)
 {
@@ -2107,19 +2105,8 @@ void wlan_hdd_ft_set_key_delay(struct wlan_objmgr_vdev *vdev)
 }
 #endif
 
-/**
- * hdd_sme_roam_callback() - hdd sme roam callback
- * @context: pointer to adapter context
- * @roam_info: pointer to roam info
- * @roam_id: roam id
- * @roam_status: roam status
- * @roam_result: roam result
- *
- * Return: QDF_STATUS enumeration
- */
 QDF_STATUS
 hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
-		      uint32_t roam_id,
 		      eRoamCmdStatus roam_status, eCsrRoamResult roam_result)
 {
 	QDF_STATUS qdf_ret_status = QDF_STATUS_SUCCESS;
@@ -2127,9 +2114,9 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
 	struct hdd_station_ctx *sta_ctx = NULL;
 	struct hdd_context *hdd_ctx;
 
-	hdd_debug("CSR Callback: status=%s (%d) result= %s (%d) roamID=%d",
+	hdd_debug("CSR Callback: status=%s (%d) result= %s (%d)",
 		  get_e_roam_cmd_status_str(roam_status), roam_status,
-		  get_e_csr_roam_result_str(roam_result), roam_result, roam_id);
+		  get_e_csr_roam_result_str(roam_result), roam_result);
 
 	/* Sanity check */
 	if ((!adapter) || (WLAN_HDD_ADAPTER_MAGIC != adapter->magic)) {
@@ -2152,7 +2139,7 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
 	{
 		qdf_ret_status =
 			hdd_roam_set_key_complete_handler(adapter, roam_info,
-							  roam_id, roam_status,
+							  roam_status,
 							  roam_result);
 		if (eCSR_ROAM_RESULT_AUTHENTICATED == roam_result)
 			hdd_debug("set key complete, session: %d",
@@ -2190,8 +2177,8 @@ hdd_sme_roam_callback(void *context, struct csr_roam_info *roam_info,
 		break;
 
 	case eCSR_ROAM_NDP_STATUS_UPDATE:
-		hdd_ndp_event_handler(adapter, roam_info, roam_id, roam_status,
-			roam_result);
+		hdd_ndp_event_handler(adapter, roam_info, roam_status,
+				      roam_result);
 		break;
 	case eCSR_ROAM_SAE_COMPUTE:
 		if (roam_info)

+ 3 - 25
core/hdd/src/wlan_hdd_cfg80211.c

@@ -22475,12 +22475,7 @@ static int __wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 	QDF_STATUS status;
 	mac_handle_t mac_handle;
 	struct qdf_mac_addr bssid;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	struct csr_roam_profile roam_profile;
-#else
 	struct channel_change_req *req;
-#endif
 	struct ch_params ch_params = {0};
 	int ret;
 	enum channel_state chan_freq_state;
@@ -22534,13 +22529,7 @@ static int __wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 	}
 	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	ch_info = &sta_ctx->ch_info;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	roam_profile.ChannelInfo.freq_list = &ch_info->freq;
-	roam_profile.ChannelInfo.numOfChannels = 1;
-	roam_profile.phyMode = ch_info->phy_mode;
-	roam_profile.ch_params.ch_width = ch_width;
-#endif
+
 	if (WLAN_REG_IS_24GHZ_CH_FREQ(chandef->chan->center_freq) &&
 	    chandef->width == NL80211_CHAN_WIDTH_40 &&
 	    chandef->center_freq1) {
@@ -22551,11 +22540,6 @@ static int __wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 	}
 	hdd_debug("set mon ch:width=%d, freq %d sec_ch_2g_freq=%d",
 		  chandef->width, chandef->chan->center_freq, sec_ch_2g_freq);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	hdd_select_cbmode(adapter, chandef->chan->center_freq, sec_ch_2g_freq,
-			  &roam_profile.ch_params);
-#endif
 	qdf_mem_copy(bssid.bytes, adapter->mac_addr.bytes,
 		     QDF_MAC_ADDR_SIZE);
 
@@ -22581,13 +22565,7 @@ static int __wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 		return qdf_status_to_os_return(status);
 	}
 	adapter->monitor_mode_vdev_up_in_progress = true;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	status = sme_roam_channel_change_req(mac_handle, bssid,
-					     adapter->vdev_id,
-					     &roam_profile.ch_params,
-					     &roam_profile);
-#else
+
 	qdf_mem_zero(&ch_params, sizeof(struct ch_params));
 
 	req = qdf_mem_malloc(sizeof(struct channel_change_req));
@@ -22609,7 +22587,7 @@ static int __wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy,
 	sme_fill_channel_change_request(mac_handle, req, ch_info->phy_mode);
 	status = sme_send_channel_change_req(mac_handle, req);
 	qdf_mem_free(req);
-#endif
+
 	if (status) {
 		hdd_err_rl("Failed to set sme_RoamChannel for monitor mode status: %d",
 			   status);

+ 4 - 26
core/hdd/src/wlan_hdd_main.c

@@ -432,9 +432,8 @@ bool hdd_adapter_is_ap(struct hdd_adapter *adapter)
 }
 
 QDF_STATUS hdd_common_roam_callback(struct wlan_objmgr_psoc *psoc,
-				     uint8_t session_id,
+				    uint8_t session_id,
 				    struct csr_roam_info *roam_info,
-				    uint32_t roam_id,
 				    eRoamCmdStatus roam_status,
 				    eCsrRoamResult roam_result)
 {
@@ -455,13 +454,13 @@ QDF_STATUS hdd_common_roam_callback(struct wlan_objmgr_psoc *psoc,
 	case QDF_NDI_MODE:
 	case QDF_P2P_CLIENT_MODE:
 	case QDF_P2P_DEVICE_MODE:
-		status = hdd_sme_roam_callback(adapter, roam_info, roam_id,
+		status = hdd_sme_roam_callback(adapter, roam_info,
 					       roam_status, roam_result);
 		break;
 	case QDF_SAP_MODE:
 	case QDF_P2P_GO_MODE:
 		status = wlansap_roam_callback(adapter->session.ap.sap_context,
-					       roam_info, roam_id, roam_status,
+					       roam_info, roam_status,
 					       roam_result);
 		break;
 	default:
@@ -8743,12 +8742,7 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, qdf_freq_t freq,
 	struct hdd_mon_set_ch_info *ch_info = &sta_ctx->ch_info;
 	QDF_STATUS status;
 	struct qdf_mac_addr bssid;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	struct csr_roam_profile roam_profile;
-#else
 	struct channel_change_req *req;
-#endif
 	struct ch_params ch_params;
 	enum phy_ch_width max_fw_bw;
 	enum phy_ch_width ch_width;
@@ -8791,15 +8785,6 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, qdf_freq_t freq,
 	}
 
 	hdd_debug("Set monitor mode frequency %d", freq);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	qdf_mem_zero(&roam_profile, sizeof(roam_profile));
-	roam_profile.ChannelInfo.freq_list = &ch_info->freq;
-	roam_profile.ChannelInfo.numOfChannels = 1;
-	roam_profile.phyMode = ch_info->phy_mode;
-	roam_profile.ch_params.ch_width = bandwidth;
-	hdd_select_cbmode(adapter, freq, 0, &roam_profile.ch_params);
-#endif
 	qdf_mem_copy(bssid.bytes, adapter->mac_addr.bytes,
 		     QDF_MAC_ADDR_SIZE);
 
@@ -8828,13 +8813,7 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, qdf_freq_t freq,
 		return qdf_status_to_os_return(status);
 	}
 	adapter->monitor_mode_vdev_up_in_progress = true;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	status = sme_roam_channel_change_req(hdd_ctx->mac_handle,
-					     bssid, adapter->vdev_id,
-					     &roam_profile.ch_params,
-					     &roam_profile);
-#else
+
 	qdf_mem_zero(&ch_params, sizeof(struct ch_params));
 
 	req = qdf_mem_malloc(sizeof(struct channel_change_req));
@@ -8855,7 +8834,6 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, qdf_freq_t freq,
 					ch_info->phy_mode);
 	status = sme_send_channel_change_req(hdd_ctx->mac_handle, req);
 	qdf_mem_free(req);
-#endif
 	if (status) {
 		hdd_err("Status: %d Failed to set sme_roam Channel for monitor mode",
 			status);

+ 4 - 64
core/hdd/src/wlan_hdd_nan_datapath.c

@@ -331,70 +331,16 @@ end:
 static int hdd_ndi_start_bss(struct hdd_adapter *adapter)
 {
 	QDF_STATUS status;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	uint32_t roam_id;
-	struct csr_roam_profile *roam_profile;
-	mac_handle_t mac_handle;
-#else
 	struct bss_dot11_config dot11_cfg = {0};
 	struct start_bss_config ndi_bss_cfg = {0};
 	tCsrChannelInfo ch_info;
 	mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter);
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-#endif
 	struct hdd_context *hdd_ctx;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	uint8_t wmm_mode = 0;
-	uint8_t value = 0;
-#endif
+
 	hdd_enter();
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	roam_profile = hdd_roam_profile(adapter);
-
-	status = ucfg_mlme_get_wmm_mode(hdd_ctx->psoc, &wmm_mode);
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		hdd_err("Get wmm_mode failed");
-		return -EINVAL;
-	}
 
-	if (HDD_WMM_USER_MODE_NO_QOS == wmm_mode) {
-		/* QoS not enabled in cfg file*/
-		roam_profile->uapsd_mask = 0;
-	} else {
-		/* QoS enabled, update uapsd mask from cfg file*/
-		status = ucfg_mlme_get_wmm_uapsd_mask(hdd_ctx->psoc, &value);
-		if (!QDF_IS_STATUS_SUCCESS(status)) {
-			hdd_err("Get uapsd_mask failed");
-			return -EINVAL;
-		}
-		roam_profile->uapsd_mask = value;
-	}
-
-	roam_profile->csrPersona = adapter->device_mode;
-
-	status = hdd_ndi_config_ch_list(hdd_ctx, &roam_profile->ChannelInfo);
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		hdd_err("Get uapsd_mask failed");
-		return -EINVAL;
-	}
-	roam_profile->SSIDs.numOfSSIDs = 1;
-	roam_profile->SSIDs.SSIDList->SSID.length = 0;
-
-	roam_profile->phyMode = eCSR_DOT11_MODE_AUTO;
-	roam_profile->BSSType = eCSR_BSS_TYPE_NDI;
-	roam_profile->BSSIDs.numOfBSSIDs = 1;
-	qdf_mem_copy((void *)(roam_profile->BSSIDs.bssid),
-		&adapter->mac_addr.bytes[0],
-		QDF_MAC_ADDR_SIZE);
-
-	mac_handle = hdd_adapter_get_mac_handle(adapter);
-	status = sme_bss_start(mac_handle, adapter->vdev_id,
-			       roam_profile, &roam_id);
-#else
 	status = hdd_ndi_config_ch_list(hdd_ctx, &ch_info);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		hdd_err("Unable to retrieve channel list for NAN");
@@ -431,7 +377,7 @@ static int hdd_ndi_start_bss(struct hdd_adapter *adapter)
 
 	status = sme_start_bss(mac_handle, adapter->vdev_id,
 			       &ndi_bss_cfg);
-#endif
+
 	if (QDF_IS_STATUS_ERROR(status)) {
 		hdd_err("NDI sme_RoamConnect session %d failed with status %d -> NotConnected",
 			adapter->vdev_id, status);
@@ -441,14 +387,8 @@ static int hdd_ndi_start_bss(struct hdd_adapter *adapter)
 	} else {
 		hdd_info("sme_RoamConnect issued successfully for NDI");
 	}
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	qdf_mem_free(roam_profile->ChannelInfo.freq_list);
-	roam_profile->ChannelInfo.freq_list = NULL;
-	roam_profile->ChannelInfo.numOfChannels = 0;
-#else
+
 	qdf_mem_free(ch_info.freq_list);
-#endif
 	hdd_exit();
 
 	return 0;
@@ -535,7 +475,7 @@ static int hdd_get_random_nan_mac_addr(struct hdd_context *hdd_ctx,
 
 void hdd_ndp_event_handler(struct hdd_adapter *adapter,
 			   struct csr_roam_info *roam_info,
-			   uint32_t roam_id, eRoamCmdStatus roam_status,
+			   eRoamCmdStatus roam_status,
 			   eCsrRoamResult roam_result)
 {
 	bool success;

+ 2 - 2
core/hdd/src/wlan_hdd_nan_datapath.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -50,7 +51,7 @@ void hdd_nan_datapath_target_config(struct hdd_context *hdd_ctx,
 						struct wma_tgt_cfg *cfg);
 void hdd_ndp_event_handler(struct hdd_adapter *adapter,
 			   struct csr_roam_info *roam_info,
-			   uint32_t roam_id, eRoamCmdStatus roam_status,
+			   eRoamCmdStatus roam_status,
 			   eCsrRoamResult roam_result);
 int wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
 	struct wireless_dev *wdev, const void *data, int data_len);
@@ -92,7 +93,6 @@ static inline void hdd_nan_datapath_target_config(struct hdd_context *hdd_ctx,
 }
 static inline void hdd_ndp_event_handler(struct hdd_adapter *adapter,
 					 struct csr_roam_info *roam_info,
-					 uint32_t roam_id,
 					 eRoamCmdStatus roam_status,
 					 eCsrRoamResult roam_result)
 {

+ 0 - 82
core/mac/inc/sir_api.h

@@ -687,52 +687,6 @@ struct add_ie_params {
 	uint8_t *probeRespBCNData_buff;
 };
 
-#ifndef SAP_CP_CLEANUP
-/* / Definition for kick starting BSS */
-/* / ---> MAC */
-/**
- * Usage of ssId, numSSID & ssIdList:
- * ---------------------------------
- * 1. ssId.length of zero indicates that Broadcast/Suppress SSID
- *    feature is enabled.
- * 2. If ssId.length is zero, MAC SW will advertise NULL SSID
- *    and interpret the SSID list from numSSID & ssIdList.
- * 3. If ssId.length is non-zero, MAC SW will advertise the SSID
- *    specified in the ssId field and it is expected that
- *    application will set numSSID to one (only one SSID present
- *    in the list) and SSID in the list is same as ssId field.
- * 4. Application will always set numSSID >= 1.
- */
-/* ***** NOTE: Please make sure all codes are updated if inserting field into
- * this structure..********** */
-struct start_bss_req {
-	uint16_t messageType;   /* eWNI_SME_START_BSS_REQ */
-	uint16_t length;
-	uint8_t vdev_id;
-	uint16_t beaconInterval;
-	uint8_t dot11mode;
-	tSirMacSSid ssId;
-	uint32_t oper_ch_freq;
-	uint8_t vht_channel_width;
-	uint8_t center_freq_seg0;
-	uint8_t center_freq_seg1;
-	uint8_t sec_ch_offset;
-	uint8_t privacy;
-	uint8_t ssidHidden;
-	tAniAuthType authType;
-	uint32_t dtimPeriod;
-	uint8_t wps_state;
-	tSirRSNie rsnIE;        /* RSN IE to be sent in */
-	tSirNwType nwType;      /* Indicates 11a/b/g */
-	tSirMacRateSet operationalRateSet;      /* Has 11a or 11b rates */
-	tSirMacRateSet extendedRateSet; /* Has 11g rates */
-	struct add_ie_params add_ie_params;
-	uint16_t beacon_tx_rate;
-	uint32_t cac_duration_ms;
-	uint32_t dfs_regdomain;
-
-};
-#endif
 #define GET_IE_LEN_IN_BSS(lenInBss) (lenInBss + sizeof(lenInBss) - \
 			    ((uintptr_t)OFFSET_OF(struct bss_description,\
 						  ieFields)))
@@ -804,10 +758,6 @@ struct bss_description {
 /* / issued start BSS request */
 /* / MAC ---> */
 struct start_bss_rsp {
-#ifndef SAP_CP_CLEANUP
-	uint16_t messageType;   /* eWNI_SME_START_BSS_RSP */
-	uint16_t length;
-#endif
 	uint8_t vdev_id;
 	tSirResultCodes status_code;
 	uint32_t staId;         /* Station ID for Self */
@@ -1222,16 +1172,6 @@ struct deauth_cnf {
 	struct qdf_mac_addr peer_macaddr;
 };
 
-#ifndef SAP_CP_CLEANUP
-/* / Definition for stop BSS request message */
-struct stop_bss_req {
-	uint16_t messageType;   /* eWNI_SME_STOP_BSS_REQ */
-	uint16_t length;
-	uint8_t sessionId;      /* Session ID */
-	tSirResultCodes reasonCode;
-	struct qdf_mac_addr bssid;      /* Self BSSID */
-};
-#else
 struct stop_bss_req {
 	uint8_t vdev_id;
 	uint32_t cmd_id;
@@ -1241,7 +1181,6 @@ struct stop_bss_rsp {
 	uint8_t vdev_id;
 	tSirResultCodes status_code;
 };
-#endif
 
 /* / Definition for Channel Switch indication for station */
 /* / MAC ---> */
@@ -2261,25 +2200,6 @@ typedef struct sSirSmeDfsChannelList {
 	uint8_t channels[SIR_DFS_MAX_20M_SUB_CH];
 } tSirSmeDfsChannelList, *tpSirSmeDfsChannelList;
 
-#ifndef SAP_CP_CLEANUP
-typedef struct sSirChanChangeRequest {
-	uint16_t messageType;
-	uint16_t messageLen;
-	uint32_t target_chan_freq;
-	uint8_t sec_ch_offset;
-	enum phy_ch_width ch_width;
-	uint8_t center_freq_seg_0;
-	uint8_t center_freq_seg_1;
-	uint8_t bssid[QDF_MAC_ADDR_SIZE];
-	uint32_t dot11mode;
-	tSirNwType nw_type;
-	tSirMacRateSet operational_rateset;
-	tSirMacRateSet extended_rateset;
-	uint32_t cac_duration_ms;
-	uint32_t dfs_regdomain;
-} tSirChanChangeRequest, *tpSirChanChangeRequest;
-#endif
-
 typedef struct sSirChanChangeResponse {
 	uint8_t sessionId;
 	uint32_t new_op_freq;
@@ -5251,7 +5171,6 @@ struct sir_update_session_txq_edca_param {
 	tSirMacEdcaParamRecord txq_edca_params;
 };
 
-#ifdef SAP_CP_CLEANUP
 /* struct channel_change_req - Change channel
  * request for SAP
  * @vdev_id: vdev id
@@ -5335,6 +5254,5 @@ struct start_bss_config {
 	uint32_t cac_duration_ms;
 	uint32_t dfs_regdomain;
 };
-#endif
 
 #endif /* __SIR_API_H */

+ 0 - 4
core/mac/src/pe/include/lim_session.h

@@ -230,11 +230,7 @@ struct pe_session {
 	tLimSystemRole limSystemRole;
 	enum bss_type bssType;
 	tSirNwType nwType;
-#ifndef SAP_CP_CLEANUP
-	struct start_bss_req *pLimStartBssReq; /* handle to start bss req */
-#else
 	struct start_bss_config *pLimStartBssReq;
-#endif
 	struct join_req *lim_join_req;    /* handle to sme join req */
 	struct join_req *pLimReAssocReq; /* handle to sme reassoc req */
 	tpLimMlmJoinReq pLimMlmJoinReq; /* handle to MLM join Req */

+ 0 - 14
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -207,17 +207,9 @@ void lim_process_mlm_start_cnf(struct mac_context *mac, uint32_t *msg_buf)
 		pe_session = NULL;
 		pe_err("Start BSS Failed");
 	}
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	/* Send response to Host */
-	lim_send_sme_start_bss_rsp(mac, eWNI_SME_START_BSS_RSP,
-				((tLimMlmStartCnf *)msg_buf)->resultCode,
-				pe_session, smesessionId);
-#else
 	lim_send_sme_start_bss_rsp(mac,
 				   ((tLimMlmStartCnf *)msg_buf)->resultCode,
 				   pe_session, smesessionId);
-#endif
 	if (pe_session &&
 	    (((tLimMlmStartCnf *)msg_buf)->resultCode == eSIR_SME_SUCCESS)) {
 		lim_ndi_mlme_vdev_up_transition(pe_session);
@@ -1682,13 +1674,7 @@ void lim_process_ap_mlm_del_bss_rsp(struct mac_context *mac,
 	/* Initialize number of associated stations during cleanup */
 	pe_session->gLimNumOfCurrentSTAs = 0;
 end:
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	lim_send_sme_rsp(mac, eWNI_SME_STOP_BSS_RSP, rc,
-			 pe_session->smeSessionId);
-#else
 	lim_send_stop_bss_response(mac, pe_session->vdev_id, rc);
-#endif
 	pe_delete_session(mac, pe_session);
 }
 

+ 0 - 100
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -445,17 +445,10 @@ static bool __lim_process_sme_sys_ready_ind(struct mac_context *mac,
  *
  * Return: None.
  */
-#ifndef SAP_CP_CLEANUP
-static void
-lim_configure_ap_start_bss_session(struct mac_context *mac_ctx,
-				   struct pe_session *session,
-				   struct start_bss_req *sme_start_bss_req)
-#else
 static void
 lim_configure_ap_start_bss_session(struct mac_context *mac_ctx,
 				   struct pe_session *session,
 				   struct start_bss_config *sme_start_bss_req)
-#endif
 {
 	bool sap_uapsd;
 	uint16_t ht_cap = cfg_default(CFG_AP_PROTECTION_MODE);
@@ -766,12 +759,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
 	uint32_t val = 0;
 	tSirMacChanNum channel_number;
 	tLimMlmStartReq *mlm_start_req = NULL;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	struct start_bss_req *sme_start_bss_req = NULL;
-#else
 	struct start_bss_config *sme_start_bss_req = NULL;
-#endif
 	tSirResultCodes ret_code = eSIR_SME_SUCCESS;
 	uint8_t session_id;
 	struct pe_session *session = NULL;
@@ -1199,13 +1187,7 @@ free:
 		pe_delete_session(mac_ctx, session);
 		session = NULL;
 	}
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	lim_send_sme_start_bss_rsp(mac_ctx, eWNI_SME_START_BSS_RSP, ret_code,
-				   session, vdev_id);
-#else
 	 lim_send_sme_start_bss_rsp(mac_ctx, ret_code, session, vdev_id);
-#endif
 }
 
 /**
@@ -5968,14 +5950,8 @@ void lim_send_stop_bss_failure_resp(struct mac_context *mac_ctx,
 
 	MTRACE(mac_trace(mac_ctx, TRACE_CODE_SME_STATE, session->peSessionId,
 			  session->limSmeState));
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	lim_send_sme_rsp(mac_ctx, eWNI_SME_STOP_BSS_RSP,
-			 eSIR_SME_STOP_BSS_FAILURE, session->smeSessionId);
-#else
 	lim_send_stop_bss_response(mac_ctx, session->vdev_id,
 				   eSIR_SME_STOP_BSS_FAILURE);
-#endif
 }
 
 static void lim_flush_all_peer_from_serialization_queue(
@@ -6148,28 +6124,11 @@ __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *msg_buf)
 	struct stop_bss_req stop_bss_req;
 	tLimSmeStates prevState;
 	struct pe_session *pe_session;
-/* To be removed after SAP CSR cleanup changes */
-#ifdef SAP_CP_CLEANUP
 	struct qdf_mac_addr bssid;
-#endif
 	uint8_t vdev_id;
 	uint8_t session_id;
 
 	qdf_mem_copy(&stop_bss_req, msg_buf, sizeof(stop_bss_req));
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	vdev_id = stop_bss_req.sessionId;
-
-	pe_session = pe_find_session_by_bssid(mac,
-				stop_bss_req.bssid.bytes,
-				&session_id);
-	if (!pe_session) {
-		pe_err("session does not exist for given BSSID");
-		lim_send_sme_rsp(mac, eWNI_SME_STOP_BSS_RSP,
-				eSIR_SME_INVALID_PARAMETERS, vdev_id);
-		return;
-	}
-#else
 	vdev_id = stop_bss_req.vdev_id;
 	wlan_mlme_get_mac_vdev_id(mac->pdev, vdev_id, &bssid);
 
@@ -6182,7 +6141,6 @@ __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *msg_buf)
 					   eSIR_SME_INVALID_PARAMETERS);
 		return;
 	}
-#endif
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_diag_event_report(mac, WLAN_PE_DIAG_STOP_BSS_REQ_EVENT, pe_session,
@@ -6201,15 +6159,8 @@ __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *msg_buf)
 			GET_LIM_SYSTEM_ROLE(pe_session));
 		lim_print_sme_state(mac, LOGE, pe_session->limSmeState);
 		/* / Send Stop BSS response to host */
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-		lim_send_sme_rsp(mac, eWNI_SME_STOP_BSS_RSP,
-				 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE,
-				 vdev_id);
-#else
 		lim_send_stop_bss_response(mac, vdev_id,
 					   eSIR_SME_UNEXPECTED_REQ_RESULT_CODE);
-#endif
 		return;
 	}
 
@@ -6273,14 +6224,8 @@ void lim_process_sme_del_bss_rsp(struct mac_context *mac,
 	SET_LIM_PROCESS_DEFD_MESGS(mac, true);
 	dph_hash_table_init(mac, &pe_session->dph.dphHashTable);
 	lim_delete_pre_auth_list(mac);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	lim_send_sme_rsp(mac, eWNI_SME_STOP_BSS_RSP, eSIR_SME_SUCCESS,
-			 pe_session->smeSessionId);
-#else
 	lim_send_stop_bss_response(mac, pe_session->vdev_id,
 				   eSIR_SME_SUCCESS);
-#endif
 	return;
 }
 
@@ -8194,13 +8139,8 @@ static void lim_change_channel(
 static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 		uint32_t *msg_buf)
 {
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	tpSirChanChangeRequest ch_change_req;
-#else
 	struct channel_change_req *ch_change_req;
 	struct qdf_mac_addr bssid;
-#endif
 	struct pe_session *session_entry;
 	uint8_t session_id;      /* PE session_id */
 	int8_t max_tx_pwr;
@@ -8211,32 +8151,11 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 		pe_err("msg_buf is NULL");
 		return;
 	}
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	ch_change_req = (tpSirChanChangeRequest)msg_buf;
-#else
 	ch_change_req = (struct channel_change_req *)msg_buf;
-#endif
 	target_freq = ch_change_req->target_chan_freq;
 
 	max_tx_pwr = wlan_reg_get_channel_reg_power_for_freq(
 				mac_ctx->pdev, target_freq);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	if ((ch_change_req->messageType != eWNI_SME_CHANNEL_CHANGE_REQ) ||
-			(max_tx_pwr == WMA_MAX_TXPOWER_INVALID)) {
-		pe_err("Invalid Request/max_tx_pwr");
-		return;
-	}
-	session_entry = pe_find_session_by_bssid(mac_ctx,
-			ch_change_req->bssid, &session_id);
-
-	if (!session_entry) {
-		lim_print_mac_addr(mac_ctx, ch_change_req->bssid, LOGE);
-		pe_err("Session does not exist for given bssId");
-		return;
-	}
-#else
 	if (max_tx_pwr == WMA_MAX_TXPOWER_INVALID) {
 		pe_err("Invalid max tx power");
 		return;
@@ -8250,7 +8169,6 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 		       QDF_MAC_ADDR_REF(bssid.bytes));
 		return;
 	}
-#endif
 
 	if (session_entry->curr_op_freq == target_freq &&
 	    session_entry->ch_width == ch_change_req->ch_width) {
@@ -8334,18 +8252,10 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 
 	/* Store the New Channel Params in session_entry */
 	session_entry->ch_width = ch_change_req->ch_width;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	session_entry->ch_center_freq_seg0 =
-		ch_change_req->center_freq_seg_0;
-	session_entry->ch_center_freq_seg1 =
-		ch_change_req->center_freq_seg_1;
-#else
 	session_entry->ch_center_freq_seg0 =
 			 ch_change_req->center_freq_seg0;
 	session_entry->ch_center_freq_seg1 =
 			ch_change_req->center_freq_seg1;
-#endif
 	session_entry->htSecondaryChannelOffset = ch_change_req->sec_ch_offset;
 	session_entry->htSupportedChannelWidthSet =
 		(ch_change_req->ch_width ? 1 : 0);
@@ -8374,22 +8284,12 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 
 	session_entry->dot11mode = ch_change_req->dot11mode;
 	session_entry->nwType = ch_change_req->nw_type;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	qdf_mem_copy(&session_entry->rateSet,
-			&ch_change_req->operational_rateset,
-			sizeof(session_entry->rateSet));
-	qdf_mem_copy(&session_entry->extRateSet,
-			&ch_change_req->extended_rateset,
-			sizeof(session_entry->extRateSet));
-#else
 	qdf_mem_copy(&session_entry->rateSet,
 		     &ch_change_req->opr_rates,
 		     sizeof(session_entry->rateSet));
 	qdf_mem_copy(&session_entry->extRateSet,
 		     &ch_change_req->ext_rates,
 		     sizeof(session_entry->extRateSet));
-#endif
 	lim_change_channel(mac_ctx, session_entry);
 }
 

+ 0 - 27
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -81,21 +81,9 @@ void lim_send_sme_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
 	msg.bodyval = 0;
 	MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG, vdev_id, msg.type));
 
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
-	switch (msg_type) {
-	case eWNI_SME_STOP_BSS_RSP:
-		lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_STOP_BSS_RSP_EVENT,
-				NULL, (uint16_t) result_code, 0);
-		break;
-	}
-#endif /* FEATURE_WLAN_DIAG_SUPPORT */
-#endif
 	lim_sys_process_mmh_msg_api(mac_ctx, &msg);
 }
 
-#ifdef SAP_CP_CLEANUP
 void
 lim_send_stop_bss_response(struct mac_context *mac_ctx, uint8_t vdev_id,
 			   tSirResultCodes result_code)
@@ -130,7 +118,6 @@ lim_send_stop_bss_response(struct mac_context *mac_ctx, uint8_t vdev_id,
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_sys_process_mmh_msg_api(mac_ctx, &msg);
 }
-#endif
 /**
  * lim_get_max_rate_flags() - Get rate flags
  * @mac_ctx: Pointer to global MAC structure
@@ -611,19 +598,10 @@ void lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx,
 	/* add reassoc resp API */
 }
 
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
 void lim_send_sme_start_bss_rsp(struct mac_context *mac,
-				uint16_t msgType,
 				tSirResultCodes resultCode,
 				struct pe_session *pe_session,
 				uint8_t smesessionId)
-#else
-void lim_send_sme_start_bss_rsp(struct mac_context *mac,
-				tSirResultCodes resultCode,
-				struct pe_session *pe_session,
-				uint8_t smesessionId)
-#endif
 {
 
 	struct scheduler_msg mmhMsg = {0};
@@ -635,11 +613,6 @@ void lim_send_sme_start_bss_rsp(struct mac_context *mac,
 	start_bss_rsp = qdf_mem_malloc(sizeof(*start_bss_rsp));
 	if (!start_bss_rsp)
 		return;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	start_bss_rsp->messageType = msgType;
-	start_bss_rsp->length = sizeof(*start_bss_rsp);
-#endif
 	start_bss_rsp->vdev_id = smesessionId;
 	start_bss_rsp->status_code = resultCode;
 

+ 0 - 11
core/mac/src/pe/lim/lim_send_sme_rsp_messages.h

@@ -59,7 +59,6 @@ void lim_send_sme_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
 /**
  * lim_send_sme_start_bss_rsp() - Send Start BSS response
  * @mac: Pointer to Global MAC structure
- * @msgType: Indicates message type
  * @resultCode: Indicates the result of previously issued request
  * @pe_session: PE session associated with the BSS
  * @smesessionId: ID of the SME session associated with the BSS
@@ -67,18 +66,10 @@ void lim_send_sme_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
  * This function is called to send eWNI_SME_START_BSS_RSP
  * message to applications above MAC Software.
  */
-#ifndef SAP_CP_CLEANUP
 void lim_send_sme_start_bss_rsp(struct mac_context *mac,
-				uint16_t msgType,
 				tSirResultCodes resultCode,
 				struct pe_session *pe_session,
 				uint8_t smesessionId);
-#else
-void lim_send_sme_start_bss_rsp(struct mac_context *mac,
-				tSirResultCodes resultCode,
-				struct pe_session *pe_session,
-				uint8_t smesessionId);
-#endif
 
 /**
  * lim_send_sme_join_reassoc_rsp() - Send Response to Upper Layers
@@ -289,7 +280,6 @@ void lim_handle_mlo_sta_csa_param(struct wlan_objmgr_vdev *vdev,
 				  struct csa_offload_params *csa_params);
 #endif /* WLAN_FEATURE_11BE_MLO */
 
-#ifdef SAP_CP_CLEANUP
 /** lim_send_stop_bss_response() - Send stop bss response to CSR
  *
  * @mac_ctx : Global mac ctx
@@ -300,5 +290,4 @@ void lim_handle_mlo_sta_csa_param(struct wlan_objmgr_vdev *vdev,
  */
 void lim_send_stop_bss_response(struct mac_context *mac_ctx, uint8_t vdev_id,
 				tSirResultCodes result_code);
-#endif
 #endif /* __LIM_SEND_SME_RSP_H */

+ 0 - 6
core/mac/src/pe/lim/lim_sme_req_utils.c

@@ -275,15 +275,9 @@ lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *mac_ctx,
 	return true;
 }
 
-#ifndef SAP_CP_CLEANUP
-bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
-				    struct start_bss_req *start_bss_req,
-				    enum bss_type bss_type)
-#else
 bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
 				    struct start_bss_config *start_bss_req,
 				    enum bss_type bss_type)
-#endif
 {
 	uint8_t i = 0;
 	tSirMacRateSet *opr_rates = &start_bss_req->operationalRateSet;

+ 1 - 6
core/mac/src/pe/lim/lim_sme_req_utils.h

@@ -39,6 +39,7 @@
  * lim_is_sme_start_bss_req_valid() - To validate sme start bss request
  * @mac_ctx: Pointer to Global MAC structure
  * @start_bss_req: Pointer to received SME_START_BSS_REQ message
+ * @bss_type: bss type
  *
  * This function is called by lim_process_sme_req_messages() upon
  * receiving SME_START_BSS_REQ message from application.
@@ -46,15 +47,9 @@
  * Return: true when received SME_START_BSS_REQ is formatted correctly false
  *         otherwise
  */
-#ifndef SAP_CP_CLEANUP
-bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
-				    struct start_bss_req *start_bss_req,
-				    enum bss_type bss_type);
-#else
 bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
 				    struct start_bss_config *start_bss_req,
 				    enum bss_type bss_type);
-#endif
 uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *,
 							    tpSirRSNie, struct pe_session *);
 

+ 0 - 6
core/mac/src/pe/nan/nan_datapath.c

@@ -403,15 +403,9 @@ void lim_ndi_del_bss_rsp(struct mac_context * mac_ctx,
 end:
 	/* Delete PE session once BSS is deleted */
 	if (session_entry) {
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-		lim_send_sme_rsp(mac_ctx, eWNI_SME_STOP_BSS_RSP,
-			rc, session_entry->smeSessionId);
-#else
 		lim_send_stop_bss_response(mac_ctx,
 					   session_entry->vdev_id,
 					   rc);
-#endif
 		pe_delete_session(mac_ctx, session_entry);
 		session_entry = NULL;
 	}

+ 0 - 1
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -78,7 +78,6 @@ uint8_t *mac_trace_getcsr_roam_sub_state(uint16_t csr_roam_sub_state)
 		CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_START_BSS_REQ);
 		CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DISASSOC_REQ);
 		CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_STOP_BSS_REQ);
-		CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_CONFIG);
 		CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_DEAUTH_REQ);
 		CASE_RETURN_STRING(eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY);
 	default:

+ 0 - 2
core/sap/inc/sap_api.h

@@ -693,7 +693,6 @@ struct sap_context;
  * wlansap_roam_callback() - API to get the events for SAP persona
  * @ctx: callback context registered with SME (sap context is registered)
  * @csr_roam_info: pointer to SME CSR roam info structure
- * @roam_id: roam id being used
  * @roam_status: status of the event reported by SME to SAP
  * @roam_result: result of the event reported by SME to SAP
  *
@@ -705,7 +704,6 @@ struct sap_context;
  */
 QDF_STATUS wlansap_roam_callback(void *ctx,
 				 struct csr_roam_info *csr_roam_info,
-				 uint32_t roam_id,
 				 eRoamCmdStatus roam_status,
 				 eCsrRoamResult roam_result);
 

+ 0 - 1
core/sap/src/sap_api_link_cntl.c

@@ -992,7 +992,6 @@ static bool sap_is_csa_restart_state(struct wlan_objmgr_psoc *psoc,
 
 QDF_STATUS wlansap_roam_callback(void *ctx,
 				 struct csr_roam_info *csr_roam_info,
-				 uint32_t roam_id,
 				 eRoamCmdStatus roam_status,
 				 eCsrRoamResult roam_result)
 {

+ 2 - 204
core/sap/src/sap_fsm.c

@@ -1460,10 +1460,7 @@ QDF_STATUS sap_clear_session_param(mac_handle_t mac_handle,
 	mac_ctx->sap.sapCtxList[sapctx->sessionId].sapPersona =
 		QDF_MAX_NO_OF_MODE;
 	sap_clear_global_dfs_param(mac_handle, sapctx);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_free_roam_profile(&sapctx->csr_roamProfile);
-#endif
+
 	sap_err("Set sapCtxList null for session %d", sapctx->sessionId);
 	qdf_mem_zero(sapctx, sizeof(*sapctx));
 	sapctx->sessionId = WLAN_UMAC_VDEV_ID_MAX;
@@ -1596,12 +1593,8 @@ static QDF_STATUS sap_goto_stopping(struct sap_context *sap_ctx)
 	}
 
 	sap_update_mcs_rate(sap_ctx, false);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_free_roam_profile(&sap_ctx->csr_roamProfile);
-#else
 	qdf_mem_zero(&sap_ctx->sap_bss_cfg, sizeof(sap_ctx->sap_bss_cfg));
-#endif
+
 	status = sme_roam_stop_bss(MAC_HANDLE(mac_ctx), sap_ctx->sessionId);
 	if (status != QDF_STATUS_SUCCESS) {
 		sap_err("Calling sme_roam_stop_bss status = %d", status);
@@ -2866,17 +2859,9 @@ static void sap_validate_chanmode_and_chwidth(struct mac_context *mac_ctx,
 	if (WLAN_REG_IS_5GHZ_CH_FREQ(sap_ctx->chan_freq) &&
 	    (sap_ctx->phyMode == eCSR_DOT11_MODE_11g ||
 	     sap_ctx->phyMode == eCSR_DOT11_MODE_11g_ONLY)) {
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-		sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11a;
-#endif
 		sap_ctx->phyMode = eCSR_DOT11_MODE_11a;
 	} else if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_ctx->chan_freq) &&
 		   (sap_ctx->phyMode == eCSR_DOT11_MODE_11a)) {
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-		sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11g;
-#endif
 		sap_ctx->phyMode = eCSR_DOT11_MODE_11g;
 	}
 
@@ -2925,13 +2910,10 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
 				    mac_handle_t mac_handle)
 {
 	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
-/* To be removed after SAP CSR cleanup changes */
-#ifdef SAP_CP_CLEANUP
 	struct bss_dot11_config dot11_cfg = {0};
 	tSirMacRateSet *opr_rates = &sap_ctx->sap_bss_cfg.operationalRateSet;
 	tSirMacRateSet *ext_rates = &sap_ctx->sap_bss_cfg.extendedRateSet;
 	uint8_t h2e;
-#endif
 
 	/*
 	 * check if channel is in DFS_NOL or if the channel
@@ -2980,25 +2962,6 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
 		  "SAP_INIT", "SAP_STARTING", sap_ctx->phyMode,
 		  sap_ctx->ch_params.ch_width);
 	/* Specify the channel */
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_ctx->csr_roamProfile.ChannelInfo.numOfChannels =
-					1;
-	sap_ctx->csr_roamProfile.ChannelInfo.freq_list =
-		&sap_ctx->csr_roamProfile.op_freq;
-	sap_ctx->csr_roamProfile.op_freq = sap_ctx->chan_freq;
-
-	sap_ctx->csr_roamProfile.ch_params = sap_ctx->ch_params;
-	sap_get_cac_dur_dfs_region(sap_ctx,
-				   &sap_ctx->csr_roamProfile.cac_duration_ms,
-				   &sap_ctx->csr_roamProfile.dfs_regdomain,
-				   sap_ctx->chan_freq,
-				   &sap_ctx->ch_params);
-	mlme_set_cac_required(sap_ctx->vdev,
-			      !!sap_ctx->csr_roamProfile.cac_duration_ms);
-	sap_ctx->csr_roamProfile.beacon_tx_rate =
-			sap_ctx->beacon_tx_rate;
-#else
 	sap_get_cac_dur_dfs_region(sap_ctx,
 				   &sap_ctx->sap_bss_cfg.cac_duration_ms,
 				   &sap_ctx->sap_bss_cfg.dfs_regdomain,
@@ -3066,7 +3029,6 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
 			sap_err("rates full, can not add H2E bss membership");
 		}
 	}
-#endif
 	sap_debug("notify hostapd about chan freq selection: %d",
 		  sap_ctx->chan_freq);
 	sap_signal_hdd_event(sap_ctx, NULL,
@@ -3080,15 +3042,8 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
 
 	sap_debug("session: %d", sap_ctx->sessionId);
 
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	qdf_status = sme_bss_start(mac_handle, sap_ctx->sessionId,
-				   &sap_ctx->csr_roamProfile,
-				   &sap_ctx->csr_roamId);
-#else
 	qdf_status = sme_start_bss(mac_handle, sap_ctx->sessionId,
 				   &sap_ctx->sap_bss_cfg);
-#endif
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status))
 		sap_err("Failed to issue sme_roam_connect");
 
@@ -3715,161 +3670,6 @@ QDF_STATUS sap_fsm(struct sap_context *sap_ctx, struct sap_sm_event *sap_event)
 	return qdf_status;
 }
 
-#ifndef SAP_CP_CLEANUP
-eSapStatus
-sapconvert_to_csr_profile(struct sap_config *config, eCsrRoamBssType bssType,
-			  struct csr_roam_profile *profile)
-{
-	int qdf_status = QDF_STATUS_SUCCESS;
-	bool chan_switch_hostapd_rate_enabled = true;
-	struct mac_context *mac_ctx;
-	uint8_t mcc_to_scc_switch = 0;
-
-	mac_ctx = sap_get_mac_context();
-	if (!mac_ctx) {
-		sap_err("Invalid MAC context");
-		return eSAP_STATUS_FAILURE;
-	}
-
-	/* Create Roam profile for SoftAP to connect */
-	profile->BSSType = eCSR_BSS_TYPE_INFRA_AP;
-	profile->SSIDs.numOfSSIDs = 1;
-	profile->csrPersona = config->persona;
-
-	qdf_mem_zero(profile->SSIDs.SSIDList[0].SSID.ssId,
-		     sizeof(profile->SSIDs.SSIDList[0].SSID.ssId));
-
-	/* Flag to not broadcast the SSID information */
-	profile->SSIDs.SSIDList[0].ssidHidden =
-		config->SSIDinfo.ssidHidden;
-
-	profile->SSIDs.SSIDList[0].SSID.length =
-		config->SSIDinfo.ssid.length;
-	qdf_mem_copy(&profile->SSIDs.SSIDList[0].SSID.ssId,
-		     config->SSIDinfo.ssid.ssId,
-		     sizeof(config->SSIDinfo.ssid.ssId));
-
-	profile->privacy = config->privacy;
-
-	if (config->authType == eSAP_SHARED_KEY) {
-		profile->csr80211AuthType = eSIR_SHARED_KEY;
-	} else if (config->authType == eSAP_OPEN_SYSTEM) {
-		profile->csr80211AuthType = eSIR_OPEN_SYSTEM;
-	} else {
-		profile->csr80211AuthType = eSIR_AUTO_SWITCH;
-	}
-
-	if (profile->pRSNReqIE) {
-		sap_debug("pRSNReqIE already allocated.");
-		qdf_mem_free(profile->pRSNReqIE);
-		profile->pRSNReqIE = NULL;
-	}
-
-	/* set the RSN/WPA IE */
-	profile->nRSNReqIELength = config->RSNWPAReqIELength;
-	if (config->RSNWPAReqIELength) {
-		profile->pRSNReqIE =
-			qdf_mem_malloc(config->RSNWPAReqIELength);
-		if (!profile->pRSNReqIE)
-			return eSAP_STATUS_FAILURE;
-
-		qdf_mem_copy(profile->pRSNReqIE, config->RSNWPAReqIE,
-			     config->RSNWPAReqIELength);
-		profile->nRSNReqIELength = config->RSNWPAReqIELength;
-	}
-
-	/* set the phyMode to accept anything */
-	/* Best means everything because it covers all the things we support */
-	/* eCSR_DOT11_MODE_BEST */
-	profile->phyMode = config->SapHw_mode;
-
-	/* Configure beaconInterval */
-	profile->beaconInterval = (uint16_t) config->beacon_int;
-
-	/* set DTIM period */
-	profile->dtimPeriod = config->dtim_period;
-
-	/* wps config info */
-	profile->wps_state = config->wps_state;
-
-	if (config->probeRespIEsBufferLen > 0 &&
-	    config->pProbeRespIEsBuffer) {
-		profile->add_ie_params.probeRespDataLen =
-			config->probeRespIEsBufferLen;
-		profile->add_ie_params.probeRespData_buff =
-			config->pProbeRespIEsBuffer;
-	} else {
-		profile->add_ie_params.probeRespDataLen = 0;
-		profile->add_ie_params.probeRespData_buff = NULL;
-	}
-	/*assoc resp IE */
-	if (config->assocRespIEsLen > 0 &&
-	    config->pAssocRespIEsBuffer) {
-		profile->add_ie_params.assocRespDataLen =
-			config->assocRespIEsLen;
-		profile->add_ie_params.assocRespData_buff =
-			config->pAssocRespIEsBuffer;
-	} else {
-		profile->add_ie_params.assocRespDataLen = 0;
-		profile->add_ie_params.assocRespData_buff = NULL;
-	}
-
-	if (config->probeRespBcnIEsLen > 0 &&
-	    config->pProbeRespBcnIEsBuffer) {
-		profile->add_ie_params.probeRespBCNDataLen =
-			config->probeRespBcnIEsLen;
-		profile->add_ie_params.probeRespBCNData_buff =
-			config->pProbeRespBcnIEsBuffer;
-	} else {
-		profile->add_ie_params.probeRespBCNDataLen = 0;
-		profile->add_ie_params.probeRespBCNData_buff = NULL;
-	}
-
-	if (config->supported_rates.numRates) {
-		qdf_mem_copy(profile->supported_rates.rate,
-				config->supported_rates.rate,
-				config->supported_rates.numRates);
-		profile->supported_rates.numRates =
-			config->supported_rates.numRates;
-	}
-
-	if (config->extended_rates.numRates) {
-		qdf_mem_copy(profile->extended_rates.rate,
-				config->extended_rates.rate,
-				config->extended_rates.numRates);
-		profile->extended_rates.numRates =
-			config->extended_rates.numRates;
-	}
-
-	profile->require_h2e = config->require_h2e;
-
-	qdf_status = ucfg_mlme_get_sap_chan_switch_rate_enabled(
-					mac_ctx->psoc,
-					&chan_switch_hostapd_rate_enabled);
-	if (!QDF_IS_STATUS_SUCCESS(qdf_status))
-		sap_err("ucfg_mlme_get_sap_chan_switch_rate_enabled, set def");
-
-	profile->chan_switch_hostapd_rate_enabled =
-					chan_switch_hostapd_rate_enabled;
-	if (QDF_STATUS_SUCCESS ==
-		ucfg_policy_mgr_get_mcc_scc_switch(mac_ctx->psoc,
-						   &mcc_to_scc_switch)) {
-		if (mcc_to_scc_switch != QDF_MCC_TO_SCC_SWITCH_DISABLE)
-			profile->chan_switch_hostapd_rate_enabled = false;
-	}
-
-	return eSAP_STATUS_SUCCESS;
-}
-
-void sap_free_roam_profile(struct csr_roam_profile *profile)
-{
-	if (profile->pRSNReqIE) {
-		qdf_mem_free(profile->pRSNReqIE);
-		profile->pRSNReqIE = NULL;
-	}
-}
-#endif
-
 void sap_sort_mac_list(struct qdf_mac_addr *macList, uint16_t size)
 {
 	uint16_t outer, inner;
@@ -4702,7 +4502,6 @@ bool sap_is_conc_sap_doing_scc_dfs(mac_handle_t mac_handle,
 	return false;
 }
 
-#ifdef SAP_CP_CLEANUP
 /**
  * sap_build_start_bss_config() - Fill the start bss request for SAP
  * @sap_bss_cfg: start bss config
@@ -4793,4 +4592,3 @@ sap_build_start_bss_config(struct start_bss_config *sap_bss_cfg,
 
 	return;
 }
-#endif

+ 0 - 19
core/sap/src/sap_internal.h

@@ -139,13 +139,7 @@ struct sap_context {
 
 	/* Include the associations MAC addresses */
 	uint8_t self_mac_addr[CDS_MAC_ADDRESS_LEN];
-#ifndef SAP_CP_CLEANUP
-	/* Include the SME(CSR) context here */
-	struct csr_roam_profile csr_roamProfile;
-	uint32_t csr_roamId;
-#else
 	struct start_bss_config sap_bss_cfg;
-#endif
 
 	/* SAP event Callback to hdd */
 	sap_event_cb sap_event_cb;
@@ -250,9 +244,7 @@ struct sap_context {
 #ifdef FEATURE_WLAN_CH_AVOID_EXT
 	uint32_t restriction_mask;
 #endif
-#ifdef SAP_CP_CLEANUP
 	bool require_h2e;
-#endif
 };
 
 /*----------------------------------------------------------------------------
@@ -331,15 +323,6 @@ sap_signal_hdd_event(struct sap_context *sap_ctx,
 
 QDF_STATUS sap_fsm(struct sap_context *sap_ctx, struct sap_sm_event *sap_event);
 
-#ifndef SAP_CP_CLEANUP
-eSapStatus
-sapconvert_to_csr_profile(struct sap_config *config,
-			  eCsrRoamBssType bssType,
-			  struct csr_roam_profile *profile);
-
-void sap_free_roam_profile(struct csr_roam_profile *profile);
-#endif
-
 QDF_STATUS
 sap_is_peer_mac_allowed(struct sap_context *sap_ctx, uint8_t *peerMac);
 
@@ -512,9 +495,7 @@ sap_chan_bond_dfs_sub_chan(struct sap_context *sap_context,
 			   qdf_freq_t channel_freq,
 			   ePhyChanBondState bond_state);
 
-#ifdef SAP_CP_CLEANUP
 void
 sap_build_start_bss_config(struct start_bss_config *sap_bss_cfg,
 			   struct sap_config *config);
 #endif
-#endif

+ 5 - 96
core/sap/src/sap_module.c

@@ -306,20 +306,7 @@ QDF_STATUS sap_init_ctx(struct sap_context *sap_ctx,
 		sap_err("Invalid SAP pointer");
 		return QDF_STATUS_E_FAULT;
 	}
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	/* Now configure the roaming profile links. To SSID and bssid.*/
-	/* We have room for two SSIDs. */
-	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].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;
-#endif
+
 	sap_ctx->csa_reason = CSA_REASON_UNKNOWN;
 	qdf_mem_copy(sap_ctx->self_mac_addr, addr, QDF_MAC_ADDR_SIZE);
 
@@ -378,10 +365,7 @@ QDF_STATUS sap_deinit_ctx(struct sap_context *sap_ctx)
 		sap_ctx->freq_list = NULL;
 		sap_ctx->num_of_channel = 0;
 	}
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_free_roam_profile(&sap_ctx->csr_roamProfile);
-#endif
+
 	if (sap_ctx->sessionId != WLAN_UMAC_VDEV_ID_MAX) {
 		/* empty queues/lists/pkts if any */
 		sap_clear_session_param(MAC_HANDLE(mac), sap_ctx,
@@ -539,19 +523,6 @@ wlansap_set_scan_acs_channel_params(struct sap_config *config,
 	psap_ctx->acs_cfg = &config->acs_cfg;
 	psap_ctx->ch_width_orig = config->acs_cfg.ch_width;
 	psap_ctx->sec_ch_freq = config->sec_ch_freq;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	/*
-	 * Set the BSSID to your "self MAC Addr" read
-	 * the mac address from Configuation ITEM received
-	 * from HDD
-	 */
-	psap_ctx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
-
-	/* Save a copy to SAP context */
-	qdf_mem_copy(psap_ctx->csr_roamProfile.BSSIDs.bssid,
-		config->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
-#endif
 	qdf_mem_copy(psap_ctx->self_mac_addr,
 		config->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
 
@@ -763,26 +734,9 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 	sap_ctx->disabled_mcs13 = false;
 	sap_ctx->phyMode = config->SapHw_mode;
 	sap_ctx->csa_reason = CSA_REASON_UNKNOWN;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	/* Set the BSSID to your "self MAC Addr" read the mac address
-		from Configuation ITEM received from HDD */
-	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(sap_ctx->csr_roamProfile.BSSIDs.bssid,
-		     config->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
-
-	/* copy the configuration items to csrProfile */
-	sapconvert_to_csr_profile(config, eCSR_BSS_TYPE_INFRA_AP,
-			       &sap_ctx->csr_roamProfile);
-#else
-	 sap_ctx->require_h2e = config->require_h2e;
-	 qdf_mem_copy(sap_ctx->bssid.bytes, config->self_macaddr.bytes,
-		      QDF_MAC_ADDR_SIZE);
-#endif
+	sap_ctx->require_h2e = config->require_h2e;
+	qdf_mem_copy(sap_ctx->bssid.bytes, config->self_macaddr.bytes,
+		     QDF_MAC_ADDR_SIZE);
 	qdf_mem_copy(sap_ctx->self_mac_addr,
 		     config->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
 	/*
@@ -844,23 +798,14 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
 	/* Store the HDD callback in SAP context */
 	sap_ctx->sap_event_cb = sap_event_cb;
 
-	/* To be removed after SAP CSR cleanup changes */
-#ifdef SAP_CP_CLEANUP
 	sap_ctx->sap_bss_cfg.vdev_id = sap_ctx->sessionId;
 	sap_build_start_bss_config(&sap_ctx->sap_bss_cfg, config);
-#endif
 	/* Handle event */
 	qdf_status = sap_fsm(sap_ctx, &sap_event);
 fail:
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	if (QDF_IS_STATUS_ERROR(qdf_status))
-		sap_free_roam_profile(&sap_ctx->csr_roamProfile);
-#else
 	if (QDF_IS_STATUS_ERROR(qdf_status))
 		qdf_mem_zero(&sap_ctx->sap_bss_cfg,
 			     sizeof(sap_ctx->sap_bss_cfg));
-#endif
 	return qdf_status;
 } /* wlansap_start_bss */
 
@@ -1794,7 +1739,6 @@ void wlansap_get_sec_channel(uint8_t sec_ch_offset,
 	}
 }
 
-#ifdef SAP_CP_CLEANUP
 /**
  * wlansap_fill_channel_change_request() - Fills the channel change request
  * @sap_ctx: sap context
@@ -1899,7 +1843,6 @@ wlansap_fill_channel_change_request(struct sap_context *sap_ctx,
 	}
 	return;
 }
-#endif
 
 QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 					  uint32_t target_chan_freq)
@@ -1908,10 +1851,7 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 	struct mac_context *mac_ctx;
 	eCsrPhyMode phy_mode;
 	struct ch_params *ch_params;
-/* To be removed after SAP CSR cleanup changes */
-#ifdef SAP_CP_CLEANUP
 	struct channel_change_req *ch_change_req;
-#endif
 
 	if (!target_chan_freq) {
 		sap_err("channel 0 requested");
@@ -1939,20 +1879,12 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 	else if (WLAN_REG_IS_24GHZ_CH_FREQ(target_chan_freq) &&
 		 (phy_mode == eCSR_DOT11_MODE_11a))
 		phy_mode = eCSR_DOT11_MODE_11g;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_ctx->csr_roamProfile.phyMode = phy_mode;
-#endif
 	sap_ctx->phyMode = phy_mode;
 
 	if (!sap_ctx->chan_freq) {
 		sap_err("Invalid channel list");
 		return QDF_STATUS_E_FAULT;
 	}
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_ctx->csr_roamProfile.ChannelInfo.freq_list[0] = target_chan_freq;
-#endif
 	/*
 	 * We are getting channel bonding mode from sapDfsInfor structure
 	 * because we've implemented channel width fallback mechanism for DFS
@@ -1969,26 +1901,8 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 	sap_ctx->chan_freq = target_chan_freq;
 	wlansap_get_sec_channel(ch_params->sec_ch_offset, sap_ctx->chan_freq,
 				&sap_ctx->sec_ch_freq);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_ctx->csr_roamProfile.ch_params = *ch_params;
-#endif
 	sap_dfs_set_current_channel(sap_ctx);
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_get_cac_dur_dfs_region(sap_ctx,
-				   &sap_ctx->csr_roamProfile.cac_duration_ms,
-				   &sap_ctx->csr_roamProfile.dfs_regdomain,
-				   sap_ctx->chan_freq, &sap_ctx->ch_params);
-	mlme_set_cac_required(sap_ctx->vdev,
-			      !!sap_ctx->csr_roamProfile.cac_duration_ms);
 
-	status = sme_roam_channel_change_req(MAC_HANDLE(mac_ctx),
-					     sap_ctx->bssid,
-					     sap_ctx->sessionId,
-					     ch_params,
-					     &sap_ctx->csr_roamProfile);
-#else
 	ch_change_req = qdf_mem_malloc(sizeof(struct channel_change_req));
 	if (!ch_change_req)
 		return QDF_STATUS_E_FAILURE;
@@ -1998,7 +1912,6 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 	status = sme_send_channel_change_req(MAC_HANDLE(mac_ctx),
 					     ch_change_req);
 	qdf_mem_free(ch_change_req);
-#endif
 	sap_debug("chan_freq:%d phy_mode %d width:%d offset:%d seg0:%d seg1:%d",
 		  sap_ctx->chan_freq, phy_mode, ch_params->ch_width,
 		  ch_params->sec_ch_offset, ch_params->center_freq_seg0,
@@ -2644,10 +2557,6 @@ QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context,
 
 	sap_context->acs_cfg = &config->acs_cfg;
 	sap_context->ch_width_orig = config->acs_cfg.ch_width;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	sap_context->csr_roamProfile.phyMode = config->acs_cfg.hw_mode;
-#endif
 	sap_context->phyMode = config->acs_cfg.hw_mode;
 
 	/*

+ 0 - 5
core/sme/inc/csr_api.h

@@ -741,7 +741,6 @@ struct csr_del_sta_params {
 	uint8_t subtype;
 };
 
-#ifdef SAP_CP_CLEANUP
 /* Struct bss_dot11_config - Dot11 parameters for
  * SAP operation
  * @vdev_id: vdev id
@@ -765,12 +764,10 @@ struct bss_dot11_config {
 	tSirMacRateSet opr_rates;
 	tSirMacRateSet ext_rates;
 };
-#endif
 
 typedef QDF_STATUS (*csr_roam_complete_cb)(struct wlan_objmgr_psoc *psoc,
 					   uint8_t session_id,
 					   struct csr_roam_info *param,
-					   uint32_t roam_id,
 					   eRoamCmdStatus roam_status,
 					   eCsrRoamResult roam_result);
 typedef QDF_STATUS (*csr_session_open_cb)(uint8_t session_id,
@@ -976,7 +973,6 @@ tSirNwType
 csr_convert_mode_to_nw_type(enum csr_cfgdot11mode dot11_mode,
 			    enum reg_wifi_band band);
 
-#ifdef SAP_CP_CLEANUP
 /*
  * csr_roam_get_phy_mode_band_for_bss() - CSR API to get phy mode and
  * band for particular dot11 config
@@ -989,4 +985,3 @@ enum csr_cfgdot11mode
 csr_roam_get_phy_mode_band_for_bss(struct mac_context *mac,
 				   struct bss_dot11_config *dot11_cfg);
 #endif
-#endif

+ 1 - 73
core/sme/inc/csr_internal.h

@@ -58,9 +58,6 @@
 	  ((mac)->mlme_cfg->lfr.roam_prefer_5ghz) \
 	)
 
-#define CSR_IS_CHANNEL_24GHZ(chnNum) \
-	(((chnNum) > 0) && ((chnNum) <= 14))
-
 /* Used to determine what to set to the MLME_DOT11_MODE */
 enum csr_cfgdot11mode {
 	eCSR_CFG_DOT11_MODE_ABG,
@@ -82,12 +79,7 @@ enum csr_cfgdot11mode {
 };
 
 enum csr_roam_reason {
-#ifndef SAP_CP_CLEANUP
-	eCsrNoConnection,
-	eCsrStartBss,
-	eCsrStopBss,
-#endif
-	eCsrForcedDisassocSta,
+	eCsrForcedDisassocSta = 1,
 	eCsrForcedDeauthSta,
 };
 
@@ -96,7 +88,6 @@ enum csr_roam_substate {
 	eCSR_ROAM_SUBSTATE_START_BSS_REQ,
 	eCSR_ROAM_SUBSTATE_DISASSOC_REQ,
 	eCSR_ROAM_SUBSTATE_STOP_BSS_REQ,
-	eCSR_ROAM_SUBSTATE_CONFIG,
 	eCSR_ROAM_SUBSTATE_DEAUTH_REQ,
 	eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY,
 	/*  max is 15 unless the bitfield is expanded... */
@@ -130,33 +121,6 @@ struct bss_config_param {
 	tSirMacCapabilityInfo BssCap;
 };
 
-#ifndef SAP_CP_CLEANUP
-struct csr_roamstart_bssparams {
-	tSirMacSSid ssId;
-
-	tSirNwType sirNwType;
-	ePhyChanBondState cb_mode;
-	tSirMacRateSet operationalRateSet;
-	tSirMacRateSet extendedRateSet;
-	uint32_t operation_chan_freq;
-	struct ch_params ch_params;
-	enum csr_cfgdot11mode uCfgDot11Mode;
-	uint8_t privacy;
-	tAniAuthType authType;
-	uint16_t bcn_int; /* If this is 0, SME'll fill in for caller */
-	uint32_t dtimPeriod;
-	uint8_t ssidHidden;
-	uint8_t wps_state;
-	uint16_t nRSNIELength;  /* If 0, pRSNIE is ignored. */
-	uint8_t *pRSNIE;        /* If not null, it has IE byte stream for RSN */
-	/* Flag used to indicate update beaconInterval */
-	bool update_bcn_int;
-	struct add_ie_params add_ie_params;
-	uint16_t beacon_tx_rate;
-	uint32_t cac_duration_ms;
-	uint32_t dfs_regdomain;
-};
-#else
 /* struct csr_roamstart_bssparams: csr bss parameters
  * @cb_mode: channel bonding mode
  * @bcn_int: beacon interval
@@ -167,15 +131,9 @@ struct csr_roamstart_bssparams {
 	uint16_t bcn_int;
 	bool update_bcn_int;
 };
-#endif
 
 struct roam_cmd {
-	uint32_t roamId;
 	enum csr_roam_reason roamReason;
-#ifndef SAP_CP_CLEANUP
-	struct csr_roam_profile roamProfile;
-	bool fReleaseProfile;             /* whether to free roamProfile */
-#endif
 	tSirMacAddr peerMac;
 	enum wlan_reason_code reason;
 };
@@ -314,7 +272,6 @@ struct csr_roam_session {
 };
 
 struct csr_roamstruct {
-	uint32_t nextRoamId;
 	struct csr_config configParam;
 	enum csr_roam_state curState[WLAN_MAX_VDEVS];
 	enum csr_roam_substate curSubState[WLAN_MAX_VDEVS];
@@ -331,18 +288,12 @@ struct csr_roamstruct {
 	spinlock_t roam_state_lock;
 };
 
-#define GET_NEXT_ROAM_ID(pRoamStruct)  (((pRoamStruct)->nextRoamId + 1 == 0) ? \
-			1 : (pRoamStruct)->nextRoamId)
 #define CSR_IS_ROAM_STATE(mac, state, sessionId) \
 			((state) == (mac)->roam.curState[sessionId])
 #define CSR_IS_ROAM_STOP(mac, sessionId) \
 		CSR_IS_ROAM_STATE((mac), eCSR_ROAMING_STATE_STOP, sessionId)
-#define CSR_IS_ROAM_INIT(mac, sessionId) \
-		 CSR_IS_ROAM_STATE((mac), eCSR_ROAMING_STATE_INIT, sessionId)
 #define CSR_IS_ROAM_JOINING(mac, sessionId)  \
 		CSR_IS_ROAM_STATE(mac, eCSR_ROAMING_STATE_JOINING, sessionId)
-#define CSR_IS_ROAM_IDLE(mac, sessionId) \
-		CSR_IS_ROAM_STATE(mac, eCSR_ROAMING_STATE_IDLE, sessionId)
 #define CSR_IS_ROAM_JOINED(mac, sessionId) \
 		CSR_IS_ROAM_STATE(mac, eCSR_ROAMING_STATE_JOINED, sessionId)
 #define CSR_IS_ROAM_SUBSTATE(mac, subState, sessionId) \
@@ -358,9 +309,6 @@ struct csr_roamstruct {
 #define CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(mac, sessionId) \
 		CSR_IS_ROAM_SUBSTATE((mac), \
 			eCSR_ROAM_SUBSTATE_STOP_BSS_REQ, sessionId)
-#define CSR_IS_ROAM_SUBSTATE_CONFIG(mac, sessionId) \
-		CSR_IS_ROAM_SUBSTATE((mac), \
-		eCSR_ROAM_SUBSTATE_CONFIG, sessionId)
 #define CSR_IS_ROAM_SUBSTATE_WAITFORKEY(mac, sessionId) \
 		CSR_IS_ROAM_SUBSTATE((mac), \
 			eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId)
@@ -563,25 +511,6 @@ QDF_STATUS csr_get_tsm_stats(struct mac_context *mac,
 		void *pContext, uint8_t tid);
 #endif
 
-#ifndef SAP_CP_CLEANUP
-/**
- * csr_roam_channel_change_req() - Post channel change request to LIM
- * @mac: mac context
- * @bssid: SAP bssid
- * @vdev_id: vdev_id
- * @ch_params: channel information
- * @profile: CSR profile
- *
- * This API is primarily used to post Channel Change Req for SAP
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS csr_roam_channel_change_req(struct mac_context *mac,
-				       struct qdf_mac_addr bssid,
-				       uint8_t vdev_id,
-				       struct ch_params *ch_params,
-				       struct csr_roam_profile *profile);
-#else
 /**
  * csr_send_channel_change_req() - Post channel change request to LIM
  * @mac : mac context
@@ -593,7 +522,6 @@ QDF_STATUS csr_roam_channel_change_req(struct mac_context *mac,
  */
 QDF_STATUS csr_send_channel_change_req(struct mac_context *mac,
 				       struct channel_change_req *req);
-#endif
 
 /* Post Beacon Tx Start Indication */
 QDF_STATUS csr_roam_start_beacon_req(struct mac_context *mac,

+ 0 - 34
core/sme/inc/sme_api.h

@@ -519,19 +519,6 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg);
 
 QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg);
 
-#ifndef SAP_CP_CLEANUP
-/**
- * sme_bss_start() - A wrapper function to request CSR to inititiate start bss
- * @mac_handle: mac handle
- * @vdev_id: the vdev id.
- * @profile: description of bss to start
- * @roam_id: to get back the request ID
- *
- * Return QDF_STATUS
- */
-QDF_STATUS sme_bss_start(mac_handle_t mac_handle, uint8_t vdev_id,
-			 struct csr_roam_profile *profile, uint32_t *roam_id);
-#endif
 /**
  * sme_roam_ndi_stop() - API to request stop ndi
  * @mac_handle: Opaque handle to the global MAC context
@@ -1270,25 +1257,6 @@ QDF_STATUS sme_set_auto_shutdown_timer(mac_handle_t mac_handle,
 				       uint32_t timer_value);
 #endif
 
-#ifndef SAP_CP_CLEANUP
-/**
- * sme_roam_channel_change_req() - Channel change to new target channel
- * @mac_handle: handle returned by mac_open
- * @bssid: mac address of BSS
- * @vdev_id: vdev_id
- * @ch_params: target channel information
- * @profile: CSR profile
- *
- * API to Indicate Channel change to new target channel
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sme_roam_channel_change_req(mac_handle_t mac_handle,
-				       struct qdf_mac_addr bssid,
-				       uint8_t vdev_id,
-				       struct ch_params *ch_params,
-				       struct csr_roam_profile *profile);
-#endif
 QDF_STATUS sme_roam_start_beacon_req(mac_handle_t mac_handle,
 				     struct qdf_mac_addr bssid,
 				     uint8_t dfsCacWaitStatus);
@@ -4489,7 +4457,6 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_psoc *psoc,
 				    bool update_sta_self_peer, int req_status);
 #endif
 
-#ifdef SAP_CP_CLEANUP
 /**
  * sme_get_network_params() - SME API to get dot11 config for SAP
  * functionality
@@ -4549,5 +4516,4 @@ void sme_fill_channel_change_request(mac_handle_t mac_handle,
  */
 QDF_STATUS sme_send_channel_change_req(mac_handle_t mac_handle,
 				      struct channel_change_req *req);
-#endif
 #endif /* #if !defined( __SME_API_H ) */

+ 1 - 14
core/sme/inc/sme_nan_datapath.h

@@ -29,11 +29,6 @@
 #include "csr_inside_api.h"
 
 #ifdef WLAN_FEATURE_NAN
-#ifndef SAP_CP_CLEANUP
-/* Start NDI BSS */
-QDF_STATUS csr_roam_start_ndi(struct mac_context *mac_ctx, uint32_t session_id,
-			      struct csr_roam_profile *profile);
-#endif
 void csr_roam_update_ndp_return_params(struct mac_context *mac_ctx,
 					uint32_t result,
 					uint32_t *roam_status,
@@ -41,15 +36,7 @@ void csr_roam_update_ndp_return_params(struct mac_context *mac_ctx,
 					struct csr_roam_info *roam_info);
 
 #else /* WLAN_FEATURE_NAN */
-#ifndef SAP_CP_CLEANUP
-/* Start NDI BSS */
-static inline QDF_STATUS csr_roam_start_ndi(struct mac_context *mac_ctx,
-					uint32_t session_id,
-					struct csr_roam_profile *profile)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
+
 static inline void csr_roam_update_ndp_return_params(struct mac_context *mac_ctx,
 					uint32_t result,
 					uint32_t *roam_status,

+ 7 - 70
core/sme/src/common/sme_api.c

@@ -79,10 +79,7 @@
 #include <cm_utf.h>
 #include <wlan_mlo_mgr_sta.h>
 #include <wlan_mlo_mgr_main.h>
-
-#ifdef SAP_CP_CLEANUP
 #include "wlan_policy_mgr_ucfg.h"
-#endif
 
 static QDF_STATUS init_sme_cmd_list(struct mac_context *mac);
 
@@ -1315,7 +1312,7 @@ static QDF_STATUS dfs_msg_processor(struct mac_context *mac,
 	}
 
 	/* Indicate Radar Event to SAP */
-	csr_roam_call_callback(mac, session_id, roam_info, 0,
+	csr_roam_call_callback(mac, session_id, roam_info,
 			       roam_status, roam_result);
 	qdf_mem_free(roam_info);
 	return status;
@@ -1342,7 +1339,7 @@ sme_unprotected_mgmt_frm_ind(struct mac_context *mac,
 	roam_info->frameType = pSmeMgmtFrm->frameType;
 
 	/* forward the mgmt frame to HDD */
-	csr_roam_call_callback(mac, SessionId, roam_info, 0,
+	csr_roam_call_callback(mac, SessionId, roam_info,
 			       eCSR_ROAM_UNPROT_MGMT_FRAME_IND, 0);
 
 	qdf_mem_free(roam_info);
@@ -1369,7 +1366,7 @@ QDF_STATUS sme_update_new_channel_event(mac_handle_t mac_handle,
 		  "sapdfs: Updated new channel event");
 
 	/* Indicate channel Event to SAP */
-	csr_roam_call_callback(mac, session_id, roamInfo, 0,
+	csr_roam_call_callback(mac, session_id, roamInfo,
 			       roamStatus, roamResult);
 
 	qdf_mem_free(roamInfo);
@@ -1415,7 +1412,7 @@ static QDF_STATUS sme_extended_change_channel_ind(struct mac_context *mac_ctx,
 		 session_id);
 
 	/* Indicate Ext Channel Change event to SAP */
-	csr_roam_call_callback(mac_ctx, session_id, roam_info, 0,
+	csr_roam_call_callback(mac_ctx, session_id, roam_info,
 			       roam_status, roam_result);
 	qdf_mem_free(roam_info);
 	return status;
@@ -1612,7 +1609,7 @@ static QDF_STATUS sme_tsm_ie_ind(struct mac_context *mac,
 	roam_info->tsm_ie.state = pSmeTsmIeInd->tsm_ie.state;
 	roam_info->tsm_ie.msmt_interval = pSmeTsmIeInd->tsm_ie.msmt_interval;
 	/* forward the tsm ie information to HDD */
-	csr_roam_call_callback(mac, SessionId, roam_info, 0,
+	csr_roam_call_callback(mac, SessionId, roam_info,
 			       eCSR_ROAM_TSM_IE_IND, 0);
 	qdf_mem_free(roam_info);
 	return status;
@@ -2922,8 +2919,6 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 		sme_process_twt_notify_event(mac, pMsg->bodyptr);
 		qdf_mem_free(pMsg->bodyptr);
 		break;
-/* To be removed after SAP CSR cleanup changes */
-#ifdef SAP_CP_CLEANUP
 	case eWNI_SME_START_BSS_RSP:
 		csr_roam_roaming_state_start_bss_rsp_processor(mac,
 							       pMsg->bodyptr);
@@ -2934,7 +2929,6 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 							      pMsg->bodyptr);
 		qdf_mem_free(pMsg->bodyptr);
 		break;
-#endif
 	default:
 
 		if ((pMsg->type >= eWNI_SME_MSG_TYPES_BEGIN)
@@ -3128,34 +3122,6 @@ eCsrPhyMode sme_get_phy_mode(mac_handle_t mac_handle)
 	return mac->roam.configParam.phyMode;
 }
 
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS sme_bss_start(mac_handle_t mac_handle, uint8_t vdev_id,
-			 struct csr_roam_profile *profile,
-			 uint32_t *roam_id)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	if (!mac)
-		return QDF_STATUS_E_FAILURE;
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_MSG_CONNECT, vdev_id, 0));
-
-	if (!CSR_IS_SESSION_VALID(mac, vdev_id)) {
-		sme_err("Invalid sessionID: %d", vdev_id);
-		return QDF_STATUS_E_INVAL;
-	}
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_ERROR(status))
-		return status;
-
-	status = csr_bss_start(mac, vdev_id, profile, roam_id);
-	sme_release_global_lock(&mac->sme);
-
-	return status;
-}
-#else
 QDF_STATUS sme_get_network_params(struct mac_context *mac,
 				  struct bss_dot11_config *dot11_cfg)
 {
@@ -3259,7 +3225,7 @@ QDF_STATUS sme_start_bss(mac_handle_t mac_handle, uint8_t vdev_id,
 
 	return status;
 }
-#endif
+
 /*
  * sme_set_phy_mode() -
  * Changes the PhyMode.
@@ -3357,14 +3323,8 @@ QDF_STATUS sme_roam_stop_bss(mac_handle_t mac_handle, uint8_t vdev_id)
 	if (QDF_IS_STATUS_ERROR(status))
 		return status;
 
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	status = csr_roam_issue_stop_bss_cmd(mac, vdev_id,
-					     eCSR_BSS_TYPE_INFRA_AP, false);
-#else
 	status = csr_roam_issue_stop_bss_cmd(mac, vdev_id,
 					     eCSR_BSS_TYPE_INFRA_AP);
-#endif
 	sme_release_global_lock(&mac->sme);
 
 	return status;
@@ -8486,26 +8446,6 @@ QDF_STATUS sme_set_mas(uint32_t val)
 	return QDF_STATUS_SUCCESS;
 }
 
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS sme_roam_channel_change_req(mac_handle_t mac_handle,
-				       struct qdf_mac_addr bssid,
-				       uint8_t vdev_id,
-				       struct ch_params *ch_params,
-				       struct csr_roam_profile *profile)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-
-		status = csr_roam_channel_change_req(mac, bssid, vdev_id,
-						     ch_params, profile);
-		sme_release_global_lock(&mac->sme);
-	}
-	return status;
-}
-#else
 QDF_STATUS sme_send_channel_change_req(mac_handle_t mac_handle,
 				      struct channel_change_req *req)
 {
@@ -8519,7 +8459,6 @@ QDF_STATUS sme_send_channel_change_req(mac_handle_t mac_handle,
 	}
 	return status;
 }
-#endif
 
 /*
  * sme_process_channel_change_resp() -
@@ -8557,7 +8496,7 @@ static QDF_STATUS sme_process_channel_change_resp(struct mac_context *mac,
 		roamResult = eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE;
 	}
 
-	csr_roam_call_callback(mac, session_id, roam_info, 0,
+	csr_roam_call_callback(mac, session_id, roam_info,
 			       eCSR_ROAM_SET_CHANNEL_RSP, roamResult);
 
 	qdf_mem_free(roam_info);
@@ -16264,7 +16203,6 @@ void sme_roam_events_deregister_callback(mac_handle_t mac_handle)
 }
 #endif
 
-#ifdef SAP_CP_CLEANUP
 static QDF_STATUS sme_send_start_bss_msg(struct mac_context *mac,
 					 struct start_bss_config *cfg)
 {
@@ -16440,4 +16378,3 @@ void sme_fill_channel_change_request(mac_handle_t mac_handle,
 				dot11_cfg.ext_rates.numRates;
 	}
 }
-#endif

ファイルの差分が大きいため隠しています
+ 10 - 828
core/sme/src/csr/csr_api_roam.c


+ 0 - 1
core/sme/src/csr/csr_api_scan.c

@@ -821,7 +821,6 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(struct mac_context *mac_ctx,
 		return QDF_STATUS_E_NOMEM;
 
 	csr_fill_neg_crypto_info(bss, &scan_entry->neg_sec_info);
-	bss->bss_score = scan_entry->bss_score;
 
 	result_info = &bss->Result;
 	result_info->ssId.length = scan_entry->ssid.length;

+ 12 - 128
core/sme/src/csr/csr_inside_api.h

@@ -32,23 +32,12 @@
 
 bool csr_is_supported_channel(struct mac_context *mac, uint32_t chan_freq);
 
-enum csr_roamcomplete_result {
-	eCsrNothingToJoin,
-	eCsrStartBssSuccess,
-	eCsrStartBssFailure,
-	eCsrStopBssSuccess,
-	eCsrStopBssFailure,
-};
-
-
-#ifdef SAP_CP_CLEANUP
 enum csr_sap_response_type {
 	CSR_SAP_START_BSS_SUCCESS,
 	CSR_SAP_START_BSS_FAILURE,
 	CSR_SAP_STOP_BSS_SUCCESS,
 	CSR_SAP_STOP_BSS_FAILURE,
 };
-#endif
 
 struct tag_csrscan_result {
 	tListElem Link;
@@ -57,8 +46,6 @@ struct tag_csrscan_result {
 	eCsrEncryptionType mcEncryptionType;
 	/* Preferred auth type that matched with the profile. */
 	enum csr_akm_type authType;
-	int  bss_score;
-	uint8_t retry_count;
 
 	tCsrScanResultInfo Result;
 	/*
@@ -88,12 +75,6 @@ void csr_roam_joined_state_msg_processor(struct mac_context *mac,
 void csr_release_command_roam(struct mac_context *mac, tSmeCmd *pCommand);
 void csr_release_command_wm_status_change(struct mac_context *mac,
 					  tSmeCmd *pCommand);
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS csr_roam_copy_profile(struct mac_context *mac,
-				 struct csr_roam_profile *pDstProfile,
-				 struct csr_roam_profile *pSrcProfile,
-				 uint8_t vdev_id);
-#endif
 QDF_STATUS csr_scan_open(struct mac_context *mac);
 QDF_STATUS csr_scan_close(struct mac_context *mac);
 
@@ -102,19 +83,8 @@ void csr_free_scan_result_entry(struct mac_context *mac, struct tag_csrscan_resu
 
 QDF_STATUS csr_roam_call_callback(struct mac_context *mac, uint32_t sessionId,
 				  struct csr_roam_info *roam_info,
-				  uint32_t roamId,
 				  eRoamCmdStatus u1, eCsrRoamResult u2);
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS csr_issue_bss_start(struct mac_context *mac, uint8_t vdev_id,
-			       struct csr_roam_profile *pProfile,
-			       uint32_t roamId);
-#else
-QDF_STATUS csr_issue_bss_start(struct mac_context *mac, uint8_t vdev_id,
-			       struct start_bss_config *bss_config,
-			       uint32_t roam_id);
-#endif
-void csr_roam_complete(struct mac_context *mac, enum csr_roamcomplete_result Result,
-		       void *Context, uint8_t session_id);
+void csr_roam_complete(struct mac_context *mac, uint8_t session_id);
 
 /**
  * csr_issue_set_context_req_helper  - Function to fill unicast/broadcast keys
@@ -140,14 +110,6 @@ csr_issue_set_context_req_helper(struct mac_context *mac,
 				 uint8_t *key);
 void csr_roam_check_for_link_status_change(struct mac_context *mac,
 					tSirSmeRsp *pSirMsg);
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
-				    struct csr_roamstart_bssparams *pParam,
-				    struct csr_roam_profile *pProfile,
-				    uint32_t roamId);
-QDF_STATUS csr_roam_issue_stop_bss(struct mac_context *mac, uint32_t sessionId,
-				   enum csr_roam_substate NewSubstate);
-#endif
 QDF_STATUS csr_send_mb_disassoc_req_msg(struct mac_context *mac, uint32_t sessionId,
 					tSirMacAddr bssId, uint16_t reasonCode);
 QDF_STATUS csr_send_mb_deauth_req_msg(struct mac_context *mac, uint32_t sessionId,
@@ -160,14 +122,6 @@ QDF_STATUS csr_send_assoc_cnf_msg(struct mac_context *mac,
 				  struct assoc_ind *pAssocInd,
 				  QDF_STATUS status,
 				  enum wlan_status_code mac_status_code);
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac,
-					 uint32_t sessionId,
-					 eCsrRoamBssType bssType,
-					 struct csr_roamstart_bssparams *pParam);
-QDF_STATUS csr_send_mb_stop_bss_req_msg(struct mac_context *mac,
-					uint32_t sessionId);
-#endif
 /**
  * csr_get_cfg_valid_channels() - Get valid channel frequency list
  * @mac: mac context
@@ -181,11 +135,6 @@ QDF_STATUS csr_send_mb_stop_bss_req_msg(struct mac_context *mac,
 QDF_STATUS csr_get_cfg_valid_channels(struct mac_context *mac,
 				      uint32_t *ch_freq_list,
 				      uint32_t *num_ch_freq);
-#ifndef SAP_CP_CLEANUP
-/* to free memory allocated inside the profile structure */
-void csr_release_profile(struct mac_context *mac,
-			 struct csr_roam_profile *pProfile);
-#endif
 
 enum csr_cfgdot11mode
 csr_get_cfg_dot11_mode_from_csr_phy_mode(bool is_ap, eCsrPhyMode phyMode);
@@ -323,47 +272,15 @@ void csr_send_set_ie(uint8_t type, uint8_t sub_type, uint8_t vdev_id);
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
 
 /* Security */
-#define WLAN_SECURITY_EVENT_REMOVE_KEY_REQ  5
-#define WLAN_SECURITY_EVENT_REMOVE_KEY_RSP  6
-#define WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND  7
-#define WLAN_SECURITY_EVENT_PMKID_UPDATE    8
 #define WLAN_SECURITY_EVENT_MIC_ERROR       9
-#define WLAN_SECURITY_EVENT_SET_UNICAST_REQ  10
 #define WLAN_SECURITY_EVENT_SET_UNICAST_RSP  11
-#define WLAN_SECURITY_EVENT_SET_BCAST_REQ    12
 #define WLAN_SECURITY_EVENT_SET_BCAST_RSP    13
 
-#define NO_MATCH    0
-#define MATCH       1
-
 #define WLAN_SECURITY_STATUS_SUCCESS        0
 #define WLAN_SECURITY_STATUS_FAILURE        1
 
-/* Scan */
-#define WLAN_SCAN_EVENT_ACTIVE_SCAN_REQ     1
-#define WLAN_SCAN_EVENT_ACTIVE_SCAN_RSP     2
-#define WLAN_SCAN_EVENT_PASSIVE_SCAN_REQ    3
-#define WLAN_SCAN_EVENT_PASSIVE_SCAN_RSP    4
-#define WLAN_SCAN_EVENT_HO_SCAN_REQ         5
-#define WLAN_SCAN_EVENT_HO_SCAN_RSP         6
-
-#define WLAN_SCAN_STATUS_SUCCESS        0
-#define WLAN_SCAN_STATUS_FAILURE        1
-#define WLAN_SCAN_STATUS_ABORT          2
-
-#define AUTO_PICK       0
-#define SPECIFIED       1
-
-#define WLAN_IBSS_STATUS_SUCCESS        0
-#define WLAN_IBSS_STATUS_FAILURE        1
-
 /* 11d */
-#define WLAN_80211D_EVENT_COUNTRY_SET   0
 #define WLAN_80211D_EVENT_RESET         1
-
-#define WLAN_80211D_DISABLED         0
-#define WLAN_80211D_SUPPORT_MULTI_DOMAIN     1
-#define WLAN_80211D_NOT_SUPPORT_MULTI_DOMAIN     2
 #endif /* #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR */
 /*
  * csr_scan_result_purge() -
@@ -376,19 +293,6 @@ QDF_STATUS csr_scan_result_purge(struct mac_context *mac,
 				 tScanResultHandle hScanResult);
 
 /* /////////////////////////////////////////Common Scan ends */
-#ifndef SAP_CP_CLEANUP
-/**
- * csr_bss_start() - A wrapper function to request CSR to inititiate start bss
- * @mac: mac ctx
- * @vdev_id: the vdev id.
- * @profile: description of bss to start
- * @roam_id: to get back the request ID
- *
- * Return QDF_STATUS
- */
-QDF_STATUS csr_bss_start(struct mac_context *mac, uint32_t vdev_id,
-			 struct csr_roam_profile *profile, uint32_t *roam_id);
-#else
 /**
  * csr_bss_start() - CSR API to post the start bss request to serialization
  * module.
@@ -400,7 +304,6 @@ QDF_STATUS csr_bss_start(struct mac_context *mac, uint32_t vdev_id,
  */
 QDF_STATUS csr_bss_start(struct mac_context *mac, uint32_t vdev_id,
 			 struct start_bss_config *bss_config);
-#endif
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /*
@@ -463,15 +366,6 @@ QDF_STATUS csr_apply_channel_and_power_list(struct mac_context *mac);
  */
 QDF_STATUS csr_roam_ndi_stop(struct mac_context *mac, uint8_t vdev_id);
 
-#ifndef SAP_CP_CLEANUP
-/* This function is used to stop a BSS. It is similar of csr_roamIssueDisconnect
- * but this function doesn't have any logic other than blindly trying to stop
- * BSS
- */
-QDF_STATUS csr_roam_issue_stop_bss_cmd(struct mac_context *mac, uint8_t vdev_id,
-				       eCsrRoamBssType bss_type,
-				       bool high_priority);
-#else
 /**
  * csr_roam_issue_stop_bss_cmd() - This API posts the stop bss command
  * to the serialization module.
@@ -484,7 +378,6 @@ QDF_STATUS csr_roam_issue_stop_bss_cmd(struct mac_context *mac, uint8_t vdev_id,
  */
 QDF_STATUS csr_roam_issue_stop_bss_cmd(struct mac_context *mac, uint8_t vdev_id,
 				       eCsrRoamBssType bss_type);
-#endif
 
 /**
  * csr_roam_issue_disassociate_sta_cmd() - disassociate a associated station
@@ -580,24 +473,6 @@ QDF_STATUS csr_sta_continue_csa(struct mac_context *mac_ctx,
 QDF_STATUS csr_set_ht2040_mode(struct mac_context *mac, uint32_t sessionId,
 			       ePhyChanBondState cbMode, bool obssEnabled);
 #endif
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS
-csr_roam_prepare_bss_config_from_profile(struct mac_context *mac_ctx,
-					 struct csr_roam_profile *profile,
-					 uint8_t vdev_id,
-					 struct bss_config_param *bss_cfg);
-#endif
-void
-csr_roam_prepare_bss_params(struct mac_context *mac_ctx, uint32_t session_id,
-			    struct csr_roam_profile *profile,
-			    struct bss_config_param *bss_cfg);
-
-#ifndef SAP_CP_CLEANUP
-QDF_STATUS
-csr_roam_set_bss_config_cfg(struct mac_context *mac_ctx, uint32_t session_id,
-			    struct csr_roam_profile *profile,
-			    struct bss_config_param *bss_cfg);
-#endif
 
 void csr_prune_channel_list_for_mode(struct mac_context *mac,
 				     struct csr_channel *pChannelList);
@@ -674,7 +549,6 @@ void csr_cm_get_sta_cxn_info(struct mac_context *mac_ctx, uint8_t vdev_id,
 #endif
 #endif
 
-#ifdef SAP_CP_CLEANUP
 /**
  * csr_process_sap_response() - Wrapper API to process the SAP
  * response from LIM
@@ -713,5 +587,15 @@ csr_roam_roaming_state_start_bss_rsp_processor(struct mac_context *mac,
  */
 void csr_roam_roaming_state_stop_bss_rsp_processor(struct mac_context *mac,
 						   void *msg);
-#endif
+
+/**
+ * csr_roam_process_results_default() - Process the result for start bss
+ * @mac_ctx: Global MAC Context
+ * @cmd:     Command to be processed
+ *
+ * Return: None
+ */
+void
+csr_roam_process_results_default(struct mac_context *mac_ctx, tSmeCmd *cmd);
+
 #endif /* CSR_INSIDE_API_H__ */

+ 2 - 29
core/sme/src/csr/csr_util.c

@@ -1066,33 +1066,6 @@ bool csr_is_bssid_match(struct qdf_mac_addr *pProfBssid,
 	return fMatch;
 }
 
-#ifndef SAP_CP_CLEANUP
-void csr_release_profile(struct mac_context *mac,
-			 struct csr_roam_profile *pProfile)
-{
-	if (pProfile) {
-		if (pProfile->BSSIDs.bssid) {
-			qdf_mem_free(pProfile->BSSIDs.bssid);
-			pProfile->BSSIDs.bssid = NULL;
-		}
-		if (pProfile->SSIDs.SSIDList) {
-			qdf_mem_free(pProfile->SSIDs.SSIDList);
-			pProfile->SSIDs.SSIDList = NULL;
-		}
-
-		if (pProfile->ChannelInfo.freq_list) {
-			qdf_mem_free(pProfile->ChannelInfo.freq_list);
-			pProfile->ChannelInfo.freq_list = NULL;
-		}
-		if (pProfile->pRSNReqIE) {
-			qdf_mem_free(pProfile->pRSNReqIE);
-			pProfile->pRSNReqIE = NULL;
-		}
-		qdf_mem_zero(pProfile, sizeof(struct csr_roam_profile));
-	}
-}
-#endif
-
 /* This function use the parameters to decide the CFG value. */
 /* CSR never sets MLME_DOT11_MODE_ALL to the CFG */
 /* So PE should not see MLME_DOT11_MODE_ALL when it gets the CFG value */
@@ -1409,7 +1382,7 @@ QDF_STATUS csr_mlme_vdev_disconnect_all_p2p_client_event(uint8_t vdev_id)
 	if (!mac_ctx)
 		return QDF_STATUS_E_FAILURE;
 
-	return csr_roam_call_callback(mac_ctx, vdev_id, NULL, 0,
+	return csr_roam_call_callback(mac_ctx, vdev_id, NULL,
 				      eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS,
 				      eCSR_ROAM_RESULT_NONE);
 }
@@ -1421,7 +1394,7 @@ QDF_STATUS csr_mlme_vdev_stop_bss(uint8_t vdev_id)
 	if (!mac_ctx)
 		return QDF_STATUS_E_FAILURE;
 
-	return csr_roam_call_callback(mac_ctx, vdev_id, NULL, 0,
+	return csr_roam_call_callback(mac_ctx, vdev_id, NULL,
 				      eCSR_ROAM_SEND_P2P_STOP_BSS,
 				      eCSR_ROAM_RESULT_NONE);
 }

+ 0 - 60
core/sme/src/nan/nan_datapath_api.c

@@ -29,46 +29,6 @@
 #include "csr_internal.h"
 #include "sme_nan_datapath.h"
 
-#ifndef SAP_CP_CLEANUP
-/**
- * csr_roam_start_ndi() - Start connection for NAN datapath
- * @mac_ctx: Global MAC context
- * @session: SME session ID
- * @profile: Configuration profile
- *
- * Return: Success or failure code
- */
-QDF_STATUS csr_roam_start_ndi(struct mac_context *mac_ctx, uint32_t session,
-			struct csr_roam_profile *profile)
-{
-	QDF_STATUS status;
-	struct bss_config_param bss_cfg;
-
-	qdf_mem_zero(&bss_cfg, sizeof(struct bss_config_param));
-	/* Build BSS configuration from profile */
-	status = csr_roam_prepare_bss_config_from_profile(mac_ctx, profile,
-							  session,
-							  &bss_cfg);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		mac_ctx->roam.roamSession[session].bssParams.uCfgDot11Mode
-			= bss_cfg.uCfgDot11Mode;
-		/* Copy profile parameters to PE session */
-		csr_roam_prepare_bss_params(mac_ctx, session, profile,
-					    &bss_cfg);
-		/*
-		 * Following routine will eventually call
-		 * csrRoamIssueStartBss through csrRoamCcmCfgSetCallback
-		 */
-		status = csr_roam_set_bss_config_cfg(mac_ctx, session, profile,
-						     &bss_cfg);
-	}
-
-	sme_debug("profile config validity: %d", status);
-
-	return status;
-}
-#endif
-
 /**
  * csr_roam_update_ndp_return_params() - updates ndp return parameters
  * @mac_ctx: MAC context handle
@@ -87,12 +47,7 @@ void csr_roam_update_ndp_return_params(struct mac_context *mac_ctx,
 {
 
 	switch (result) {
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	case eCsrStartBssSuccess:
-#else
 	case CSR_SAP_START_BSS_SUCCESS:
-#endif
 		roam_info->ndp.ndi_create_params.reason = 0;
 		roam_info->ndp.ndi_create_params.status =
 					NDP_RSP_STATUS_SUCCESS;
@@ -100,36 +55,21 @@ void csr_roam_update_ndp_return_params(struct mac_context *mac_ctx,
 		*roam_status = eCSR_ROAM_NDP_STATUS_UPDATE;
 		*roam_result = eCSR_ROAM_RESULT_NDI_CREATE_RSP;
 		break;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	case eCsrStartBssFailure:
-#else
 	case CSR_SAP_START_BSS_FAILURE:
-#endif
 		roam_info->ndp.ndi_create_params.status = NDP_RSP_STATUS_ERROR;
 		roam_info->ndp.ndi_create_params.reason =
 					NDP_NAN_DATA_IFACE_CREATE_FAILED;
 		*roam_status = eCSR_ROAM_NDP_STATUS_UPDATE;
 		*roam_result = eCSR_ROAM_RESULT_NDI_CREATE_RSP;
 		break;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	case eCsrStopBssSuccess:
-#else
 	case CSR_SAP_STOP_BSS_SUCCESS:
-#endif
 		roam_info->ndp.ndi_delete_params.reason = 0;
 		roam_info->ndp.ndi_delete_params.status =
 						NDP_RSP_STATUS_SUCCESS;
 		*roam_status = eCSR_ROAM_NDP_STATUS_UPDATE;
 		*roam_result = eCSR_ROAM_RESULT_NDI_DELETE_RSP;
 		break;
-/* To be removed after SAP CSR cleanup changes */
-#ifndef SAP_CP_CLEANUP
-	case eCsrStopBssFailure:
-#else
 	case CSR_SAP_STOP_BSS_FAILURE:
-#endif
 		roam_info->ndp.ndi_delete_params.status = NDP_RSP_STATUS_ERROR;
 		roam_info->ndp.ndi_delete_params.reason =
 					NDP_NAN_DATA_IFACE_DELETE_FAILED;

+ 1 - 2
core/sme/src/rrm/sme_rrm.c

@@ -397,8 +397,7 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results(
 
 		roam_info->pEseBcnReportRsp = bcn_report;
 		status = csr_roam_call_callback(mac_ctx, session_id, roam_info,
-						0, eCSR_ROAM_ESE_BCN_REPORT_IND,
-						0);
+						eCSR_ROAM_ESE_BCN_REPORT_IND, 0);
 
 		/* Free the memory allocated to IE */
 		for (i = 0; i < j; i++)

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません