wmi_unified_action_oui_tlv.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Copyright (c) 2016-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. #ifndef _WMI_UNIFIED_ACTION_OUI_TLV_H_
  19. #define _WMI_UNIFIED_ACTION_OUI_TLV_H_
  20. #ifdef WLAN_FEATURE_ACTION_OUI
  21. #include "wmi.h"
  22. #include "wmi_unified.h"
  23. #include "wmi_unified_api.h"
  24. #include "wmi_unified_param.h"
  25. /**
  26. * wmi_get_action_oui_info_mask() - convert info mask to firmware specific
  27. * @info_mask: host specific info mask
  28. *
  29. * Return: firmware specific information mask
  30. */
  31. uint32_t wmi_get_action_oui_info_mask(uint32_t info_mask);
  32. /**
  33. * wmi_get_action_oui_id() - convert action id to firmware specific
  34. * @action_id: host specific action id
  35. * @id: output pointer to hold converted fw specific action id
  36. *
  37. * Return: true on conversion else failure
  38. */
  39. bool wmi_get_action_oui_id(enum action_oui_id action_id,
  40. wmi_vendor_oui_action_id *id);
  41. /**
  42. * wmi_fill_oui_extensions() - populates wmi_vendor_oui_ext array
  43. * @extension: pointer to user supplied action oui extensions
  44. * @no_oui_extns: number of action oui extensions
  45. * @cmd_ext: output pointer to TLV
  46. *
  47. * This function parses the user supplied input data and populates the
  48. * array of variable structures TLV in WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID
  49. *
  50. * Return: None
  51. */
  52. void wmi_fill_oui_extensions(struct action_oui_extension *extension,
  53. uint32_t no_oui_extns,
  54. wmi_vendor_oui_ext *cmd_ext);
  55. /**
  56. * wmi_fill_oui_extensions_buffer() - populates data buffer in action oui cmd
  57. * @extension: pointer to user supplied action oui extensions
  58. * @cmd_ext: pointer to vendor_oui_ext TLV in action oui cmd
  59. * @no_oui_extns: number of action oui extensions
  60. * @rem_var_buf_len: remaining length of buffer to be populated
  61. * @var_buf: output pointer to hold variable length data
  62. *
  63. * This function parses the user supplied input data and populates the variable
  64. * buffer of type array byte TLV in WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID
  65. *
  66. * Return: QDF_STATUS_SUCCESS for successful fill else QDF_STATUS_E_INVAL
  67. */
  68. QDF_STATUS
  69. wmi_fill_oui_extensions_buffer(struct action_oui_extension *extension,
  70. wmi_vendor_oui_ext *cmd_ext,
  71. uint32_t no_oui_extns, uint32_t rem_var_buf_len,
  72. uint8_t *var_buf);
  73. /**
  74. * send_action_oui_cmd_tlv() - send action oui cmd to firmware
  75. * @wmi_handle: wmi handler
  76. * @req: pointer to action oui info
  77. *
  78. * Return: QDF_STATUS_SUCCESS on successful transmission else
  79. * QDF_STATUS_E_INVAL or QDF_STATUS_E_NOMEM
  80. */
  81. QDF_STATUS
  82. send_action_oui_cmd_tlv(wmi_unified_t wmi_handle,
  83. struct action_oui_request *req);
  84. #endif /* WLAN_FEATURE_ACTION_OUI */
  85. #endif /* _WMI_UNIFIED_ACTION_OUI_TLV_H_ */