diff --git a/Kbuild b/Kbuild index 8519c93ff122..97e03a49f869 100644 --- a/Kbuild +++ b/Kbuild @@ -2072,6 +2072,9 @@ cppflags-$(CONFIG_WLAN_SYSFS) += -DWLAN_SYSFS cppflags-$(CONFIG_FEATURE_WLAN_RMC) += -DFEATURE_WLAN_RMC cppflags-$(CONFIG_FEATURE_BECN_STATS) += -DWLAN_FEATURE_BEACON_RECEPTION_STATS +#Set kernel thread scheduler +cppflags-$(CONFIG_THREAD_PERFORMANCE) += -DTHREAD_PERFORMANCE + #Enable OL debug and wmi unified functions cppflags-$(CONFIG_ATH_PERF_PWR_OFFLOAD) += -DATH_PERF_PWR_OFFLOAD diff --git a/configs/default_defconfig b/configs/default_defconfig index 7000c21c2dc4..d9855103c637 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -88,6 +88,7 @@ endif ifeq ($(CONFIG_ARCH_QCS405), y) CONFIG_WLAN_SYNC_TSF_PLUS := y CONFIG_WLAN_SYNC_TSF_PLUS_NOIRQ := y + CONFIG_THREAD_PERFORMANCE := y endif #Flag to enable Legacy Fast Roaming2(LFR2) diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index b84ee4623ea5..808ae4260016 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -35,6 +35,9 @@ #include #include #include +#ifdef THREAD_PERFORMANCE +#include +#endif /* Milli seconds to delay SSR thread when an Entry point is Active */ #define SSR_WAIT_SLEEP_TIME 200 @@ -407,6 +410,12 @@ QDF_STATUS cds_sched_open(void *p_cds_context, p_cds_sched_context pSchedContext, uint32_t SchedCtxSize) { +#ifdef THREAD_PERFORMANCE + struct sched_param param; + + param.sched_priority = 99; +#endif + cds_debug("Opening the CDS Scheduler"); /* Sanity checks */ if ((p_cds_context == NULL) || (pSchedContext == NULL)) { @@ -453,6 +462,9 @@ QDF_STATUS cds_sched_open(void *p_cds_context, goto OL_RX_THREAD_START_FAILURE; } +#ifdef THREAD_PERFORMANCE + sched_setscheduler(pSchedContext->ol_rx_thread, SCHED_RR, ¶m); +#endif wake_up_process(pSchedContext->ol_rx_thread); cds_debug("CDS OL RX thread Created"); wait_for_completion_interruptible(&pSchedContext->ol_rx_start_event);