Home
last modified time | relevance | path

Searched refs:tlv (Results 1 – 25 of 230) sorted by relevance

12345678910

/openbmc/qemu/hw/net/rocker/
H A Drocker_tlv.h34 static inline RockerTlv *rocker_tlv_next(const RockerTlv *tlv, int *remaining) in rocker_tlv_next() argument
36 int totlen = ROCKER_TLV_ALIGN(le16_to_cpu(tlv->len)); in rocker_tlv_next()
39 return (RockerTlv *) ((char *) tlv + totlen); in rocker_tlv_next()
42 static inline int rocker_tlv_ok(const RockerTlv *tlv, int remaining) in rocker_tlv_ok() argument
45 le16_to_cpu(tlv->len) >= ROCKER_TLV_HDRLEN && in rocker_tlv_ok()
46 le16_to_cpu(tlv->len) <= remaining; in rocker_tlv_ok()
54 #define rocker_tlv_for_each_nested(pos, tlv, rem) \ argument
55 rocker_tlv_for_each(pos, rocker_tlv_data(tlv), rocker_tlv_len(tlv), rem)
72 static inline int rocker_tlv_type(const RockerTlv *tlv) in rocker_tlv_type() argument
74 return le32_to_cpu(tlv->type); in rocker_tlv_type()
[all …]
/openbmc/linux/drivers/net/wireless/ath/ath10k/
H A Dwmi-tlv.c76 const struct wmi_tlv *tlv; in ath10k_wmi_tlv_iter() local
81 if (len < sizeof(*tlv)) { in ath10k_wmi_tlv_iter()
84 ptr - begin, len, sizeof(*tlv)); in ath10k_wmi_tlv_iter()
88 tlv = ptr; in ath10k_wmi_tlv_iter()
89 tlv_tag = __le16_to_cpu(tlv->tag); in ath10k_wmi_tlv_iter()
90 tlv_len = __le16_to_cpu(tlv->len); in ath10k_wmi_tlv_iter()
91 ptr += sizeof(*tlv); in ath10k_wmi_tlv_iter()
92 len -= sizeof(*tlv); in ath10k_wmi_tlv_iter()
1717 struct wmi_tlv *tlv; in ath10k_wmi_tlv_op_gen_pdev_suspend() local
1720 skb = ath10k_wmi_alloc_skb(ar, sizeof(*tlv) + sizeof(*cmd)); in ath10k_wmi_tlv_op_gen_pdev_suspend()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlxfw/
H A Dmlxfw_mfa2_tlv_multi.c9 #define MLXFW_MFA2_TLV_TOTAL_SIZE(tlv) \ argument
10 NLA_ALIGN(sizeof(*(tlv)) + be16_to_cpu((tlv)->len))
24 const struct mlxfw_mfa2_tlv *tlv) in mlxfw_mfa2_tlv_next() argument
30 tlv_len = MLXFW_MFA2_TLV_TOTAL_SIZE(tlv); in mlxfw_mfa2_tlv_next()
32 if (tlv->type == MLXFW_MFA2_TLV_MULTI_PART) { in mlxfw_mfa2_tlv_next()
33 multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, tlv); in mlxfw_mfa2_tlv_next()
39 next = (void *) tlv + tlv_len; in mlxfw_mfa2_tlv_next()
47 const struct mlxfw_mfa2_tlv *tlv; in mlxfw_mfa2_tlv_advance() local
50 mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count) in mlxfw_mfa2_tlv_advance()
51 if (!tlv) in mlxfw_mfa2_tlv_advance()
[all …]
H A Dmlxfw_mfa2_tlv.h28 const struct mlxfw_mfa2_tlv *tlv, u8 payload_type, in mlxfw_mfa2_tlv_payload_get() argument
33 tlv_top = (void *) tlv + be16_to_cpu(tlv->len) - 1; in mlxfw_mfa2_tlv_payload_get()
34 if (!mlxfw_mfa2_valid_ptr(mfa2_file, tlv) || in mlxfw_mfa2_tlv_payload_get()
37 if (tlv->type != payload_type) in mlxfw_mfa2_tlv_payload_get()
39 if (varsize && (be16_to_cpu(tlv->len) < payload_size)) in mlxfw_mfa2_tlv_payload_get()
41 if (!varsize && (be16_to_cpu(tlv->len) != payload_size)) in mlxfw_mfa2_tlv_payload_get()
44 return tlv->data; in mlxfw_mfa2_tlv_payload_get()
50 const struct mlxfw_mfa2_tlv *tlv) \
52 return mlxfw_mfa2_tlv_payload_get(mfa2_file, tlv, \
60 const struct mlxfw_mfa2_tlv *tlv) \
[all …]
H A Dmlxfw_mfa2.c98 const struct mlxfw_mfa2_tlv *tlv; in mlxfw_mfa2_tlv_multi_validate() local
102 mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) { in mlxfw_mfa2_tlv_multi_validate()
103 if (!tlv) { in mlxfw_mfa2_tlv_multi_validate()
119 const struct mlxfw_mfa2_tlv *tlv; in mlxfw_mfa2_file_dev_validate() local
136 tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, multi, in mlxfw_mfa2_file_dev_validate()
138 if (!tlv) { in mlxfw_mfa2_file_dev_validate()
143 psid = mlxfw_mfa2_tlv_psid_get(mfa2_file, tlv); in mlxfw_mfa2_file_dev_validate()
150 psid->psid, be16_to_cpu(tlv->len), true); in mlxfw_mfa2_file_dev_validate()
165 tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, multi, in mlxfw_mfa2_file_dev_validate()
168 if (!tlv) in mlxfw_mfa2_file_dev_validate()
[all …]
H A Dmlxfw_mfa2_tlv_multi.h17 const struct mlxfw_mfa2_tlv *tlv);
33 #define mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count) \ argument
34 for (idx = 0, tlv = from_tlv; idx < (count); \
35 idx++, tlv = mlxfw_mfa2_tlv_next(mfa2_file, tlv))
37 #define mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) \ argument
38 mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, \
/openbmc/linux/drivers/net/ethernet/rocker/
H A Drocker_tlv.h29 static inline struct rocker_tlv *rocker_tlv_next(const struct rocker_tlv *tlv, in rocker_tlv_next() argument
32 int totlen = ROCKER_TLV_ALIGN(tlv->len); in rocker_tlv_next()
35 return (struct rocker_tlv *) ((char *) tlv + totlen); in rocker_tlv_next()
38 static inline int rocker_tlv_ok(const struct rocker_tlv *tlv, int remaining) in rocker_tlv_ok() argument
41 tlv->len >= ROCKER_TLV_HDRLEN && in rocker_tlv_ok()
42 tlv->len <= remaining; in rocker_tlv_ok()
50 #define rocker_tlv_for_each_nested(pos, tlv, rem) \ argument
51 rocker_tlv_for_each(pos, rocker_tlv_data(tlv), \
52 rocker_tlv_len(tlv), rem)
69 static inline int rocker_tlv_type(const struct rocker_tlv *tlv) in rocker_tlv_type() argument
[all …]
H A Drocker_tlv.c18 const struct rocker_tlv *tlv; in rocker_tlv_parse() local
24 rocker_tlv_for_each(tlv, head, buf_len, rem) { in rocker_tlv_parse()
25 u32 type = rocker_tlv_type(tlv); in rocker_tlv_parse()
28 tb[type] = tlv; in rocker_tlv_parse()
37 struct rocker_tlv *tlv; in rocker_tlv_put() local
42 tlv = rocker_tlv_start(desc_info); in rocker_tlv_put()
44 tlv->type = attrtype; in rocker_tlv_put()
45 tlv->len = rocker_tlv_attr_size(attrlen); in rocker_tlv_put()
46 memcpy(rocker_tlv_data(tlv), data, attrlen); in rocker_tlv_put()
47 memset((char *) tlv + tlv->len, 0, rocker_tlv_padlen(attrlen)); in rocker_tlv_put()
/openbmc/linux/net/nfc/
H A Dllcp_commands.c32 static u8 llcp_tlv8(const u8 *tlv, u8 type) in llcp_tlv8() argument
34 if (tlv[0] != type || tlv[1] != llcp_tlv_length[tlv[0]]) in llcp_tlv8()
37 return tlv[2]; in llcp_tlv8()
40 static u16 llcp_tlv16(const u8 *tlv, u8 type) in llcp_tlv16() argument
42 if (tlv[0] != type || tlv[1] != llcp_tlv_length[tlv[0]]) in llcp_tlv16()
45 return be16_to_cpu(*((__be16 *)(tlv + 2))); in llcp_tlv16()
49 static u8 llcp_tlv_version(const u8 *tlv) in llcp_tlv_version() argument
51 return llcp_tlv8(tlv, LLCP_TLV_VERSION); in llcp_tlv_version()
54 static u16 llcp_tlv_miux(const u8 *tlv) in llcp_tlv_miux() argument
56 return llcp_tlv16(tlv, LLCP_TLV_MIUX) & 0x7ff; in llcp_tlv_miux()
[all …]
/openbmc/linux/drivers/net/ethernet/intel/ice/
H A Dice_dcb.c211 ice_parse_ieee_etscfg_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_etscfg_tlv() argument
215 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_etscfg_tlv()
243 ice_parse_ieee_etsrec_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_etsrec_tlv() argument
246 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_etsrec_tlv()
260 ice_parse_ieee_pfccfg_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_pfccfg_tlv() argument
263 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_pfccfg_tlv()
287 ice_parse_ieee_app_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_app_tlv() argument
296 typelen = ntohs(tlv->typelen); in ice_parse_ieee_app_tlv()
298 buf = tlv->tlvinfo; in ice_parse_ieee_app_tlv()
303 len -= (sizeof(tlv->ouisubtype) + 1); in ice_parse_ieee_app_tlv()
[all …]
/openbmc/linux/drivers/net/wireless/marvell/mwifiex/
H A Duap_cmd.c305 u8 *tlv = *tlv_buf; in mwifiex_uap_bss_wpa() local
307 tlv_akmp = (struct host_cmd_tlv_akmp *)tlv; in mwifiex_uap_bss_wpa()
314 tlv += sizeof(struct host_cmd_tlv_akmp); in mwifiex_uap_bss_wpa()
317 pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; in mwifiex_uap_bss_wpa()
325 tlv += sizeof(struct host_cmd_tlv_pwk_cipher); in mwifiex_uap_bss_wpa()
329 pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; in mwifiex_uap_bss_wpa()
337 tlv += sizeof(struct host_cmd_tlv_pwk_cipher); in mwifiex_uap_bss_wpa()
341 gwk_cipher = (struct host_cmd_tlv_gwk_cipher *)tlv; in mwifiex_uap_bss_wpa()
348 tlv += sizeof(struct host_cmd_tlv_gwk_cipher); in mwifiex_uap_bss_wpa()
352 passphrase = (struct host_cmd_tlv_passphrase *)tlv; in mwifiex_uap_bss_wpa()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/
H A Dxdp_features.c229 struct tlv_hdr *tlv = (struct tlv_hdr *)buf; in dut_echo_thread() local
236 if (n != ntohs(tlv->len)) in dut_echo_thread()
239 if (ntohs(tlv->type) != CMD_ECHO) in dut_echo_thread()
342 struct tlv_hdr *tlv = (struct tlv_hdr *)buf; in recv_msg() local
346 if (len != ntohs(tlv->len) || len < sizeof(*tlv)) in recv_msg()
350 len -= sizeof(*tlv); in recv_msg()
354 memcpy(val, tlv->data, len); in recv_msg()
388 struct tlv_hdr *tlv = (struct tlv_hdr *)buf; in dut_run() local
394 switch (ntohs(tlv->type)) { in dut_run()
409 tlv->type = htons(CMD_ACK); in dut_run()
[all …]
/openbmc/linux/include/uapi/linux/
H A Dtipc_config.h254 #define TLV_DATA(tlv) ((void *)((char *)(tlv) + TLV_LENGTH(0))) argument
256 static inline int TLV_OK(const void *tlv, __u16 space) in TLV_OK() argument
268 (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_len) <= space); in TLV_OK()
271 static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) in TLV_CHECK() argument
273 return TLV_OK(tlv, space) && in TLV_CHECK()
274 (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_type) == exp_type); in TLV_CHECK()
277 static inline int TLV_GET_LEN(struct tlv_desc *tlv) in TLV_GET_LEN() argument
279 return __be16_to_cpu(tlv->tlv_len); in TLV_GET_LEN()
282 static inline void TLV_SET_LEN(struct tlv_desc *tlv, __u16 len) in TLV_SET_LEN() argument
284 tlv->tlv_len = __cpu_to_be16(len); in TLV_SET_LEN()
[all …]
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/
H A Diwl-dbg-tlv.c54 struct iwl_ucode_tlv *tlv; member
67 static int iwl_dbg_tlv_add(const struct iwl_ucode_tlv *tlv, in iwl_dbg_tlv_add() argument
70 u32 len = le32_to_cpu(tlv->length); in iwl_dbg_tlv_add()
77 memcpy(&node->tlv, tlv, sizeof(node->tlv)); in iwl_dbg_tlv_add()
78 memcpy(node->tlv.data, tlv->data, len); in iwl_dbg_tlv_add()
84 static bool iwl_dbg_tlv_ver_support(const struct iwl_ucode_tlv *tlv) in iwl_dbg_tlv_ver_support() argument
86 const struct iwl_fw_ini_header *hdr = (const void *)&tlv->data[0]; in iwl_dbg_tlv_ver_support()
87 u32 type = le32_to_cpu(tlv->type); in iwl_dbg_tlv_ver_support()
99 const struct iwl_ucode_tlv *tlv) in iwl_dbg_tlv_alloc_debug_info() argument
101 const struct iwl_fw_ini_debug_info_tlv *debug_info = (const void *)tlv->data; in iwl_dbg_tlv_alloc_debug_info()
[all …]
/openbmc/linux/drivers/infiniband/hw/bnxt_re/
H A Dqplib_tlv.h7 struct tlv tlv; member
18 rtlv->tlv.cmd_discr = cpu_to_le16(CMD_DISCR_TLV_ENCAP); in __roce_1st_tlv_prep()
19 rtlv->tlv.tlv_type = cpu_to_le16(TLV_TYPE_ROCE_SP_COMMAND); in __roce_1st_tlv_prep()
20 rtlv->tlv.length = cpu_to_le16(content_bytes); in __roce_1st_tlv_prep()
21 rtlv->tlv.flags = TLV_FLAGS_REQUIRED; in __roce_1st_tlv_prep()
22 rtlv->tlv.flags |= flags ? TLV_FLAGS_MORE : 0; in __roce_1st_tlv_prep()
29 rtlv->tlv.cmd_discr = cpu_to_le16(CMD_DISCR_TLV_ENCAP); in __roce_ext_tlv_prep()
30 rtlv->tlv.tlv_type = cpu_to_le16(tlv_type); in __roce_ext_tlv_prep()
31 rtlv->tlv.length = cpu_to_le16(content_bytes); in __roce_ext_tlv_prep()
32 rtlv->tlv.flags |= more ? TLV_FLAGS_MORE : 0; in __roce_ext_tlv_prep()
[all …]
/openbmc/linux/net/ife/
H A Dife.c102 const struct meta_tlvhdr *tlv; in __ife_tlv_meta_valid() local
105 if (unlikely(skbdata + sizeof(*tlv) > ifehdr_end)) in __ife_tlv_meta_valid()
108 tlv = (const struct meta_tlvhdr *)skbdata; in __ife_tlv_meta_valid()
109 tlvlen = ntohs(tlv->len); in __ife_tlv_meta_valid()
130 struct meta_tlvhdr *tlv; in ife_tlv_meta_decode() local
135 tlv = (struct meta_tlvhdr *)skbdata; in ife_tlv_meta_decode()
136 *dlen = ntohs(tlv->len) - NLA_HDRLEN; in ife_tlv_meta_decode()
137 *attrtype = ntohs(tlv->type); in ife_tlv_meta_decode()
148 struct meta_tlvhdr *tlv = (struct meta_tlvhdr *) skbdata; in ife_tlv_meta_next() local
149 u16 tlvlen = ntohs(tlv->len); in ife_tlv_meta_next()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dtest_lwt_seg6local.c136 struct sr6_tlv_t tlv; in is_valid_tlv_boundary() local
144 err = bpf_skb_load_bytes(skb, cur_off, &tlv, sizeof(tlv)); in is_valid_tlv_boundary()
148 if (tlv.type == SR6_TLV_PADDING) { in is_valid_tlv_boundary()
149 *pad_size = tlv.len + sizeof(tlv); in is_valid_tlv_boundary()
158 } else if (tlv.type == SR6_TLV_HMAC) { in is_valid_tlv_boundary()
162 cur_off += sizeof(tlv) + tlv.len; in is_valid_tlv_boundary()
229 struct sr6_tlv_t tlv; in delete_tlv() local
238 err = bpf_skb_load_bytes(skb, tlv_off, &tlv, sizeof(tlv)); in delete_tlv()
242 err = bpf_lwt_seg6_adjust_srh(skb, tlv_off, -(sizeof(tlv) + tlv.len)); in delete_tlv()
246 pad_off -= sizeof(tlv) + tlv.len; in delete_tlv()
[all …]
/openbmc/pldm/pldmtool/
H A Dpldm_fru_cmd.cpp120 auto tlv = reinterpret_cast<const pldm_fru_record_tlv*>(p); in print() local
125 if (tlv->type == PLDM_FRU_FIELD_TYPE_IANA) in print()
128 fruFieldParserU32(tlv->value, tlv->length); in print()
130 else if (tlv->type == PLDM_FRU_FIELD_TYPE_MANUFAC_DATE) in print()
133 fruFieldParserTimestamp(tlv->value, tlv->length); in print()
138 fruFieldValuestring(tlv->value, tlv->length); in print()
142 typeToString(FruFieldTypeMap, tlv in print()
[all...]
/openbmc/linux/sound/soc/intel/avs/
H A Dmessages.c466 struct avs_tlv *tlv; in avs_ipc_get_fw_config() local
482 tlv = (struct avs_tlv *)(payload + offset); in avs_ipc_get_fw_config()
484 switch (tlv->type) { in avs_ipc_get_fw_config()
486 memcpy(&cfg->fw_version, tlv->value, sizeof(cfg->fw_version)); in avs_ipc_get_fw_config()
490 cfg->memory_reclaimed = *tlv->value; in avs_ipc_get_fw_config()
494 cfg->slow_clock_freq_hz = *tlv->value; in avs_ipc_get_fw_config()
498 cfg->fast_clock_freq_hz = *tlv->value; in avs_ipc_get_fw_config()
502 cfg->alh_support = *tlv->value; in avs_ipc_get_fw_config()
506 cfg->ipc_dl_mailbox_bytes = *tlv->value; in avs_ipc_get_fw_config()
510 cfg->ipc_ul_mailbox_bytes = *tlv->value; in avs_ipc_get_fw_config()
[all …]
/openbmc/linux/drivers/nvmem/layouts/
H A Donie-tlv.c103 struct onie_tlv tlv; in onie_tlv_add_cells() local
113 memcpy(&tlv, data + offset, sizeof(tlv)); in onie_tlv_add_cells()
114 if (offset + tlv.len >= data_len) { in onie_tlv_add_cells()
116 tlv.len, hdr_len + offset); in onie_tlv_add_cells()
120 cell.name = onie_tlv_cell_name(tlv.type); in onie_tlv_add_cells()
124 cell.offset = hdr_len + offset + sizeof(tlv.type) + sizeof(tlv.len); in onie_tlv_add_cells()
125 cell.bytes = tlv.len; in onie_tlv_add_cells()
127 cell.read_post_process = onie_tlv_read_cb(tlv.type, data + offset + sizeof(tlv)); in onie_tlv_add_cells()
135 offset += sizeof(tlv) + tlv.len; in onie_tlv_add_cells()
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7996/
H A Dmcu.c368 struct tlv *tlv = (struct tlv *)data; in mt7996_mcu_rx_log_message() local
377 if (le16_to_cpu(tlv->tag) != UNI_EVENT_FW_LOG_FORMAT) in mt7996_mcu_rx_log_message()
380 data += sizeof(*tlv) + 4; in mt7996_mcu_rx_log_message()
381 len = le16_to_cpu(tlv->len) - sizeof(*tlv) - 4; in mt7996_mcu_rx_log_message()
424 struct tlv *tlv = (struct tlv *)(data + 4); in mt7996_mcu_ie_countdown() local
434 while (data + sizeof(struct tlv) < tail && le16_to_cpu(tlv->len)) { in mt7996_mcu_ie_countdown()
435 switch (le16_to_cpu(tlv->tag)) { in mt7996_mcu_ie_countdown()
448 data += le16_to_cpu(tlv->len); in mt7996_mcu_ie_countdown()
449 tlv = (struct tlv *)data; in mt7996_mcu_ie_countdown()
520 static struct tlv *
[all …]
/openbmc/linux/drivers/net/ethernet/intel/i40e/
H A Di40e_dcb.c38 static void i40e_parse_ieee_etscfg_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_etscfg_tlv() argument
42 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_etscfg_tlv()
109 static void i40e_parse_ieee_etsrec_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_etsrec_tlv() argument
112 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_etsrec_tlv()
164 static void i40e_parse_ieee_pfccfg_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_pfccfg_tlv() argument
167 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_pfccfg_tlv()
191 static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_app_tlv() argument
200 typelength = ntohs(tlv->typelength); in i40e_parse_ieee_app_tlv()
203 buf = tlv->tlvinfo; in i40e_parse_ieee_app_tlv()
206 length -= (sizeof(tlv->ouisubtype) + 1); in i40e_parse_ieee_app_tlv()
[all …]
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/fw/
H A Dpnvm.c37 const struct iwl_ucode_tlv *tlv; in iwl_pnvm_handle_section() local
46 while (len >= sizeof(*tlv)) { in iwl_pnvm_handle_section()
49 len -= sizeof(*tlv); in iwl_pnvm_handle_section()
50 tlv = (const void *)data; in iwl_pnvm_handle_section()
52 tlv_len = le32_to_cpu(tlv->length); in iwl_pnvm_handle_section()
53 tlv_type = le32_to_cpu(tlv->type); in iwl_pnvm_handle_section()
61 data += sizeof(*tlv); in iwl_pnvm_handle_section()
170 const struct iwl_ucode_tlv *tlv; in iwl_pnvm_parse() local
174 while (len >= sizeof(*tlv)) { in iwl_pnvm_parse()
177 len -= sizeof(*tlv); in iwl_pnvm_parse()
[all …]
H A Duefi.c119 const struct iwl_ucode_tlv *tlv; in iwl_uefi_reduce_power_section() local
124 while (len >= sizeof(*tlv)) { in iwl_uefi_reduce_power_section()
127 len -= sizeof(*tlv); in iwl_uefi_reduce_power_section()
128 tlv = (const void *)data; in iwl_uefi_reduce_power_section()
130 tlv_len = le32_to_cpu(tlv->length); in iwl_uefi_reduce_power_section()
131 tlv_type = le32_to_cpu(tlv->type); in iwl_uefi_reduce_power_section()
139 data += sizeof(*tlv); in iwl_uefi_reduce_power_section()
173 const struct iwl_ucode_tlv *tlv; in iwl_uefi_reduce_power_parse() local
177 while (len >= sizeof(*tlv)) { in iwl_uefi_reduce_power_parse()
180 len -= sizeof(*tlv); in iwl_uefi_reduce_power_parse()
[all …]
/openbmc/linux/net/ipv6/
H A Dseg6_hmac.c86 struct sr6_tlv_hmac *tlv; in seg6_get_tlv_hmac() local
94 tlv = (struct sr6_tlv_hmac *) in seg6_get_tlv_hmac()
97 if (tlv->tlvhdr.type != SR6_TLV_HMAC || tlv->tlvhdr.len != 38) in seg6_get_tlv_hmac()
100 return tlv; in seg6_get_tlv_hmac()
241 struct sr6_tlv_hmac *tlv; in seg6_hmac_validate_skb() local
249 tlv = seg6_get_tlv_hmac(srh); in seg6_hmac_validate_skb()
252 if (idev->cnf.seg6_require_hmac > 0 && !tlv) in seg6_hmac_validate_skb()
260 if (idev->cnf.seg6_require_hmac == 0 && !tlv) in seg6_hmac_validate_skb()
265 hinfo = seg6_hmac_info_lookup(net, be32_to_cpu(tlv->hmackeyid)); in seg6_hmac_validate_skb()
272 if (memcmp(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN) != 0) in seg6_hmac_validate_skb()
[all …]

12345678910