Просмотр исходного кода

qcacld-3.0: (PART-1) Remove obsoleted APIs in SME module

Remove some of the obsoleted APIs in SME module

Change-Id: If865445d564a89bde133ca32272fff9594ce44fd
CRs-Fixed: 2201799
Krunal Soni 7 лет назад
Родитель
Сommit
795f9c2733

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

@@ -382,9 +382,6 @@ tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle,
 tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle,
 		tScanResultHandle hScanResult);
 QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult);
-QDF_STATUS sme_scan_get_pmkid_candidate_list(tHalHandle hHal, uint8_t sessionId,
-		tPmkidCandidateInfo *pPmkidList,
-		uint32_t *pNumItems);
 QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId,
 		tCsrRoamProfile *pProfile, uint32_t *pRoamId);
 QDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId,

+ 0 - 36
core/sme/src/common/sme_api.c

@@ -3035,42 +3035,6 @@ QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult)
 	return status;
 }
 
-/*
- * sme_scan_get_pmkid_candidate_list() -
- * A wrapper function to return the PMKID candidate list
- *   This is a synchronous call
- *
- * pPmkidList - caller allocated buffer point to an array of
- *			tPmkidCandidateInfo
- * pNumItems - pointer to a variable that has the number of
- *		       tPmkidCandidateInfo allocated when retruning, this is
- *		       either the number needed or number of items put into
- *		       pPmkidList
- * Return QDF_STATUS - when fail, it usually means the buffer allocated is not
- *			 big enough and pNumItems
- *			 has the number of tPmkidCandidateInfo.
- *  \Note: pNumItems is a number of tPmkidCandidateInfo,
- *	   not sizeof(tPmkidCandidateInfo) * something
- */
-QDF_STATUS sme_scan_get_pmkid_candidate_list(tHalHandle hHal, uint8_t sessionId,
-					     tPmkidCandidateInfo *pPmkidList,
-					     uint32_t *pNumItems)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
-	status = sme_acquire_global_lock(&pMac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		status =
-			csr_scan_get_pmkid_candidate_list(pMac, sessionId,
-							  pPmkidList,
-							  pNumItems);
-		sme_release_global_lock(&pMac->sme);
-	}
-
-	return status;
-}
-
 eCsrPhyMode sme_get_phy_mode(tHalHandle hHal)
 {
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);

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

@@ -1257,108 +1257,6 @@ static bool csr_scan_flush_denied(tpAniSirGlobal pMac)
 	return 0;
 }
 
