소스 검색

qcacld-3.0: Cleanup the legacy scan code

Cleanup the unused legacy scan code.

Change-Id: Ia45cf0310c506d3cf6b897b31f9d28b4fac3197c
CRs-Fixed: 2193917
Abhishek Singh 7 년 전
부모
커밋
f723e3d31a

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

@@ -4439,8 +4439,7 @@ hdd_sme_roam_callback(void *pContext, struct csr_roam_info *roam_info,
 	struct cfg80211_bss *bss_status;
 	struct hdd_context *hdd_ctx;
 
-	if (eCSR_ROAM_UPDATE_SCAN_RESULT != roamStatus)
-		hdd_debug("CSR Callback: status= %d result= %d roamID=%d",
+	hdd_debug("CSR Callback: status= %d result= %d roamID=%d",
 			  roamStatus, roamResult, roamId);
 
 	/* Sanity check */
@@ -4453,9 +4452,7 @@ hdd_sme_roam_callback(void *pContext, struct csr_roam_info *roam_info,
 	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
-	/* Omitting eCSR_ROAM_UPDATE_SCAN_RESULT as this is too frequent */
-	if (eCSR_ROAM_UPDATE_SCAN_RESULT != roamStatus)
-		MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_RX_SME_MSG,
+	MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_RX_SME_MSG,
 				 adapter->session_id, roamStatus));
 
 	switch (roamStatus) {

+ 0 - 98
core/hdd/src/wlan_hdd_cfg80211.c

@@ -16367,104 +16367,6 @@ wlan_hdd_cfg80211_update_bss_db(struct hdd_adapter *adapter,
 	}
 	return bss;
 }
-/**
- * wlan_hdd_cfg80211_update_bss() - update bss
- * @wiphy: Pointer to wiphy
- * @adapter: Pointer to adapter
- * @scan_time: scan request timestamp
- *
- * Return: zero if success, non-zero otherwise
- */
-int wlan_hdd_cfg80211_update_bss(struct wiphy *wiphy,
-				 struct hdd_adapter *adapter,
-				 uint32_t scan_time)
-{
-	tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter);
-	tCsrScanResultInfo *pScanResult;
-	QDF_STATUS status = 0;
-	tScanResultHandle pResult;
-	struct cfg80211_bss *bss_status = NULL;
-	struct hdd_context *hdd_ctx;
-	int ret;
-
-	ENTER();
-
-	if (wlan_hdd_validate_session_id(adapter->session_id)) {
-		hdd_err("invalid session id: %d", adapter->session_id);
-		return -EINVAL;
-	}
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
-			 TRACE_CODE_HDD_CFG80211_UPDATE_BSS,
-			 NO_SESSION, adapter->session_id));
-
-	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
-		return ret;
-
-	/* start getting scan results and populate cgf80211 BSS database */
-	status = sme_scan_get_result(hHal, adapter->session_id, NULL, &pResult);
-
-	/* no scan results */
-	if (NULL == pResult) {
-		hdd_err("No scan result Status: %d", status);
-		return -EAGAIN;
-	}
-
-	pScanResult = sme_scan_result_get_first(hHal, pResult);
-
-	while (pScanResult) {
-		/*
-		 * - cfg80211_inform_bss() is not updating ie field of bss
-		 * entry if entry already exists in bss data base of cfg80211
-		 * for that particular BSS ID.  Using cfg80211_inform_bss_frame
-		 * to update thebss entry instead of cfg80211_inform_bss,
-		 * But this call expects mgmt packet as input. As of now
-		 * there is no possibility to get the mgmt(probe response)
-		 * frame from PE, converting bss_desc to
-		 * ieee80211_mgmt(probe response) and passing to c
-		 * fg80211_inform_bss_frame.
-		 * - Update BSS only if beacon timestamp is later than
-		 * scan request timestamp.
-		 */
-		if ((scan_time == 0) ||
-			(scan_time <
-				pScanResult->BssDescriptor.received_time)) {
-			bss_status =
-				wlan_hdd_cfg80211_inform_bss_frame(adapter,
-						&pScanResult->BssDescriptor);
-
-			if (NULL == bss_status) {
-				hdd_debug("NULL returned by cfg80211_inform_bss_frame");
-			} else {
-				cfg80211_put_bss(
-					wiphy,
-					bss_status);
-			}
-		} else {
-			hdd_debug("BSSID: " MAC_ADDRESS_STR " Skipped",
-			MAC_ADDR_ARRAY(pScanResult->BssDescriptor.bssId));
-		}
-		pScanResult = sme_scan_result_get_next(hHal, pResult);
-	}
-
-	sme_scan_result_purge(pResult);
-	/*
-	 * For SAP mode, scan is invoked by hostapd during SAP start
-	 * if hostapd is restarted, we need to flush previous scan
-	 * result so that it will reflect environment change
-	 */
-	if (adapter->device_mode == QDF_SAP_MODE
-#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
-		&& hdd_ctx->skip_acs_scan_status != eSAP_SKIP_ACS_SCAN
-#endif
-	)
-		sme_scan_flush_result(hHal);
-
-	EXIT();
-	return 0;
-}
 
 /**
  * wlan_hdd_cfg80211_pmksa_candidate_notify() - notify a new PMSKA candidate

+ 10 - 4
core/hdd/src/wlan_hdd_cfg80211.h

@@ -373,10 +373,6 @@ struct cfg80211_bss *
 wlan_hdd_cfg80211_update_bss_list(struct hdd_adapter *adapter,
 				  tSirMacAddr bssid);
 
-int wlan_hdd_cfg80211_update_bss(struct wiphy *wiphy,
-				 struct hdd_adapter *adapter,
-				 uint32_t scan_timestamp);
-
 void wlan_hdd_cfg80211_acs_ch_select_evt(struct hdd_adapter *adapter);
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
@@ -436,6 +432,16 @@ static inline void wlan_hdd_cfg80211_indicate_disconnect(struct net_device *dev,
 				GFP_KERNEL);
 }
 #endif
+
+/**
+ * wlan_hdd_cfg80211_inform_bss_frame() - inform bss details to NL80211
+ * @adapter: Pointer to adapter
+ * @bss_desc: Pointer to bss descriptor
+ *
+ * This function is used to inform the BSS details to nl80211 interface.
+ *
+ * Return: struct cfg80211_bss pointer
+ */
 struct cfg80211_bss *
 wlan_hdd_cfg80211_inform_bss_frame(struct hdd_adapter *adapter,
 				   struct bss_description *bss_desc);

