mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Remove tCsrCmd & replace few of sme api with csr
tCsrCmd struct is not required as tSmeCmd struct serves the purpose. Remove tCsrCmd so that un-necessary confusion go away. Replace sme_release_command with csr_release_command to keep track of pending command. Replace sme_get_command_buffer with csr_get_command_buffer to keep track of pending command. Change-Id: I75f45673c95a0c4e656967274b9933661f4b2f43 CRs-Fixed: 2005532
This commit is contained in:
parent
985b813ee3
commit
78618d9d54
6 changed files with 26 additions and 50 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -114,16 +114,6 @@ typedef enum {
|
|||
eCSR_CFG_DOT11_MODE_AUTO,
|
||||
} eCsrCfgDot11Mode;
|
||||
|
||||
typedef enum etCsrRoamCommands {
|
||||
eCsrRoamNoCommand,
|
||||
eCsrRoamCommandScan,
|
||||
eCsrRoamCommandRoam,
|
||||
eCsrRoamCommandWmStatusChange,
|
||||
eCsrRoamCommandSetKey,
|
||||
eCsrRoamCommandRemoveKey,
|
||||
|
||||
} eCsrRoamCommands;
|
||||
|
||||
typedef enum {
|
||||
eCsrScanOther = 1,
|
||||
eCsrScanLostLink1,
|
||||
|
|
@ -447,21 +437,6 @@ typedef struct tagDelStaForSessionCmd {
|
|||
void *pContext;
|
||||
} tDelStaForSessionCmd;
|
||||
|
||||
/* This structure represents one scan request */
|
||||
typedef struct tagCsrCmd {
|
||||
tListElem Link;
|
||||
eCsrRoamCommands command;
|
||||
uint8_t sessionId; /* Session ID for this command */
|
||||
union {
|
||||
tScanCmd scanCmd;
|
||||
tRoamCmd roamCmd;
|
||||
tWmStatusChangeCmd wmStatusChangeCmd;
|
||||
tSetKeyCmd setKeyCmd;
|
||||
tAddStaForSessionCmd addStaSessionCmd;
|
||||
tDelStaForSessionCmd delStaSessionCmd;
|
||||
} u;
|
||||
} tCsrCmd;
|
||||
|
||||
typedef struct tagCsr11rConfig {
|
||||
bool IsFTResourceReqSupported;
|
||||
} tCsr11rConfig;
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ end:
|
|||
LL_ACCESS_LOCK);
|
||||
if (found) {
|
||||
/* Now put this command back on the avilable command list */
|
||||
sme_release_command(mac, command);
|
||||
csr_release_command(mac, command);
|
||||
}
|
||||
sme_process_pending_queue(mac);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
@ -680,10 +680,10 @@ static void sme_abort_command(tpAniSirGlobal pMac, tSmeCmd *pCommand,
|
|||
pCommand->u.remainChlCmd.scan_id);
|
||||
}
|
||||
}
|
||||
sme_release_command(pMac, pCommand);
|
||||
csr_release_command(pMac, pCommand);
|
||||
break;
|
||||
default:
|
||||
sme_release_command(pMac, pCommand);
|
||||
csr_release_command(pMac, pCommand);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -793,7 +793,7 @@ static bool sme_process_scan_queue(tpAniSirGlobal pMac)
|
|||
&pMac->sme.smeScanCmdActiveList,
|
||||
LL_ACCESS_NOLOCK);
|
||||
pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
|
||||
sme_release_command(pMac, pCommand);
|
||||
csr_release_command(pMac, pCommand);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1018,7 +1018,7 @@ sme_process_cmd:
|
|||
LL_ACCESS_NOLOCK);
|
||||
csr_ll_unlock(&pMac->sme.smeCmdActiveList);
|
||||
pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
|
||||
sme_release_command(pMac, pCommand);
|
||||
csr_release_command(pMac, pCommand);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2433,7 +2433,7 @@ static QDF_STATUS sme_process_dual_mac_config_resp(tpAniSirGlobal mac,
|
|||
LL_ACCESS_LOCK);
|
||||
if (found)
|
||||
/* Now put this command back on the available command list */
|
||||
sme_release_command(mac, command);
|
||||
csr_release_command(mac, command);
|
||||
|
||||
sme_process_pending_queue(mac);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
@ -2502,7 +2502,7 @@ static QDF_STATUS sme_process_antenna_mode_resp(tpAniSirGlobal mac,
|
|||
LL_ACCESS_LOCK);
|
||||
if (found)
|
||||
/* Now put this command back on the available command list */
|
||||
sme_release_command(mac, command);
|
||||
csr_release_command(mac, command);
|
||||
|
||||
sme_process_pending_queue(mac);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
@ -3169,7 +3169,7 @@ QDF_STATUS sme_process_nss_update_resp(tpAniSirGlobal mac, uint8_t *msg)
|
|||
LL_ACCESS_LOCK);
|
||||
if (found) {
|
||||
/* Now put this command back on the avilable command list */
|
||||
sme_release_command(mac, command);
|
||||
csr_release_command(mac, command);
|
||||
}
|
||||
sme_process_pending_queue(mac);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
@ -15504,7 +15504,7 @@ QDF_STATUS sme_pdev_set_hw_mode(tHalHandle hal,
|
|||
return QDF_STATUS_E_RESOURCES;
|
||||
}
|
||||
|
||||
cmd = sme_get_command_buffer(mac);
|
||||
cmd = csr_get_command_buffer(mac);
|
||||
if (!cmd) {
|
||||
sms_log(mac, LOGE, FL("Get command buffer failed"));
|
||||
sme_release_global_lock(&mac->sme);
|
||||
|
|
@ -15569,7 +15569,7 @@ QDF_STATUS sme_nss_update_request(tHalHandle hHal, uint32_t vdev_id,
|
|||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
cmd = sme_get_command_buffer(mac);
|
||||
cmd = csr_get_command_buffer(mac);
|
||||
if (!cmd) {
|
||||
sms_log(mac, LOGE, FL("Get command buffer failed"));
|
||||
sme_release_global_lock(&mac->sme);
|
||||
|
|
@ -15615,7 +15615,7 @@ QDF_STATUS sme_soc_set_dual_mac_config(tHalHandle hal,
|
|||
return QDF_STATUS_E_RESOURCES;
|
||||
}
|
||||
|
||||
cmd = sme_get_command_buffer(mac);
|
||||
cmd = csr_get_command_buffer(mac);
|
||||
if (!cmd) {
|
||||
sms_log(mac, LOGE, FL("Get command buffer failed"));
|
||||
sme_release_global_lock(&mac->sme);
|
||||
|
|
@ -15706,7 +15706,7 @@ QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal,
|
|||
return QDF_STATUS_E_RESOURCES;
|
||||
}
|
||||
|
||||
cmd = sme_get_command_buffer(mac);
|
||||
cmd = csr_get_command_buffer(mac);
|
||||
if (!cmd) {
|
||||
sme_release_global_lock(&mac->sme);
|
||||
sms_log(mac, LOGE, FL("Get command buffer failed"));
|
||||
|
|
|
|||
|
|
@ -1331,7 +1331,7 @@ void csr_release_roc_req_cmd(tpAniSirGlobal mac_ctx, uint8_t session_id)
|
|||
/* Put this cmd back on the available command list */
|
||||
if (csr_ll_remove_entry(&mac_ctx->sme.smeCmdActiveList,
|
||||
entry, LL_ACCESS_LOCK))
|
||||
sme_release_command(mac_ctx, cmd);
|
||||
csr_release_command(mac_ctx, cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -8812,13 +8812,13 @@ bool csr_is_scan_for_roam_command_active(tpAniSirGlobal pMac,
|
|||
{
|
||||
bool fRet = false;
|
||||
tListElem *pEntry;
|
||||
tCsrCmd *pCommand;
|
||||
tSmeCmd *pCommand;
|
||||
/* alwasy lock active list before locking pending list */
|
||||
csr_ll_lock(&pMac->sme.smeCmdActiveList);
|
||||
pEntry = csr_ll_peek_head(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK);
|
||||
if (pEntry) {
|
||||
pCommand = GET_BASE_ADDR(pEntry, tCsrCmd, Link);
|
||||
if ((eCsrRoamCommandScan == pCommand->command) &&
|
||||
pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
|
||||
if ((eSmeCommandScan == pCommand->command) &&
|
||||
((eCsrScanForSsid == pCommand->u.scanCmd.reason) ||
|
||||
(eCsrScanP2PFindPeer == pCommand->u.scanCmd.reason))) {
|
||||
fRet = true;
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx, struct scheduler_msg *msg)
|
|||
/* Now put this cmd back on the avilable command list */
|
||||
if (csr_ll_remove_entry(&mac_ctx->sme.smeCmdActiveList,
|
||||
entry, LL_ACCESS_LOCK))
|
||||
sme_release_command(mac_ctx, cmd);
|
||||
csr_release_command(mac_ctx, cmd);
|
||||
sme_process_pending_queue(mac_ctx);
|
||||
}
|
||||
}
|
||||
|
|
@ -794,7 +794,7 @@ void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx, struct scheduler_msg *msg)
|
|||
void csr_release_ndp_initiator_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
|
||||
{
|
||||
csr_free_ndp_initiator_req(cmd);
|
||||
sme_release_command(mac_ctx, cmd);
|
||||
csr_release_command(mac_ctx, cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -808,7 +808,7 @@ void csr_release_ndp_initiator_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
|
|||
void csr_release_ndp_responder_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
|
||||
{
|
||||
csr_free_ndp_responder_req(cmd);
|
||||
sme_release_command(mac_ctx, cmd);
|
||||
csr_release_command(mac_ctx, cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -823,5 +823,5 @@ void csr_release_ndp_data_end_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
|
|||
{
|
||||
qdf_mem_free(cmd->u.data_end_req);
|
||||
cmd->u.data_end_req = NULL;
|
||||
sme_release_command(mac_ctx, cmd);
|
||||
csr_release_command(mac_ctx, cmd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ QDF_STATUS sme_remain_on_chn_rsp(tpAniSirGlobal pMac, uint8_t *pMsg)
|
|||
LL_ACCESS_LOCK);
|
||||
if (fFound) {
|
||||
/* Now put this command back on the avilable command list */
|
||||
sme_release_command(pMac, pCommand);
|
||||
csr_release_command(pMac, pCommand);
|
||||
}
|
||||
sme_process_pending_queue(pMac);
|
||||
return status;
|
||||
|
|
@ -252,7 +252,7 @@ QDF_STATUS p2p_remain_on_channel(tHalHandle hHal, uint8_t sessionId,
|
|||
tSmeCmd *pRemainChlCmd = NULL;
|
||||
uint32_t phyMode;
|
||||
|
||||
pRemainChlCmd = sme_get_command_buffer(pMac);
|
||||
pRemainChlCmd = csr_get_command_buffer(pMac);
|
||||
if (pRemainChlCmd == NULL)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "ani_global.h"
|
||||
|
||||
#include "sme_inside.h"
|
||||
#include "csr_inside_api.h"
|
||||
#include "host_diag_core_event.h"
|
||||
#include "host_diag_core_log.h"
|
||||
|
||||
|
|
@ -784,7 +785,7 @@ sme_QosStatusType sme_qos_release_req(tHalHandle hHal, uint8_t session_id,
|
|||
void qos_release_command(tpAniSirGlobal pMac, tSmeCmd *pCommand)
|
||||
{
|
||||
qdf_mem_zero(&pCommand->u.qosCmd, sizeof(tGenericQosCmd));
|
||||
sme_release_command(pMac, pCommand);
|
||||
csr_release_command(pMac, pCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -7470,7 +7471,7 @@ static QDF_STATUS qos_issue_command(tpAniSirGlobal pMac, uint8_t sessionId,
|
|||
QDF_STATUS status = QDF_STATUS_E_RESOURCES;
|
||||
tSmeCmd *pCommand = NULL;
|
||||
do {
|
||||
pCommand = sme_get_command_buffer(pMac);
|
||||
pCommand = csr_get_command_buffer(pMac);
|
||||
if (!pCommand) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: fail to get command buffer for command %d",
|
||||
|
|
|
|||
Loading…
Reference in a new issue