qdf_vfs.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * Copyright (c) 2018-2020 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: qdf_vfs
  20. * QCA driver framework (QDF) virtual filesystem management APIs
  21. */
  22. #if !defined(__QDF_VFS_H)
  23. #define __QDF_VFS_H
  24. /* Include Files */
  25. #include <qdf_types.h>
  26. struct qdf_vfs_attr;
  27. struct qdf_vf_bin_attr;
  28. struct qdf_dev_obj;
  29. #ifdef ENHANCED_OS_ABSTRACTION
  30. /**
  31. * qdf_vfs_set_file_attributes() - set file attributes
  32. * @devobj: Device object
  33. * @attr: File attribute
  34. *
  35. * This function will set the attributes of a file
  36. *
  37. * Return: QDF_STATUS_SUCCESS on success
  38. */
  39. QDF_STATUS
  40. qdf_vfs_set_file_attributes(struct qdf_dev_obj *devobj,
  41. struct qdf_vfs_attr *attr);
  42. /**
  43. * qdf_vfs_clear_file_attributes() - clear file attributes
  44. * @devobj: Device object
  45. * @attr: File attribute
  46. *
  47. * This function will clear the attributes of a file
  48. *
  49. * Return: QDF_STATUS_SUCCESS on success
  50. */
  51. QDF_STATUS
  52. qdf_vfs_clear_file_attributes(struct qdf_dev_obj *devobj,
  53. struct qdf_vfs_attr *attr);
  54. /**
  55. * qdf_vfs_create_binfile() - create binfile
  56. * @devobj: Device object
  57. * @attr: File attribute
  58. *
  59. * This function will create a binary file
  60. *
  61. * Return: QDF_STATUS_SUCCESS on success
  62. */
  63. QDF_STATUS
  64. qdf_vfs_create_binfile(struct qdf_dev_obj *devobj,
  65. struct qdf_vf_bin_attr *attr);
  66. /**
  67. * qdf_vfs_delete_binfile() - delete binfile
  68. * @devobj: Device object
  69. * @attr: File attribute
  70. *
  71. * This function will delete a binary file
  72. *
  73. * Return: QDF_STATUS_SUCCESS on success
  74. */
  75. QDF_STATUS
  76. qdf_vfs_delete_binfile(struct qdf_dev_obj *devobj,
  77. struct qdf_vf_bin_attr *attr);
  78. #else
  79. static inline QDF_STATUS
  80. qdf_vfs_set_file_attributes(struct qdf_dev_obj *devobj,
  81. struct qdf_vfs_attr *attr)
  82. {
  83. return __qdf_vfs_set_file_attributes(devobj, attr);
  84. }
  85. static inline QDF_STATUS
  86. qdf_vfs_clear_file_attributes(struct qdf_dev_obj *devobj,
  87. struct qdf_vfs_attr *attr)
  88. {
  89. return __qdf_vfs_clear_file_attributes(devobj, attr);
  90. }
  91. static inline QDF_STATUS
  92. qdf_vfs_create_binfile(struct qdf_dev_obj *devobj,
  93. struct qdf_vf_bin_attr *attr)
  94. {
  95. return __qdf_vfs_create_binfile(devobj, attr);
  96. }
  97. static inline QDF_STATUS
  98. qdf_vfs_delete_binfile(struct qdf_dev_obj *devobj,
  99. struct qdf_vf_bin_attr *attr)
  100. {
  101. return __qdf_vfs_delete_binfile(devobj, attr);
  102. }
  103. #endif
  104. #endif /* __QDF_VFS_H */