-static QDF_STATUS csr_add_pmkid_candidate_list(tpAniSirGlobal pMac,
-					       uint32_t sessionId,
-					       tSirBssDescription *pBssDesc,
-					       tDot11fBeaconIEs *pIes)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
-	tPmkidCandidateInfo *pmkid_info = NULL;
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-	WLAN_HOST_DIAG_EVENT_DEF(secEvent,
-				 host_event_wlan_security_payload_type);
-#endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */
-	if (!pSession) {
-		sme_err("session %d not found", sessionId);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	sme_debug("NumPmkidCandidate: %d", pSession->NumPmkidCandidate);
-	if (!pIes)
-		return status;
-		/* check if this is a RSN BSS */
-	if (!pIes->RSN.present)
-		return status;
-
-	if (pSession->NumPmkidCandidate >= CSR_MAX_PMKID_ALLOWED)
-		return QDF_STATUS_E_FAILURE;
-
-	/* BSS is capable of doing pre-authentication */
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-	qdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type),
-		    0);
-	secEvent.eventId = WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND;
-	secEvent.encryptionModeMulticast = (uint8_t)diag_enc_type_from_csr_type(
-				pSession->connectedProfile.mcEncryptionType);
-	secEvent.encryptionModeUnicast = (uint8_t)diag_enc_type_from_csr_type(
-				pSession->connectedProfile.EncryptionType);
-	qdf_mem_copy(secEvent.bssid, pSession->connectedProfile.bssid.bytes,
-			QDF_MAC_ADDR_SIZE);
-	secEvent.authMode = (uint8_t)diag_auth_type_from_csr_type(
-				pSession->connectedProfile.AuthType);
-	WLAN_HOST_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY);
-#endif /* #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR */
-
-	pmkid_info = &pSession->PmkidCandidateInfo[pSession->NumPmkidCandidate];
-	/* if yes, then add to PMKIDCandidateList */
-	qdf_mem_copy(pmkid_info->BSSID.bytes, pBssDesc->bssId,
-			QDF_MAC_ADDR_SIZE);
-	/* Bit 0 offirst byte - PreAuthentication Capability */
-	if ((pIes->RSN.RSN_Cap[0] >> 0) & 0x1)
-		pmkid_info->preAuthSupported = true;
-	else
-		pmkid_info->preAuthSupported = false;
-	pSession->NumPmkidCandidate++;
-	return status;
-}
-/*
- * This function checks whether new AP is found for the current connected
- * profile. If it is found, it return the sessionId, else it return invalid
- * sessionID
- */
-static QDF_STATUS csr_process_bss_desc_for_pmkid_list(tpAniSirGlobal pMac,
-						tSirBssDescription *pBssDesc,
-						tDot11fBeaconIEs *pIes,
-						uint8_t sessionId)
-{
-	struct csr_roam_session *pSession;
-	tDot11fBeaconIEs *pIesLocal = pIes;
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-
-	if (!(pIesLocal ||
-	    QDF_IS_STATUS_SUCCESS(
-		csr_get_parsed_bss_description_ies(pMac, pBssDesc,
-						   &pIesLocal))))
-		return status;
-
-	if (!CSR_IS_SESSION_VALID(pMac, sessionId)) {
-		if (!pIes)
-			qdf_mem_free(pIesLocal);
-		return status;
-	}
-
-	pSession = CSR_GET_SESSION(pMac, sessionId);
-	if (csr_is_conn_state_connected_infra(pMac, sessionId)
-	    && (eCSR_AUTH_TYPE_RSN == pSession->connectedProfile.AuthType)
-	    && csr_match_bss_to_connect_profile(pMac,
-				&pSession->connectedProfile,
-				pBssDesc, pIesLocal)) {
-		/* This new BSS fits the current profile connected */
-		status = csr_add_pmkid_candidate_list(pMac, sessionId,
-						      pBssDesc, pIesLocal);
-		if (!QDF_IS_STATUS_SUCCESS(status))
-			sme_err("csr_add_pmkid_candidate_list failed");
-		else
-			status = QDF_STATUS_SUCCESS;
-	}
-
-	if (!pIes)
-		qdf_mem_free(pIesLocal);
-
-	return status;
-}
-
 #ifdef FEATURE_WLAN_WAPI
 static QDF_STATUS csr_add_bkid_candidate_list(tpAniSirGlobal pMac,
 					      uint32_t sessionId,
@@ -2433,75 +2331,6 @@ QDF_STATUS csr_move_bss_to_head_from_bssid(tpAniSirGlobal pMac,
 	return status;
 }
 
-QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac,
-					     uint32_t sessionId,
-					     tPmkidCandidateInfo *pPmkidList,
-					     uint32_t *pNumItems)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
-	tCsrScanResultFilter *pScanFilter;
-	tCsrScanResultInfo *pScanResult;
-	tScanResultHandle hBSSList;
-	uint32_t nItems = *pNumItems;
-
-	if (!pSession) {
-		sme_err("session %d not found", sessionId);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	sme_debug("pMac->scan.NumPmkidCandidate = %d",
-		pSession->NumPmkidCandidate);
-	csr_reset_pmkid_candidate_list(pMac, sessionId);
-	if (!(csr_is_conn_state_connected(pMac, sessionId)
-	    && pSession->pCurRoamProfile))
-		return status;
-
-	*pNumItems = 0;
-	pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
-	if (NULL == pScanFilter)
-		return QDF_STATUS_E_NOMEM;
-
-	/* Here is the profile we need to connect to */
-	status = csr_roam_prepare_filter_from_profile(pMac,
-					pSession->pCurRoamProfile, pScanFilter);
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		qdf_mem_free(pScanFilter);
-		return status;
-	}
-
-	status = csr_scan_get_result(pMac, pScanFilter, &hBSSList);
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		csr_free_scan_filter(pMac, pScanFilter);
-		qdf_mem_free(pScanFilter);
-		return status;
-	}
-
-	if (pSession->NumPmkidCandidate < nItems) {
-		pScanResult = csr_scan_result_get_next(pMac, hBSSList);
-		while (pScanResult != NULL) {
-			/* NumPmkidCandidate adds up here */
-			csr_process_bss_desc_for_pmkid_list(pMac,
-				&pScanResult->BssDescriptor,
-				(tDot11fBeaconIEs *)(pScanResult->pvIes),
-				sessionId);
-			pScanResult = csr_scan_result_get_next(pMac, hBSSList);
-		}
-	}
-
-	if (pSession->NumPmkidCandidate) {
-		*pNumItems = pSession->NumPmkidCandidate;
-		qdf_mem_copy(pPmkidList, pSession->PmkidCandidateInfo,
-			     pSession->NumPmkidCandidate *
-			     sizeof(tPmkidCandidateInfo));
-	}
-
-	csr_scan_result_purge(pMac, hBSSList);
-	csr_free_scan_filter(pMac, pScanFilter);
-	qdf_mem_free(pScanFilter);
-	return status;
-}
-
 #ifdef FEATURE_WLAN_WAPI
 QDF_STATUS csr_scan_get_bkid_candidate_list(tpAniSirGlobal pMac,
 					    uint32_t sessionId,

+ 0 - 18
core/sme/src/csr/csr_inside_api.h

@@ -849,24 +849,6 @@ QDF_STATUS csr_roam_connect_to_last_profile(tpAniSirGlobal pMac,
 QDF_STATUS csr_roam_disconnect(tpAniSirGlobal pMac, uint32_t sessionId,
 			       eCsrRoamDisconnectReason reason);
 
-/*
- * csr_scan_get_pmkid_candidate_list() -
- *  Return the PMKID candidate list
- *
- * pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo
- * pNumItems - pointer to a variable that has the number of tPmkidCandidateInfo
- * allocated when retruning, this is either the number needed or number of
- * itemsput into pPmkidList
- * Return QDF_STATUS - when fail, it usually means the buffer allocated is not
- * big enough and pNumItems has the number of tPmkidCandidateInfo.
- * Note: pNumItems is a number of tPmkidCandidateInfo, not
- * sizeof(tPmkidCandidateInfo) * something
- */
-QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac,
-						uint32_t sessionId,
-					     tPmkidCandidateInfo *pPmkidList,
-					     uint32_t *pNumItems);
-
 /* 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