Commit Graph

18 Commitit

Tekijä SHA1 Viesti Päivämäärä
Jingxiang Ge
3200bacc98 qcacmn: check wrap around in BEFORE_UNLOCK
1 Add protection for wrap around of jiffies.
2 fix assign issue from uint32_t to uint64_t.

Change-Id: Idbd3604d0cb985d08aa82e3b1d7f32fa6be8c3ef
CRs-Fixed: 2864737
2021-01-29 14:41:25 -08:00
Debasis Das
2c411d6e74 qcacmn: Make inline OS-abstraction APIs as non-inline
OS-abstraction API's are made non-inline to avoid direct
usage of kernel API's.

Change-Id: Ib35aa9271d98054ab582fc079e62714bb7fdae99
2021-01-22 05:31:44 -08:00
Ananya Gupta
a3152f3104 qcacmn: Add DP event history in non debug mode
Enable DP event history for perf mode.

Change-Id: I1b8863928f956aa39488ea357d56e182613aad8d
CRs-Fixed: 2846844
2021-01-19 19:02:49 -08:00
Yu Tian
cee4dbb1c5 qcacmn: Implement a light weight get_timestamp routine
For some 3rd party platforms, get_timestamp through legacy
kernel API is time costing. For spin_lock/unlock statistics
info, the resolution in ms level is enough. So use another
light weight API to save CPU resource for 3rd party
platforms only.

Change-Id: I9182f00adda0d3081a2c40b222ab37bb1ca9d6a1
CRs-Fixed: 2796263
2020-11-03 13:17:00 -08:00
Aniruddha Paul
ea81d9ac47 qcacmn: Add qdf API wrapper for ktime_real_get
Add qdf wrapper API to the ktime_real(). This gives the
current wallclock in ktime format.

Change-Id: If869985007225606075fb936593d5798ea0746e9
2020-06-29 02:38:43 -07:00
Rajeev Kumar
1fe4511e2e qcacmn: Replace adrastea compile time config by MSM platfrom
To have proper MSM timer tick to usec conversion replace adrastea
config by msm platfrom.

Change-Id: I3c5ed4b907a6844c507b7f38bce2537bd933f89b
CRs-Fixed: 2421674
2019-03-26 20:56:22 -07:00
Dustin Brown
aaa97751a6 qcacmn: Add excessive logging detection
One of the most common stability issues encountered by the stability
team is watchdog bite due to excessive logging. Add a feature to track
logging to dmesg using a tumbling window and counter, and panic if the
configured maximum number of logs for that window is exceeded.

Change-Id: If83c6dfccb9d191b02a3a7166b065c0a0704f969
CRs-Fixed: 2338385
2018-10-25 12:33:04 -07:00
Dustin Brown
39bb395e2e qcacmn: Add scheduler history
To help triage issues where the scheduler thread is processing slowly,
add a scheduler processing history for offline analysis. This can also
be useful in determining if a processing delay in some operation is
attributed to the scheduler thread or not.

Change-Id: Icfea17efc34b2a23d4f8b2baebe08db4e2f6ce8b
CRs-Fixed: 2307252
2018-09-05 22:15:13 -07:00
Jeff Johnson
1974e07df2 qcacmn: qdf: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Ia920daa3248677b9446f4203c7698cbc37648fbd
CRs-Fixed: 2230684
2018-05-18 02:17:38 -07:00
Kiran Venkatappa
bc1c547b8e qcacmn: Add timekeeping.h inclusion under correct kernel version
timekeeping.h is available from kernel version 3.17. Add header
inclusion and ktime_get_boot_ns call under correct version check flag.

Change-Id: I2a1a127e1716b52af56d14c39e2e646e34b05fa3
CRs-Fixed: 2230949
2018-05-07 01:29:30 -07:00
Venkata krishna Sundararajan
e456cb8400 qcacmn: Add qdf wrapper for ktime, hrtimer related APIs
Add qdf wrapper for ktime, hrtimer related functions
and abstracts in qdf layer. The  wifi driver use the
qdf wrappers for the above APIs.

ktime APIs:
=========
ktime_to_ms
ktime_set
ktime_to_ns
ktime_add_ns
ktime_get
ktime_add
ns_to_ktime

hrtimer APIs:
=====
hrtimer_forward
hrtimer_active
hrtimer_callback_running
hrtimer_cancel
hrtimer_is_queued
hrtimer_get_remaining
tasklet_hrtimer_init
tasklet_hrtimer_cancel

CRs-Fixed: 2138717
Change-Id: Ic4655d6b342f2121a5acc9b1c6bda7aabd154f8f
2018-03-29 18:57:32 -07:00
Ashish Kumar Dhanotiya
1c5d902876 qcacmn: Add proper api for ktime_get_boot_ns for kernel 3.10
Kernel api ktime_get_boot_ns is not supported in kernel version 3.10
so add correct api for kernel 3.10.

Change-Id: Id78d50d759db90a9c6edf4114f8af1a925dfb9bb
CRs-Fixed: 2076538
2017-07-24 02:37:31 -07:00
Ashish Kumar Dhanotiya
c846868cd8 qcacmn: Add correct api call to get proper boot time
Propagation from qcacld-2.0 to qcacmn

Currently to get clock boottime, qdf_get_monotonic_boottime_ns
api is getting used which does not include the suspend time.

To include the system suspend time also in clock boottime, use
qdf_get_bootbased_boottime_ns api which uses ktime_get_boot_ns
kernel api.

Change-Id: Ibcc628c315201fa3ced7e1ad96753772d91707b2
CRs-Fixed: 2069085
2017-07-05 03:40:50 -07:00
Dustin Brown
6cb0fa1c4f qcacmn: Create qdf_log_timestamp_to_secs helper function
Create a timestamp conversion helper that returns whole seconds and
remaining micro seconds, for easier consumption by logging methods.

Change-Id: I5bc40075566485f3dc9f7e5fd81a13ec462c5da0
CRs-Fixed: 2031564
2017-04-13 21:31:10 -07:00
Houston Hoffman
14201bf72d qcacmn: support logtime conversion for qtimer
The api qdf_get_log_timestamp is the fastest way to get a
high resolution timestamp in the system, however its
scaling is not consistent.  This adds some conversion
apis for logging time differences in human readible quantities.
This also adds the reverse conversion.

Change-Id: I6c22132514c2cebb67c850260214a7f734bf8670
CRs-Fixed: 1100505
2017-01-31 13:14:50 -08:00
Houston Hoffman
2bfb82fd6f qcacmn: make qdf_time_t synonymous with system ticks
Currently the use of qdf_time_t vs unsigned long is arbitrary.

Change-Id: I658b1e9169e50389f9054b9fe1d229e51e578461
CRs-Fixed: 1017055
2016-05-23 11:33:18 -07:00
Chouhan, Anurag
5776318d19 qcacmn: Add QDF OS abstraction convergence
Converge ADF and CDF API's and move them to
QDF folder. MCL/WIN driver use this QDF converged
module for OS abstraction.

Change-Id: I1d0cdfd8730a5c021aaa50b7dc8549d491d760b3
CRs-Fixed: 981187
2016-03-16 12:18:26 -07:00
Prakash Dhavali
142cee4bf2 Initial host-common file folder cleanup and moves
Initial host-common file folder cleanup and moves
on top of baseline reference of MCL WLAN driver
SU#5.0.0.160.

Move dp, ht comm, hif, wmi and qdf folders one level up

Change-Id: I2120898024b1eafd5d651c48768dbf48bf05995d
2016-03-03 01:02:02 -08:00