wlan_p2p_api.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) 2019-2021 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. /**
  19. * DOC: Contains p2p public data structure definitions
  20. */
  21. #ifndef _WLAN_P2P_API_H_
  22. #define _WLAN_P2P_API_H_
  23. #include <qdf_types.h>
  24. #include <wlan_objmgr_vdev_obj.h>
  25. /**
  26. * wlan_p2p_check_oui_and_force_1x1() - Function to get P2P client device
  27. * attributes from assoc request frames
  28. * @assoc_ie: pointer to assoc request frame IEs
  29. * @ie_len: length of the assoc request frame IE
  30. *
  31. * When assoc request is received from P2P STA device, this function checks
  32. * for specific OUI present in the P2P device info attribute. The caller should
  33. * take care of checking if this is called only in P2P GO mode.
  34. *
  35. * Return: True if OUI is present, else false.
  36. */
  37. bool wlan_p2p_check_oui_and_force_1x1(uint8_t *assoc_ie, uint32_t ie_len);
  38. /**
  39. * wlan_p2p_cleanup_roc_by_vdev() - Cleanup roc request by vdev
  40. * @vdev: pointer to vdev object
  41. *
  42. * This function call P2P API to cleanup roc request by vdev
  43. *
  44. * Return: QDF_STATUS_SUCCESS - in case of success
  45. */
  46. QDF_STATUS wlan_p2p_cleanup_roc_by_vdev(struct wlan_objmgr_vdev *vdev);
  47. /**
  48. * wlan_p2p_status_connect() - Update P2P connection status
  49. * @vdev: vdev context
  50. *
  51. * Updates P2P connection status by up layer when connecting.
  52. *
  53. * Return: QDF_STATUS_SUCCESS - in case of success
  54. */
  55. QDF_STATUS wlan_p2p_status_connect(struct wlan_objmgr_vdev *vdev);
  56. /**
  57. * wlan_p2p_abort_scan() - Abort on going scan on p2p interfaces
  58. * @pdev: pdev object
  59. *
  60. * This function triggers an abort scan request to scan component to abort the
  61. * ongoing scan request on p2p vdevs.
  62. *
  63. * Return: QDF_STATUS_SUCCESS - in case of success
  64. */
  65. QDF_STATUS wlan_p2p_abort_scan(struct wlan_objmgr_pdev *pdev);
  66. #endif