diff --git a/Kbuild b/Kbuild index 97e03a49f8699..24cc5fe449777 100644 --- a/Kbuild +++ b/Kbuild @@ -2073,7 +2073,7 @@ 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 +cppflags-$(CONFIG_RX_PERFORMANCE) += -DRX_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 d02b4b611d466..9af7c5f7bf4b0 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -88,7 +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 + CONFIG_RX_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 808ae42600165..8a6ed8118e3e8 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -35,7 +35,7 @@ #include #include #include -#ifdef THREAD_PERFORMANCE +#ifdef RX_PERFORMANCE #include #endif @@ -410,7 +410,7 @@ QDF_STATUS cds_sched_open(void *p_cds_context, p_cds_sched_context pSchedContext, uint32_t SchedCtxSize) { -#ifdef THREAD_PERFORMANCE +#ifdef RX_PERFORMANCE struct sched_param param; param.sched_priority = 99; @@ -462,7 +462,7 @@ QDF_STATUS cds_sched_open(void *p_cds_context, goto OL_RX_THREAD_START_FAILURE; } -#ifdef THREAD_PERFORMANCE +#ifdef RX_PERFORMANCE sched_setscheduler(pSchedContext->ol_rx_thread, SCHED_RR, ¶m); #endif wake_up_process(pSchedContext->ol_rx_thread); @@ -733,6 +733,10 @@ static int cds_ol_rx_thread(void *arg) p_cds_sched_context pSchedContext = (p_cds_sched_context) arg; bool shutdown = false; int status; +#ifdef RX_PERFORMANCE + int i; + unsigned long pref_cpu = 0; +#endif #ifdef RX_THREAD_PRIORITY struct sched_param scheduler_params = {0}; @@ -747,6 +751,21 @@ static int cds_ol_rx_thread(void *arg) set_wake_up_idle(true); #endif +#ifdef RX_PERFORMANCE + /* + * Find the available cpu core other than cpu 0 and + * bind the thread + */ + for_each_online_cpu(i) { + if (i == 0) + continue; + pref_cpu = i; + break; + } + if (pref_cpu != 0 && (!cds_set_cpus_allowed_ptr(current, pref_cpu))) + affine_cpu = pref_cpu; +#endif + complete(&pSchedContext->ol_rx_start_event); while (!shutdown) { diff --git a/core/hdd/inc/hdd_dp_cfg.h b/core/hdd/inc/hdd_dp_cfg.h index f0bd14b46c823..be812d526aeb2 100644 --- a/core/hdd/inc/hdd_dp_cfg.h +++ b/core/hdd/inc/hdd_dp_cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index c948ab6fce558..0250082ed6192 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -2083,8 +2083,9 @@ QDF_STATUS hdd_rx_packet_cbk(void *adapter_context, dest_mac_addr = (struct qdf_mac_addr *)(skb->data); mac_addr = (struct qdf_mac_addr *)(skb->data+QDF_MAC_ADDR_SIZE); - ucfg_tdls_update_rx_pkt_cnt(adapter->vdev, mac_addr, - dest_mac_addr); + if (hdd_ctx->cur_vote_level < PLD_BUS_WIDTH_HIGH) + ucfg_tdls_update_rx_pkt_cnt(adapter->vdev, mac_addr, + dest_mac_addr); skb->dev = adapter->dev; skb->protocol = eth_type_trans(skb, skb->dev); @@ -2106,8 +2107,9 @@ QDF_STATUS hdd_rx_packet_cbk(void *adapter_context, } /* hold configurable wakelock for unicast traffic */ - if (hdd_ctx->config->rx_wakelock_timeout && - sta_ctx->conn_info.uIsAuthenticated) + if (hdd_ctx->cur_vote_level < PLD_BUS_WIDTH_HIGH && + hdd_ctx->config->rx_wakelock_timeout && + sta_ctx->conn_info.uIsAuthenticated) wake_lock = hdd_is_rx_wake_lock_needed(skb); if (wake_lock) {