From 8fbc8c29417b0dcfd7ac8b3daf3476d904bcc479 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Fri, 26 Jul 2019 15:14:32 -0700 Subject: [PATCH 1/2] qcacmn: Add QDF timer multiplier for all timers on host Some QDF timers on host do not use the QDF timer multiplier. Add QDF timer multiplier so that all timers on host have it. Change-Id: I57acb28240ea815aaed685b5a193e492332cad69 CRs-Fixed: 2498149 --- qdf/inc/qdf_timer.h | 12 ++++-------- qdf/linux/src/i_qdf_timer.h | 13 ++++++++++--- qdf/linux/src/qdf_event.c | 2 +- qdf/linux/src/qdf_mc_timer.c | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/qdf/inc/qdf_timer.h b/qdf/inc/qdf_timer.h index 0f82b1c2167f..83ec8d3bd182 100644 --- a/qdf/inc/qdf_timer.h +++ b/qdf/inc/qdf_timer.h @@ -51,19 +51,13 @@ qdf_timer_init(qdf_handle_t hdl, qdf_timer_t *timer, qdf_timer_func_t func, return __qdf_timer_init(timer, func, arg, type); } -#ifdef QDF_TIMER_MULTIPLIER_FRAC -#define qdf_msecs_to_jiffies(msec) \ - (QDF_TIMER_MULTIPLIER_FRAC * __qdf_msecs_to_jiffies(msec)) -#else -#define qdf_msecs_to_jiffies(msec) \ - (qdf_timer_get_multiplier() * __qdf_msecs_to_jiffies(msec)) -#endif - /** * qdf_timer_start() - start a timer * @timer: timer to start * @msec: Expiration period in milliseconds * + * If QDF timer multiplier is set, the timeout value may get scaled. + * * Return: none */ static inline void qdf_timer_start(qdf_timer_t *timer, int msec) @@ -78,6 +72,8 @@ static inline void qdf_timer_start(qdf_timer_t *timer, int msec) * * If @timer is not active, it will be activated. * + * If QDF timer multiplier is set, the timeout value may get scaled. + * * Return: none */ static inline void qdf_timer_mod(qdf_timer_t *timer, int msec) diff --git a/qdf/linux/src/i_qdf_timer.h b/qdf/linux/src/i_qdf_timer.h index 2cbb6cbf7c7f..29c7782a9430 100644 --- a/qdf/linux/src/i_qdf_timer.h +++ b/qdf/linux/src/i_qdf_timer.h @@ -43,7 +43,13 @@ struct __qdf_timer_t { void *context; }; -#define __qdf_msecs_to_jiffies(msec) msecs_to_jiffies(msec) +#ifdef QDF_TIMER_MULTIPLIER_FRAC +#define __qdf_scaled_msecs_to_jiffies(msec) \ + (QDF_TIMER_MULTIPLIER_FRAC * msecs_to_jiffies(msec)) +#else +#define __qdf_scaled_msecs_to_jiffies(msec) \ + (qdf_timer_get_multiplier() * msecs_to_jiffies(msec)) +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) static inline void __os_timer_shim(struct timer_list *os_timer) @@ -121,13 +127,14 @@ static inline void __qdf_timer_start(struct __qdf_timer_t *timer, uint32_t msec) { struct timer_list *os_timer = &timer->os_timer; - os_timer->expires = jiffies + __qdf_msecs_to_jiffies(msec); + os_timer->expires = jiffies + __qdf_scaled_msecs_to_jiffies(msec); add_timer(os_timer); } static inline void __qdf_timer_mod(struct __qdf_timer_t *timer, uint32_t msec) { - mod_timer(&timer->os_timer, jiffies + __qdf_msecs_to_jiffies(msec)); + mod_timer(&timer->os_timer, + jiffies + __qdf_scaled_msecs_to_jiffies(msec)); } static inline bool __qdf_timer_stop(struct __qdf_timer_t *timer) diff --git a/qdf/linux/src/qdf_event.c b/qdf/linux/src/qdf_event.c index 929eff8972dd..c504e586b405 100644 --- a/qdf/linux/src/qdf_event.c +++ b/qdf/linux/src/qdf_event.c @@ -214,7 +214,7 @@ QDF_STATUS qdf_wait_single_event(qdf_event_t *event, uint32_t timeout) ret = wait_for_completion_timeout( &event->complete, - qdf_msecs_to_jiffies(timeout)); + __qdf_scaled_msecs_to_jiffies(timeout)); if (ret <= 0) return QDF_STATUS_E_TIMEOUT; diff --git a/qdf/linux/src/qdf_mc_timer.c b/qdf/linux/src/qdf_mc_timer.c index 61f7f9410915..451986a60c96 100644 --- a/qdf/linux/src/qdf_mc_timer.c +++ b/qdf/linux/src/qdf_mc_timer.c @@ -677,7 +677,7 @@ QDF_STATUS qdf_mc_timer_start(qdf_mc_timer_t *timer, uint32_t expiration_time) /* start the timer */ mod_timer(&(timer->platform_info.timer), - jiffies + qdf_msecs_to_jiffies(expiration_time)); + jiffies + __qdf_scaled_msecs_to_jiffies(expiration_time)); timer->state = QDF_TIMER_STATE_RUNNING; From 689d670cc9e509c285ccac41f00a567f760077e5 Mon Sep 17 00:00:00 2001 From: Tushnim Bhattacharyya Date: Tue, 23 Jul 2019 15:19:50 -0700 Subject: [PATCH 2/2] qcacmn: Clean up CONFIG_MCL for MAX_BCN_PROBE_IN_SCAN_QUEUE Clean up CONFIG_MCL and add MAX_BCN_PROBE_IN_SCAN_QUEUE in the defaul_defconfig file. Change-Id: I5c79ed31609ae67545d7ddf4a649925d1d071b9a CRs-Fixed: 2495605 --- umac/scan/dispatcher/inc/wlan_scan_public_structs.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h index b6b7e5694244..29b3f2dbeeac 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h +++ b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h @@ -69,12 +69,6 @@ typedef uint32_t wlan_scan_id; #define MAX_INDEX_SCORE 100 #define MAX_INDEX_PER_INI 4 -#ifdef CONFIG_MCL -#define MAX_BCN_PROBE_IN_SCAN_QUEUE 150 -#else -#define MAX_BCN_PROBE_IN_SCAN_QUEUE 2000 -#endif - #define WLAN_GET_BITS(_val, _index, _num_bits) \ (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))