+ 0 - 5
core/hdd/src/wlan_hdd_hostapd.c

@@ -1232,11 +1232,6 @@ static QDF_STATUS hdd_handle_acs_scan_event(tpSap_Event sap_event,
 		}
 	}
 	qdf_spin_unlock(&hdd_ctx->acs_skip_lock);
-	/* Update ACS scan result to cfg80211. Then OBSS scan can reuse the
-	 * scan result.
-	 */
-	if (wlan_hdd_cfg80211_update_bss(hdd_ctx->wiphy, adapter, 0))
-		hdd_debug("NO SCAN result");
 
 	hdd_debug("Reusing Last ACS scan result for %d sec",
 		ACS_SCAN_EXPIRY_TIMEOUT_S);

+ 2 - 3
core/sap/src/sap_api_link_cntl.c

@@ -916,11 +916,10 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info,
 	}
 
 	mac_ctx = PMAC_STRUCT(hal);
-	if (eCSR_ROAM_UPDATE_SCAN_RESULT != roam_status) {
-		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
+	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			FL("roam_status = %d, roam_result = %d"),
 			roam_status, roam_result);
-	}
+
 
 	switch (roam_status) {
 	case eCSR_ROAM_INFRA_IND:

+ 1 - 10
core/sme/inc/csr_support.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -314,15 +314,6 @@ bool csr_is_security_match(tHalHandle hHal, tCsrAuthList *authType,
 		eCsrEncryptionType *negotiatedMCCipher);
 bool csr_is_bss_type_match(eCsrRoamBssType bssType1, eCsrRoamBssType bssType2);
 bool csr_is_bss_type_ibss(eCsrRoamBssType bssType);
-/*
- * ppIes can be NULL. If caller want to get the *ppIes allocated by
- * this function, pass in *ppIes = NULL. Caller needs to free the memory
- * in this case
- */
-bool csr_match_bss(tHalHandle hHal, tSirBssDescription *pBssDesc,
-		tCsrScanResultFilter *pFilter, eCsrAuthType *pNegAuth,
-		eCsrEncryptionType *pNegUc, eCsrEncryptionType *pNegMc,
-		tDot11fBeaconIEs **ppIes);
 bool csr_is_bssid_match(tHalHandle hHal, struct qdf_mac_addr *pProfBssid,
 		struct qdf_mac_addr *BssBssid);
 bool csr_match_bss_to_connect_profile(tHalHandle hHal,

+ 1 - 3
core/sme/src/csr/csr_api_roam.c

@@ -7065,9 +7065,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx,
 		}
 	}
 	if (!CSR_IS_INFRA_AP(profile) && !CSR_IS_NDI(profile)) {
-		csr_scan_append_bss_description(mac_ctx,
-					bss_desc, ies_ptr, false,
-					session_id);
+		csr_scan_append_bss_description(mac_ctx, bss_desc);
 	}
 	csr_roam_save_connected_bss_desc(mac_ctx, session_id, bss_desc);
 	csr_roam_free_connect_profile(&session->connectedProfile);

