diff options
| author | Ankit Gupta <guptaank@codeaurora.org> | 2016-09-26 12:11:30 -0700 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-07 19:24:23 -0700 |
| commit | fef4c02f2c2e127292e360f18adec7f62fe92365 (patch) | |
| tree | 569788faf144bb6d159d68387e17ec75fab05efe | |
| parent | f754bee3890abbd595189e24534b2136faa3a01f (diff) | |
qcacld-3.0: Make lim_process* messages static functions
lim_process_messages() and lim_process_deferred_message_queue
are currently a global functions, but they are only referenced
from within lim_process_message_queue.c.
Making lim_process_messages() and lim_process_deferred_message_queue
to be a static function and rearrange it to avoid any forward
reference of it.
Change-Id: I30c5b388814de5fc02fd0352ef41c324216af705
CRs-Fixed: 1071312
| -rw-r--r-- | core/mac/src/pe/include/lim_api.h | 1 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_message_queue.c | 76 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_types.h | 3 |
3 files changed, 33 insertions, 47 deletions
diff --git a/core/mac/src/pe/include/lim_api.h b/core/mac/src/pe/include/lim_api.h index 9e77bcc44fce..9afa50d2fcc2 100644 --- a/core/mac/src/pe/include/lim_api.h +++ b/core/mac/src/pe/include/lim_api.h @@ -136,7 +136,6 @@ uint32_t lim_post_msg_high_priority(tpAniSirGlobal mac, tSirMsgQ *msg); * and dispatch to various sub modules within LIM module. */ extern void lim_message_processor(tpAniSirGlobal, tpSirMsgQ); -extern void lim_process_messages(tpAniSirGlobal, tpSirMsgQ); /* DT test alt deferred 2 */ /** * Function to check the LIM state if system is in Scan/Learn state. */ diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c index 37b326b6e863..728fda23726d 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -1256,34 +1256,6 @@ void lim_process_abort_scan_ind(tpAniSirGlobal mac_ctx, return; } -/** - * lim_message_processor() - Process messages from LIM. - * - * @mac_ctx: Pointer to the Global Mac Context. - * @msg: Received LIM message. - * - * Wrapper function for lim_process_messages when handling messages received by - * LIM.Could either defer messages or process them. - * - * Return: None. - */ -void lim_message_processor(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) -{ - if (eLIM_MLM_OFFLINE_STATE == mac_ctx->lim.gLimMlmState) { - pe_free_msg(mac_ctx, msg); - return; - } - - if (!def_msg_decision(mac_ctx, msg)) { - lim_process_messages(mac_ctx, msg); - /* process deferred message queue if allowed */ - if ((!(mac_ctx->lim.gLimAddtsSent)) && - (!(lim_is_system_in_scan_state(mac_ctx))) && - (true == GET_LIM_PROCESS_DEFD_MESGS(mac_ctx))) - lim_process_deferred_message_queue(mac_ctx); - } -} - static void lim_process_sme_obss_scan_ind(tpAniSirGlobal mac_ctx, struct sSirMsgQ *msg) { @@ -1319,12 +1291,12 @@ static void lim_process_sme_obss_scan_ind(tpAniSirGlobal mac_ctx, /** * lim_process_messages() - Process messages from upper layers. * - * @mac_ctx: Pointer to the Global Mac Context. - * @msg: Received message. + * @mac_ctx: Pointer to the Global Mac Context. + * @msg: Received message. * * Return: None. */ -void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) +static void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) { #ifdef FEATURE_AP_MCC_CH_AVOIDANCE uint8_t vdev_id = 0; @@ -2043,26 +2015,17 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) } /*** end lim_process_messages() ***/ /** - * lim_process_deferred_message_queue + * lim_process_deferred_message_queue() * - ***FUNCTION: * This function is called by LIM while exiting from Learn * mode. This function fetches messages posted to the LIM * deferred message queue limDeferredMsgQ. * - ***LOGIC: - * - ***ASSUMPTIONS: - * NA - * - ***NOTE: - * NA - * - * @param pMac - Pointer to Global MAC structure + * @pMac: Pointer to Global MAC structure * @return None */ -void lim_process_deferred_message_queue(tpAniSirGlobal pMac) +static void lim_process_deferred_message_queue(tpAniSirGlobal pMac) { tSirMsgQ limMsg = { 0, 0, 0 }; @@ -2090,6 +2053,33 @@ void lim_process_deferred_message_queue(tpAniSirGlobal pMac) } /*** end lim_process_deferred_message_queue() ***/ /** + * lim_message_processor() - Process messages from LIM. + * @mac_ctx: Pointer to the Global Mac Context. + * @msg: Received LIM message. + * + * Wrapper function for lim_process_messages when handling messages received by + * LIM. Could either defer messages or process them. + * + * Return: None. + */ +void lim_message_processor(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) +{ + if (eLIM_MLM_OFFLINE_STATE == mac_ctx->lim.gLimMlmState) { + pe_free_msg(mac_ctx, msg); + return; + } + + if (!def_msg_decision(mac_ctx, msg)) { + lim_process_messages(mac_ctx, msg); + /* process deferred message queue if allowed */ + if ((!(mac_ctx->lim.gLimAddtsSent)) && + (!(lim_is_system_in_scan_state(mac_ctx))) && + (true == GET_LIM_PROCESS_DEFD_MESGS(mac_ctx))) + lim_process_deferred_message_queue(mac_ctx); + } +} + +/** * lim_process_normal_hdd_msg() - Process the message and defer if needed * @mac_ctx : Pointer to Global MAC structure * @msg : The message need to be processed diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h index 571579dc4d87..2dd2df5994e7 100644 --- a/core/mac/src/pe/lim/lim_types.h +++ b/core/mac/src/pe/lim/lim_types.h @@ -551,9 +551,6 @@ void lim_tear_down_link_with_ap(tpAniSirGlobal, uint8_t, tSirMacReasonCodes); /* / Function that processes Max retries interrupt from TFP */ void limHandleMaxRetriesInterrupt(uint32_t); -/* / Function that processes messages deferred during Learn mode */ -void lim_process_deferred_message_queue(tpAniSirGlobal); - /* / Function that defers the messages received */ uint32_t lim_defer_msg(tpAniSirGlobal, tSirMsgQ *); |
