qcacld-3.0: Change the policy & priority of RX thread
Change the policy & priority of RX thread to improve the RX throughput for
Specified platform.
Change-Id: Ie9df5de6f34d75264c4f3b7bdcb59ab92845a128
CRs-Fixed: 2354502
diff --git a/Kbuild b/Kbuild
index fcd537b..157c696 100644
--- a/Kbuild
+++ b/Kbuild
@@ -2167,12 +2167,18 @@
ifeq ($(CONFIG_ARCH_MSM8996), y)
CONFIG_FEATURE_SG := y
+CONFIG_RX_THREAD_PRIORITY := y
endif
ifeq ($(CONFIG_FEATURE_SG), y)
cppflags-y += -DFEATURE_SG
endif
+ifeq ($(CONFIG_RX_THREAD_PRIORITY), y)
+cppflags-y += -DRX_THREAD_PRIORITY
+endif
+
+
#Enable wbuff
cppflags-$(CONFIG_WLAN_WBUFF) += -DWLAN_FEATURE_WBUFF
diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c
index cfcb2c8..7f981c5 100644
--- a/core/cds/src/cds_sched.c
+++ b/core/cds/src/cds_sched.c
@@ -691,7 +691,15 @@
bool shutdown = false;
int status;
+#ifdef RX_THREAD_PRIORITY
+ struct sched_param scheduler_params = {0};
+
+ scheduler_params.sched_priority = 1;
+ sched_setscheduler(current, SCHED_FIFO, &scheduler_params);
+#else
set_user_nice(current, -1);
+#endif
+
#ifdef MSM_PLATFORM
set_wake_up_idle(true);
#endif