cfg_nan_api.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Copyright (c) 2018-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. #if !defined(__NAN_CFG_API_H__)
  19. #define __NAN_CFG_API_H__
  20. /**
  21. *
  22. * DOC: nan_cfg_api.h
  23. *
  24. * NAN feature INI configuration parameters get/set APIs
  25. */
  26. #include "qdf_types.h"
  27. struct wlan_objmgr_psoc;
  28. #ifdef WLAN_FEATURE_NAN
  29. /**
  30. * cfg_nan_get_enable() - get NAN support enable status
  31. * @psoc: pointer to psoc object
  32. *
  33. * This function returns NAN enable status
  34. */
  35. bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc);
  36. /**
  37. * cfg_nan_get_datapath_enable() - get NAN Datapath support enable status
  38. * @psoc: pointer to psoc object
  39. *
  40. * This function returns NAN Datapath enable status
  41. */
  42. bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc);
  43. /**
  44. * cfg_nan_get_ndi_mac_randomize() - get NDI MAC randomize enable status
  45. * @psoc: pointer to psoc object
  46. *
  47. * This function returns NAN Datapath Interface MAC randomization status
  48. */
  49. bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc);
  50. /**
  51. * cfg_nan_get_ndp_inactivity_timeout() - get NDP inactivity timeout value
  52. * @psoc: pointer to psoc object
  53. * @val: pointer to the value where inactivity timeout has to be copied to
  54. *
  55. * Return: QDF_STATUS
  56. */
  57. QDF_STATUS cfg_nan_get_ndp_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
  58. uint16_t *val);
  59. #else
  60. static inline bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc)
  61. {
  62. return false;
  63. }
  64. static inline bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc)
  65. {
  66. return false;
  67. }
  68. static inline bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc)
  69. {
  70. return false;
  71. }
  72. static inline
  73. QDF_STATUS cfg_nan_get_ndp_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
  74. uint16_t *val)
  75. {
  76. return QDF_STATUS_SUCCESS;
  77. }
  78. #endif
  79. #endif