diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2014-12-09 01:31:44 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-12-09 01:31:44 -0800 |
| commit | dbd55db8134a7ac5e1032e231d6ebe30c31cee47 (patch) | |
| tree | 715d3863685c9ed55ffbb471c42affdb0d0c3ac5 | |
| parent | c0dcc2bc5e34f62e015509c22ca1ee6645a98c67 (diff) | |
| parent | af86285f3ea8204535c35d5ee9f78afb781d9c5a (diff) | |
Merge "Release 1.0.0.251A QCACLD WLAN Driver"
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 7 | ||||
| -rw-r--r-- | CORE/MAC/inc/qwlan_version.h | 2 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_sched.c | 128 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_sched.h | 38 |
4 files changed, 8 insertions, 167 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index b3ce9f26aa47..75572214005a 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -11516,13 +11516,6 @@ void hdd_cnss_request_bus_bandwidth(hdd_context_t *pHddCtx, __func__, next_vote_level, tx_packets, rx_packets); pHddCtx->cur_vote_level = next_vote_level; cnss_request_bus_bandwidth(next_vote_level); -#ifdef QCA_CONFIG_SMP - if (next_vote_level == CNSS_BUS_WIDTH_LOW) { - vos_sched_handle_throughput_req(VOS_FALSE); - } else { - vos_sched_handle_throughput_req(VOS_TRUE); - } -#endif /* QCA_CONFIG_SMP */ } pHddCtx->prev_rx = rx_packets; diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index 16e42ceaa41a..051e35f1847d 100644 --- a/CORE/MAC/inc/qwlan_version.h +++ b/CORE/MAC/inc/qwlan_version.h @@ -44,7 +44,7 @@ BRIEF DESCRIPTION: #define QWLAN_VERSION_EXTRA "" #define QWLAN_VERSION_BUILD 251 -#define QWLAN_VERSIONSTR "1.0.0.251" +#define QWLAN_VERSIONSTR "1.0.0.251A" #define AR6320_REV1_VERSION 0x5000000 diff --git a/CORE/VOSS/src/vos_sched.c b/CORE/VOSS/src/vos_sched.c index d78b141e18de..017ea3f34a98 100644 --- a/CORE/VOSS/src/vos_sched.c +++ b/CORE/VOSS/src/vos_sched.c @@ -111,8 +111,6 @@ extern v_VOID_t vos_core_return_msg(v_PVOID_t pVContext, pVosMsgWrapper pMsgWrap #ifdef QCA_CONFIG_SMP #define VOS_CORE_PER_CLUSTER 4 -#define MAX_CPU_COUNT 8 - static int vos_set_cpus_allowed_ptr(struct task_struct *task, unsigned long cpu) { @@ -125,116 +123,6 @@ static int vos_set_cpus_allowed_ptr(struct task_struct *task, #endif } -int vos_sched_handle_cpu_hot_plug(void) -{ - pVosSchedContext pSchedContext = get_vos_sched_ctxt(); - unsigned long online_perf_cpu[MAX_CPU_COUNT]; - unsigned long online_litl_cpu[MAX_CPU_COUNT]; - unsigned long cpus; - unsigned char perf_core_count = 0; - unsigned char litl_core_count = 0; - - vos_lock_acquire(&pSchedContext->affinity_lock); - /* Get Online perf CPU count */ - for_each_online_cpu(cpus) { - if (cpus >= VOS_CORE_PER_CLUSTER) { - online_perf_cpu[perf_core_count] = cpus; - perf_core_count++; - } else { - online_litl_cpu[litl_core_count] = cpus; - litl_core_count++; - } - } - - if (litl_core_count > 0) { - litl_core_count--; - } - /* High throughput required and at least one PERF CPU online */ - if ((pSchedContext->high_throughput_required) && (perf_core_count >= 1)) { - /* Attach RX thread to PERF CPU */ - if (pSchedContext->rx_thread_cpu != - online_perf_cpu[perf_core_count - 1]) { - vos_set_cpus_allowed_ptr(pSchedContext->TlshimRxThread, - online_perf_cpu[perf_core_count - 1]); - pSchedContext->rx_thread_cpu = online_perf_cpu[perf_core_count - 1]; - } - } else { - if (pSchedContext->rx_thread_cpu != online_litl_cpu[litl_core_count]) { - /* no high throughput required or no PERF CPU online */ - vos_set_cpus_allowed_ptr(pSchedContext->TlshimRxThread, - online_litl_cpu[litl_core_count]); - pSchedContext->rx_thread_cpu = online_litl_cpu[litl_core_count]; - } - } - vos_lock_release(&pSchedContext->affinity_lock); - - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - "%s: NUM PERF CORE %d, HIGH TPUTR REQ %d, RX THRE CPU %lu", - __func__, perf_core_count, - (int)pSchedContext->high_throughput_required, - pSchedContext->rx_thread_cpu); - return 0; -} - -int vos_sched_handle_throughput_req(v_BOOL_t high_tput_required) -{ - pVosSchedContext pSchedContext = get_vos_sched_ctxt(); - unsigned long online_perf_cpu[MAX_CPU_COUNT]; - unsigned long online_litl_cpu[MAX_CPU_COUNT]; - unsigned long cpus; - unsigned char perf_core_count = 0; - unsigned char litl_core_count = 0; - - /* Single cluster system, not need to handle this */ - if (num_possible_cpus() < VOS_CORE_PER_CLUSTER) { - return 0; - } - - vos_lock_acquire(&pSchedContext->affinity_lock); - if (pSchedContext->high_throughput_required == high_tput_required) { - vos_lock_release(&pSchedContext->affinity_lock); - return 0; - } - for_each_online_cpu(cpus) { - if (cpus >= VOS_CORE_PER_CLUSTER) { - online_perf_cpu[perf_core_count] = cpus; - perf_core_count++; - } else { - online_litl_cpu[litl_core_count] = cpus; - litl_core_count++; - } - } - - if (litl_core_count > 0) { - litl_core_count--; - } - if ((VOS_TRUE == high_tput_required) && (perf_core_count >= 1)) { - if (pSchedContext->rx_thread_cpu != - online_perf_cpu[perf_core_count - 1]) { - /* Attach RX thread to PERF CPU */ - vos_set_cpus_allowed_ptr(pSchedContext->TlshimRxThread, - online_perf_cpu[perf_core_count - 1]); - pSchedContext->rx_thread_cpu = online_perf_cpu[perf_core_count - 1]; - } - } else { - if (pSchedContext->rx_thread_cpu != online_litl_cpu[litl_core_count]) { - /* no high throughput required or no PERF CPU online */ - vos_set_cpus_allowed_ptr(pSchedContext->TlshimRxThread, - online_litl_cpu[litl_core_count]); - pSchedContext->rx_thread_cpu = online_litl_cpu[litl_core_count]; - } - } - pSchedContext->high_throughput_required = high_tput_required; - vos_lock_release(&pSchedContext->affinity_lock); - - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - "%s: NUM PERF CORE %d, HIGH TPUTR REQ %d, RX THRE CPU %lu", - __func__, - perf_core_count, (int)pSchedContext->high_throughput_required, - pSchedContext->rx_thread_cpu); - return 0; -} - static int vos_cpu_hotplug_notify(struct notifier_block *block, unsigned long state, void *hcpu) { @@ -258,21 +146,17 @@ static int vos_cpu_hotplug_notify(struct notifier_block *block, "%s: RX CORE %d, STATE %d, NUM CPUS %d", __func__, (int)affine_cpu, (int)state, num_cpus); multi_cluster = (num_cpus > VOS_CORE_PER_CLUSTER)?1:0; - if ((multi_cluster) && - ((CPU_ONLINE == state) || (CPU_DEAD == state))) { - vos_sched_handle_cpu_hot_plug(); - return NOTIFY_OK; - } switch (state) { case CPU_ONLINE: - if (affine_cpu != 0) + if ((!multi_cluster) && (affine_cpu != 0)) return NOTIFY_OK; for_each_online_cpu(i) { if (i == 0) continue; pref_cpu = i; + if (!multi_cluster) break; } break; @@ -285,6 +169,7 @@ static int vos_cpu_hotplug_notify(struct notifier_block *block, if (i == 0) continue; pref_cpu = i; + if (!multi_cluster) break; } } @@ -408,8 +293,6 @@ vos_sched_open spin_unlock_bh(&pSchedContext->VosTlshimPktFreeQLock); register_hotcpu_notifier(&vos_cpu_hotplug_notifier); pSchedContext->cpuHotPlugNotifier = &vos_cpu_hotplug_notifier; - vos_lock_init(&pSchedContext->affinity_lock); - pSchedContext->high_throughput_required = VOS_FALSE; #endif @@ -1541,20 +1424,24 @@ static int VosTlshimRxThread(void *arg) unsigned long pref_cpu = 0; bool shutdown = false; int status, i; + unsigned int num_cpus; set_user_nice(current, -1); #ifdef MSM_PLATFORM set_wake_up_idle(true); #endif + num_cpus = num_possible_cpus(); /* 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; + if (num_cpus <= VOS_CORE_PER_CLUSTER) { break; } + } if (pref_cpu != 0 && (!vos_set_cpus_allowed_ptr(current, pref_cpu))) affine_cpu = pref_cpu; @@ -1675,7 +1562,6 @@ VOS_STATUS vos_sched_close ( v_PVOID_t pVosContext ) vos_sched_deinit_mqs(gpVosSchedContext); #ifdef QCA_CONFIG_SMP - vos_lock_destroy(&gpVosSchedContext->affinity_lock); // Shut down Tlshim Rx thread set_bit(RX_SHUTDOWN_EVENT_MASK, &gpVosSchedContext->tlshimRxEvtFlg); set_bit(RX_POST_EVENT_MASK, &gpVosSchedContext->tlshimRxEvtFlg); diff --git a/CORE/VOSS/src/vos_sched.h b/CORE/VOSS/src/vos_sched.h index 2339c100647d..5b7b5094386c 100644 --- a/CORE/VOSS/src/vos_sched.h +++ b/CORE/VOSS/src/vos_sched.h @@ -73,7 +73,6 @@ #endif #include <vos_mq.h> #include <adf_os_types.h> -#include <vos_lock.h> #define TX_POST_EVENT_MASK 0x001 #define TX_SUSPEND_EVENT_MASK 0x002 @@ -283,15 +282,6 @@ typedef struct _VosSchedContext /* cpu hotplug notifier */ struct notifier_block *cpuHotPlugNotifier; - - /* affinity lock */ - vos_lock_t affinity_lock; - - /* rx thread affinity cpu */ - unsigned long rx_thread_cpu; - - /* high throughput required */ - v_BOOL_t high_throughput_required; #endif } VosSchedContext, *pVosSchedContext; @@ -421,34 +411,6 @@ typedef struct _VosContextType #ifdef QCA_CONFIG_SMP /*--------------------------------------------------------------------------- - \brief vos_sched_handle_cpu_hot_plug() - API to handle cpu hot plug - notification. - The \a vos_sched_handle_cpu_hot_plug() changes affined CPU for IRQ and - some of WLAN thread like TLShim RX Thread if needed. - - \param none - - \return integer, success return 0 - - \sa vos_sched_handle_cpu_hot_plug() - -------------------------------------------------------------------------*/ -int vos_sched_handle_cpu_hot_plug(void); - -/*--------------------------------------------------------------------------- - \brief vos_sched_handle_throughput_req() - API to handle throughput - requirement - The \a vos_sched_handle_throughput_req() changes affined CPU for IRQ and - some of WLAN thread like TLShim RX Thread if needed. - - \param high_tput_required, boolean, high throughput is required or not - - \return integer, success return 0 - - \sa vos_sched_handle_throughput_req() - -------------------------------------------------------------------------*/ -int vos_sched_handle_throughput_req(v_BOOL_t high_tput_required); - -/*--------------------------------------------------------------------------- \brief vos_drop_rxpkt_by_staid() - API to drop pending Rx packets for a sta The \a vos_drop_rxpkt_by_staid() drops queued packets for a station, to drop all the pending packets the caller has to send WLAN_MAX_STA_COUNT as staId. |
