wlan_p2p_api.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021 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. *
  43. * This function call P2P API to cleanup roc request by vdev
  44. *
  45. * Return: QDF_STATUS_SUCCESS - in case of success
  46. */
  47. QDF_STATUS wlan_p2p_cleanup_roc_by_vdev(struct wlan_objmgr_vdev *vdev);
  48. /**
  49. * wlan_p2p_status_connect() - Update P2P connection status
  50. * @vdev: vdev context
  51. *
  52. * Updates P2P connection status by up layer when connecting.
  53. *
  54. * Return: QDF_STATUS_SUCCESS - in case of success
  55. */
  56. QDF_STATUS wlan_p2p_status_connect(struct wlan_objmgr_vdev *vdev);
  57. /**
  58. * wlan_p2p_abort_scan() - Abort on going scan on p2p interfaces
  59. * @pdev: pdev object
  60. *
  61. * This function triggers an abort scan request to scan component to abort the
  62. * ongoing scan request on p2p vdevs.
  63. *
  64. * Return: QDF_STATUS_SUCCESS - in case of success
  65. */
  66. QDF_STATUS wlan_p2p_abort_scan(struct wlan_objmgr_pdev *pdev);
  67. #ifdef WLAN_FEATURE_P2P_P2P_STA
  68. /**
  69. * wlan_p2p_check_and_force_scc_go_plus_go() - Check and do force scc for
  70. * go plus go
  71. * @psoc: psoc object
  72. * @vdev: vdev object
  73. *
  74. * This function checks whether force scc is enabled or not. If it
  75. * is enabled then it will do force scc to remaining p2p go vdev if
  76. * user has initiated CSA to current vdev.
  77. *
  78. * Return: status
  79. */
  80. QDF_STATUS
  81. wlan_p2p_check_and_force_scc_go_plus_go(struct wlan_objmgr_psoc *psoc,
  82. struct wlan_objmgr_vdev *vdev);
  83. #endif
  84. #endif