bmi.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright (c) 2013-2018 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. /* BMI declarations and prototypes */
  20. /* */
  21. /* ================================================================= */
  22. #ifndef _BMI_H_
  23. #define _BMI_H_
  24. #include "bmi_msg.h"
  25. #include "qdf_trace.h"
  26. #include "ol_if_athvar.h"
  27. #include "hif.h"
  28. struct ol_context;
  29. /**
  30. * struct hif_config_info - Place Holder for hif confiruation
  31. * @enable_uart_print: UART Print
  32. * @enable_self_recovery: Self Recovery
  33. * @enable_fw_log: To Enable FW LOG
  34. * @enable_lpass_support: LPASS support
  35. * @enable_ramdump_collection: Ramdump Collection
  36. *
  37. * Structure for holding ini parameters.
  38. */
  39. struct ol_config_info {
  40. bool enable_uart_print;
  41. bool enable_self_recovery;
  42. uint8_t enable_fw_log;
  43. bool enable_lpass_support;
  44. bool enable_ramdump_collection;
  45. };
  46. #ifdef WLAN_FEATURE_BMI
  47. QDF_STATUS ol_cds_init(qdf_device_t qdf_dev, void *hif_ctx);
  48. void ol_cds_free(void);
  49. void ol_init_ini_config(struct ol_context *ol_ctx,
  50. struct ol_config_info *cfg);
  51. void bmi_cleanup(struct ol_context *scn);
  52. QDF_STATUS bmi_done(struct ol_context *ol_ctx);
  53. void bmi_target_ready(struct hif_opaque_softc *scn, void *cfg_ctx);
  54. QDF_STATUS bmi_download_firmware(struct ol_context *ol_ctx);
  55. #else /* WLAN_FEATURE_BMI */
  56. static inline QDF_STATUS
  57. ol_cds_init(qdf_device_t qdf_dev, void *hif_ctx)
  58. {
  59. return QDF_STATUS_SUCCESS;
  60. }
  61. static inline void ol_cds_free(void)
  62. {
  63. }
  64. static inline void
  65. ol_init_ini_config(struct ol_context *ol_ctx, struct ol_config_info *cfg)
  66. {
  67. }
  68. static inline void bmi_cleanup(struct ol_context *scn)
  69. {
  70. }
  71. static inline QDF_STATUS bmi_done(struct ol_context *ol_ctx)
  72. {
  73. return QDF_STATUS_SUCCESS;
  74. }
  75. static inline void
  76. bmi_target_ready(struct hif_opaque_softc *scn, void *cfg_ctx)
  77. {
  78. }
  79. static inline QDF_STATUS
  80. bmi_download_firmware(struct ol_context *ol_ctx)
  81. {
  82. return QDF_STATUS_SUCCESS;
  83. }
  84. #endif /* WLAN_FEATURE_BMI */
  85. #endif /* _BMI_H_ */