+ 19 - 51
core/sme/src/csr/csr_api_scan.c

@@ -784,9 +784,7 @@ static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac,
 /* Put the BSS into the scan result list */
 /* pIes can not be NULL */
 static void csr_scan_add_result(tpAniSirGlobal mac_ctx,
-				struct tag_csrscan_result *pResult,
-				tDot11fBeaconIEs *pIes,
-				uint32_t sessionId)
+				struct tag_csrscan_result *pResult)
 {
 	qdf_nbuf_t buf;
 	uint8_t *data;
@@ -797,6 +795,11 @@ static void csr_scan_add_result(tpAniSirGlobal mac_ctx,
 	tSirBssDescription *bss_desc;
 	enum mgmt_frame_type frm_type = MGMT_BEACON;
 
+	if (!pResult) {
+		sme_err("pResult is null");
+		return;
+	}
+
 	bss_desc = &pResult->Result.BssDescriptor;
 	if (bss_desc->fProbeRsp)
 		frm_type = MGMT_PROBE_RESP;
@@ -805,6 +808,7 @@ static void csr_scan_add_result(tpAniSirGlobal mac_ctx,
 	rx_param.channel = bss_desc->channelId;
 	rx_param.rssi = bss_desc->rssi;
 	rx_param.tsf_delta = bss_desc->tsf_delta;
+
 	buf_len = GET_IE_LEN_IN_BSS(bss_desc->length) +
 		+ offsetof(struct wlan_bcn_frame, ie) + sizeof(*hdr);
 
@@ -813,7 +817,6 @@ static void csr_scan_add_result(tpAniSirGlobal mac_ctx,
 	if (!buf) {
 		sme_err("Failed to allocate wbuf for mgmt rx len (%u)",
 			buf_len);
-		csr_free_scan_result_entry(mac_ctx, pResult);
 		return;
 	}
 	qdf_nbuf_put_tail(buf, buf_len);
@@ -838,7 +841,6 @@ static void csr_scan_add_result(tpAniSirGlobal mac_ctx,
 		GET_IE_LEN_IN_BSS(bss_desc->length));
 	tgt_scan_bcn_probe_rx_callback(mac_ctx->psoc, NULL, buf, &rx_param,
 		frm_type);
-	csr_free_scan_result_entry(mac_ctx, pResult);
 }
 
 /*
@@ -1060,12 +1062,9 @@ static bool csr_process_bss_desc_for_bkid_list(tpAniSirGlobal pMac,
 
 #endif
 
-static bool csr_scan_save_bss_description(tpAniSirGlobal
-							pMac,
+static bool csr_scan_save_bss_description(tpAniSirGlobal pMac,
 						     tSirBssDescription *
-						     pBSSDescription,
-						     tDot11fBeaconIEs *pIes,
-						     uint8_t sessionId)
+						     pBSSDescription)
 {
 	struct tag_csrscan_result *pCsrBssDescription = NULL;
 	uint32_t cbBSSDesc;
@@ -1093,20 +1092,18 @@ static bool csr_scan_save_bss_description(tpAniSirGlobal
 			       bssId));
 	qdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor,
 		     pBSSDescription, cbBSSDesc);
-	csr_scan_add_result(pMac, pCsrBssDescription, pIes, sessionId);
+	csr_scan_add_result(pMac, pCsrBssDescription);
+	csr_free_scan_result_entry(pMac, pCsrBssDescription);
 
 	return true;
 }
 
 /* Append a Bss Description... */
 bool csr_scan_append_bss_description(tpAniSirGlobal pMac,
-						tSirBssDescription *
-						pSirBssDescription,
-						tDot11fBeaconIEs *pIes,
-						bool fForced, uint8_t sessionId)
+				     tSirBssDescription *pSirBssDescription)
 {
 	return csr_scan_save_bss_description(pMac,
-					pSirBssDescription, pIes, sessionId);
+					pSirBssDescription);
 }
 
 static void csr_purge_channel_power(tpAniSirGlobal pMac, tDblLinkList
@@ -3091,47 +3088,35 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac,
 					       uint8_t channel)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tDot11fBeaconIEs *pNewIes = NULL;
 	struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
 	tSirBssDescription *pNewBssDescriptor = NULL;
 	uint32_t size = 0;
 
 	if (NULL == pSession) {
-		status = QDF_STATUS_E_FAILURE;
-		return status;
+		return QDF_STATUS_E_FAILURE;
 	}
 	sme_debug("Current bssid::"MAC_ADDRESS_STR,
 		MAC_ADDR_ARRAY(pSession->pConnectBssDesc->bssId));
 	sme_debug("My bssid::"MAC_ADDRESS_STR" channel %d",
 		MAC_ADDR_ARRAY(bssid.bytes), channel);
 
-	if (!QDF_IS_STATUS_SUCCESS(csr_get_parsed_bss_description_ies(
-					pMac, pSession->pConnectBssDesc,
-					&pNewIes))) {
-		sme_err("Failed to parse IEs");
-		status = QDF_STATUS_E_FAILURE;
-		goto free_mem;
-	}
 	size = pSession->pConnectBssDesc->length +
 		sizeof(pSession->pConnectBssDesc->length);
 	if (!size) {
 		sme_err("length of bss descriptor is 0");
-		status = QDF_STATUS_E_FAILURE;
-		goto free_mem;
+		return QDF_STATUS_E_FAILURE;
 	}
 	pNewBssDescriptor = qdf_mem_malloc(size);
 	if (NULL == pNewBssDescriptor) {
 		sme_err("memory allocation failed");
-		status = QDF_STATUS_E_FAILURE;
-		goto free_mem;
+		return QDF_STATUS_E_FAILURE;
 	}
 	qdf_mem_copy(pNewBssDescriptor, pSession->pConnectBssDesc, size);
 	/* change the BSSID & channel as passed */
 	qdf_mem_copy(pNewBssDescriptor->bssId, bssid.bytes,
 			sizeof(tSirMacAddr));
 	pNewBssDescriptor->channelId = channel;
-	if (!csr_scan_append_bss_description(pMac, pNewBssDescriptor,
-						pNewIes, true, sessionId)) {
+	if (!csr_scan_append_bss_description(pMac, pNewBssDescriptor)) {
 		sme_err("csr_scan_append_bss_description failed");
 		status = QDF_STATUS_E_FAILURE;
 		goto free_mem;
@@ -3139,9 +3124,6 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac,
 	sme_err("entry successfully added in scan cache");
 
 free_mem:
-	if (pNewIes)
-		qdf_mem_free(pNewIes);
-
 	if (pNewBssDescriptor)
 		qdf_mem_free(pNewBssDescriptor);
 
@@ -3180,9 +3162,7 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac,
 		tpSirBssDescription  bss_desc_ptr)
 {
 	uint32_t length = 0;
-	tDot11fBeaconIEs *ies_local_ptr = NULL;
 	struct tag_csrscan_result *scan_res_ptr = NULL;
-	uint8_t session_id = roam_sync_ind_ptr->roamedVdevId;
 
 	length = roam_sync_ind_ptr->beaconProbeRespLength -
 		(SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET);
@@ -3197,23 +3177,11 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac,
 	qdf_mem_copy(&scan_res_ptr->Result.BssDescriptor,
 			bss_desc_ptr,
 			(sizeof(tSirBssDescription) + length));
-	ies_local_ptr = (tDot11fBeaconIEs *)(scan_res_ptr->Result.pvIes);
-	if (!ies_local_ptr &&
-		(!QDF_IS_STATUS_SUCCESS(csr_get_parsed_bss_description_ies(
-						pMac, &scan_res_ptr->Result.
-						BssDescriptor,
-						&ies_local_ptr)))) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				"%s:Cannot Parse IEs", __func__);
-		csr_free_scan_result_entry(pMac, scan_res_ptr);
-		return QDF_STATUS_E_RESOURCES;
-	}
 
 	sme_debug("LFR3:Add BSSID to scan cache" MAC_ADDRESS_STR,
 		MAC_ADDR_ARRAY(scan_res_ptr->Result.BssDescriptor.bssId));
-	csr_scan_add_result(pMac, scan_res_ptr, ies_local_ptr, session_id);
-	if ((scan_res_ptr->Result.pvIes == NULL) && ies_local_ptr)
-		qdf_mem_free(ies_local_ptr);
+	csr_scan_add_result(pMac, scan_res_ptr);
+	csr_free_scan_result_entry(pMac, scan_res_ptr);
 	return QDF_STATUS_SUCCESS;
 }
 #endif

