qcacld-3.0: Remove serialization for get link speed cmd

Currently, Host serialize get link speed command through
MC thread which is truly not required.Hence removing
serialization for get link speed cmd.

Change-Id: Ia2895394025056d4957856bb9bde0350b55d25ca
CRs-Fixed: 2042492
This commit is contained in:
Mukul Sharma
2017-05-04 17:53:22 +05:30
committed by snandini
parent 79f0ba6ffe
commit c3886aad85
8 changed files with 26 additions and 39 deletions

View File

@@ -185,7 +185,6 @@ enum eWniMsgTypes {
eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND, /* To indicate completion of CSA IE */
/* update in beacons/probe rsp */
eWNI_SME_STATS_EXT_EVENT,
eWNI_SME_LINK_SPEED_IND, /* Indicate linkspeed response from WMA */
eWNI_SME_CSA_OFFLOAD_EVENT,
eWNI_SME_UPDATE_ADDITIONAL_IES, /* indicates Additional IE from hdd to PE */
eWNI_SME_MODIFY_ADDITIONAL_IES, /* To indicate IE modify from hdd to PE */

View File

@@ -321,7 +321,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
CASE_RETURN_STRING(eWNI_SME_DFS_BEACON_CHAN_SW_IE_REQ);
CASE_RETURN_STRING(eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND);
CASE_RETURN_STRING(eWNI_SME_STATS_EXT_EVENT);
CASE_RETURN_STRING(eWNI_SME_LINK_SPEED_IND);
CASE_RETURN_STRING(eWNI_SME_CSA_OFFLOAD_EVENT);
CASE_RETURN_STRING(eWNI_SME_UPDATE_ADDITIONAL_IES);
CASE_RETURN_STRING(eWNI_SME_MODIFY_ADDITIONAL_IES);
@@ -663,7 +662,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
CASE_RETURN_STRING(WMA_DFS_BEACON_TX_SUCCESS_IND);
CASE_RETURN_STRING(WMA_DISASSOC_TX_COMP);
CASE_RETURN_STRING(WMA_DEAUTH_TX_COMP);
CASE_RETURN_STRING(WMA_GET_LINK_SPEED);
CASE_RETURN_STRING(WMA_MODEM_POWER_STATE_IND);
#ifdef WLAN_FEATURE_STATS_EXT
CASE_RETURN_STRING(WMA_STATS_EXT_REQUEST);

View File

@@ -2439,13 +2439,6 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg)
}
break;
#endif
case eWNI_SME_LINK_SPEED_IND:
if (pMac->sme.pLinkSpeedIndCb)
pMac->sme.pLinkSpeedIndCb(pMsg->bodyptr,
pMac->sme.pLinkSpeedCbContext);
if (pMsg->bodyptr)
qdf_mem_free(pMsg->bodyptr);
break;
case eWNI_SME_CSA_OFFLOAD_EVENT:
if (pMsg->bodyptr) {
csr_scan_flush_bss_entry(pMac, pMsg->bodyptr);
@@ -9791,7 +9784,7 @@ QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
QDF_STATUS status = QDF_STATUS_SUCCESS;
tpAniSirGlobal pMac;
tSirLinkSpeedInfo *req;
struct scheduler_msg message = {0};
void *wma_handle;
if (!hHal || !pCallbackfn || !lsReq) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -9799,6 +9792,13 @@ QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
return QDF_STATUS_E_FAILURE;
}
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
if (!wma_handle) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"wma handle is NULL");
return QDF_STATUS_E_FAILURE;
}
pMac = PMAC_STRUCT(hHal);
req = qdf_mem_malloc(sizeof(*req));
if (!req) {
@@ -9816,16 +9816,8 @@ QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
pMac->sme.pLinkSpeedCbContext = plsContext;
pMac->sme.pLinkSpeedIndCb = pCallbackfn;
/* serialize the req through MC thread */
message.bodyptr = req;
message.type = WMA_GET_LINK_SPEED;
status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
status = wma_get_link_speed(wma_handle, req);
sme_release_global_lock(&pMac->sme);
if (!QDF_IS_STATUS_SUCCESS(status)) {
sme_err("%s: Post Link Speed msg fail", __func__);
qdf_mem_free(req);
}
return status;
}

View File

@@ -140,6 +140,7 @@ void wma_set_peer_authorized_cb(void *wma_ctx, wma_peer_authorized_fp auth_cb);
QDF_STATUS wma_set_peer_param(void *wma_ctx, uint8_t *peer_addr,
uint32_t param_id,
uint32_t param_value, uint32_t vdev_id);
QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed);
#ifdef NOT_YET
QDF_STATUS wma_update_channel_list(WMA_HANDLE handle, void *scan_chan_info);
#endif

View File

@@ -892,8 +892,6 @@ void wma_process_link_status_req(tp_wma_handle wma,
QDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle,
tAniDHCPInd *ta_dhcp_ind);
QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed);
int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf,
uint32_t len);

View File

@@ -378,7 +378,6 @@
#define WMA_DFS_BEACON_TX_SUCCESS_IND SIR_HAL_BEACON_TX_SUCCESS_IND
#define WMA_DISASSOC_TX_COMP SIR_HAL_DISASSOC_TX_COMP
#define WMA_DEAUTH_TX_COMP SIR_HAL_DEAUTH_TX_COMP
#define WMA_GET_LINK_SPEED SIR_HAL_GET_LINK_SPEED
#define WMA_MODEM_POWER_STATE_IND SIR_HAL_MODEM_POWER_STATE_IND

View File

@@ -6653,10 +6653,6 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, struct scheduler_msg *msg)
(tDisableIntraBssFwd *) msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
case WMA_GET_LINK_SPEED:
wma_get_link_speed(wma_handle, msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
case WMA_MODEM_POWER_STATE_IND:
wma_notify_modem_power_state(wma_handle,
(tSirModemPowerStateInd *) msg->bodyptr);

View File

@@ -2784,24 +2784,28 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
QDF_STATUS wma_send_link_speed(uint32_t link_speed)
{
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
struct scheduler_msg sme_msg = { 0 };
tSirLinkSpeedInfo *ls_ind =
(tSirLinkSpeedInfo *) qdf_mem_malloc(sizeof(tSirLinkSpeedInfo));
tpAniSirGlobal mac_ctx;
tSirLinkSpeedInfo *ls_ind;
mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
if (!mac_ctx) {
WMA_LOGD("%s: NULL pMac ptr. Exiting", __func__);
return QDF_STATUS_E_INVAL;
}
ls_ind = (tSirLinkSpeedInfo *)qdf_mem_malloc(sizeof(tSirLinkSpeedInfo));
if (!ls_ind) {
WMA_LOGE("%s: Memory allocation failed.", __func__);
qdf_status = QDF_STATUS_E_NOMEM;
} else {
ls_ind->estLinkSpeed = link_speed;
sme_msg.type = eWNI_SME_LINK_SPEED_IND;
sme_msg.bodyptr = ls_ind;
sme_msg.bodyval = 0;
qdf_status = scheduler_post_msg(QDF_MODULE_ID_SME, &sme_msg);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
WMA_LOGE("%s: Fail to post linkspeed ind msg",
__func__);
if (mac_ctx->sme.pLinkSpeedIndCb)
mac_ctx->sme.pLinkSpeedIndCb(ls_ind,
mac_ctx->sme.pLinkSpeedCbContext);
else
WMA_LOGD("%s: pLinkSpeedIndCb is null", __func__);
qdf_mem_free(ls_ind);
}
}
return qdf_status;
}