diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 590179bb590f..e0648122ad8d 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -1608,11 +1608,7 @@ QDF_STATUS cds_get_vdev_types(enum tQDF_ADAPTER_MODE mode, uint32_t *type, */ void cds_flush_work(void *work) { -#if defined (CONFIG_CNSS) - cnss_flush_work(work); -#elif defined (WLAN_OPEN_SOURCE) cancel_work_sync(work); -#endif } /** @@ -1623,11 +1619,7 @@ void cds_flush_work(void *work) */ void cds_flush_delayed_work(void *dwork) { -#if defined (CONFIG_CNSS) - cnss_flush_delayed_work(dwork); -#elif defined (WLAN_OPEN_SOURCE) cancel_delayed_work_sync(dwork); -#endif } /** @@ -1706,15 +1698,10 @@ void cds_trigger_recovery(void) uint64_t cds_get_monotonic_boottime(void) { -#ifdef CONFIG_CNSS struct timespec ts; - cnss_get_monotonic_boottime(&ts); + get_monotonic_boottime(&ts); return ((uint64_t) ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); -#else - return ((uint64_t)qdf_system_ticks_to_msecs(qdf_system_ticks()) * - 1000); -#endif } /** diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index b55ccce7cae3..0c11fdbeda44 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -6389,13 +6389,8 @@ QDF_STATUS cds_check_and_restart_sap(eCsrRoamResult roam_result, * creating workqueue then our main thread might go to sleep * which is not acceptable. */ -#ifdef CONFIG_CNSS - cnss_init_work(&hdd_ctx->sap_start_work, - cds_sap_restart_handle); -#else INIT_WORK(&hdd_ctx->sap_start_work, cds_sap_restart_handle); -#endif schedule_work(&hdd_ctx->sap_start_work); return QDF_STATUS_SUCCESS; } diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index bbf9b754d775..4f9a39c5fe2b 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -46,9 +46,6 @@ #include #include #include -#if defined(QCA_CONFIG_SMP) && defined(CONFIG_CNSS) -#include -#endif /* Preprocessor Definitions and Constants */ #define CDS_SCHED_THREAD_HEART_BEAT INFINITE /* Milli seconds to delay SSR thread when an Entry point is Active */ @@ -89,13 +86,7 @@ static QDF_STATUS cds_alloc_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext); #define CDS_CORE_PER_CLUSTER (4) static int cds_set_cpus_allowed_ptr(struct task_struct *task, unsigned long cpu) { -#ifdef WLAN_OPEN_SOURCE return set_cpus_allowed_ptr(task, cpumask_of(cpu)); -#elif defined(CONFIG_CNSS) - return cnss_set_cpus_allowed_ptr(task, cpu); -#else - return 0; -#endif } /** diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 0262528886b8..f8a3837b13ee 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -247,12 +247,6 @@ */ #define WLAN_TFC_IPAUC_TX_DESC_RESERVE 100 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) -#ifdef CONFIG_CNSS -#define cfg80211_vendor_cmd_reply(skb) cnss_vendor_cmd_reply(skb) -#endif -#endif - /* * NET_NAME_UNKNOWN is only introduced after Kernel 3.17, to have a macro * here if the Kernel version is less than 3.17 to avoid the interleave diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 104aa9396064..19b32c755594 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -42,9 +42,6 @@ #include #include #include -#ifdef CONFIG_CNSS -#include -#endif #include #include #include "sir_params.h" @@ -1791,13 +1788,8 @@ void wlan_hdd_cfg80211_acs_ch_select_evt(hdd_adapter_t *adapter) con_sap_adapter = hdd_get_con_sap_adapter(adapter, false); if (con_sap_adapter && test_bit(ACS_PENDING, &con_sap_adapter->event_flags)) { -#ifdef CONFIG_CNSS - cnss_init_delayed_work(&con_sap_adapter->acs_pending_work, - wlan_hdd_cfg80211_start_pending_acs); -#else INIT_DELAYED_WORK(&con_sap_adapter->acs_pending_work, wlan_hdd_cfg80211_start_pending_acs); -#endif /* Lets give 500ms for OBSS + START_BSS to complete */ schedule_delayed_work(&con_sap_adapter->acs_pending_work, msecs_to_jiffies(500)); @@ -7826,9 +7818,7 @@ wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter, int rssi = 0; hdd_context_t *pHddCtx; int status; -#ifdef CONFIG_CNSS struct timespec ts; -#endif struct hdd_config *cfg_param; ENTER(); @@ -7847,18 +7837,11 @@ wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter, memcpy(mgmt->bssid, bss_desc->bssId, ETH_ALEN); -#ifdef CONFIG_CNSS /* Android does not want the timestamp from the frame. Instead it wants a monotonic increasing value */ - cnss_get_monotonic_boottime(&ts); + get_monotonic_boottime(&ts); mgmt->u.probe_resp.timestamp = ((u64) ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); -#else - /* keep old behavior for non-open source (for now) */ - memcpy(&mgmt->u.probe_resp.timestamp, bss_desc->timeStamp, - sizeof(bss_desc->timeStamp)); - -#endif mgmt->u.probe_resp.beacon_int = bss_desc->beaconInterval; mgmt->u.probe_resp.capab_info = bss_desc->capabilityInfo; diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c index 06473990b67c..34a943e47df4 100644 --- a/core/hdd/src/wlan_hdd_ext_scan.c +++ b/core/hdd/src/wlan_hdd_ext_scan.c @@ -772,9 +772,8 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx, { hdd_context_t *pHddCtx = (hdd_context_t *) ctx; struct sk_buff *skb = NULL; -#ifdef CONFIG_CNSS struct timespec ts; -#endif + int flags = cds_get_gfp_flags(); ENTER(); @@ -804,12 +803,12 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx, } pData->ap.channel = cds_chan_to_freq(pData->ap.channel); -#ifdef CONFIG_CNSS + /* Android does not want the time stamp from the frame. Instead it wants a monotonic increasing value since boot */ - cnss_get_monotonic_boottime(&ts); + get_monotonic_boottime(&ts); pData->ap.ts = ((u64)ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); -#endif + hddLog(LOG1, "Req Id %u More Data %u", pData->requestId, pData->moreData); hddLog(LOG1, "AP Info: Timestamp %llu Ssid: %s " diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 84cc0e37cb38..90e6c7228e87 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -1743,19 +1743,11 @@ end: * * Return: none */ -#ifdef CONFIG_CNSS -static void hdd_ipa_init_uc_op_work(struct work_struct *work, - work_func_t work_handler) -{ - cnss_init_work(work, work_handler); -} -#else static void hdd_ipa_init_uc_op_work(struct work_struct *work, work_func_t work_handler) { INIT_WORK(work, work_handler); } -#endif /** @@ -2353,19 +2345,11 @@ int hdd_ipa_set_perf_level(hdd_context_t *hdd_ctx, uint64_t tx_packets, * * Return: none */ -#ifdef CONFIG_CNSS -static void hdd_ipa_init_uc_rm_work(struct work_struct *work, - work_func_t work_handler) -{ - cnss_init_work(work, work_handler); -} -#else static void hdd_ipa_init_uc_rm_work(struct work_struct *work, work_func_t work_handler) { INIT_WORK(work, work_handler); } -#endif /** * hdd_ipa_setup_rm() - Setup IPA resource management @@ -2430,13 +2414,8 @@ static int hdd_ipa_setup_rm(struct hdd_ipa_priv *hdd_ipa) } qdf_wake_lock_create(&hdd_ipa->wake_lock, "wlan_ipa"); -#ifdef CONFIG_CNSS - cnss_init_delayed_work(&hdd_ipa->wake_lock_work, - hdd_ipa_wake_lock_timer_func); -#else INIT_DELAYED_WORK(&hdd_ipa->wake_lock_work, hdd_ipa_wake_lock_timer_func); -#endif qdf_spinlock_create(&hdd_ipa->rm_lock); hdd_ipa->rm_state = HDD_IPA_RM_RELEASED; hdd_ipa->wake_lock_released = true; @@ -4045,11 +4024,7 @@ QDF_STATUS hdd_ipa_init(hdd_context_t *hdd_ctx) qdf_spinlock_create(&iface_context->interface_lock); } -#ifdef CONFIG_CNSS - cnss_init_work(&hdd_ipa->pm_work, hdd_ipa_pm_send_pkt_to_tl); -#else INIT_WORK(&hdd_ipa->pm_work, hdd_ipa_pm_send_pkt_to_tl); -#endif qdf_spinlock_create(&hdd_ipa->pm_lock); qdf_nbuf_queue_init(&hdd_ipa->pm_queue_head); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index cf03f2014d06..0cfba34472be 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2541,26 +2541,16 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type, * Workqueue which gets scheduled in IPv4 notification * callback */ -#ifdef CONFIG_CNSS - cnss_init_work(&adapter->ipv4NotifierWorkQueue, - hdd_ipv4_notifier_work_queue); -#else INIT_WORK(&adapter->ipv4NotifierWorkQueue, hdd_ipv4_notifier_work_queue); -#endif #ifdef WLAN_NS_OFFLOAD /* * Workqueue which gets scheduled in IPv6 * notification callback. */ -#ifdef CONFIG_CNSS - cnss_init_work(&adapter->ipv6NotifierWorkQueue, - hdd_ipv6_notifier_work_queue); -#else INIT_WORK(&adapter->ipv6NotifierWorkQueue, hdd_ipv6_notifier_work_queue); -#endif #endif status = hdd_register_interface(adapter, rtnl_held); if (QDF_STATUS_SUCCESS != status) { diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index bee481fa42e6..b4d68c59042e 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -1331,13 +1331,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, */ pAdapter->request = request; -#ifdef CONFIG_CNSS - cnss_init_work(&pAdapter->scan_block_work, - wlan_hdd_cfg80211_scan_block_cb); -#else INIT_WORK(&pAdapter->scan_block_work, wlan_hdd_cfg80211_scan_block_cb); -#endif schedule_work(&pAdapter->scan_block_work); return 0; } diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index cd60b7141134..03d233bf1674 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -750,19 +750,10 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) pHddCtx->tdls_mode = eTDLS_SUPPORT_ENABLED; } -#ifdef CONFIG_CNSS - cnss_init_work(&pHddTdlsCtx->implicit_setup, wlan_hdd_tdls_pre_setup); -#else INIT_WORK(&pHddTdlsCtx->implicit_setup, wlan_hdd_tdls_pre_setup); -#endif -#ifdef CONFIG_CNSS - cnss_init_delayed_work(&pHddCtx->tdls_scan_ctxt.tdls_scan_work, - wlan_hdd_tdls_schedule_scan); -#else INIT_DELAYED_WORK(&pHddCtx->tdls_scan_ctxt.tdls_scan_work, wlan_hdd_tdls_schedule_scan); -#endif /* * Release tdls lock before calling in SME api diff --git a/core/hdd/src/wlan_hdd_wmm.c b/core/hdd/src/wlan_hdd_wmm.c index 28e96fb7b299..5fbfb179fc9d 100644 --- a/core/hdd/src/wlan_hdd_wmm.c +++ b/core/hdd/src/wlan_hdd_wmm.c @@ -1882,12 +1882,7 @@ QDF_STATUS hdd_wmm_acquire_access(hdd_adapter_t *pAdapter, pQosContext->magic = HDD_WMM_CTX_MAGIC; pQosContext->is_inactivity_timer_running = false; -#ifdef CONFIG_CNSS - cnss_init_work(&pQosContext->wmmAcSetupImplicitQos, - hdd_wmm_do_implicit_qos); -#else INIT_WORK(&pQosContext->wmmAcSetupImplicitQos, hdd_wmm_do_implicit_qos); -#endif QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_DEBUG, "%s: Scheduling work for AC %d, context %p",