+ 1 - 13
core/sme/src/csr/csr_inside_api.h

@@ -254,10 +254,7 @@ void csr_roam_stopTKIPCounterMeasureTimer(tpAniSirGlobal pMac);
 QDF_STATUS csr_scan_open(tpAniSirGlobal pMac);
 QDF_STATUS csr_scan_close(tpAniSirGlobal pMac);
 bool csr_scan_append_bss_description(tpAniSirGlobal pMac,
-						tSirBssDescription *
-						pSirBssDescription,
-						tDot11fBeaconIEs *pIes,
-						bool fForced, uint8_t sessionId);
+				     tSirBssDescription *pSirBssDescription);
 void csr_scan_call_callback(tpAniSirGlobal pMac, tSmeCmd *pCommand,
 			    eCsrScanStatus scanStatus);
 QDF_STATUS csr_scan_copy_request(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq,
@@ -445,15 +442,6 @@ void csr_reset_bkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId);
 QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac,
 					uint32_t tableSize, tSirMacChanInfo
 					*channelTable);
-
-/* To check whether a country code matches the one in the IE Only check the
- * first two characters, ignoring in/outdoor pCountry -- caller allocated
- * buffer contain the country code that is checking against the one in pIes.
- * It can be NULL. caller must provide pIes, it cannot be NULL. This function
- * always return true if 11d support is not turned on. pIes cannot be NULL
- */
-bool csr_match_country_code(tpAniSirGlobal pMac, uint8_t *pCountry,
-			    tDot11fBeaconIEs *pIes);
 QDF_STATUS csr_roam_set_key(tpAniSirGlobal pMac, uint32_t sessionId,
 			    tCsrRoamSetKey *pSetKey, uint32_t roamId);
 QDF_STATUS csr_roam_open_session(tpAniSirGlobal pMac,

+ 0 - 252
core/sme/src/csr/csr_util.c

@@ -5640,215 +5640,6 @@ static bool csr_is_rate_set_match(tpAniSirGlobal mac_ctx,
 	return match;
 }
 
-#ifdef WLAN_FEATURE_FILS_SK
-/*
- * csr_is_fils_realm_match: API to check whether realm in scan filter is
- * matching with realm in bss info
- * @bss_descr: bss description
- * @filter: scan filter
- *
- * Return: true if success else false
- */
-static bool csr_is_fils_realm_match(tSirBssDescription *bss_descr,
-			tCsrScanResultFilter *filter)
-{
-	int i;
-	bool is_match = true;
-
-	if (filter->realm_check) {
-		is_match = false;
-		for (i = 0; i < bss_descr->fils_info_element.realm_cnt; i++) {
-			if (!qdf_mem_cmp(filter->fils_realm,
-				bss_descr->fils_info_element.realm[i],
-				SIR_REALM_LEN)) {
-				return true;
-			}
-		}
-	}
-
-	return is_match;
-}
-#else
-static bool csr_is_fils_realm_match(tSirBssDescription *bss_descr,
-			tCsrScanResultFilter *filter)
-{
-	return true;
-}
-#endif
-/**
- * csr_match_bss() - to compare the bss
- * @hal: pointer to hal context
- * @bss_descr: pointer bss description
- * @filter: scan filter
- * @neg_auth: negotiated auth
- * @neg_uc: negotiated for unicast
- * @neg_mc: negotiated for multicast
- * @ie_dblptr: double pointer to IE
- *
- * This routine will be called to match the bss
- * If caller want to get the *ie_dblptr allocated by this function,
- * pass in *ie_dblptr = NULL
- *
- * Return: bool
- */
-bool csr_match_bss(tHalHandle hal, tSirBssDescription *bss_descr,
-		   tCsrScanResultFilter *filter, eCsrAuthType *neg_auth,
-		   eCsrEncryptionType *neg_uc, eCsrEncryptionType *neg_mc,
-		   tDot11fBeaconIEs **ie_dblptr)
-{
-	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
-	bool rc = false, check, blacklist_check;
-	uint32_t i;
-	tDot11fBeaconIEs *ie_ptr = NULL;
-	uint8_t *pb;
-	struct roam_ext_params *roam_params;
-	uint8_t *p2p_macaddr = NULL;
-
-	roam_params = &mac_ctx->roam.configParam.roam_params;
-	if ((NULL == ie_dblptr) || (*ie_dblptr) == NULL) {
-		/* If no IEs passed in, get our own. */
-		if (!QDF_IS_STATUS_SUCCESS(
-			csr_get_parsed_bss_description_ies(mac_ctx,
-				bss_descr, &ie_ptr))) {
-			goto end;
-		}
-	} else {
-		/* Save the one pass in for local use */
-		ie_ptr = *ie_dblptr;
-	}
-
-	/* Check if caller wants P2P */
-	check = (!filter->p2pResult || ie_ptr->P2PBeaconProbeRes.present);
-	if (!check)
-		goto end;
-
-	/* Check for Blacklist BSSID's and avoid connections */
-	blacklist_check = false;
-	for (i = 0; i < roam_params->num_bssid_avoid_list; i++) {
-		if (qdf_is_macaddr_equal((struct qdf_mac_addr *)
-					&roam_params->bssid_avoid_list[i],
-				(struct qdf_mac_addr *)bss_descr->bssId)) {
-			blacklist_check = true;
-			break;
-		}
-	}
-	if (blacklist_check) {
-		sme_err("Don't Attempt connect to blacklist bssid");
-		goto end;
-	}
-
-	if (ie_ptr->SSID.present) {
-		for (i = 0; i < filter->SSIDs.numOfSSIDs; i++) {
-			check = csr_is_ssid_match(mac_ctx,
-					filter->SSIDs.SSIDList[i].SSID.ssId,
-					filter->SSIDs.SSIDList[i].SSID.length,
-					ie_ptr->SSID.ssid,
-					ie_ptr->SSID.num_ssid, true);
-			if (check)
-				break;
-		}
-		if (!check)
-			goto end;
-	}
-	check = true;
-	p2p_macaddr = ie_ptr->P2PBeaconProbeRes.P2PDeviceInfo.P2PDeviceAddress;
-	for (i = 0; i < filter->BSSIDs.numOfBSSIDs; i++) {
-		check = csr_is_bssid_match(mac_ctx,
-				(struct qdf_mac_addr *)&filter->BSSIDs.bssid[i],
-				(struct qdf_mac_addr *)bss_descr->bssId);
-		if (check)
-			break;
-
-		if (filter->p2pResult && ie_ptr->P2PBeaconProbeRes.present) {
-			check = csr_is_bssid_match(mac_ctx,
-					(struct qdf_mac_addr *)
-						&filter->BSSIDs.bssid[i],
-					(struct qdf_mac_addr *)p2p_macaddr);
-			if (check)
-				break;
-		}
-	}
-	if (!check)
-		goto end;
-
-	check = true;
-	for (i = 0; i < filter->ChannelInfo.numOfChannels; i++) {
-		check = csr_is_channel_band_match(mac_ctx,
-				filter->ChannelInfo.ChannelList[i], bss_descr);
-		if (check)
-			break;
-	}
-	if (!check)
-		goto end;
-	/* If this is for measurement filtering */
-	if (filter->fMeasurement) {
-		rc = true;
-		goto end;
-	}
-	if (!csr_is_phy_mode_match(mac_ctx, filter->phyMode, bss_descr,
-			NULL, NULL, ie_ptr))
-		goto end;
-
-#ifdef WLAN_FEATURE_11W
-	if ((!filter->bWPSAssociation) && (!filter->bOSENAssociation) &&
-			!csr_is_security_match(mac_ctx, &filter->authType,
-				&filter->EncryptionType,
-				&filter->mcEncryptionType,
-				&filter->MFPEnabled,
-				&filter->MFPRequired,
-				&filter->MFPCapable,
-				bss_descr, ie_ptr, neg_auth,
-				neg_uc, neg_mc))
-#else
-	if ((!filter->bWPSAssociation) && (!filter->bOSENAssociation) &&
-			!csr_is_security_match(mac_ctx, &filter->authType,
-				&filter->EncryptionType,
-				&filter->mcEncryptionType,
-				NULL, NULL, NULL,
-				bss_descr, ie_ptr, neg_auth,
-				neg_uc, neg_mc))
-#endif
-		goto end;
-	if (!csr_is_capabilities_match(mac_ctx, filter->BSSType, bss_descr))
-		goto end;
-	if (!csr_is_rate_set_match(mac_ctx, &ie_ptr->SuppRates,
-			&ie_ptr->ExtSuppRates))
-		goto end;
-	if ((eCsrRoamWmmQbssOnly == mac_ctx->roam.configParam.WMMSupportMode)
-			&& !CSR_IS_QOS_BSS(ie_ptr))
-		goto end;
-	/*
-	 * Check country. check even when pb is NULL because we may
-	 * want to make sure
-	 */
-	pb = (filter->countryCode[0]) ? (filter->countryCode) : NULL;
-	check = csr_match_country_code(mac_ctx, pb, ie_ptr);
-	if (!check)
-		goto end;
-
-	if (filter->MDID.mdiePresent && csr_roam_is11r_assoc(mac_ctx,
-			mac_ctx->roam.roamSession->sessionId)) {
-		if (bss_descr->mdiePresent) {
-			if (filter->MDID.mobilityDomain !=
-					(bss_descr->mdie[1] << 8 |
-						bss_descr->mdie[0]))
-				goto end;
-		} else {
-			goto end;
-		}
-	}
-	rc = true;
-	if (rc)
-		rc = csr_is_fils_realm_match(bss_descr, filter);
-
-end:
-	if (ie_dblptr)
-		*ie_dblptr = ie_ptr;
-	else if (ie_ptr)
-		qdf_mem_free(ie_ptr);
-	return rc;
-}
-
 static bool csr_match_connected_bss_security(tpAniSirGlobal pMac,
 					     tCsrRoamConnectedProfile *pProfile,
 					     tSirBssDescription *pBssDesc,
@@ -6456,49 +6247,6 @@ QDF_STATUS csr_get_regulatory_domain_for_country(tpAniSirGlobal pMac,
 	return status;
 }
 
-/* To check whether a country code matches the one in the IE
- * Only check the first two characters, ignoring in/outdoor
- * pCountry -- caller allocated buffer contain the country
- * code that is checking against the one in pIes. It can be
- * NULL. Caller must provide pIes, it cannot be NULL This
- * function always return true if 11d support is not turned on.
- */
-bool csr_match_country_code(tpAniSirGlobal pMac, uint8_t *pCountry,
-			    tDot11fBeaconIEs *pIes)
-{
-	bool fRet = true;
-
-	do {
-		if (!wlan_reg_11d_enabled_on_host(pMac->psoc))
-			break;
-
-		if (!pIes) {
-			sme_err("No IEs");
-			break;
-		}
-
-		if (pCountry) {
-			uint32_t i;
-
-			if (!pIes->Country.present) {
-				fRet = false;
-				break;
-			}
-			/* Convert the CountryCode characters to upper */
-			for (i = 0; i < WNI_CFG_COUNTRY_CODE_LEN - 1; i++)
-				pCountry[i] = csr_to_upper(pCountry[i]);
-
-			if (qdf_mem_cmp(pIes->Country.country, pCountry,
-					     WNI_CFG_COUNTRY_CODE_LEN - 1)) {
-				fRet = false;
-				break;
-			}
-		}
-	} while (0);
-
-	return fRet;
-}
-
 QDF_STATUS csr_get_modify_profile_fields(tpAniSirGlobal pMac,
 					uint32_t sessionId,
 					 tCsrRoamModifyProfileFields *