summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGupta, Kapil <kapgupta@qti.qualcomm.com>2015-12-07 14:05:25 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-12-21 13:22:10 +0530
commitf077025f3f1e6d4e2ed23172b99ee37a7ceed4a6 (patch)
tree54362a26210f9cf1b92ee6a1485b57b38296a61b
parentc4bdb509ba444f26d7f6fa0f8af0f302b861c939 (diff)
qcacld-2.0: Remove Rx and Tx thread code
Tx and Rx threads are not being used anymore, remove initialization and related variables,functions of Rx and Tx threads. Change-Id: Ic66ad502a160fee4ee6a78fc8b532416d71b5e6e CRs-Fixed: 948016
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c24
-rw-r--r--CORE/SYS/common/inc/wlan_qct_sys.h23
-rw-r--r--CORE/SYS/common/src/wlan_qct_sys.c138
-rw-r--r--CORE/VOSS/inc/vos_mq.h76
-rw-r--r--CORE/VOSS/src/vos_api.c212
-rw-r--r--CORE/VOSS/src/vos_sched.c545
-rw-r--r--CORE/VOSS/src/vos_sched.h49
-rw-r--r--CORE/VOSS/src/vos_timer.c29
8 files changed, 2 insertions, 1094 deletions
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index a9913cd3a751..e7ac7a17ea9e 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -1871,14 +1871,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
complete(&vosSchedContext->ResumeMcEvent);
pHddCtx->isMcThreadSuspended= FALSE;
}
- if(TRUE == pHddCtx->isTxThreadSuspended){
- complete(&vosSchedContext->ResumeTxEvent);
- pHddCtx->isTxThreadSuspended= FALSE;
- }
- if(TRUE == pHddCtx->isRxThreadSuspended){
- complete(&vosSchedContext->ResumeRxEvent);
- pHddCtx->isRxThreadSuspended= FALSE;
- }
#ifdef QCA_CONFIG_SMP
if (TRUE == pHddCtx->isTlshimRxThreadSuspended) {
complete(&vosSchedContext->ResumeTlshimRxEvent);
@@ -1900,20 +1892,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
wake_up_interruptible(&vosSchedContext->mcWaitQueue);
wait_for_completion(&vosSchedContext->McShutdown);
- /* Wait for TX to exit */
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Shutting down TX thread",__func__);
- set_bit(TX_SHUTDOWN_EVENT_MASK, &vosSchedContext->txEventFlag);
- set_bit(TX_POST_EVENT_MASK, &vosSchedContext->txEventFlag);
- wake_up_interruptible(&vosSchedContext->txWaitQueue);
- wait_for_completion(&vosSchedContext->TxShutdown);
-
- /* Wait for RX to exit */
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Shutting down RX thread",__func__);
- set_bit(RX_SHUTDOWN_EVENT_MASK, &vosSchedContext->rxEventFlag);
- set_bit(RX_POST_EVENT_MASK, &vosSchedContext->rxEventFlag);
- wake_up_interruptible(&vosSchedContext->rxWaitQueue);
- wait_for_completion(&vosSchedContext->RxShutdown);
-
#ifdef QCA_CONFIG_SMP
/* Wait for TLshim RX to exit */
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Shutting down TLshim RX thread",
@@ -1982,8 +1960,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
hddLog(VOS_TRACE_LEVEL_INFO, "%s: Flush Queues",__func__);
/* Clean up message queues of TX, RX and MC thread */
vos_sched_flush_mc_mqs(vosSchedContext);
- vos_sched_flush_tx_mqs(vosSchedContext);
- vos_sched_flush_rx_mqs(vosSchedContext);
/* Deinit all the TX, RX and MC queues */
vos_sched_deinit_mqs(vosSchedContext);
diff --git a/CORE/SYS/common/inc/wlan_qct_sys.h b/CORE/SYS/common/inc/wlan_qct_sys.h
index 24f8e9e7be88..50a9d3277e11 100644
--- a/CORE/SYS/common/inc/wlan_qct_sys.h
+++ b/CORE/SYS/common/inc/wlan_qct_sys.h
@@ -78,12 +78,6 @@ typedef enum
SYS_MSG_ID_MC_START,
SYS_MSG_ID_MC_THR_PROBE,
SYS_MSG_ID_MC_TIMER,
-
- SYS_MSG_ID_TX_THR_PROBE,
- SYS_MSG_ID_TX_TIMER,
-
- SYS_MSG_ID_RX_TIMER,
-
SYS_MSG_ID_MC_STOP,
SYS_MSG_ID_FTM_RSP,
@@ -388,23 +382,6 @@ v_VOID_t sysMcFreeMsg( v_CONTEXT_t pVosContext, vos_msg_t* pMsg );
/*----------------------------------------------------------------------------
- \brief sysTxFreeMsg() - free a message queue'd to the Tx thread
-
- This fnction will free a SYS Message that is pending in the Tx
- thread queue. These messages are free'd when the message queue needs to be
- purged, for example during a Reset of Shutdown of the system.
-
- \param pVosContext - pointer to the VOS Context
-
- \param pMsg - the message to be free'd
-
- \return Nothing.
-
- --------------------------------------------------------------------------*/
-v_VOID_t sysTxFreeMsg( v_CONTEXT_t pVContext, vos_msg_t* pMsg );
-
-/*----------------------------------------------------------------------------
-
\brief wlan_sys_ftm() - FTM Cmd Response from halPhy
This fnction is called by halPhy and carried the FTM command response.
diff --git a/CORE/SYS/common/src/wlan_qct_sys.c b/CORE/SYS/common/src/wlan_qct_sys.c
index 875851737f48..6041c40bed4b 100644
--- a/CORE/SYS/common/src/wlan_qct_sys.c
+++ b/CORE/SYS/common/src/wlan_qct_sys.c
@@ -438,149 +438,11 @@ VOS_STATUS sysMcProcessMsg( v_CONTEXT_t pVosContext, vos_msg_t *pMsg )
}
-
-
-VOS_STATUS sysTxProcessMsg( v_CONTEXT_t pVosContext, vos_msg_t *pMsg )
-{
- VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
-
- if (NULL == pMsg)
- {
- VOS_ASSERT(0);
- VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- "%s: NULL pointer to vos_msg_t", __func__);
- return VOS_STATUS_E_INVAL;
- }
- // All 'new' SYS messages are identified by a cookie in the reserved
- // field of the message as well as the message type. This prevents
- // the possibility of overlap in the message types defined for new
- // SYS messages with the 'legacy' message types. The legacy messages
- // will not have this cookie in the reserved field
- if ( SYS_MSG_COOKIE == pMsg->reserved )
- {
- // Process all the new SYS messages..
- switch( pMsg->type )
- {
- // Process TX thread probe. Just callback to the
- // function that is in the message.
- case SYS_MSG_ID_TX_THR_PROBE:
- {
- /* Handling for this message is not needed now so adding
- * debug print and VOS_ASSERT*/
- VOS_TRACE( VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- " Received SYS_MSG_ID_TX_THR_PROBE message msgType= %d [0x%08x]",
- pMsg->type, pMsg->type );
- VOS_ASSERT(0);
-
- break;
- }
-
- case SYS_MSG_ID_TX_TIMER:
- {
- vos_timer_callback_t timerCB = pMsg->callback;
-
- if (NULL != timerCB)
- {
- timerCB(pMsg->bodyptr);
- }
- break;
- }
-
- default:
- {
- VOS_TRACE( VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- "Unknown message type in sysTxProcessMsg() msgType= %d [0x%08x]",
- pMsg->type, pMsg->type );
- break;
- }
-
- } // end switch on message type
- } // end if cookie set
- else
- {
- VOS_ASSERT( 0 );
-
- VOS_TRACE( VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- "Received SYS message cookie with unidentified TX message "
- " type= %d [0x%08X]", pMsg->type, pMsg->type );
-
- vosStatus = VOS_STATUS_E_BADMSG;
- } // end else
-
- return( vosStatus );
-}
-
-
-VOS_STATUS sysRxProcessMsg( v_CONTEXT_t pVosContext, vos_msg_t *pMsg )
-{
- VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
-
- if (NULL == pMsg)
- {
- VOS_ASSERT(0);
- VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- "%s: NULL pointer to vos_msg_t", __func__);
- return VOS_STATUS_E_INVAL;
- }
-
- // All 'new' SYS messages are identified by a cookie in the reserved
- // field of the message as well as the message type. This prevents
- // the possibility of overlap in the message types defined for new
- // SYS messages with the 'legacy' message types. The legacy messages
- // will not have this cookie in the reserved field
- if ( SYS_MSG_COOKIE == pMsg->reserved )
- {
- // Process all the new SYS messages..
- switch( pMsg->type )
- {
- case SYS_MSG_ID_RX_TIMER:
- {
- vos_timer_callback_t timerCB = pMsg->callback;
-
- if (NULL != timerCB)
- {
- timerCB(pMsg->bodyptr);
- }
- break;
- }
-
- default:
- {
- VOS_TRACE( VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- "Unknown message type in sysRxProcessMsg() msgType= %d [0x%08x]",
- pMsg->type, pMsg->type );
- break;
- }
-
- } // end switch on message type
- } // end if cookie set
- else
- {
- VOS_ASSERT( 0 );
-
- VOS_TRACE( VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- "Received SYS message cookie with unidentified RX message "
- " type= %d [0x%08X]", pMsg->type, pMsg->type );
-
- vosStatus = VOS_STATUS_E_BADMSG;
- } // end else
-
- return( vosStatus );
-}
-
-
v_VOID_t sysMcFreeMsg( v_CONTEXT_t pVContext, vos_msg_t* pMsg )
{
return;
}
-
-v_VOID_t sysTxFreeMsg( v_CONTEXT_t pVContext, vos_msg_t* pMsg )
-{
- return;
-}
-
-
void
SysProcessMmhMsg
(
diff --git a/CORE/VOSS/inc/vos_mq.h b/CORE/VOSS/inc/vos_mq.h
index 878fe86de235..b5a46193861f 100644
--- a/CORE/VOSS/inc/vos_mq.h
+++ b/CORE/VOSS/inc/vos_mq.h
@@ -154,80 +154,4 @@ typedef enum
--------------------------------------------------------------------------*/
VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *message );
-
-/**---------------------------------------------------------------------------
-
- \brief vos_tx_mq_serialize() - serialize a message to the Tx execution flow
-
- This API allows messages to be posted to a specific message queue in the
- Tx excution flow. Messages for the Tx execution flow can be posted only
- to the following queue.
-
- <ul>
- <li> TL
- </ul>
-
- \param msgQueueId - identifies the message queue upon which the message
- will be posted.
-
- \param message - a pointer to a message buffer. Body memory for this message
- buffer is allocated by the caller and free'd by the vOSS after the
- message is dispacthed to the appropriate component. If the consumer
- of the message needs to keep anything in the body, it needs to copy
- the contents before returning from the message handler.
-
- \return VOS_STATUS_SUCCESS - the message has been successfully posted
- to the message queue.
-
- VOS_STATUS_E_INVAL - The value specified by msgQueueId does not
- refer to a valid Message Queue Id.
-
- VOS_STATUS_E_FAULT - message is an invalid pointer.
-
- VOS_STATUS_E_FAILURE - the message queue handler has reported
- an unknown failure.
-
- \sa
-
- --------------------------------------------------------------------------*/
-VOS_STATUS vos_tx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *message );
-
-/**---------------------------------------------------------------------------
-
- \brief vos_rx_mq_serialize() - serialize a message to the Rx execution flow
-
- This API allows messages to be posted to a specific message queue in the
- Tx excution flow. Messages for the Rx execution flow can be posted only
- to the following queue.
-
- <ul>
- <li> TL
- </ul>
-
- \param msgQueueId - identifies the message queue upon which the message
- will be posted.
-
- \param message - a pointer to a message buffer. Body memory for this message
- buffer is allocated by the caller and free'd by the vOSS after the
- message is dispacthed to the appropriate component. If the consumer
- of the message needs to keep anything in the body, it needs to copy
- the contents before returning from the message handler.
-
- \return VOS_STATUS_SUCCESS - the message has been successfully posted
- to the message queue.
-
- VOS_STATUS_E_INVAL - The value specified by msgQueueId does not
- refer to a valid Message Queue Id.
-
- VOS_STATUS_E_FAULT - message is an invalid pointer.
-
- VOS_STATUS_E_FAILURE - the message queue handler has reported
- an unknown failure.
-
- \sa
-
- --------------------------------------------------------------------------*/
-VOS_STATUS vos_rx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *message );
-
-
#endif // if !defined __VOS_MQ_H
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index 4945bb6e3a98..b7ab10050313 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -1844,218 +1844,6 @@ VOS_STATUS vos_mq_post_message( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg )
} /* vos_mq_post_message()*/
-
-/**---------------------------------------------------------------------------
-
- \brief vos_tx_mq_serialize() - serialize a message to the Tx execution flow
-
- This API allows messages to be posted to a specific message queue in the
- Tx excution flow. Messages for the Tx execution flow can be posted only
- to the following queue.
-
- <ul>
- <li> TL
- </ul>
-
- \param msgQueueId - identifies the message queue upon which the message
- will be posted.
-
- \param message - a pointer to a message buffer. Body memory for this message
- buffer is allocated by the caller and free'd by the vOSS after the
- message is dispacthed to the appropriate component. If the consumer
- of the message needs to keep anything in the body, it needs to copy
- the contents before returning from the message handler.
-
- \return VOS_STATUS_SUCCESS - the message has been successfully posted
- to the message queue.
-
- VOS_STATUS_E_INVAL - The value specified by msgQueueId does not
- refer to a valid Message Queue Id.
-
- VOS_STATUS_E_FAULT - message is an invalid pointer.
-
- VOS_STATUS_E_FAILURE - the message queue handler has reported
- an unknown failure.
-
- \sa
-
- --------------------------------------------------------------------------*/
-VOS_STATUS vos_tx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg )
-{
- pVosMqType pTargetMq = NULL;
- pVosMsgWrapper pMsgWrapper = NULL;
-
- if ((gpVosContext == NULL) || (pMsg == NULL))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Null params or global vos context is null", __func__);
- VOS_ASSERT(0);
- return VOS_STATUS_E_FAILURE;
- }
-
- switch (msgQueueId)
- {
- /// Message Queue ID for messages bound for SME
- case VOS_MQ_ID_TL:
- {
- pTargetMq = &(gpVosContext->vosSched.tlTxMq);
- break;
- }
-
- /// Message Queue ID for messages bound for the SYS module
- case VOS_MQ_ID_SYS:
- {
- pTargetMq = &(gpVosContext->vosSched.sysTxMq);
- break;
- }
-
- default:
-
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Trying to queue msg into unknown Tx Msg queue ID %d",
- __func__, msgQueueId);
-
- return VOS_STATUS_E_FAILURE;
- }
-
- if (pTargetMq == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: pTargetMq == NULL", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
-
- /*
- ** Try and get a free Msg wrapper
- */
- pMsgWrapper = vos_mq_get(&gpVosContext->freeVosMq);
-
- if (NULL == pMsgWrapper)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
- "%s: VOS Core run out of message wrapper", __func__);
-
- return VOS_STATUS_E_RESOURCES;
- }
-
- /*
- ** Copy the message now
- */
- vos_mem_copy( (v_VOID_t*)pMsgWrapper->pVosMsg,
- (v_VOID_t*)pMsg, sizeof(vos_msg_t));
-
- vos_mq_put(pTargetMq, pMsgWrapper);
-
- set_bit(TX_POST_EVENT_MASK, &gpVosContext->vosSched.txEventFlag);
- wake_up_interruptible(&gpVosContext->vosSched.txWaitQueue);
-
- return VOS_STATUS_SUCCESS;
-
-} /* vos_tx_mq_serialize()*/
-
-/**---------------------------------------------------------------------------
-
- \brief vos_rx_mq_serialize() - serialize a message to the Rx execution flow
-
- This API allows messages to be posted to a specific message queue in the
- Tx excution flow. Messages for the Rx execution flow can be posted only
- to the following queue.
-
- <ul>
- <li> TL
- </ul>
-
- \param msgQueueId - identifies the message queue upon which the message
- will be posted.
-
- \param message - a pointer to a message buffer. Body memory for this message
- buffer is allocated by the caller and free'd by the vOSS after the
- message is dispacthed to the appropriate component. If the consumer
- of the message needs to keep anything in the body, it needs to copy
- the contents before returning from the message handler.
-
- \return VOS_STATUS_SUCCESS - the message has been successfully posted
- to the message queue.
-
- VOS_STATUS_E_INVAL - The value specified by msgQueueId does not
- refer to a valid Message Queue Id.
-
- VOS_STATUS_E_FAULT - message is an invalid pointer.
-
- VOS_STATUS_E_FAILURE - the message queue handler has reported
- an unknown failure.
-
- \sa
-
- --------------------------------------------------------------------------*/
-
-VOS_STATUS vos_rx_mq_serialize( VOS_MQ_ID msgQueueId, vos_msg_t *pMsg )
-{
- pVosMqType pTargetMq = NULL;
- pVosMsgWrapper pMsgWrapper = NULL;
- if ((gpVosContext == NULL) || (pMsg == NULL))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Null params or global vos context is null", __func__);
- VOS_ASSERT(0);
- return VOS_STATUS_E_FAILURE;
- }
-
- switch (msgQueueId)
- {
-
- case VOS_MQ_ID_SYS:
- {
- pTargetMq = &(gpVosContext->vosSched.sysRxMq);
- break;
- }
-
- default:
-
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Trying to queue msg into unknown Rx Msg queue ID %d",
- __func__, msgQueueId);
-
- return VOS_STATUS_E_FAILURE;
- }
-
- if (pTargetMq == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: pTargetMq == NULL", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
-
- /*
- ** Try and get a free Msg wrapper
- */
- pMsgWrapper = vos_mq_get(&gpVosContext->freeVosMq);
-
- if (NULL == pMsgWrapper)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: VOS Core run out of message wrapper", __func__);
-
- return VOS_STATUS_E_RESOURCES;
- }
-
- /*
- ** Copy the message now
- */
- vos_mem_copy( (v_VOID_t*)pMsgWrapper->pVosMsg,
- (v_VOID_t*)pMsg, sizeof(vos_msg_t));
-
- vos_mq_put(pTargetMq, pMsgWrapper);
-
- set_bit(RX_POST_EVENT_MASK, &gpVosContext->vosSched.rxEventFlag);
- wake_up_interruptible(&gpVosContext->vosSched.rxWaitQueue);
-
- return VOS_STATUS_SUCCESS;
-
-} /* vos_rx_mq_serialize()*/
-
v_VOID_t
vos_sys_probe_thread_cback
(
diff --git a/CORE/VOSS/src/vos_sched.c b/CORE/VOSS/src/vos_sched.c
index a55c129d1e83..06b9288bb30b 100644
--- a/CORE/VOSS/src/vos_sched.c
+++ b/CORE/VOSS/src/vos_sched.c
@@ -99,14 +99,11 @@ static pVosWatchdogContext gpVosWatchdogContext;
* ------------------------------------------------------------------------*/
static int VosMCThread(void *Arg);
static int VosWDThread(void *Arg);
-static int VosTXThread(void *Arg);
-static int VosRXThread(void *Arg);
#ifdef QCA_CONFIG_SMP
static int VosTlshimRxThread(void *arg);
static unsigned long affine_cpu = 0;
static VOS_STATUS vos_alloc_tlshim_pkt_freeq(pVosSchedContext pSchedContext);
#endif
-void vos_sched_flush_rx_mqs(pVosSchedContext SchedContext);
extern v_VOID_t vos_core_return_msg(v_PVOID_t pVContext, pVosMsgWrapper pMsgWrapper);
@@ -536,28 +533,16 @@ vos_sched_open
}
// Initialize the helper events and event queues
init_completion(&pSchedContext->McStartEvent);
- init_completion(&pSchedContext->TxStartEvent);
- init_completion(&pSchedContext->RxStartEvent);
init_completion(&pSchedContext->McShutdown);
- init_completion(&pSchedContext->TxShutdown);
- init_completion(&pSchedContext->RxShutdown);
init_completion(&pSchedContext->ResumeMcEvent);
- init_completion(&pSchedContext->ResumeTxEvent);
- init_completion(&pSchedContext->ResumeRxEvent);
spin_lock_init(&pSchedContext->McThreadLock);
- spin_lock_init(&pSchedContext->TxThreadLock);
- spin_lock_init(&pSchedContext->RxThreadLock);
#ifdef QCA_CONFIG_SMP
spin_lock_init(&pSchedContext->TlshimRxThreadLock);
#endif
init_waitqueue_head(&pSchedContext->mcWaitQueue);
pSchedContext->mcEventFlag = 0;
- init_waitqueue_head(&pSchedContext->txWaitQueue);
- pSchedContext->txEventFlag= 0;
- init_waitqueue_head(&pSchedContext->rxWaitQueue);
- pSchedContext->rxEventFlag= 0;
#ifdef QCA_CONFIG_SMP
init_waitqueue_head(&pSchedContext->tlshimRxWaitQueue);
@@ -606,32 +591,6 @@ vos_sched_open
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: VOSS Main Controller thread Created",__func__);
- pSchedContext->TxThread = kthread_create(VosTXThread, pSchedContext,
- "VosTXThread");
- if (IS_ERR(pSchedContext->TxThread))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
- "%s: Could not Create VOSS TX Thread",__func__);
- goto TX_THREAD_START_FAILURE;
- }
- wake_up_process(pSchedContext->TxThread);
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- ("VOSS TX thread Created"));
-
- pSchedContext->RxThread = kthread_create(VosRXThread, pSchedContext,
- "VosRXThread");
- if (IS_ERR(pSchedContext->RxThread))
- {
-
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
- "%s: Could not Create VOSS RX Thread",__func__);
- goto RX_THREAD_START_FAILURE;
-
- }
- wake_up_process(pSchedContext->RxThread);
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- ("VOSS RX thread Created"));
-
#ifdef QCA_CONFIG_SMP
pSchedContext->TlshimRxThread = kthread_create(VosTlshimRxThread,
pSchedContext,
@@ -655,12 +614,6 @@ vos_sched_open
wait_for_completion_interruptible(&pSchedContext->McStartEvent);
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: VOSS MC Thread has started",__func__);
- wait_for_completion_interruptible(&pSchedContext->TxStartEvent);
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: VOSS Tx Thread has started",__func__);
- wait_for_completion_interruptible(&pSchedContext->RxStartEvent);
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: VOSS Rx Thread has started",__func__);
#ifdef QCA_CONFIG_SMP
wait_for_completion_interruptible(&pSchedContext->TlshimRxStartEvent);
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
@@ -676,22 +629,8 @@ vos_sched_open
#ifdef QCA_CONFIG_SMP
TLSHIM_RX_THREAD_START_FAILURE:
- //Try and force the Rx thread controller to exit
- set_bit(RX_SHUTDOWN_EVENT_MASK, &pSchedContext->rxEventFlag);
- set_bit(RX_POST_EVENT_MASK, &pSchedContext->rxEventFlag);
- wake_up_interruptible(&pSchedContext->rxWaitQueue);
- //Wait for RX to exit
- wait_for_completion_interruptible(&pSchedContext->RxShutdown);
#endif
-RX_THREAD_START_FAILURE:
- //Try and force the Tx thread controller to exit
- set_bit(MC_SHUTDOWN_EVENT_MASK, &pSchedContext->txEventFlag);
- set_bit(MC_POST_EVENT_MASK, &pSchedContext->txEventFlag);
- wake_up_interruptible(&pSchedContext->txWaitQueue);
- //Wait for TX to exit
- wait_for_completion_interruptible(&pSchedContext->TxShutdown);
-
-TX_THREAD_START_FAILURE:
+MC_THREAD_START_FAILURE:
//Try and force the Main thread controller to exit
set_bit(MC_SHUTDOWN_EVENT_MASK, &pSchedContext->mcEventFlag);
set_bit(MC_POST_EVENT_MASK, &pSchedContext->mcEventFlag);
@@ -699,7 +638,6 @@ TX_THREAD_START_FAILURE:
//Wait for MC to exit
wait_for_completion_interruptible(&pSchedContext->McShutdown);
-MC_THREAD_START_FAILURE:
//De-initialize all the message queues
vos_sched_deinit_mqs(pSchedContext);
@@ -1198,317 +1136,6 @@ err_reset:
} /* VosMCThread() */
-/*---------------------------------------------------------------------------
- \brief VosTXThread() - The VOSS Main Tx thread
- The \a VosTxThread() is the VOSS main controller thread:
- \param Arg - pointer to the global vOSS Sched Context
-
- \return Thread exit code
- \sa VosTxThread()
- -------------------------------------------------------------------------*/
-static int VosTXThread ( void * Arg )
-{
- pVosSchedContext pSchedContext = (pVosSchedContext)Arg;
- pVosMsgWrapper pMsgWrapper = NULL;
- VOS_STATUS vStatus = VOS_STATUS_SUCCESS;
- int retWaitStatus = 0;
- v_BOOL_t shutdown = VOS_FALSE;
- hdd_context_t *pHddCtx = NULL;
- v_CONTEXT_t pVosContext = NULL;
-
- set_user_nice(current, -1);
-
-#ifdef WLAN_FEATURE_11AC_HIGH_TP
- set_wake_up_idle(true);
-#endif
-
- if (Arg == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s Bad Args passed", __func__);
- return 0;
- }
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
- daemonize("TX_Thread");
-#endif
-
- /*
- ** Ack back to the context from which the main controller thread has been
- ** created.
- */
- complete(&pSchedContext->TxStartEvent);
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: TX Thread %d (%s) starting up!",__func__, current->pid, current->comm);
-
- /* Get the Global VOSS Context */
- pVosContext = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
- if(!pVosContext) {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: Global VOS context is Null", __func__);
- return 0;
- }
-
- /* Get the HDD context */
- pHddCtx = (hdd_context_t *)vos_get_context(VOS_MODULE_ID_HDD, pVosContext );
- if(!pHddCtx) {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: HDD context is Null",__func__);
- return 0;
- }
-
-
- while(!shutdown)
- {
- // This implements the execution model algorithm
- retWaitStatus = wait_event_interruptible(pSchedContext->txWaitQueue,
- test_bit(TX_POST_EVENT_MASK, &pSchedContext->txEventFlag) ||
- test_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag));
-
-
- if(retWaitStatus == -ERESTARTSYS)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: wait_event_interruptible returned -ERESTARTSYS", __func__);
- break;
- }
- clear_bit(TX_POST_EVENT_MASK, &pSchedContext->txEventFlag);
-
- while(1)
- {
- if(test_bit(TX_SHUTDOWN_EVENT_MASK, &pSchedContext->txEventFlag))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: TX thread signaled to shutdown", __func__);
- shutdown = VOS_TRUE;
- /* Check for any Suspend Indication */
- if(test_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag))
- {
- clear_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag);
-
- /* Unblock anyone waiting on suspend */
- complete(&pHddCtx->tx_sus_event_var);
- }
- break;
- }
- // Check the SYS queue first
- if (!vos_is_mq_empty(&pSchedContext->sysTxMq))
- {
- // Service the SYS message queue
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: Servicing the VOS SYS TX Message queue",__func__);
- pMsgWrapper = vos_mq_get(&pSchedContext->sysTxMq);
- if (pMsgWrapper == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: pMsgWrapper is NULL", __func__);
- VOS_ASSERT(0);
- break;
- }
- vStatus = sysTxProcessMsg( pSchedContext->pVContext,
- pMsgWrapper->pVosMsg);
- if (!VOS_IS_STATUS_SUCCESS(vStatus))
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Issue Processing TX SYS message",__func__);
- }
- // return message to the Core
- vos_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
- continue;
- }
- // Check now the TL queue
- if (!vos_is_mq_empty(&pSchedContext->tlTxMq))
- {
- // Service the TL message queue
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: Servicing the VOS TL TX Message queue",__func__);
- pMsgWrapper = vos_mq_get(&pSchedContext->tlTxMq);
- if (pMsgWrapper == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: pMsgWrapper is NULL", __func__);
- VOS_ASSERT(0);
- break;
- }
- vStatus = WLANTL_TxProcessMsg( pSchedContext->pVContext,
- pMsgWrapper->pVosMsg);
- if (!VOS_IS_STATUS_SUCCESS(vStatus))
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Issue Processing TX TL message",__func__);
- }
- // return message to the Core
- vos_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
- continue;
- }
-
- /* Check for any Suspend Indication */
- if(test_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag))
- {
- clear_bit(TX_SUSPEND_EVENT_MASK, &pSchedContext->txEventFlag);
- spin_lock(&pSchedContext->TxThreadLock);
-
- /* Tx Thread Suspended */
- complete(&pHddCtx->tx_sus_event_var);
-
- INIT_COMPLETION(pSchedContext->ResumeTxEvent);
- spin_unlock(&pSchedContext->TxThreadLock);
-
- /* Wait foe Resume Indication */
- wait_for_completion_interruptible(&pSchedContext->ResumeTxEvent);
- }
-
- break; //All queues are empty now
- } // while message loop processing
- } // while TRUE
- // If we get here the TX thread must exit
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: TX Thread exiting!!!!", __func__);
- complete_and_exit(&pSchedContext->TxShutdown, 0);
-} /* VosTxThread() */
-
-/*---------------------------------------------------------------------------
- \brief VosRXThread() - The VOSS Main Rx thread
- The \a VosRxThread() is the VOSS Rx controller thread:
- \param Arg - pointer to the global vOSS Sched Context
-
- \return Thread exit code
- \sa VosRxThread()
- -------------------------------------------------------------------------*/
-
-static int VosRXThread ( void * Arg )
-{
- pVosSchedContext pSchedContext = (pVosSchedContext)Arg;
- pVosMsgWrapper pMsgWrapper = NULL;
- int retWaitStatus = 0;
- v_BOOL_t shutdown = VOS_FALSE;
- hdd_context_t *pHddCtx = NULL;
- v_CONTEXT_t pVosContext = NULL;
- VOS_STATUS vStatus = VOS_STATUS_SUCCESS;
-
- set_user_nice(current, -1);
-
-#ifdef WLAN_FEATURE_11AC_HIGH_TP
- set_wake_up_idle(true);
-#endif
-
- if (Arg == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s Bad Args passed", __func__);
- return 0;
- }
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
- daemonize("RX_Thread");
-#endif
-
- /*
- ** Ack back to the context from which the main controller thread has been
- ** created.
- */
- complete(&pSchedContext->RxStartEvent);
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: RX Thread %d (%s) starting up!",__func__, current->pid, current->comm);
-
- /* Get the Global VOSS Context */
- pVosContext = vos_get_global_context(VOS_MODULE_ID_SYS, NULL);
- if(!pVosContext) {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: Global VOS context is Null", __func__);
- return 0;
- }
-
- /* Get the HDD context */
- pHddCtx = (hdd_context_t *)vos_get_context(VOS_MODULE_ID_HDD, pVosContext );
- if(!pHddCtx) {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: HDD context is Null",__func__);
- return 0;
- }
-
- while(!shutdown)
- {
- // This implements the execution model algorithm
- retWaitStatus = wait_event_interruptible(pSchedContext->rxWaitQueue,
- test_bit(RX_POST_EVENT_MASK, &pSchedContext->rxEventFlag) ||
- test_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag));
-
-
- if(retWaitStatus == -ERESTARTSYS)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: wait_event_interruptible returned -ERESTARTSYS", __func__);
- break;
- }
- clear_bit(RX_POST_EVENT_MASK, &pSchedContext->rxEventFlag);
-
- while(1)
- {
- if(test_bit(RX_SHUTDOWN_EVENT_MASK, &pSchedContext->rxEventFlag))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: RX thread signaled to shutdown", __func__);
- shutdown = VOS_TRUE;
- /* Check for any Suspend Indication */
- if(test_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag))
- {
- clear_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag);
-
- /* Unblock anyone waiting on suspend */
- complete(&pHddCtx->rx_sus_event_var);
- }
- break;
- }
-
-
- // Check the SYS queue first
- if (!vos_is_mq_empty(&pSchedContext->sysRxMq))
- {
- // Service the SYS message queue
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: Servicing the VOS SYS RX Message queue",__func__);
- pMsgWrapper = vos_mq_get(&pSchedContext->sysRxMq);
- if (pMsgWrapper == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: pMsgWrapper is NULL", __func__);
- VOS_ASSERT(0);
- break;
- }
- vStatus = sysRxProcessMsg( pSchedContext->pVContext,
- pMsgWrapper->pVosMsg);
- if (!VOS_IS_STATUS_SUCCESS(vStatus))
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Issue Processing TX SYS message",__func__);
- }
- // return message to the Core
- vos_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
- continue;
- }
-
- /* Check for any Suspend Indication */
- if(test_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag))
- {
- clear_bit(RX_SUSPEND_EVENT_MASK, &pSchedContext->rxEventFlag);
- spin_lock(&pSchedContext->RxThreadLock);
-
- /* Rx Thread Suspended */
- complete(&pHddCtx->rx_sus_event_var);
-
- INIT_COMPLETION(pSchedContext->ResumeRxEvent);
- spin_unlock(&pSchedContext->RxThreadLock);
-
- /* Wait for Resume Indication */
- wait_for_completion_interruptible(&pSchedContext->ResumeRxEvent);
- }
-
- break; //All queues are empty now
- } // while message loop processing
- } // while TRUE
- // If we get here the RX thread must exit
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: RX Thread exiting!!!!", __func__);
- complete_and_exit(&pSchedContext->RxShutdown, 0);
-} /* VosRxThread() */
-
#ifdef QCA_CONFIG_SMP
/*---------------------------------------------------------------------------
\brief vos_free_tlshim_pkt_freeq() - Free voss buffer free queue
@@ -1829,26 +1456,8 @@ VOS_STATUS vos_sched_close ( v_PVOID_t pVosContext )
wait_for_completion(&gpVosSchedContext->McShutdown);
gpVosSchedContext->McThread = 0;
- // shut down TX Thread
- set_bit(TX_SHUTDOWN_EVENT_MASK, &gpVosSchedContext->txEventFlag);
- set_bit(TX_POST_EVENT_MASK, &gpVosSchedContext->txEventFlag);
- wake_up_interruptible(&gpVosSchedContext->txWaitQueue);
- //Wait for TX to exit
- wait_for_completion(&gpVosSchedContext->TxShutdown);
- gpVosSchedContext->TxThread = 0;
-
- // shut down RX Thread
- set_bit(RX_SHUTDOWN_EVENT_MASK, &gpVosSchedContext->rxEventFlag);
- set_bit(RX_POST_EVENT_MASK, &gpVosSchedContext->rxEventFlag);
- wake_up_interruptible(&gpVosSchedContext->rxWaitQueue);
- //Wait for RX to exit
- wait_for_completion(&gpVosSchedContext->RxShutdown);
- gpVosSchedContext->RxThread = 0;
-
- //Clean up message queues of TX and MC thread
+ //Clean up message queues of MC thread
vos_sched_flush_mc_mqs(gpVosSchedContext);
- vos_sched_flush_tx_mqs(gpVosSchedContext);
- vos_sched_flush_rx_mqs(gpVosSchedContext);
//Deinit all the queues
vos_sched_deinit_mqs(gpVosSchedContext);
@@ -1953,36 +1562,6 @@ VOS_STATUS vos_sched_init_mqs ( pVosSchedContext pSchedContext )
return vStatus;
}
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: Initializing the TL Tx Message queue",__func__);
- vStatus = vos_mq_init(&pSchedContext->tlTxMq);
- if (! VOS_IS_STATUS_SUCCESS(vStatus))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to init TL TX Message queue",__func__);
- VOS_ASSERT(0);
- return vStatus;
- }
-
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: Initializing the SYS Tx Message queue",__func__);
- vStatus = vos_mq_init(&pSchedContext->sysTxMq);
- if (! VOS_IS_STATUS_SUCCESS(vStatus))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to init SYS TX Message queue",__func__);
- VOS_ASSERT(0);
- return vStatus;
- }
-
- vStatus = vos_mq_init(&pSchedContext->sysRxMq);
- if (! VOS_IS_STATUS_SUCCESS(vStatus))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to init SYS RX Message queue",__func__);
- VOS_ASSERT(0);
- return vStatus;
- }
return VOS_STATUS_SUCCESS;
} /* vos_sched_init_mqs() */
@@ -2018,20 +1597,6 @@ void vos_sched_deinit_mqs ( pVosSchedContext pSchedContext )
"%s De-Initializing the SYS MC Message queue",__func__);
vos_mq_deinit(&pSchedContext->sysMcMq);
- //Tx TL
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s De-Initializing the TL Tx Message queue",__func__);
- vos_mq_deinit(&pSchedContext->tlTxMq);
-
- //Tx SYS
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: DeInitializing the SYS Tx Message queue",__func__);
- vos_mq_deinit(&pSchedContext->sysTxMq);
-
- //Rx SYS
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: DeInitializing the SYS Rx Message queue",__func__);
- vos_mq_deinit(&pSchedContext->sysRxMq);
} /* vos_sched_deinit_mqs() */
/*-------------------------------------------------------------------------
@@ -2128,112 +1693,6 @@ void vos_sched_flush_mc_mqs ( pVosSchedContext pSchedContext )
} /* vos_sched_flush_mc_mqs() */
/*-------------------------------------------------------------------------
- This helper function flushes all the TX message queues
- ------------------------------------------------------------------------*/
-void vos_sched_flush_tx_mqs ( pVosSchedContext pSchedContext )
-{
- pVosMsgWrapper pMsgWrapper = NULL;
- /*
- ** Here each of the TX thread MQ shall be drained and returned to the
- ** Core. Before returning a wrapper to the Core, the VOS message shall
- ** be freed first
- */
- VOS_TRACE( VOS_MODULE_ID_VOSS,
- VOS_TRACE_LEVEL_INFO,
- "%s: Flushing the TX Thread message queue",__func__);
-
- if (NULL == pSchedContext)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: pSchedContext is NULL", __func__);
- return;
- }
-
- /* Flush the SYS Mq */
- while( NULL != (pMsgWrapper = vos_mq_get(&pSchedContext->sysTxMq) ))
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS,
- VOS_TRACE_LEVEL_INFO,
- "%s: Freeing TX SYS message type %d",__func__,
- pMsgWrapper->pVosMsg->type );
- sysTxFreeMsg(pSchedContext->pVContext, pMsgWrapper->pVosMsg);
- vos_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
- }
- /* Flush the TL Mq */
- while( NULL != (pMsgWrapper = vos_mq_get(&pSchedContext->tlTxMq) ))
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS,
- VOS_TRACE_LEVEL_INFO,
- "%s: Freeing TX TL MSG message type %d",__func__,
- pMsgWrapper->pVosMsg->type );
- WLANTL_TxFreeMsg(pSchedContext->pVContext, pMsgWrapper->pVosMsg);
- vos_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
- }
-} /* vos_sched_flush_tx_mqs() */
-/*-------------------------------------------------------------------------
- This helper function flushes all the RX message queues
- ------------------------------------------------------------------------*/
-void vos_sched_flush_rx_mqs ( pVosSchedContext pSchedContext )
-{
- pVosMsgWrapper pMsgWrapper = NULL;
- /*
- ** Here each of the RX thread MQ shall be drained and returned to the
- ** Core. Before returning a wrapper to the Core, the VOS message shall
- ** be freed first
- */
- VOS_TRACE( VOS_MODULE_ID_VOSS,
- VOS_TRACE_LEVEL_INFO,
- "%s: Flushing the RX Thread message queue",__func__);
-
- if (NULL == pSchedContext)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: pSchedContext is NULL", __func__);
- return;
- }
-
- while( NULL != (pMsgWrapper = vos_mq_get(&pSchedContext->sysRxMq) ))
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS,
- VOS_TRACE_LEVEL_INFO,
- "%s: Freeing RX SYS MSG message type %d",__func__,
- pMsgWrapper->pVosMsg->type );
- sysTxFreeMsg(pSchedContext->pVContext, pMsgWrapper->pVosMsg);
- }
-
-}/* vos_sched_flush_rx_mqs() */
-
-/*-------------------------------------------------------------------------
- This helper function helps determine if thread id is of TX thread
- ------------------------------------------------------------------------*/
-int vos_sched_is_tx_thread(int threadID)
-{
- // Make sure that Vos Scheduler context has been initialized
- VOS_ASSERT( NULL != gpVosSchedContext);
- if (gpVosSchedContext == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: gpVosSchedContext == NULL",__func__);
- return 0;
- }
- return ((gpVosSchedContext->TxThread) && (threadID == gpVosSchedContext->TxThread->pid));
-}
-/*-------------------------------------------------------------------------
- This helper function helps determine if thread id is of RX thread
- ------------------------------------------------------------------------*/
-int vos_sched_is_rx_thread(int threadID)
-{
- // Make sure that Vos Scheduler context has been initialized
- VOS_ASSERT( NULL != gpVosSchedContext);
- if (gpVosSchedContext == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: gpVosSchedContext == NULL",__func__);
- return 0;
- }
- return ((gpVosSchedContext->RxThread) && (threadID == gpVosSchedContext->RxThread->pid));
-}
-/*-------------------------------------------------------------------------
Helper function to get the scheduler context
------------------------------------------------------------------------*/
pVosSchedContext get_vos_sched_ctxt(void)
diff --git a/CORE/VOSS/src/vos_sched.h b/CORE/VOSS/src/vos_sched.h
index 4d85ed744415..258252a8549f 100644
--- a/CORE/VOSS/src/vos_sched.h
+++ b/CORE/VOSS/src/vos_sched.h
@@ -179,70 +179,25 @@ typedef struct _VosSchedContext
/* SYS Message queue on the Main thread */
VosMqType sysMcMq;
- /* TL Message queue on the Tx thread */
- VosMqType tlTxMq;
-
- /* SYS Message queue on the Tx thread */
- VosMqType sysTxMq;
-
- VosMqType sysRxMq;
-
/* Handle of Event for MC thread to signal startup */
struct completion McStartEvent;
- /* Handle of Event for Tx thread to signal startup */
- struct completion TxStartEvent;
-
- /* Handle of Event for Rx thread to signal startup */
- struct completion RxStartEvent;
-
struct task_struct* McThread;
- /* TX Thread handle */
-
- struct task_struct* TxThread;
-
- /* RX Thread handle */
- struct task_struct* RxThread;
-
/* completion object for MC thread shutdown */
struct completion McShutdown;
- /* completion object for Tx thread shutdown */
- struct completion TxShutdown;
-
- /* completion object for Rx thread shutdown */
- struct completion RxShutdown;
-
/* Wait queue for MC thread */
wait_queue_head_t mcWaitQueue;
unsigned long mcEventFlag;
- /* Wait queue for Tx thread */
- wait_queue_head_t txWaitQueue;
-
- unsigned long txEventFlag;
-
- /* Wait queue for Rx thread */
- wait_queue_head_t rxWaitQueue;
-
- unsigned long rxEventFlag;
-
/* Completion object to resume Mc thread */
struct completion ResumeMcEvent;
- /* Completion object to resume Tx thread */
- struct completion ResumeTxEvent;
-
- /* Completion object to resume Rx thread */
- struct completion ResumeRxEvent;
-
/* lock to make sure that McThread and TxThread Suspend/resume mechanism is in sync*/
spinlock_t McThreadLock;
- spinlock_t TxThreadLock;
- spinlock_t RxThreadLock;
#ifdef QCA_CONFIG_SMP
spinlock_t TlshimRxThreadLock;
@@ -511,8 +466,6 @@ static inline int vos_sched_handle_throughput_req(
}
#endif
-int vos_sched_is_tx_thread(int threadID);
-int vos_sched_is_rx_thread(int threadID);
/*---------------------------------------------------------------------------
\brief vos_sched_open() - initialize the vOSS Scheduler
@@ -658,8 +611,6 @@ pVosWatchdogContext get_vos_watchdog_ctxt(void);
VOS_STATUS vos_sched_init_mqs (pVosSchedContext pSchedContext);
void vos_sched_deinit_mqs (pVosSchedContext pSchedContext);
void vos_sched_flush_mc_mqs (pVosSchedContext pSchedContext);
-void vos_sched_flush_tx_mqs (pVosSchedContext pSchedContext);
-void vos_sched_flush_rx_mqs (pVosSchedContext pSchedContext);
void clearWlanResetReason(void);
void vos_timer_module_init( void );
diff --git a/CORE/VOSS/src/vos_timer.c b/CORE/VOSS/src/vos_timer.c
index ef9de7d7d2ec..da00db0df4ff 100644
--- a/CORE/VOSS/src/vos_timer.c
+++ b/CORE/VOSS/src/vos_timer.c
@@ -186,35 +186,6 @@ static void vos_linux_timer_callback (unsigned long data)
__func__);
return;
}
- // If timer has expired then call vos_client specific callback
- if ( vos_sched_is_tx_thread( threadId ) )
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "TIMER callback: running on TX thread");
-
- //Serialize to the Tx thread
- sysBuildMessageHeader( SYS_MSG_ID_TX_TIMER, &msg );
- msg.callback = callback;
- msg.bodyptr = userData;
- msg.bodyval = 0;
-
- if(vos_tx_mq_serialize( VOS_MQ_ID_SYS, &msg ) == VOS_STATUS_SUCCESS)
- return;
- }
- else if ( vos_sched_is_rx_thread( threadId ) )
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "TIMER callback: running on RX thread");
-
- //Serialize to the Rx thread
- sysBuildMessageHeader( SYS_MSG_ID_RX_TIMER, &msg );
- msg.callback = callback;
- msg.bodyptr = userData;
- msg.bodyval = 0;
-
- if(vos_rx_mq_serialize( VOS_MQ_ID_SYS, &msg ) == VOS_STATUS_SUCCESS)
- return;
- }
else
{
VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,