cfg_nan_api.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Copyright (c) 2018 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. #else
  37. static inline bool cfg_nan_get_enable(struct wlan_objmgr_psoc *psoc)
  38. {
  39. return false;
  40. }
  41. #endif
  42. #ifdef WLAN_FEATURE_NAN_DATAPATH
  43. /**
  44. * cfg_nan_get_datapath_enable() - get NAN Datapath support enable status
  45. * @psoc: pointer to psoc object
  46. *
  47. * This function returns NAN Datapath enable status
  48. */
  49. bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc);
  50. /**
  51. * cfg_nan_get_ndi_channel() - get NAN Datapath channel
  52. * @psoc: pointer to psoc object
  53. *
  54. * This function returns NAN Datapath channel
  55. */
  56. uint32_t cfg_nan_get_ndi_channel(struct wlan_objmgr_psoc *psoc);
  57. /**
  58. * cfg_nan_get_ndi_mac_randomize() - get NDI MAC randomize enable status
  59. * @psoc: pointer to psoc object
  60. *
  61. * This function returns NAN Datapath Interface MAC randomization status
  62. */
  63. bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc);
  64. #else
  65. static inline bool cfg_nan_get_datapath_enable(struct wlan_objmgr_psoc *psoc)
  66. {
  67. return false;
  68. }
  69. static inline uint32_t cfg_nan_get_ndi_channel(struct wlan_objmgr_psoc *psoc)
  70. {
  71. return 0;
  72. }
  73. static inline bool cfg_nan_get_ndi_mac_randomize(struct wlan_objmgr_psoc *psoc)
  74. {
  75. return false;
  76. }
  77. #endif
  78. #endif