fw_dbglog_priv.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * This file contains the API definitions for the Unified Wireless
  20. * Module Interface (WMI).
  21. */
  22. #ifndef _FW_DBGLOG_PRIV_H_
  23. #define _FW_DBGLOG_PRIV_H_
  24. #include <wmi_unified_api.h>
  25. struct dbglog_ops {
  26. void (*dbglog_set_log_lvl)(ol_scn_t scn, uint32_t log_lvl);
  27. int (*dbglog_fw_handler)(ol_scn_t soc, uint8_t *data, uint32_t datalen);
  28. int (*dbglog_parse_debug_logs)(ol_scn_t scn,
  29. u_int8_t *datap, uint16_t len, void *context);
  30. void (*dbglog_ratelimit_set)(uint32_t burst_limit);
  31. void (*dbglog_vap_log_enable)(ol_scn_t soc, uint16_t vap_id,
  32. bool isenable);
  33. void (*dbglog_set_timestamp_resolution)(ol_scn_t soc, uint16_t tsr);
  34. void (*dbglog_reporting_enable)(ol_scn_t soc, bool isenable);
  35. void (*dbglog_module_log_enable)(ol_scn_t scn,
  36. uint32_t mod_id, bool isenable);
  37. void (*dbglog_init)(void *scn);
  38. void (*dbglog_set_report_size)(ol_scn_t scn, uint16_t size);
  39. void (*dbglog_free)(void *soc);
  40. int (*smartlog_init)(void *icp);
  41. void (*smartlog_deinit)(void *sc);
  42. ssize_t (*smartlog_dump)(struct device *dev,
  43. struct device_attribute *attr, char *buf);
  44. };
  45. struct dbglog_info {
  46. struct dbglog_ops *ops;
  47. };
  48. #endif /*_FW_DBGLOG_PRIV_H_ */