target_if_cfr.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #include <wlan_objmgr_cmn.h>
  19. #include <wlan_objmgr_psoc_obj.h>
  20. #include <wlan_objmgr_pdev_obj.h>
  21. #include <wlan_objmgr_vdev_obj.h>
  22. #include <wlan_objmgr_peer_obj.h>
  23. #define PEER_CFR_CAPTURE_ENABLE 1
  24. #define PEER_CFR_CAPTURE_DISABLE 0
  25. /**
  26. * target_if_cfr_init_pdev() - Inits cfr pdev and registers necessary handlers.
  27. * @psoc: pointer to psoc object
  28. * @pdev: pointer to pdev object
  29. *
  30. * Return: Registration status for necessary handlers
  31. */
  32. int target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
  33. struct wlan_objmgr_pdev *pdev);
  34. /**
  35. * target_if_cfr_deinit_pdev() - De-inits corresponding pdev and handlers.
  36. * @psoc: pointer to psoc object
  37. * @pdev: pointer to pdev object
  38. *
  39. * Return: De-registration status for necessary handlers
  40. */
  41. int target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
  42. struct wlan_objmgr_pdev *pdev);
  43. /**
  44. * target_if_cfr_tx_ops_register() - Registers tx ops for cfr module
  45. * @tx_ops - pointer to tx_ops structure.
  46. */
  47. void target_if_cfr_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops);
  48. /**
  49. * target_if_cfr_enable_cfr_timer() - Enables cfr timer
  50. * @pdev: pointer to pdev object
  51. * @cfr_timer: Amount of time this timer has to run
  52. *
  53. * Return: status of timer
  54. */
  55. int target_if_cfr_enable_cfr_timer(struct wlan_objmgr_pdev *pdev,
  56. uint32_t cfr_timer);
  57. /**
  58. * target_if_cfr_pdev_set_param() - Function to set params for cfr config
  59. * @pdev: pointer to pdev object
  60. * @param_id: param id which has to be set
  61. * @param_value: value of param being set
  62. *
  63. * Return: success/failure of setting param
  64. */
  65. int target_if_cfr_pdev_set_param(struct wlan_objmgr_pdev *pdev,
  66. uint32_t param_id, uint32_t param_value);
  67. /**
  68. * target_if_cfr_start_capture() - Function to start cfr capture for a peer
  69. * @pdev: pointer to pdev object
  70. * @peer: pointer to peer object
  71. * @cfr_params: capture parameters for this peer
  72. *
  73. * Return: success/failure status of start capture
  74. */
  75. int target_if_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
  76. struct wlan_objmgr_peer *peer,
  77. struct cfr_capture_params *cfr_params);
  78. /**
  79. * target_if_cfr_stop_capture() - Function to stop cfr capture for a peer
  80. * @pdev: pointer to pdev object
  81. * @peer: pointer to peer object
  82. *
  83. * Return: success/failure status of stop capture
  84. */
  85. int target_if_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
  86. struct wlan_objmgr_peer *peer);