target_if_cfr_8074v2.h 2.8 KB

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