qcacld-3.0: Add rx thread status API for HL targets
For HL targets, frames are queued to ol_rx_thread_queue during WoW suspend in progress. At this time ol_rx_thread_queue is in SUSPEND state and these frames can't deliver to Linux Stack. for ICMP case, if no other frames come to wake up system and ICMP timeout will happen. This change is to add rx thread status check API for HL targets. Change-Id: I3d37e6d6ce8f7f6edaf5f78bf5cef77bee6ed523 CRs-Fixed: 3407169
This commit is contained in:

committed by
Madan Koyyalamudi

parent
0cc739104b
commit
fb4d033d9c
@@ -36,6 +36,7 @@
|
|||||||
#include "qdf_mc_timer.h"
|
#include "qdf_mc_timer.h"
|
||||||
#include "cds_config.h"
|
#include "cds_config.h"
|
||||||
#include "qdf_cpuhp.h"
|
#include "qdf_cpuhp.h"
|
||||||
|
#include "cdp_txrx_cmn_struct.h"
|
||||||
|
|
||||||
#define MC_SUSPEND_EVENT 0x002
|
#define MC_SUSPEND_EVENT 0x002
|
||||||
#define RX_POST_EVENT 0x001
|
#define RX_POST_EVENT 0x001
|
||||||
@@ -341,6 +342,15 @@ void cds_free_ol_rx_pkt(p_cds_sched_context pSchedContext,
|
|||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
void cds_free_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext);
|
void cds_free_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cds_get_rx_thread_pending() - get rx thread status
|
||||||
|
* @soc: ol_txrx_soc_handle object
|
||||||
|
*
|
||||||
|
* Return: 1 if rx thread is not empty.
|
||||||
|
* 0 if rx thread is empty.
|
||||||
|
*/
|
||||||
|
int cds_get_rx_thread_pending(ol_txrx_soc_handle soc);
|
||||||
#else
|
#else
|
||||||
static inline void cds_sched_handle_rx_thread_affinity_req(
|
static inline void cds_sched_handle_rx_thread_affinity_req(
|
||||||
bool high_throughput) {}
|
bool high_throughput) {}
|
||||||
@@ -389,6 +399,10 @@ static inline int cds_sched_handle_throughput_req(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int cds_get_rx_thread_pending(ol_txrx_soc_handle soc)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -145,7 +145,9 @@ static struct ol_if_ops dp_ol_if_ops = {
|
|||||||
/* TODO: Add any other control path calls required to OL_IF/WMA layer */
|
/* TODO: Add any other control path calls required to OL_IF/WMA layer */
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
static struct ol_if_ops dp_ol_if_ops;
|
static struct ol_if_ops dp_ol_if_ops = {
|
||||||
|
.dp_rx_get_pending = cds_get_rx_thread_pending,
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void cds_trigger_recovery_work(void *param);
|
static void cds_trigger_recovery_work(void *param);
|
||||||
|
@@ -918,3 +918,35 @@ int cds_get_gfp_flags(void)
|
|||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cds_get_rx_thread_pending(): get rx thread status
|
||||||
|
* @soc: ol_txrx_soc_handle object
|
||||||
|
*
|
||||||
|
* Return: 1 if rx thread is not empty.
|
||||||
|
* 0 if rx thread is empty
|
||||||
|
*/
|
||||||
|
#ifdef QCA_CONFIG_SMP
|
||||||
|
int cds_get_rx_thread_pending(ol_txrx_soc_handle soc)
|
||||||
|
{
|
||||||
|
p_cds_sched_context cds_sched_context = get_cds_sched_ctxt();
|
||||||
|
|
||||||
|
if (!cds_sched_context) {
|
||||||
|
cds_err("cds_sched_context is NULL");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_lock_bh(&cds_sched_context->ol_rx_queue_lock);
|
||||||
|
|
||||||
|
if (list_empty(&cds_sched_context->ol_rx_thread_queue)) {
|
||||||
|
spin_unlock_bh(&cds_sched_context->ol_rx_queue_lock);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In helium there is no scope to get no of pending frames
|
||||||
|
* in rx thread, Hence return 1 if frames are queued
|
||||||
|
*/
|
||||||
|
spin_unlock_bh(&cds_sched_context->ol_rx_queue_lock);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user