qcacld-3.0: Remove legacy scan for ssid logic
Remove legacy scan for ssid logic Change-Id: I87b2b2a1b284d72e6d6c8d26303ce02b80c0b8b2 CRs-Fixed: 2101353
This commit is contained in:
parent
d698bf5328
commit
344d725f60
@ -160,9 +160,7 @@ static QDF_STATUS sme_process_set_hw_mode_resp(tpAniSirGlobal mac, uint8_t *msg)
|
||||
enum sir_conn_update_reason reason;
|
||||
struct csr_roam_session *session;
|
||||
uint32_t session_id;
|
||||
#ifndef NAPIER_SCAN
|
||||
tSmeCmd *saved_cmd;
|
||||
#endif
|
||||
|
||||
param = (struct sir_set_hw_mode_resp *)msg;
|
||||
if (!param) {
|
||||
sme_err("HW mode resp param is NULL");
|
||||
@ -224,40 +222,6 @@ static QDF_STATUS sme_process_set_hw_mode_resp(tpAniSirGlobal mac, uint8_t *msg)
|
||||
* needs to be handled after the response of set hw
|
||||
* mode
|
||||
*/
|
||||
#ifndef NAPIER_SCAN
|
||||
saved_cmd = (tSmeCmd *)mac->sme.saved_scan_cmd;
|
||||
if (!saved_cmd) {
|
||||
sme_err("saved cmd is NULL, Check this");
|
||||
goto end;
|
||||
}
|
||||
if (param->status == SET_HW_MODE_STATUS_OK) {
|
||||
sme_err("search for ssid success");
|
||||
csr_scan_handle_search_for_ssid(mac,
|
||||
saved_cmd);
|
||||
} else {
|
||||
sme_debug("search for ssid failure");
|
||||
csr_scan_handle_search_for_ssid_failure(mac,
|
||||
saved_cmd);
|
||||
}
|
||||
if (saved_cmd->u.roamCmd.pRoamBssEntry)
|
||||
qdf_mem_free(
|
||||
saved_cmd->u.roamCmd.pRoamBssEntry);
|
||||
if (saved_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList)
|
||||
qdf_mem_free(saved_cmd->u.scanCmd.u.
|
||||
scanRequest.SSIDs.SSIDList);
|
||||
if (saved_cmd->u.scanCmd.pToRoamProfile) {
|
||||
csr_release_profile(mac, saved_cmd->
|
||||
u.scanCmd.pToRoamProfile);
|
||||
qdf_mem_free(saved_cmd->u.scanCmd.pToRoamProfile);
|
||||
saved_cmd->u.scanCmd.pToRoamProfile = NULL;
|
||||
}
|
||||
if (saved_cmd) {
|
||||
csr_saved_scan_cmd_free_fields(mac, saved_cmd);
|
||||
qdf_mem_free(saved_cmd);
|
||||
saved_cmd = NULL;
|
||||
mac->sme.saved_scan_cmd = NULL;
|
||||
}
|
||||
#else
|
||||
if (param->status == SET_HW_MODE_STATUS_OK) {
|
||||
sme_debug("search for ssid success");
|
||||
csr_scan_handle_search_for_ssid(mac,
|
||||
@ -268,7 +232,6 @@ static QDF_STATUS sme_process_set_hw_mode_resp(tpAniSirGlobal mac, uint8_t *msg)
|
||||
session_id);
|
||||
}
|
||||
csr_saved_scan_cmd_free_fields(mac, session);
|
||||
#endif
|
||||
}
|
||||
|
||||
end:
|
||||
|
@ -1120,7 +1120,7 @@ QDF_STATUS csr_scan_handle_failed_lostlink3(tpAniSirGlobal pMac,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#ifdef NAPIER_SCAN
|
||||
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal mac_ctx,
|
||||
uint32_t session_id)
|
||||
{
|
||||
@ -1256,165 +1256,7 @@ roam_completion:
|
||||
false);
|
||||
return status;
|
||||
}
|
||||
#else
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal pMac,
|
||||
tSmeCmd *pCommand)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
tScanResultHandle hBSSList = CSR_INVALID_SCANRESULT_HANDLE;
|
||||
tCsrScanResultFilter *pScanFilter = NULL;
|
||||
tCsrRoamProfile *pProfile = pCommand->u.scanCmd.pToRoamProfile;
|
||||
uint32_t sessionId = pCommand->sessionId;
|
||||
|
||||
do {
|
||||
/* If this scan is for LFR */
|
||||
if (pMac->roam.neighborRoamInfo[sessionId].
|
||||
uOsRequestedHandoff) {
|
||||
/* notify LFR state m/c */
|
||||
status = csr_neighbor_roam_sssid_scan_done(pMac,
|
||||
sessionId, QDF_STATUS_SUCCESS);
|
||||
if (QDF_STATUS_SUCCESS != status)
|
||||
csr_neighbor_roam_start_lfr_scan(pMac,
|
||||
sessionId);
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* If there is roam command waiting, ignore this roam because
|
||||
* the newer roam command is the one to execute
|
||||
*/
|
||||
if (csr_is_roam_command_waiting_for_session(pMac, sessionId)) {
|
||||
sme_warn("aborts because roam command waiting");
|
||||
break;
|
||||
}
|
||||
if (pProfile == NULL)
|
||||
break;
|
||||
pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
|
||||
if (NULL == pScanFilter) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
break;
|
||||
}
|
||||
status = csr_roam_prepare_filter_from_profile(pMac, pProfile,
|
||||
pScanFilter);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
break;
|
||||
status = csr_scan_get_result(pMac, pScanFilter, &hBSSList);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
break;
|
||||
if (pMac->roam.roamSession[sessionId].connectState ==
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING) {
|
||||
sme_err("upper layer issued disconnetion");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
break;
|
||||
}
|
||||
status = csr_roam_issue_connect(pMac, sessionId, pProfile,
|
||||
hBSSList, eCsrHddIssued,
|
||||
pCommand->u.scanCmd.roamId,
|
||||
true, true);
|
||||
} while (0);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
if (CSR_INVALID_SCANRESULT_HANDLE != hBSSList)
|
||||
csr_scan_result_purge(pMac, hBSSList);
|
||||
/* We haven't done anything to this profile */
|
||||
csr_roam_call_callback(pMac, sessionId, NULL,
|
||||
pCommand->u.scanCmd.roamId,
|
||||
eCSR_ROAM_ASSOCIATION_FAILURE,
|
||||
eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE);
|
||||
}
|
||||
if (pScanFilter) {
|
||||
csr_free_scan_filter(pMac, pScanFilter);
|
||||
qdf_mem_free(pScanFilter);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal pMac,
|
||||
tSmeCmd *pCommand)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
uint32_t sessionId = pCommand->sessionId;
|
||||
tCsrRoamProfile *pProfile = pCommand->u.scanCmd.pToRoamProfile;
|
||||
struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
|
||||
eCsrRoamResult roam_result;
|
||||
|
||||
if (!pSession) {
|
||||
sme_err("session %d not found", sessionId);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
/* If this scan is for LFR */
|
||||
if (pMac->roam.neighborRoamInfo[sessionId].uOsRequestedHandoff) {
|
||||
/* notify LFR state m/c */
|
||||
status = csr_neighbor_roam_sssid_scan_done(pMac, sessionId,
|
||||
QDF_STATUS_E_FAILURE);
|
||||
if (QDF_STATUS_SUCCESS != status)
|
||||
csr_neighbor_roam_start_lfr_scan(pMac, sessionId);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#ifdef WLAN_DEBUG
|
||||
if (pCommand->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs == 1) {
|
||||
char str[36];
|
||||
tSirMacSSid *ptr_ssid =
|
||||
&pCommand->u.scanCmd.u.scanRequest.SSIDs.SSIDList[0].SSID;
|
||||
qdf_mem_copy(str, ptr_ssid->ssId, ptr_ssid->length);
|
||||
str[ptr_ssid->length] = 0;
|
||||
sme_debug("SSID: %s", str);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Check whether it is for start ibss. No need to do anything if it
|
||||
* is a JOIN request
|
||||
*/
|
||||
if (pProfile && CSR_IS_START_IBSS(pProfile)) {
|
||||
status = csr_roam_issue_connect(pMac, sessionId, pProfile, NULL,
|
||||
eCsrHddIssued, pCommand->u.scanCmd.roamId,
|
||||
true, true);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err(
|
||||
"failed to issue startIBSS, status: 0x%08X",
|
||||
status);
|
||||
csr_roam_call_callback(pMac, sessionId, NULL,
|
||||
pCommand->u.scanCmd.roamId, eCSR_ROAM_FAILED,
|
||||
eCSR_ROAM_RESULT_FAILURE);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
roam_result = eCSR_ROAM_RESULT_FAILURE;
|
||||
if (NULL != pProfile && csr_is_bss_type_ibss(pProfile->BSSType)) {
|
||||
roam_result = eCSR_ROAM_RESULT_IBSS_START_FAILED;
|
||||
goto roam_completion;
|
||||
}
|
||||
/* Only indicate assoc_completion if we indicate assoc_start. */
|
||||
if (pSession->bRefAssocStartCnt > 0) {
|
||||
tCsrRoamInfo *pRoamInfo = NULL, roamInfo;
|
||||
|
||||
qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
|
||||
pRoamInfo = &roamInfo;
|
||||
if (pCommand->u.roamCmd.pRoamBssEntry) {
|
||||
tCsrScanResult *pScanResult = GET_BASE_ADDR(
|
||||
pCommand->u.roamCmd.pRoamBssEntry,
|
||||
tCsrScanResult, Link);
|
||||
roamInfo.pBssDesc = &pScanResult->Result.BssDescriptor;
|
||||
}
|
||||
roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
|
||||
roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
|
||||
pSession->bRefAssocStartCnt--;
|
||||
csr_roam_call_callback(pMac, sessionId, pRoamInfo,
|
||||
pCommand->u.scanCmd.roamId,
|
||||
eCSR_ROAM_ASSOCIATION_COMPLETION,
|
||||
eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE);
|
||||
} else {
|
||||
csr_roam_call_callback(pMac, sessionId, NULL,
|
||||
pCommand->u.scanCmd.roamId,
|
||||
eCSR_ROAM_ASSOCIATION_FAILURE,
|
||||
eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE);
|
||||
}
|
||||
roam_completion:
|
||||
csr_roam_completion(pMac, sessionId, NULL, pCommand, roam_result,
|
||||
false);
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
QDF_STATUS csr_scan_result_purge(tpAniSirGlobal pMac,
|
||||
tScanResultHandle hScanList)
|
||||
{
|
||||
@ -2771,103 +2613,6 @@ void csr_saved_scan_cmd_free_fields(tpAniSirGlobal mac_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_save_profile() - Save the profile info from sme command
|
||||
* @mac_ctx: Global MAC context
|
||||
* @save_cmd: Pointer where the command will be saved
|
||||
* @command: Command from which the profile will be saved
|
||||
*
|
||||
* Saves the profile information from the SME's scan command
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx,
|
||||
tSmeCmd *save_cmd, tSmeCmd *command)
|
||||
{
|
||||
tCsrScanResult *scan_result;
|
||||
tCsrScanResult *temp;
|
||||
uint32_t bss_len;
|
||||
QDF_STATUS status;
|
||||
|
||||
save_cmd->u.scanCmd.pToRoamProfile =
|
||||
qdf_mem_malloc(sizeof(tCsrRoamProfile));
|
||||
if (!save_cmd->u.scanCmd.pToRoamProfile) {
|
||||
sme_err("pToRoamProfile mem fail");
|
||||
goto error;
|
||||
}
|
||||
|
||||
status = csr_roam_copy_profile(mac_ctx,
|
||||
save_cmd->u.scanCmd.pToRoamProfile,
|
||||
command->u.scanCmd.pToRoamProfile);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err("csr_roam_copy_profile fail");
|
||||
goto error;
|
||||
}
|
||||
|
||||
save_cmd->sessionId = command->sessionId;
|
||||
save_cmd->u.scanCmd.roamId = command->u.scanCmd.roamId;
|
||||
save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs =
|
||||
command->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs;
|
||||
save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList =
|
||||
qdf_mem_malloc(
|
||||
save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs *
|
||||
sizeof(tCsrSSIDInfo));
|
||||
if (!save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList) {
|
||||
sme_err("SSIDList mem fail");
|
||||
goto error;
|
||||
}
|
||||
|
||||
qdf_mem_copy(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList,
|
||||
command->u.scanCmd.u.scanRequest.SSIDs.SSIDList,
|
||||
save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs *
|
||||
sizeof(tCsrSSIDInfo));
|
||||
|
||||
if (!command->u.roamCmd.pRoamBssEntry)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
scan_result = GET_BASE_ADDR(command->u.roamCmd.pRoamBssEntry,
|
||||
tCsrScanResult, Link);
|
||||
|
||||
bss_len = scan_result->Result.BssDescriptor.length +
|
||||
sizeof(scan_result->Result.BssDescriptor.length);
|
||||
|
||||
temp = qdf_mem_malloc(sizeof(tCsrScanResult) + bss_len);
|
||||
if (!temp) {
|
||||
sme_err("bss mem fail");
|
||||
goto error;
|
||||
}
|
||||
|
||||
temp->AgingCount = scan_result->AgingCount;
|
||||
temp->preferValue = scan_result->preferValue;
|
||||
temp->capValue = scan_result->capValue;
|
||||
temp->ucEncryptionType = scan_result->ucEncryptionType;
|
||||
temp->mcEncryptionType = scan_result->mcEncryptionType;
|
||||
temp->authType = scan_result->authType;
|
||||
/* pvIes is unsued in success/failure */
|
||||
temp->Result.pvIes = NULL;
|
||||
|
||||
qdf_mem_copy(temp->Result.pvIes,
|
||||
scan_result->Result.pvIes,
|
||||
sizeof(*scan_result->Result.pvIes));
|
||||
temp->Result.ssId.length = scan_result->Result.ssId.length;
|
||||
qdf_mem_copy(temp->Result.ssId.ssId,
|
||||
scan_result->Result.ssId.ssId,
|
||||
sizeof(scan_result->Result.ssId.ssId));
|
||||
temp->Result.timer = scan_result->Result.timer;
|
||||
qdf_mem_copy(&temp->Result.BssDescriptor,
|
||||
&scan_result->Result.BssDescriptor,
|
||||
sizeof(temp->Result.BssDescriptor));
|
||||
temp->Link.last = temp->Link.next = NULL;
|
||||
save_cmd->u.roamCmd.pRoamBssEntry = (tListElem *)temp;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
error:
|
||||
csr_scan_handle_search_for_ssid_failure(mac_ctx,
|
||||
command);
|
||||
csr_saved_scan_cmd_free_fields(mac_ctx, save_cmd);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
static void
|
||||
csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand,
|
||||
eCsrScanCompleteNextCommand *nxt_cmd,
|
||||
@ -4257,39 +4002,6 @@ QDF_STATUS csr_scan_get_bkid_candidate_list(tpAniSirGlobal pMac,
|
||||
}
|
||||
#endif /* FEATURE_WLAN_WAPI */
|
||||
|
||||
#ifndef NAPIER_SCAN
|
||||
/**
|
||||
* csr_roam_copy_channellist() - Function to copy channel list
|
||||
* @mac_ctx: pointer to Global Mac structure
|
||||
* @profile: pointer to tCsrRoamProfile
|
||||
* @scan_cmd: pointer to tSmeCmd
|
||||
* @index: index for channellist
|
||||
*
|
||||
* Function copies channel list
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void csr_roam_copy_channellist(tpAniSirGlobal mac_ctx,
|
||||
tCsrRoamProfile *profile,
|
||||
tSmeCmd *scan_cmd, uint8_t index)
|
||||
{
|
||||
tCsrChannelInfo *channel_info =
|
||||
&scan_cmd->u.scanCmd.u.scanRequest.ChannelInfo;
|
||||
|
||||
for (index = 0; index < profile->ChannelInfo.numOfChannels;
|
||||
index++) {
|
||||
if (!csr_roam_is_valid_channel(mac_ctx,
|
||||
profile->ChannelInfo.ChannelList[index])) {
|
||||
sme_warn("process a channel: %d that is invalid",
|
||||
profile->ChannelInfo.ChannelList[index]);
|
||||
continue;
|
||||
}
|
||||
channel_info->ChannelList[channel_info->numOfChannels] =
|
||||
profile->ChannelInfo.ChannelList[index];
|
||||
scan_cmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* csr_scan_for_ssid() - Function usually used for BSSs that suppresses SSID
|
||||
* @mac_ctx: Pointer to Global Mac structure
|
||||
|
@ -1036,10 +1036,6 @@ QDF_STATUS csr_set_ht2040_mode(tpAniSirGlobal pMac, uint32_t sessionId,
|
||||
ePhyChanBondState cbMode, bool obssEnabled);
|
||||
#endif
|
||||
#ifndef NAPIER_SCAN
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal mac,
|
||||
tSmeCmd *command);
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal mac,
|
||||
tSmeCmd *command);
|
||||
void csr_saved_scan_cmd_free_fields(tpAniSirGlobal mac_ctx,
|
||||
tSmeCmd *saved_scan_cmd);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user