qdf_time.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. /*
  2. * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: qdf_time
  21. * This file abstracts time related functionality.
  22. */
  23. #ifndef _QDF_OS_TIME_H
  24. #define _QDF_OS_TIME_H
  25. #include <i_qdf_time.h>
  26. typedef __qdf_time_t qdf_time_t;
  27. typedef __qdf_ktime_t qdf_ktime_t;
  28. typedef __qdf_timespec_t qdf_timespec_t;
  29. typedef __qdf_work_struct_t qdf_work_struct_t;
  30. #define qdf_time_uint_to_ms(tu) (((tu) * 1024) / 1000)
  31. #ifdef ENHANCED_OS_ABSTRACTION
  32. /**
  33. * qdf_ns_to_ktime - Converts nanoseconds to a qdf_ktime_t object
  34. * @ns: time in nanoseconds
  35. *
  36. * Return: nanoseconds as qdf_ktime_t object
  37. */
  38. qdf_ktime_t qdf_ns_to_ktime(uint64_t ns);
  39. /**
  40. * qdf_ktime_add - Adds two qdf_ktime_t objects and returns
  41. * a qdf_ktime_t object
  42. * @ktime1: time as qdf_ktime_t object
  43. * @ktime2: time as qdf_ktime_t object
  44. *
  45. * Return: sum of both qdf_ktime_t as qdf_ktime_t object
  46. */
  47. qdf_ktime_t qdf_ktime_add(qdf_ktime_t ktime1, qdf_ktime_t ktime2);
  48. /**
  49. * qdf_ktime_get - Gets the current time as qdf_ktime_t object
  50. *
  51. * Return: current time as qdf_ktime_t object
  52. */
  53. qdf_ktime_t qdf_ktime_get(void);
  54. /**
  55. * qdf_ktime_real_get - Gets the current wall clock as qdf_ktime_t object
  56. *
  57. * Return: current wall clock as qdf_ktime_t object
  58. */
  59. qdf_ktime_t qdf_ktime_real_get(void);
  60. /**
  61. * qdf_ktime_add_ns - Adds qdf_ktime_t object and nanoseconds value and
  62. * returns the qdf_ktime_t object
  63. * @ktime: time as qdf_ktime_t object
  64. * @ns: time in nanoseconds
  65. *
  66. * Return: qdf_ktime_t object
  67. */
  68. qdf_ktime_t qdf_ktime_add_ns(qdf_ktime_t ktime, int64_t ns);
  69. /**
  70. * qdf_ktime_to_ms - Convert the qdf_ktime_t object into milliseconds
  71. * @ktime: time as qdf_ktime_t object
  72. *
  73. * Return: qdf_ktime_t in milliseconds
  74. */
  75. int64_t qdf_ktime_to_ms(qdf_ktime_t ktime);
  76. /**
  77. * qdf_ktime_to_us - Convert the qdf_ktime_t object into microseconds
  78. * @ktime: time as qdf_ktime_t object
  79. *
  80. * Return: qdf_ktime_t in microseconds
  81. */
  82. int64_t qdf_ktime_to_us(qdf_ktime_t ktime);
  83. /**
  84. * qdf_ktime_to_ns - Convert the qdf_ktime_t object into nanoseconds
  85. * @ktime: time as qdf_ktime_t object
  86. *
  87. * Return: qdf_ktime_t in nanoseconds
  88. */
  89. int64_t qdf_ktime_to_ns(qdf_ktime_t ktime);
  90. /**
  91. * qdf_system_ticks - Count the number of ticks elapsed from the time when
  92. * the system booted
  93. *
  94. * Return: ticks
  95. */
  96. qdf_time_t qdf_system_ticks(void);
  97. #define qdf_system_ticks_per_sec __qdf_system_ticks_per_sec
  98. /**
  99. * qdf_system_ticks_to_msecs - convert ticks to milliseconds
  100. * @clock_ticks: Number of ticks
  101. *
  102. * Return: unsigned int Time in milliseconds
  103. */
  104. uint32_t qdf_system_ticks_to_msecs(unsigned long clock_ticks);
  105. /**
  106. * qdf_system_ticks_to_nsecs - convert ticks to nanoseconds
  107. * @clock_ticks: Number of ticks
  108. *
  109. * Return: unsigned int Time in nanoseconds
  110. */
  111. uint32_t qdf_system_ticks_to_nsecs(unsigned long clock_ticks);
  112. /**
  113. * qdf_system_msecs_to_ticks - convert milliseconds to ticks
  114. * @msec: Time in milliseconds
  115. *
  116. * Return: unsigned long number of ticks
  117. */
  118. qdf_time_t qdf_system_msecs_to_ticks(uint32_t msecs);
  119. /**
  120. * qdf_get_system_uptime - Return a monotonically increasing time
  121. * This increments once per HZ ticks
  122. *
  123. * Return: qdf_time_t system up time in ticks
  124. */
  125. qdf_time_t qdf_get_system_uptime(void);
  126. /**
  127. * qdf_get_bootbased_boottime_ns() - Get the bootbased time in nanoseconds
  128. *
  129. * qdf_get_bootbased_boottime_ns() function returns the number of nanoseconds
  130. * that have elapsed since the system was booted. It also includes the time when
  131. * system was suspended.
  132. *
  133. * Return:
  134. * The time since system booted in nanoseconds
  135. */
  136. uint64_t qdf_get_bootbased_boottime_ns(void);
  137. /**
  138. * qdf_get_system_timestamp - Return current timestamp
  139. *
  140. * Return: unsigned long timestamp in ms.
  141. */
  142. unsigned long qdf_get_system_timestamp(void);
  143. /**
  144. * qdf_udelay - delay in microseconds
  145. * @usecs: Number of microseconds to delay
  146. *
  147. * Return: none
  148. */
  149. void qdf_udelay(int usecs);
  150. /**
  151. * qdf_mdelay - Delay in milliseconds.
  152. * @msec: Number of milliseconds to delay
  153. *
  154. * Return: none
  155. */
  156. void qdf_mdelay(int msecs);
  157. /**
  158. * qdf_system_time_after() - Check if a is later than b
  159. * @a: Time stamp value a
  160. * @b: Time stamp value b
  161. *
  162. * Return: true if a < b else false
  163. */
  164. bool qdf_system_time_after(qdf_time_t a, qdf_time_t b);
  165. /**
  166. * qdf_system_time_before() - Check if a is before b
  167. * @a: Time stamp value a
  168. * @b: Time stamp value b
  169. *
  170. * Return: true if a is before b else false
  171. */
  172. bool qdf_system_time_before(qdf_time_t a, qdf_time_t b);
  173. /**
  174. * qdf_system_time_after_eq() - Check if a atleast as recent as b, if not
  175. * later
  176. * @a: Time stamp value a
  177. * @b: Time stamp value b
  178. *
  179. * Return: true if a >= b else false
  180. */
  181. bool qdf_system_time_after_eq(qdf_time_t a, qdf_time_t b);
  182. /**
  183. * enum qdf_timestamp_unit - what unit the qdf timestamp is in
  184. * @KERNEL_LOG: boottime time in uS (micro seconds)
  185. * @QTIMER: QTIME in (1/19200)S
  186. *
  187. * This enum is used to distinguish which timer source is used.
  188. */
  189. enum qdf_timestamp_unit {
  190. KERNEL_LOG,
  191. QTIMER,
  192. };
  193. #ifdef MSM_PLATFORM
  194. #define QDF_LOG_TIMESTAMP_UNIT QTIMER
  195. #define QDF_LOG_TIMESTAMP_CYCLES_PER_10_US 192
  196. #else
  197. #define QDF_LOG_TIMESTAMP_UNIT KERNEL_LOG
  198. #define QDF_LOG_TIMESTAMP_CYCLES_PER_10_US 10
  199. #endif /* end of MSM_PLATFORM */
  200. uint64_t qdf_log_timestamp_to_usecs(uint64_t time);
  201. /**
  202. * qdf_get_log_timestamp_to_secs() - get time stamp for logging in seconds
  203. *
  204. * Return: The current logging timestamp normalized to second precision
  205. */
  206. void qdf_log_timestamp_to_secs(uint64_t time, uint64_t *secs,
  207. uint64_t *usecs);
  208. uint64_t qdf_usecs_to_log_timestamp(uint64_t usecs);
  209. /**
  210. * qdf_get_log_timestamp - get time stamp for logging
  211. * For adrastea this API returns QTIMER tick which is needed to synchronize
  212. * host and fw log timestamps
  213. * For ROME and other discrete solution this API returns system boot time stamp
  214. *
  215. * Return:
  216. * QTIMER ticks(19.2MHz) for adrastea
  217. * System tick for rome and other future discrete solutions
  218. */
  219. uint64_t qdf_get_log_timestamp(void);
  220. /**
  221. * qdf_get_log_timestamp_usecs() - get time stamp for logging in microseconds
  222. *
  223. * Return: The current logging timestamp normalized to microsecond precision
  224. */
  225. uint64_t qdf_get_log_timestamp_usecs(void);
  226. /**
  227. * qdf_get_monotonic_boottime - get monotonic kernel boot time
  228. * This API is similar to qdf_get_system_boottime but it includes
  229. * time spent in suspend.
  230. *
  231. * Return: Time in microseconds
  232. */
  233. uint64_t qdf_get_monotonic_boottime(void);
  234. /**
  235. * qdf_time_ktime_get_real_time() - Get the time of day in qdf_timespec_t
  236. * @ts: pointer to the qdf_timespec_t
  237. *
  238. * Return: None
  239. */
  240. void qdf_time_ktime_get_real_time(qdf_timespec_t *ts);
  241. /**
  242. * qdf_time_sched_clock - scheduler clock
  243. *
  244. * Return: current time in nanosec units.
  245. */
  246. unsigned long long qdf_time_sched_clock(void);
  247. #else
  248. /**
  249. * qdf_ns_to_ktime - Converts nanoseconds to a qdf_ktime_t object
  250. * @ns: time in nanoseconds
  251. *
  252. * Return: nanoseconds as qdf_ktime_t object
  253. */
  254. static inline qdf_ktime_t qdf_ns_to_ktime(uint64_t ns)
  255. {
  256. return __qdf_ns_to_ktime(ns);
  257. }
  258. /**
  259. * qdf_ktime_add - Adds two qdf_ktime_t objects and returns
  260. * a qdf_ktime_t object
  261. * @ktime1: time as qdf_ktime_t object
  262. * @ktime2: time as qdf_ktime_t object
  263. *
  264. * Return: sum of both qdf_ktime_t as qdf_ktime_t object
  265. */
  266. static inline qdf_ktime_t qdf_ktime_add(qdf_ktime_t ktime1, qdf_ktime_t ktime2)
  267. {
  268. return __qdf_ktime_add(ktime1, ktime2);
  269. }
  270. /**
  271. * qdf_ktime_get - Gets the current time as qdf_ktime_t object
  272. *
  273. * Return: current time as qdf_ktime_t object
  274. */
  275. static inline qdf_ktime_t qdf_ktime_get(void)
  276. {
  277. return __qdf_ktime_get();
  278. }
  279. /**
  280. * qdf_ktime_real_get - Gets the current wall clock as qdf_ktime_t object
  281. *
  282. * Return: current wall clock as qdf_ktime_t object
  283. */
  284. static inline qdf_ktime_t qdf_ktime_real_get(void)
  285. {
  286. return __qdf_ktime_real_get();
  287. }
  288. /**
  289. * qdf_ktime_add_ns - Adds qdf_ktime_t object and nanoseconds value and
  290. * returns the qdf_ktime_t object
  291. * @ktime: time as qdf_ktime_t object
  292. * @ns: time in nanoseconds
  293. *
  294. * Return: qdf_ktime_t object
  295. */
  296. static inline qdf_ktime_t qdf_ktime_add_ns(qdf_ktime_t ktime, int64_t ns)
  297. {
  298. return __qdf_ktime_add_ns(ktime, ns);
  299. }
  300. /**
  301. * qdf_ktime_to_ms - Convert the qdf_ktime_t object into milliseconds
  302. * @ktime: time as qdf_ktime_t object
  303. *
  304. * Return: qdf_ktime_t in milliseconds
  305. */
  306. static inline int64_t qdf_ktime_to_ms(qdf_ktime_t ktime)
  307. {
  308. return __qdf_ktime_to_ms(ktime);
  309. }
  310. /**
  311. * qdf_ktime_to_us - Convert the qdf_ktime_t object into microseconds
  312. * @ktime: time as qdf_ktime_t object
  313. *
  314. * Return: qdf_ktime_t in microseconds
  315. */
  316. static inline int64_t qdf_ktime_to_us(qdf_ktime_t ktime)
  317. {
  318. return __qdf_time_ktime_to_us(ktime);
  319. }
  320. /**
  321. * qdf_ktime_to_ns - Convert the qdf_ktime_t object into nanoseconds
  322. * @ktime: time as qdf_ktime_t object
  323. *
  324. * Return: qdf_ktime_t in nanoseconds
  325. */
  326. static inline int64_t qdf_ktime_to_ns(qdf_ktime_t ktime)
  327. {
  328. return __qdf_ktime_to_ns(ktime);
  329. }
  330. /**
  331. * qdf_system_ticks - Count the number of ticks elapsed from the time when
  332. * the system booted
  333. *
  334. * Return: ticks
  335. */
  336. static inline qdf_time_t qdf_system_ticks(void)
  337. {
  338. return __qdf_system_ticks();
  339. }
  340. #define qdf_system_ticks_per_sec __qdf_system_ticks_per_sec
  341. /**
  342. * qdf_system_ticks_to_msecs - convert ticks to milliseconds
  343. * @clock_ticks: Number of ticks
  344. *
  345. * Return: unsigned int Time in milliseconds
  346. */
  347. static inline uint32_t qdf_system_ticks_to_msecs(unsigned long clock_ticks)
  348. {
  349. return __qdf_system_ticks_to_msecs(clock_ticks);
  350. }
  351. /**
  352. * qdf_system_msecs_to_ticks - convert milliseconds to ticks
  353. * @msec: Time in milliseconds
  354. *
  355. * Return: unsigned long number of ticks
  356. */
  357. static inline qdf_time_t qdf_system_msecs_to_ticks(uint32_t msecs)
  358. {
  359. return __qdf_system_msecs_to_ticks(msecs);
  360. }
  361. /**
  362. * qdf_get_system_uptime - Return a monotonically increasing time
  363. * This increments once per HZ ticks
  364. *
  365. * Return: qdf_time_t system up time in ticks
  366. */
  367. static inline qdf_time_t qdf_get_system_uptime(void)
  368. {
  369. return __qdf_get_system_uptime();
  370. }
  371. /**
  372. * qdf_get_bootbased_boottime_ns() - Get the bootbased time in nanoseconds
  373. *
  374. * qdf_get_bootbased_boottime_ns() function returns the number of nanoseconds
  375. * that have elapsed since the system was booted. It also includes the time when
  376. * system was suspended.
  377. *
  378. * Return:
  379. * The time since system booted in nanoseconds
  380. */
  381. static inline uint64_t qdf_get_bootbased_boottime_ns(void)
  382. {
  383. return __qdf_get_bootbased_boottime_ns();
  384. }
  385. /**
  386. * qdf_get_system_timestamp - Return current timestamp
  387. *
  388. * Return: unsigned long timestamp in ms.
  389. */
  390. static inline unsigned long qdf_get_system_timestamp(void)
  391. {
  392. return __qdf_get_system_timestamp();
  393. }
  394. /**
  395. * qdf_udelay - delay in microseconds
  396. * @usecs: Number of microseconds to delay
  397. *
  398. * Return: none
  399. */
  400. static inline void qdf_udelay(int usecs)
  401. {
  402. __qdf_udelay(usecs);
  403. }
  404. /**
  405. * qdf_mdelay - Delay in milliseconds.
  406. * @msec: Number of milliseconds to delay
  407. *
  408. * Return: none
  409. */
  410. static inline void qdf_mdelay(int msecs)
  411. {
  412. __qdf_mdelay(msecs);
  413. }
  414. /**
  415. * qdf_system_time_after() - Check if a is later than b
  416. * @a: Time stamp value a
  417. * @b: Time stamp value b
  418. *
  419. * Return:
  420. * true if a < b else false
  421. */
  422. static inline bool qdf_system_time_after(qdf_time_t a, qdf_time_t b)
  423. {
  424. return __qdf_system_time_after(a, b);
  425. }
  426. /**
  427. * qdf_system_time_before() - Check if a is before b
  428. * @a: Time stamp value a
  429. * @b: Time stamp value b
  430. *
  431. * Return:
  432. * true if a is before b else false
  433. */
  434. static inline bool qdf_system_time_before(qdf_time_t a, qdf_time_t b)
  435. {
  436. return __qdf_system_time_before(a, b);
  437. }
  438. /**
  439. * qdf_system_time_after_eq() - Check if a atleast as recent as b, if not
  440. * later
  441. * @a: Time stamp value a
  442. * @b: Time stamp value b
  443. *
  444. * Return:
  445. * true if a >= b else false
  446. */
  447. static inline bool qdf_system_time_after_eq(qdf_time_t a, qdf_time_t b)
  448. {
  449. return __qdf_system_time_after_eq(a, b);
  450. }
  451. /**
  452. * qdf_sched_clock() - use light weight timer to get timestamp for logging
  453. *
  454. * Return: timestamp in ns
  455. */
  456. static inline uint64_t qdf_sched_clock(void)
  457. {
  458. return __qdf_sched_clock();
  459. }
  460. /**
  461. * enum qdf_timestamp_unit - what unit the qdf timestamp is in
  462. * @KERNEL_LOG: boottime time in uS (micro seconds)
  463. * @QTIMER: QTIME in (1/19200)S
  464. *
  465. * This enum is used to distinguish which timer source is used.
  466. */
  467. enum qdf_timestamp_unit {
  468. KERNEL_LOG,
  469. QTIMER,
  470. };
  471. #ifdef MSM_PLATFORM
  472. #define QDF_LOG_TIMESTAMP_UNIT QTIMER
  473. #define QDF_LOG_TIMESTAMP_CYCLES_PER_10_US 192
  474. static inline uint64_t qdf_log_timestamp_to_usecs(uint64_t time)
  475. {
  476. /*
  477. * Try to preserve precision by multiplying by 10 first.
  478. * If that would cause a wrap around, divide first instead.
  479. */
  480. if (time * 10 < time) {
  481. do_div(time, QDF_LOG_TIMESTAMP_CYCLES_PER_10_US);
  482. return time * 10;
  483. }
  484. time = time * 10;
  485. do_div(time, QDF_LOG_TIMESTAMP_CYCLES_PER_10_US);
  486. return time;
  487. }
  488. /**
  489. * qdf_get_log_timestamp_lightweight - get time stamp for logging
  490. * For adrastea this API returns QTIMER tick which is needed to synchronize
  491. * host and fw log timestamps
  492. * For ROME and other discrete solution this API returns system boot time stamp
  493. *
  494. * Return:
  495. * QTIMER ticks(19.2MHz) for adrastea
  496. * System tick for rome and other 3rd party platform solutions
  497. */
  498. static inline uint64_t qdf_get_log_timestamp_lightweight(void)
  499. {
  500. return __qdf_get_log_timestamp();
  501. }
  502. #else
  503. #define QDF_LOG_TIMESTAMP_UNIT KERNEL_LOG
  504. #define QDF_LOG_TIMESTAMP_CYCLES_PER_10_US 10
  505. static inline uint64_t qdf_log_timestamp_to_usecs(uint64_t time)
  506. {
  507. /* timestamps are already in micro seconds */
  508. return time;
  509. }
  510. static inline uint64_t qdf_get_log_timestamp_lightweight(void)
  511. {
  512. uint64_t timestamp_us;
  513. /* explicitly change to uint64_t, otherwise it will assign
  514. * uint32_t to timestamp_us, which lose high 32bits.
  515. * on 64bit platform, it will only use low 32bits jiffies in
  516. * jiffies_to_msecs.
  517. * eg: HZ=250, it will overflow every (0xffff ffff<<2==0x3fff ffff)
  518. * ticks. it is 1193 hours.
  519. */
  520. timestamp_us =
  521. (uint64_t)__qdf_system_ticks_to_msecs(qdf_system_ticks()) * 1000;
  522. return timestamp_us;
  523. }
  524. #endif /* end of MSM_PLATFORM */
  525. static inline void qdf_log_timestamp_to_secs(uint64_t time, uint64_t *secs,
  526. uint64_t *usecs)
  527. {
  528. *secs = qdf_log_timestamp_to_usecs(time);
  529. *usecs = do_div(*secs, 1000000ul);
  530. }
  531. static inline uint64_t qdf_usecs_to_log_timestamp(uint64_t usecs)
  532. {
  533. return (usecs * QDF_LOG_TIMESTAMP_CYCLES_PER_10_US) / 10;
  534. }
  535. /**
  536. * qdf_get_log_timestamp - get time stamp for logging
  537. * For adrastea this API returns QTIMER tick which is needed to synchronize
  538. * host and fw log timestamps
  539. * For ROME and other discrete solution this API returns system boot time stamp
  540. *
  541. * Return:
  542. * QTIMER ticks(19.2MHz) for adrastea
  543. * System tick for rome and other future discrete solutions
  544. */
  545. static inline uint64_t qdf_get_log_timestamp(void)
  546. {
  547. return __qdf_get_log_timestamp();
  548. }
  549. /**
  550. * qdf_get_log_timestamp_usecs() - get time stamp for logging in microseconds
  551. *
  552. * Return: The current logging timestamp normalized to microsecond precision
  553. */
  554. static inline uint64_t qdf_get_log_timestamp_usecs(void)
  555. {
  556. return qdf_log_timestamp_to_usecs(qdf_get_log_timestamp());
  557. }
  558. /**
  559. * qdf_get_monotonic_boottime - get monotonic kernel boot time
  560. * This API is similar to qdf_get_system_boottime but it includes
  561. * time spent in suspend.
  562. *
  563. * Return: Time in microseconds
  564. */
  565. static inline uint64_t qdf_get_monotonic_boottime(void)
  566. {
  567. return __qdf_get_monotonic_boottime();
  568. }
  569. static inline void qdf_time_ktime_get_real_time(qdf_timespec_t *ts)
  570. {
  571. return __qdf_time_ktime_get_real_time(ts);
  572. }
  573. static inline unsigned long long qdf_time_sched_clock(void)
  574. {
  575. return __qdf_time_sched_clock();
  576. }
  577. #endif
  578. #endif