wlan_dp_api.c 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /**
  17. * DOC: wlan_dp_api.c
  18. *
  19. */
  20. #include "wlan_dp_main.h"
  21. #include "wlan_dp_api.h"
  22. #include <wlan_dp_fisa_rx.h>
  23. #include <cdp_txrx_ctrl.h>
  24. void wlan_dp_update_peer_map_unmap_version(uint8_t *version)
  25. {
  26. __wlan_dp_update_peer_map_unmap_version(version);
  27. }
  28. QDF_STATUS wlan_dp_runtime_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id)
  29. {
  30. return __wlan_dp_runtime_suspend(soc, pdev_id);
  31. }
  32. QDF_STATUS wlan_dp_runtime_resume(ol_txrx_soc_handle soc, uint8_t pdev_id)
  33. {
  34. return __wlan_dp_runtime_resume(soc, pdev_id);
  35. }
  36. void wlan_dp_print_fisa_rx_stats(enum cdp_fisa_stats_id stats_id)
  37. {
  38. dp_print_fisa_rx_stats(stats_id);
  39. }
  40. void wlan_dp_set_fst_in_cmem(bool fst_in_cmem)
  41. {
  42. dp_set_fst_in_cmem(fst_in_cmem);
  43. }
  44. void wlan_dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support)
  45. {
  46. dp_set_fisa_dynamic_aggr_size_support(dynamic_aggr_size_support);
  47. }
  48. #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
  49. bool wlan_dp_is_local_pkt_capture_active(struct wlan_objmgr_psoc *psoc)
  50. {
  51. void *soc = cds_get_context(QDF_MODULE_ID_SOC);
  52. union cdp_config_param_t param;
  53. QDF_STATUS status;
  54. status = cdp_txrx_get_psoc_param(soc, CDP_MONITOR_FLAG, &param);
  55. if (QDF_IS_STATUS_ERROR(status)) {
  56. dp_err("Unable to fetch monitor flags.");
  57. return false;
  58. }
  59. if (cdp_cfg_get(soc, cfg_dp_local_pkt_capture) &&
  60. !(QDF_MONITOR_FLAG_OTHER_BSS & param.cdp_monitor_flag))
  61. return true;
  62. return false;
  63. }
  64. #endif
  65. void wlan_dp_update_def_link(struct wlan_objmgr_psoc *psoc,
  66. struct qdf_mac_addr *intf_mac,
  67. struct wlan_objmgr_vdev *vdev)
  68. {
  69. __wlan_dp_update_def_link(psoc, intf_mac, vdev);
  70. }