qdf_trace.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. /*
  2. * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. #if !defined(__QDF_TRACE_H)
  27. #define __QDF_TRACE_H
  28. /**
  29. * DOC: qdf_trace
  30. * QCA driver framework trace APIs
  31. * Trace, logging, and debugging definitions and APIs
  32. */
  33. /* Include Files */
  34. #include <qdf_types.h> /* For QDF_MODULE_ID... */
  35. #include <stdarg.h> /* For va_list... */
  36. #include <qdf_status.h>
  37. #include <qdf_nbuf.h>
  38. #include <i_qdf_types.h>
  39. /* Type declarations */
  40. #define FL(x) "%s: %d: " x, __func__, __LINE__
  41. /**
  42. * typedef enum QDF_TRACE_LEVEL - Debug Trace level
  43. * @QDF_TRACE_LEVEL_NONE: no trace will be logged. This value is in place
  44. * for the qdf_trace_setlevel() to allow the user to turn off all traces
  45. * @QDF_TRACE_LEVEL_FATAL: enable trace for fatal Error
  46. * @QDF_TRACE_LEVEL_ERROR: enable trace for errors
  47. * @QDF_TRACE_LEVEL_WARN: enable trace for warnings
  48. * @QDF_TRACE_LEVEL_INFO: enable trace for information
  49. * @QDF_TRACE_LEVEL_INFO_HIGH: enable high level trace information
  50. * @QDF_TRACE_LEVEL_INFO_MED: enable middle level trace information
  51. * @QDF_TRACE_LEVEL_INFO_LOW: enable low level trace information
  52. * @QDF_TRACE_LEVEL_DEBUG: enable trace for debugging
  53. * @QDF_TRACE_LEVEL_ALL: enable all trace
  54. * @QDF_TRACE_LEVEL_MAX: enable max level trace
  55. */
  56. typedef enum {
  57. QDF_TRACE_LEVEL_NONE = 0,
  58. QDF_TRACE_LEVEL_FATAL,
  59. QDF_TRACE_LEVEL_ERROR,
  60. QDF_TRACE_LEVEL_WARN,
  61. QDF_TRACE_LEVEL_INFO,
  62. QDF_TRACE_LEVEL_INFO_HIGH,
  63. QDF_TRACE_LEVEL_INFO_MED,
  64. QDF_TRACE_LEVEL_INFO_LOW,
  65. QDF_TRACE_LEVEL_DEBUG,
  66. QDF_TRACE_LEVEL_ALL,
  67. QDF_TRACE_LEVEL_MAX
  68. } QDF_TRACE_LEVEL;
  69. /*
  70. * Log levels
  71. */
  72. #define QDF_DEBUG_FUNCTRACE 0x01
  73. #define QDF_DEBUG_LEVEL0 0x02
  74. #define QDF_DEBUG_LEVEL1 0x04
  75. #define QDF_DEBUG_LEVEL2 0x08
  76. #define QDF_DEBUG_LEVEL3 0x10
  77. #define QDF_DEBUG_ERROR 0x20
  78. #define QDF_DEBUG_CFG 0x40
  79. /*
  80. * Shared print control index
  81. * for converged debug framework
  82. */
  83. #define QDF_PRINT_IDX_SHARED -1
  84. /**
  85. * QDF_PRINT_INFO() - Generic wrapper API for logging
  86. * @idx: Index of print control object
  87. * @module: Module identifier. A member of QDF_MODULE_ID enumeration that
  88. * identifies the module issuing the trace message
  89. * @level: Trace level. A member of QDF_TRACE_LEVEL enumeration indicating
  90. * the severity of the condition causing the trace message to be
  91. * issued.
  92. * @str_format: Format string that contains the message to be logged.
  93. * @...:.
  94. *
  95. *
  96. * This wrapper will be used for any generic logging messages. Wrapper will
  97. * compile a call to converged QDF trace message API.
  98. *
  99. * Return: Nothing
  100. *
  101. */
  102. void QDF_PRINT_INFO(unsigned int idx, QDF_MODULE_ID module,
  103. QDF_TRACE_LEVEL level,
  104. char *str_format, ...);
  105. #ifdef CONFIG_MCL
  106. /* By default Data Path module will have all log levels enabled, except debug
  107. * log level. Debug level will be left up to the framework or user space modules
  108. * to be enabled when issue is detected
  109. */
  110. #define QDF_DATA_PATH_TRACE_LEVEL \
  111. ((1 << QDF_TRACE_LEVEL_FATAL) | (1 << QDF_TRACE_LEVEL_ERROR) | \
  112. (1 << QDF_TRACE_LEVEL_WARN) | (1 << QDF_TRACE_LEVEL_INFO) | \
  113. (1 << QDF_TRACE_LEVEL_INFO_HIGH) | (1 << QDF_TRACE_LEVEL_INFO_MED) | \
  114. (1 << QDF_TRACE_LEVEL_INFO_LOW))
  115. /* Preprocessor definitions and constants */
  116. #define ASSERT_BUFFER_SIZE (512)
  117. #define MAX_QDF_TRACE_RECORDS 4000
  118. #define INVALID_QDF_TRACE_ADDR 0xffffffff
  119. #define DEFAULT_QDF_TRACE_DUMP_COUNT 0
  120. #define DUMP_DP_TRACE 0
  121. #define ENABLE_DP_TRACE_LIVE_MODE 1
  122. #define CLEAR_DP_TRACE_BUFFER 2
  123. #ifdef TRACE_RECORD
  124. #define MTRACE(p) p
  125. #define NO_SESSION 0xFF
  126. #else
  127. #define MTRACE(p) { }
  128. #endif
  129. /**
  130. * typedef struct qdf_trace_record_s - keep trace record
  131. * @qtime: qtimer ticks
  132. * @time: user timestamp
  133. * @module: module name
  134. * @code: hold record of code
  135. * @session: hold record of session
  136. * @data: hold data
  137. * @pid: hold pid of the process
  138. */
  139. typedef struct qdf_trace_record_s {
  140. uint64_t qtime;
  141. char time[18];
  142. uint8_t module;
  143. uint8_t code;
  144. uint16_t session;
  145. uint32_t data;
  146. uint32_t pid;
  147. } qdf_trace_record_t, *tp_qdf_trace_record;
  148. /**
  149. * typedef struct s_qdf_trace_data - MTRACE logs are stored in ring buffer
  150. * @head: position of first record
  151. * @tail: position of last record
  152. * @num: count of total record
  153. * @num_since_last_dump: count from last dump
  154. * @enable: config for controlling the trace
  155. * @dump_count: Dump after number of records reach this number
  156. */
  157. typedef struct s_qdf_trace_data {
  158. uint32_t head;
  159. uint32_t tail;
  160. uint32_t num;
  161. uint16_t num_since_last_dump;
  162. uint8_t enable;
  163. uint16_t dump_count;
  164. } t_qdf_trace_data;
  165. #define CASE_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
  166. /* DP Trace Implementation */
  167. #ifdef FEATURE_DP_TRACE
  168. #define DPTRACE(p) p
  169. #else
  170. #define DPTRACE(p)
  171. #endif
  172. #define MAX_QDF_DP_TRACE_RECORDS 4000
  173. #define QDF_DP_TRACE_RECORD_SIZE 16
  174. #define INVALID_QDF_DP_TRACE_ADDR 0xffffffff
  175. #define QDF_DP_TRACE_VERBOSITY_HIGH 3
  176. #define QDF_DP_TRACE_VERBOSITY_MEDIUM 2
  177. #define QDF_DP_TRACE_VERBOSITY_LOW 1
  178. #define QDF_DP_TRACE_VERBOSITY_DEFAULT 0
  179. /**
  180. * enum QDF_DP_TRACE_ID - Generic ID to identify various events in data path
  181. * @QDF_DP_TRACE_INVALID - invalid
  182. * @QDF_DP_TRACE_DROP_PACKET_RECORD - record drop packet
  183. * @QDF_DP_TRACE_EAPOL_PACKET_RECORD - record EAPOL packet
  184. * @QDF_DP_TRACE_DHCP_PACKET_RECORD - record DHCP packet
  185. * @QDF_DP_TRACE_ARP_PACKET_RECORD - record ARP packet
  186. * @QDF_DP_TRACE_MGMT_PACKET_RECORD - record MGMT pacekt
  187. * QDF_DP_TRACE_EVENT_RECORD - record events
  188. * @QDF_DP_TRACE_DEFAULT_VERBOSITY - below this are part of default verbosity
  189. * @QDF_DP_TRACE_HDD_TX_TIMEOUT - HDD tx timeout
  190. * @QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT- SOFTAP HDD tx timeout
  191. * @QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD - HDD layer ptr record
  192. * @QDF_DP_TRACE_CE_PACKET_PTR_RECORD - CE layer ptr record
  193. * @QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD- CE fastpath ptr record
  194. * @QDF_DP_TRACE_FREE_PACKET_PTR_RECORD - tx completion ptr record
  195. * @QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD - HTT RX record
  196. * @QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD- HTT RX offload record
  197. * @QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD - HDD RX record
  198. * @QDF_DP_TRACE_LOW_VERBOSITY - below this are part of low verbosity
  199. * @QDF_DP_TRACE_TXRX_QUEUE_PACKET_PTR_RECORD -tx queue ptr record
  200. * @QDF_DP_TRACE_TXRX_PACKET_PTR_RECORD - txrx packet ptr record
  201. * @QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD - txrx fast path record
  202. * @QDF_DP_TRACE_HTT_PACKET_PTR_RECORD - htt packet ptr record
  203. * @QDF_DP_TRACE_HTC_PACKET_PTR_RECORD - htc packet ptr record
  204. * @QDF_DP_TRACE_HIF_PACKET_PTR_RECORD - hif packet ptr record
  205. * @QDF_DP_TRACE_RX_TXRX_PACKET_PTR_RECORD - txrx packet ptr record
  206. * @QDF_DP_TRACE_MED_VERBOSITY - below this are part of med verbosity
  207. * @QDF_DP_TRACE_HDD_TX_PACKET_RECORD - record 32 bytes at HDD
  208. * @QDF_DP_TRACE_HIGH_VERBOSITY - below this are part of high verbosity
  209. */
  210. enum QDF_DP_TRACE_ID {
  211. QDF_DP_TRACE_INVALID,
  212. QDF_DP_TRACE_DROP_PACKET_RECORD,
  213. QDF_DP_TRACE_EAPOL_PACKET_RECORD,
  214. QDF_DP_TRACE_DHCP_PACKET_RECORD,
  215. QDF_DP_TRACE_ARP_PACKET_RECORD,
  216. QDF_DP_TRACE_MGMT_PACKET_RECORD,
  217. QDF_DP_TRACE_EVENT_RECORD,
  218. QDF_DP_TRACE_DEFAULT_VERBOSITY,
  219. QDF_DP_TRACE_HDD_TX_TIMEOUT,
  220. QDF_DP_TRACE_HDD_SOFTAP_TX_TIMEOUT,
  221. QDF_DP_TRACE_HDD_TX_PACKET_PTR_RECORD,
  222. QDF_DP_TRACE_CE_PACKET_PTR_RECORD,
  223. QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD,
  224. QDF_DP_TRACE_FREE_PACKET_PTR_RECORD,
  225. QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD,
  226. QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD,
  227. QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD,
  228. QDF_DP_TRACE_LOW_VERBOSITY,
  229. QDF_DP_TRACE_TXRX_QUEUE_PACKET_PTR_RECORD,
  230. QDF_DP_TRACE_TXRX_PACKET_PTR_RECORD,
  231. QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD,
  232. QDF_DP_TRACE_HTT_PACKET_PTR_RECORD,
  233. QDF_DP_TRACE_HTC_PACKET_PTR_RECORD,
  234. QDF_DP_TRACE_HIF_PACKET_PTR_RECORD,
  235. QDF_DP_TRACE_RX_TXRX_PACKET_PTR_RECORD,
  236. QDF_DP_TRACE_MED_VERBOSITY,
  237. QDF_DP_TRACE_HDD_TX_PACKET_RECORD,
  238. QDF_DP_TRACE_HIGH_VERBOSITY,
  239. QDF_DP_TRACE_MAX
  240. };
  241. /**
  242. * qdf_proto_dir - direction
  243. * @QDF_TX: TX direction
  244. * @QDF_RX: RX direction
  245. * @QDF_NA: not applicable
  246. */
  247. enum qdf_proto_dir {
  248. QDF_TX,
  249. QDF_RX,
  250. QDF_NA
  251. };
  252. /**
  253. * struct qdf_dp_trace_ptr_buf - pointer record buffer
  254. * @cookie: cookie value
  255. * @msdu_id: msdu_id
  256. * @status: completion status
  257. */
  258. struct qdf_dp_trace_ptr_buf {
  259. uint64_t cookie;
  260. uint16_t msdu_id;
  261. uint16_t status;
  262. };
  263. /**
  264. * struct qdf_dp_trace_proto_buf - proto packet buffer
  265. * @sa: source address
  266. * @da: destination address
  267. * @vdev_id : vdev id
  268. * @type: packet type
  269. * @subtype: packet subtype
  270. * @dir: direction
  271. */
  272. struct qdf_dp_trace_proto_buf {
  273. struct qdf_mac_addr sa;
  274. struct qdf_mac_addr da;
  275. uint8_t vdev_id;
  276. uint8_t type;
  277. uint8_t subtype;
  278. uint8_t dir;
  279. };
  280. /**
  281. * struct qdf_dp_trace_mgmt_buf - mgmt packet buffer
  282. * @vdev_id : vdev id
  283. * @type: packet type
  284. * @subtype: packet subtype
  285. */
  286. struct qdf_dp_trace_mgmt_buf {
  287. uint8_t vdev_id;
  288. uint8_t type;
  289. uint8_t subtype;
  290. };
  291. /**
  292. * struct qdf_dp_trace_event_buf - event buffer
  293. * @vdev_id : vdev id
  294. * @type: packet type
  295. * @subtype: packet subtype
  296. */
  297. struct qdf_dp_trace_event_buf {
  298. uint8_t vdev_id;
  299. uint8_t type;
  300. uint8_t subtype;
  301. };
  302. /**
  303. * struct qdf_dp_trace_record_s - Describes a record in DP trace
  304. * @time: time when it got stored
  305. * @code: Describes the particular event
  306. * @data: buffer to store data
  307. * @size: Length of the valid data stored in this record
  308. * @pid : process id which stored the data in this record
  309. */
  310. struct qdf_dp_trace_record_s {
  311. char time[20];
  312. uint8_t code;
  313. uint8_t data[QDF_DP_TRACE_RECORD_SIZE];
  314. uint8_t size;
  315. uint32_t pid;
  316. };
  317. /**
  318. * struct qdf_dp_trace_data - Parameters to configure/control DP trace
  319. * @head: Position of first record
  320. * @tail: Position of last record
  321. * @num: Current index
  322. * @proto_bitmap: defines which protocol to be traced
  323. * @no_of_record: defines every nth packet to be traced
  324. * @verbosity : defines verbosity level
  325. * @enable: enable/disable DP trace
  326. * @count: current packet number
  327. */
  328. struct s_qdf_dp_trace_data {
  329. uint32_t head;
  330. uint32_t tail;
  331. uint32_t num;
  332. uint8_t proto_bitmap;
  333. uint8_t no_of_record;
  334. uint8_t verbosity;
  335. bool enable;
  336. uint32_t tx_count;
  337. uint32_t rx_count;
  338. bool live_mode;
  339. };
  340. /* Function declarations and documenation */
  341. /**
  342. * qdf_trace_set_level() - Set the trace level for a particular module
  343. * @level : trace level
  344. *
  345. * Trace level is a member of the QDF_TRACE_LEVEL enumeration indicating
  346. * the severity of the condition causing the trace message to be issued.
  347. * More severe conditions are more likely to be logged.
  348. *
  349. * This is an external API that allows trace levels to be set for each module.
  350. *
  351. * Return: nothing
  352. */
  353. void qdf_trace_set_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level);
  354. /**
  355. * qdf_trace_get_level() - get the trace level
  356. * @level : trace level
  357. *
  358. * This is an external API that returns a bool value to signify if a
  359. * particular trace level is set for the specified module.
  360. * A member of the QDF_TRACE_LEVEL enumeration indicating the severity
  361. * of the condition causing the trace message to be issued.
  362. *
  363. * Note that individual trace levels are the only valid values
  364. * for this API. QDF_TRACE_LEVEL_NONE and QDF_TRACE_LEVEL_ALL
  365. * are not valid input and will return false
  366. *
  367. * Return:
  368. * false - the specified trace level for the specified module is OFF
  369. * true - the specified trace level for the specified module is ON
  370. */
  371. bool qdf_trace_get_level(QDF_MODULE_ID module, QDF_TRACE_LEVEL level);
  372. typedef void (*tp_qdf_trace_cb)(void *p_mac, tp_qdf_trace_record, uint16_t);
  373. typedef void (*tp_qdf_state_info_cb) (char **buf, uint16_t *size);
  374. void qdf_register_debugcb_init(void);
  375. void qdf_register_debug_callback(QDF_MODULE_ID module_id,
  376. tp_qdf_state_info_cb qdf_state_infocb);
  377. QDF_STATUS qdf_state_info_dump_all(char *buf, uint16_t size,
  378. uint16_t *driver_dump_size);
  379. void qdf_trace(uint8_t module, uint8_t code, uint16_t session, uint32_t data);
  380. void qdf_trace_register(QDF_MODULE_ID, tp_qdf_trace_cb);
  381. QDF_STATUS qdf_trace_spin_lock_init(void);
  382. void qdf_trace_init(void);
  383. void qdf_trace_enable(uint32_t, uint8_t enable);
  384. void qdf_trace_dump_all(void *, uint8_t, uint8_t, uint32_t, uint32_t);
  385. #ifdef FEATURE_DP_TRACE
  386. void qdf_dp_trace_log_pkt(uint8_t session_id, struct sk_buff *skb,
  387. enum qdf_proto_dir dir);
  388. void qdf_dp_trace_init(void);
  389. void qdf_dp_trace_spin_lock_init(void);
  390. void qdf_dp_trace_set_value(uint8_t proto_bitmap, uint8_t no_of_records,
  391. uint8_t verbosity);
  392. void qdf_dp_trace_set_track(qdf_nbuf_t nbuf, enum qdf_proto_dir dir);
  393. void qdf_dp_trace(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code,
  394. uint8_t *data, uint8_t size, enum qdf_proto_dir dir);
  395. void qdf_dp_trace_dump_all(uint32_t count);
  396. typedef void (*tp_qdf_dp_trace_cb)(struct qdf_dp_trace_record_s* , uint16_t);
  397. void qdf_dp_display_record(struct qdf_dp_trace_record_s *record,
  398. uint16_t index);
  399. void qdf_dp_trace_ptr(qdf_nbuf_t nbuf, enum QDF_DP_TRACE_ID code,
  400. uint8_t *data, uint8_t size, uint16_t msdu_id, uint16_t status);
  401. void qdf_dp_display_ptr_record(struct qdf_dp_trace_record_s *pRecord,
  402. uint16_t recIndex);
  403. uint8_t qdf_dp_get_proto_bitmap(void);
  404. void
  405. qdf_dp_trace_proto_pkt(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
  406. uint8_t *sa, uint8_t *da, enum qdf_proto_type type,
  407. enum qdf_proto_subtype subtype, enum qdf_proto_dir dir);
  408. void qdf_dp_display_proto_pkt(struct qdf_dp_trace_record_s *record,
  409. uint16_t index);
  410. void qdf_dp_trace_enable_live_mode(void);
  411. void qdf_dp_trace_clear_buffer(void);
  412. void qdf_dp_trace_mgmt_pkt(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
  413. enum qdf_proto_type type, enum qdf_proto_subtype subtype);
  414. void qdf_dp_display_mgmt_pkt(struct qdf_dp_trace_record_s *record,
  415. uint16_t index);
  416. void qdf_dp_display_event_record(struct qdf_dp_trace_record_s *record,
  417. uint16_t index);
  418. void qdf_dp_trace_record_event(enum QDF_DP_TRACE_ID code, uint8_t vdev_id,
  419. enum qdf_proto_type type, enum qdf_proto_subtype subtype);
  420. #else
  421. static inline
  422. void qdf_dp_trace_log_pkt(uint8_t session_id, struct sk_buff *skb,
  423. enum qdf_proto_dir dir)
  424. {
  425. }
  426. static inline
  427. void qdf_dp_trace_init(void)
  428. {
  429. }
  430. static inline
  431. void qdf_dp_trace_set_track(qdf_nbuf_t nbuf, enum qdf_proto_dir dir)
  432. {
  433. }
  434. static inline
  435. void qdf_dp_trace_set_value(uint8_t proto_bitmap, uint8_t no_of_records,
  436. uint8_t verbosity)
  437. {
  438. }
  439. static inline
  440. void qdf_dp_trace_dump_all(uint32_t count)
  441. {
  442. }
  443. static inline
  444. void qdf_dp_trace_enable_live_mode(void)
  445. {
  446. }
  447. static inline
  448. void qdf_dp_trace_clear_buffer(void)
  449. {
  450. }
  451. #endif
  452. /**
  453. * qdf_trace_msg()- logging API
  454. * @module: Module identifier. A member of the QDF_MODULE_ID enumeration that
  455. * identifies the module issuing the trace message.
  456. * @level: Trace level. A member of the QDF_TRACE_LEVEL enumeration indicating
  457. * the severity of the condition causing the trace message to be issued.
  458. * More severe conditions are more likely to be logged.
  459. * @str_format: Format string. The message to be logged. This format string
  460. * contains printf-like replacement parameters, which follow this
  461. * parameter in the variable argument list.
  462. *
  463. * Users wishing to add tracing information to their code should use
  464. * QDF_TRACE. QDF_TRACE() will compile into a call to qdf_trace_msg() when
  465. * tracing is enabled.
  466. *
  467. * Return: nothing
  468. *
  469. */
  470. void __printf(3, 4) qdf_trace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
  471. char *str_format, ...);
  472. void qdf_trace_hex_dump(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
  473. void *data, int buf_len);
  474. void qdf_trace_display(void);
  475. void qdf_trace_set_value(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
  476. uint8_t on);
  477. void qdf_trace_set_module_trace_level(QDF_MODULE_ID module, uint32_t level);
  478. void __printf(3, 4) qdf_snprintf(char *str_buffer, unsigned int size,
  479. char *str_format, ...);
  480. #define QDF_SNPRINTF qdf_snprintf
  481. #else
  482. #define DPTRACE(x)
  483. #define qdf_trace_hex_dump(x, y, z, q)
  484. #endif /* CONFIG_MCL */
  485. #endif /* __QDF_TRACE_H */