target_if_cfr_8074v2.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * Copyright (c) 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. #ifndef _TARGET_IF_CFR_8072V2_H_
  19. #define _TARGET_IF_CFR_8072V2_H_
  20. #define STREAMFS_MAX_SUBBUF_8S 8500
  21. #define STREAMFS_NUM_SUBBUF_8S 255
  22. #define PEER_CFR_CAPTURE_EVT_STATUS_MASK 0x80000000
  23. #define CFR_TX_EVT_STATUS_MASK 0x00000003
  24. /* Values used for computing number of tones */
  25. #define TONES_IN_20MHZ 256
  26. #define TONES_IN_40MHZ 512
  27. #define TONES_IN_80MHZ 1024
  28. #define TONES_IN_160MHZ 2048 /* 160 MHz isn't supported yet */
  29. #define TONES_INVALID 0
  30. /* Status codes used by correlate and relay function */
  31. #define STATUS_STREAM_AND_RELEASE 0
  32. #define STATUS_HOLD 1
  33. #define STATUS_ERROR -1
  34. /* Module IDs using corrlation function */
  35. #define CORRELATE_DBR_MODULE_ID 0
  36. #define CORRELATE_TX_EV_MODULE_ID 1
  37. /**
  38. * cfr_8074v2_init_pdev() - Inits cfr pdev and registers necessary handlers.
  39. * @psoc: pointer to psoc object
  40. * @pdev: pointer to pdev object
  41. *
  42. * Return: Registration status for necessary handlers
  43. */
  44. int cfr_8074v2_init_pdev(
  45. struct wlan_objmgr_psoc *psoc,
  46. struct wlan_objmgr_pdev *pdev);
  47. /**
  48. * cfr_8074v2_deinit_pdev() - De-inits corresponding pdev and handlers.
  49. * @psoc: pointer to psoc object
  50. * @pdev: pointer to pdev object
  51. *
  52. * Return: De-registration status for necessary handlers
  53. */
  54. int cfr_8074v2_deinit_pdev(
  55. struct wlan_objmgr_psoc *psoc,
  56. struct wlan_objmgr_pdev *pdev);
  57. /**
  58. * target_if_register_to_dbr() - Register to Direct DMA handler
  59. * @pdev: pointer to pdev object
  60. *
  61. * Return: Status
  62. */
  63. QDF_STATUS
  64. target_if_register_to_dbr(struct wlan_objmgr_pdev *pdev);
  65. /**
  66. * target_if_register_tx_completion_event_handler()
  67. * register TX completion handler
  68. * @pdev: pointer to pdev object
  69. *
  70. * Return: Status
  71. */
  72. int
  73. target_if_register_tx_completion_event_handler(struct wlan_objmgr_psoc *psoc);
  74. /**
  75. * target_if_unregister_tx_completion_event_handler
  76. * unregister TX completion handler
  77. * @pdev: pointer to pdev object
  78. *
  79. * Return: Status
  80. */
  81. int
  82. target_if_unregister_tx_completion_event_handler(struct wlan_objmgr_psoc *psoc);
  83. #endif