qcacld-3.0: Consolidate PE message handling

During the review of "qcacld-3.0: lim: Replace tSirRetStatus with
QDF_STATUS" it was observed that the documentation for function
pe_process_messages() referenced an incorrect return type and return
value. While addressing this issue it was further observed that
pe_process_messages() was only being called from within lim_api.c by
pe_mc_process_handler(). Since these are both trivial functions,
consolidate them into one function.

Change-Id: Ia66088b79003e0c8c517a8e3ae32540c19fec070
CRs-Fixed: 2271550
This commit is contained in:
Jeff Johnson 2018-06-29 12:47:11 -07:00 • committed by nshrivas
commit edfaf0bc96
2 changed files with 22 additions and 48 deletions

View file

@ -306,20 +306,17 @@ static inline void lim_get_rf_band_new(tpAniSirGlobal pMac,
*band = psessionEntry ? psessionEntry->limRFBand : BAND_UNKNOWN;
}
/*--------------------------------------------------------------------------
\brief pe_process_messages() - Message Processor for PE
Voss calls this function to dispatch the message to PE
\param pMac - Pointer to Global MAC structure
\param pMsg - Pointer to the message structure
\return QDF_STATUS_SUCCESS on success, other QDF_STATUS on error
--------------------------------------------------------------------------*/
QDF_STATUS pe_process_messages(tpAniSirGlobal pMac,
struct scheduler_msg *pMsg);
/**
* pe_mc_process_handler() - Message Processor for PE
* @msg: Pointer to the message structure
*
* Verifies the system is in a mode where messages are expected to be
* processed, and if so, routes the message to the appropriate handler
* based upon message type.
*
* Return: QDF_STATUS_SUCCESS if the message was handled, otherwise an
* appropriate QDF_STATUS error code
*/
QDF_STATUS pe_mc_process_handler(struct scheduler_msg *msg);
/** -------------------------------------------------------------

View file

@ -1059,49 +1059,26 @@ QDF_STATUS lim_post_msg_high_priority(tpAniSirGlobal mac,
msg, true);
}
/*--------------------------------------------------------------------------
\brief pe_process_messages() - Message Processor for PE
Voss calls this function to dispatch the message to PE
\param pMac - Pointer to Global MAC structure
\param pMsg - Pointer to the message structure
\return uint32_t - TX_SUCCESS for success.
--------------------------------------------------------------------------*/
QDF_STATUS pe_process_messages(tpAniSirGlobal pMac,
struct scheduler_msg *pMsg)
{
if (ANI_DRIVER_TYPE(pMac) == QDF_DRIVER_TYPE_MFG) {
return QDF_STATUS_SUCCESS;
}
/**
* If the Message to be handled is for CFG Module call the CFG Msg
* Handler and for all the other cases post it to LIM
*/
if (SIR_CFG_PARAM_UPDATE_IND != pMsg->type && IS_CFG_MSG(pMsg->type))
cfg_process_mb_msg(pMac, (tSirMbMsg *) pMsg->bodyptr);
else
lim_message_processor(pMac, pMsg);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS pe_mc_process_handler(struct scheduler_msg *msg)
{
QDF_STATUS status;
tpAniSirGlobal mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
if (mac_ctx == NULL)
return QDF_STATUS_E_FAILURE;
status = pe_process_messages(mac_ctx, msg);
if (status == QDF_STATUS_SUCCESS)
if (ANI_DRIVER_TYPE(mac_ctx) == QDF_DRIVER_TYPE_MFG)
return QDF_STATUS_SUCCESS;
return QDF_STATUS_E_FAILURE;
/*
* If the Message to be handled is for CFG Module call the CFG Msg
* Handler and for all the other cases post it to LIM
*/
if (SIR_CFG_PARAM_UPDATE_IND != msg->type && IS_CFG_MSG(msg->type))
cfg_process_mb_msg(mac_ctx, msg->bodyptr);
else
lim_message_processor(mac_ctx, msg);
return QDF_STATUS_SUCCESS;
}
/**