wlan_p2p_api.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: Contains p2p public data structure definitions
  21. */
  22. #ifndef _WLAN_P2P_API_H_
  23. #define _WLAN_P2P_API_H_
  24. #include <qdf_types.h>
  25. #include <wlan_objmgr_vdev_obj.h>
  26. /**
  27. * wlan_p2p_check_oui_and_force_1x1() - Function to get P2P client device
  28. * attributes from assoc request frames
  29. * @assoc_ie: pointer to assoc request frame IEs
  30. * @ie_len: length of the assoc request frame IE
  31. *
  32. * When assoc request is received from P2P STA device, this function checks
  33. * for specific OUI present in the P2P device info attribute. The caller should
  34. * take care of checking if this is called only in P2P GO mode.
  35. *
  36. * Return: True if OUI is present, else false.
  37. */
  38. bool wlan_p2p_check_oui_and_force_1x1(uint8_t *assoc_ie, uint32_t ie_len);
  39. /**
  40. * wlan_p2p_cleanup_roc_by_vdev() - Cleanup roc request by vdev
  41. * @vdev: pointer to vdev object
  42. * @sync: whether to wait for complete event
  43. *
  44. * This function call P2P API to cleanup roc request by vdev
  45. *
  46. * Return: QDF_STATUS_SUCCESS - in case of success
  47. */
  48. QDF_STATUS wlan_p2p_cleanup_roc_by_vdev(struct wlan_objmgr_vdev *vdev,
  49. bool sync);
  50. /**
  51. * wlan_p2p_status_connect() - Update P2P connection status
  52. * @vdev: vdev context
  53. *
  54. * Updates P2P connection status by up layer when connecting.
  55. *
  56. * Return: QDF_STATUS_SUCCESS - in case of success
  57. */
  58. QDF_STATUS wlan_p2p_status_connect(struct wlan_objmgr_vdev *vdev);
  59. /**
  60. * wlan_p2p_abort_scan() - Abort on going scan on p2p interfaces
  61. * @pdev: pdev object
  62. *
  63. * This function triggers an abort scan request to scan component to abort the
  64. * ongoing scan request on p2p vdevs.
  65. *
  66. * Return: QDF_STATUS_SUCCESS - in case of success
  67. */
  68. QDF_STATUS wlan_p2p_abort_scan(struct wlan_objmgr_pdev *pdev);
  69. #ifdef WLAN_FEATURE_P2P_P2P_STA
  70. /**
  71. * wlan_p2p_check_and_force_scc_go_plus_go() - Check and do force scc for
  72. * go plus go
  73. * @psoc: psoc object
  74. * @vdev: vdev object
  75. *
  76. * This function checks whether force scc is enabled or not. If it
  77. * is enabled then it will do force scc to remaining p2p go vdev if
  78. * user has initiated CSA to current vdev.
  79. *
  80. * Return: status
  81. */
  82. QDF_STATUS
  83. wlan_p2p_check_and_force_scc_go_plus_go(struct wlan_objmgr_psoc *psoc,
  84. struct wlan_objmgr_vdev *vdev);
  85. #endif
  86. #endif