123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- #ifndef _WMI_TLV_HELPER_H_
- #define _WMI_TLV_HELPER_H_
- #define WMI_TLV_HDR_SIZE (1 * sizeof(A_UINT32))
- #define WMITLV_GET_HDR(tlv_buf) (((A_UINT32 *)(tlv_buf))[0])
- #define WMITLV_SET_HDR(tlv_buf, tag, len) (((A_UINT32 *)(tlv_buf))[0]) = ((tag << 16) | (len & 0x0000FFFF))
- #define WMITLV_GET_TLVTAG(tlv_header) ((A_UINT32)((tlv_header)>>16))
- #define WMITLV_GET_TLVLEN(tlv_header) ((A_UINT32)((tlv_header) & 0x0000FFFF))
- #define WMITLV_GET_STRUCT_TLVLEN(tlv_struct) ((A_UINT32)(sizeof(tlv_struct)-WMI_TLV_HDR_SIZE))
- #define WMITLV_SIZE_FIX 0
- #define WMITLV_SIZE_VAR 1
- typedef struct {
- A_UINT32 tag_order;
- A_UINT32 tag_id;
- A_UINT32 tag_struct_size;
- A_UINT32 tag_varied_size;
- A_UINT32 tag_array_size;
- A_UINT32 cmd_num_tlv;
- } wmitlv_attributes_struc;
- typedef struct {
- A_UINT32 tlv_header;
- A_UINT32 uint32_array[1];
- } wmitlv_array_uint32;
- typedef struct {
- A_UINT32 tlv_header;
- A_UINT32 struc_array[1];
- } wmitlv_array_struc;
- #define WMITLV_ARR_SIZE_INVALID 0x1FE
- #define WMITLV_GET_TAG_NUM_TLV_ATTRIB(wmi_cmd_event_id) \
- WMI_TLV_HLPR_NUM_TLVS_FOR_##wmi_cmd_event_id
- void
- wmitlv_set_static_param_tlv_buf(void *param_tlv_buf, A_UINT32 max_tlvs_accomodated);
- void
- wmitlv_set_static_param_tlv_buf_ext(void *param_tlv_buf, A_UINT32 max_tlvs_accomodated, A_UINT32 indx);
- void
- wmitlv_free_allocated_command_tlvs(
- A_UINT32 cmd_id,
- void **wmi_cmd_struct_ptr);
- void
- wmitlv_free_allocated_event_tlvs(
- A_UINT32 event_id,
- void **wmi_cmd_struct_ptr);
- int
- wmitlv_check_command_tlv_params(
- void *os_ctx, void *param_struc_ptr, A_UINT32 param_buf_len, A_UINT32 wmi_cmd_event_id);
- int
- wmitlv_check_event_tlv_params(
- void *os_ctx, void *param_struc_ptr, A_UINT32 param_buf_len, A_UINT32 wmi_cmd_event_id);
- int
- wmitlv_check_and_pad_command_tlvs(
- void *os_ctx, void *param_struc_ptr, A_UINT32 param_buf_len, A_UINT32 wmi_cmd_event_id, void **wmi_cmd_struct_ptr);
- int
- wmitlv_check_and_pad_event_tlvs(
- void *os_ctx, void *param_struc_ptr, A_UINT32 param_buf_len, A_UINT32 wmi_cmd_event_id, void **wmi_cmd_struct_ptr);
- typedef struct {
- A_UINT32 major;
- A_UINT32 minor;
- A_UINT32 namespace_0;
- A_UINT32 namespace_1;
- A_UINT32 namespace_2;
- A_UINT32 namespace_3;
- } wmi_whitelist_version_info;
- struct _wmi_abi_version;
- int
- wmi_cmp_and_set_abi_version(int num_whitelist, wmi_whitelist_version_info *version_whitelist_table,
- struct _wmi_abi_version *my_vers,
- struct _wmi_abi_version *opp_vers,
- struct _wmi_abi_version *out_vers);
- int
- wmi_versions_are_compatible(struct _wmi_abi_version *vers1, struct _wmi_abi_version *vers2);
- #endif
|