Home
last modified time | relevance | path

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

123456789

/linux/drivers/net/wireless/ath/ath10k/
H A Dwmi-tlv.c77 const struct wmi_tlv *tlv; in ath10k_wmi_tlv_iter() local
82 if (len < sizeof(*tlv)) { in ath10k_wmi_tlv_iter()
85 ptr - begin, len, sizeof(*tlv)); in ath10k_wmi_tlv_iter()
89 tlv = ptr; in ath10k_wmi_tlv_iter()
90 tlv_tag = __le16_to_cpu(tlv->tag); in ath10k_wmi_tlv_iter()
91 tlv_len = __le16_to_cpu(tlv->len); in ath10k_wmi_tlv_iter()
92 ptr += sizeof(*tlv); in ath10k_wmi_tlv_iter()
93 len -= sizeof(*tlv); in ath10k_wmi_tlv_iter()
1718 struct wmi_tlv *tlv; in ath10k_wmi_tlv_op_gen_pdev_suspend() local
1721 skb = ath10k_wmi_alloc_skb(ar, sizeof(*tlv) + sizeof(*cmd)); in ath10k_wmi_tlv_op_gen_pdev_suspend()
[all …]
/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, \
/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()
/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 …]
/linux/drivers/net/wireless/marvell/mwifiex/
H A Duap_cmd.c300 u8 *tlv = *tlv_buf; in mwifiex_uap_bss_wpa() local
302 tlv_akmp = (struct host_cmd_tlv_akmp *)tlv; in mwifiex_uap_bss_wpa()
309 tlv += sizeof(struct host_cmd_tlv_akmp); in mwifiex_uap_bss_wpa()
312 pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; in mwifiex_uap_bss_wpa()
320 tlv += sizeof(struct host_cmd_tlv_pwk_cipher); in mwifiex_uap_bss_wpa()
324 pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; in mwifiex_uap_bss_wpa()
332 tlv += sizeof(struct host_cmd_tlv_pwk_cipher); in mwifiex_uap_bss_wpa()
336 gwk_cipher = (struct host_cmd_tlv_gwk_cipher *)tlv; in mwifiex_uap_bss_wpa()
343 tlv += sizeof(struct host_cmd_tlv_gwk_cipher); in mwifiex_uap_bss_wpa()
347 passphrase = (struct host_cmd_tlv_passphrase *)tlv; in mwifiex_uap_bss_wpa()
[all …]
/linux/drivers/net/ethernet/intel/ice/
H A Dice_dcb.c207 ice_parse_ieee_etscfg_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_etscfg_tlv() argument
211 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_etscfg_tlv()
237 ice_parse_ieee_etsrec_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_etsrec_tlv() argument
240 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_etsrec_tlv()
254 ice_parse_ieee_pfccfg_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_pfccfg_tlv() argument
257 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_pfccfg_tlv()
279 ice_parse_ieee_app_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_app_tlv() argument
288 typelen = ntohs(tlv->typelen); in ice_parse_ieee_app_tlv()
290 buf = tlv->tlvinfo; in ice_parse_ieee_app_tlv()
295 len -= (sizeof(tlv->ouisubtype) + 1); in ice_parse_ieee_app_tlv()
[all …]
/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 …]
/linux/drivers/net/wireless/mediatek/mt76/mt7925/
H A Dmcu.c225 struct mt7925_wow_pattern_tlv *tlv; in mt7925_mcu_set_wow_pattern() local
234 skb = mt76_mcu_msg_alloc(dev, NULL, sizeof(hdr) + sizeof(*tlv)); in mt7925_mcu_set_wow_pattern()
239 tlv = (struct mt7925_wow_pattern_tlv *)skb_put(skb, sizeof(*tlv)); in mt7925_mcu_set_wow_pattern()
240 tlv->tag = cpu_to_le16(UNI_SUSPEND_WOW_PATTERN); in mt7925_mcu_set_wow_pattern()
241 tlv->len = cpu_to_le16(sizeof(*tlv)); in mt7925_mcu_set_wow_pattern()
242 tlv->bss_idx = 0xF; in mt7925_mcu_set_wow_pattern()
243 tlv->data_len = pattern->pattern_len; in mt7925_mcu_set_wow_pattern()
244 tlv->enable = enable; in mt7925_mcu_set_wow_pattern()
245 tlv->index = index; in mt7925_mcu_set_wow_pattern()
246 tlv->offset = 0; in mt7925_mcu_set_wow_pattern()
[all …]
/linux/sound/soc/intel/avs/
H A Dmessages.c393 struct avs_tlv *tlv; in avs_ipc_get_fw_config() local
409 tlv = (struct avs_tlv *)(payload + offset); in avs_ipc_get_fw_config()
411 switch (tlv->type) { in avs_ipc_get_fw_config()
413 memcpy(&cfg->fw_version, tlv->value, sizeof(cfg->fw_version)); in avs_ipc_get_fw_config()
417 cfg->memory_reclaimed = *tlv->value; in avs_ipc_get_fw_config()
421 cfg->slow_clock_freq_hz = *tlv->value; in avs_ipc_get_fw_config()
425 cfg->fast_clock_freq_hz = *tlv->value; in avs_ipc_get_fw_config()
429 cfg->alh_support = *tlv->value; in avs_ipc_get_fw_config()
433 cfg->ipc_dl_mailbox_bytes = *tlv->value; in avs_ipc_get_fw_config()
437 cfg->ipc_ul_mailbox_bytes = *tlv->value; in avs_ipc_get_fw_config()
[all …]
/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 …]
/linux/drivers/net/wireless/intel/iwlwifi/
H A Diwl-dbg-tlv.c54 struct iwl_ucode_tlv *tlv; member
68 static struct iwl_ucode_tlv *iwl_dbg_tlv_add(const struct iwl_ucode_tlv *tlv, in iwl_dbg_tlv_add() argument
71 u32 len = le32_to_cpu(tlv->length); in iwl_dbg_tlv_add()
74 node = kzalloc(struct_size(node, tlv.data, len), GFP_KERNEL); in iwl_dbg_tlv_add()
78 memcpy(&node->tlv, tlv, sizeof(node->tlv)); in iwl_dbg_tlv_add()
79 memcpy(node->tlv.data, tlv->data, len); in iwl_dbg_tlv_add()
82 return &node->tlv; in iwl_dbg_tlv_add()
85 static bool iwl_dbg_tlv_ver_support(const struct iwl_ucode_tlv *tlv) in iwl_dbg_tlv_ver_support() argument
87 const struct iwl_fw_ini_header *hdr = (const void *)&tlv->data[0]; in iwl_dbg_tlv_ver_support()
88 u32 type = le32_to_cpu(tlv->type); in iwl_dbg_tlv_ver_support()
[all …]
/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 …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_lwt_seg6local.c138 struct sr6_tlv_t tlv; in is_valid_tlv_boundary() local
146 err = bpf_skb_load_bytes(skb, cur_off, &tlv, sizeof(tlv)); in is_valid_tlv_boundary()
150 if (tlv.type == SR6_TLV_PADDING) { in is_valid_tlv_boundary()
151 *pad_size = tlv.len + sizeof(tlv); in is_valid_tlv_boundary()
160 } else if (tlv.type == SR6_TLV_HMAC) { in is_valid_tlv_boundary()
164 cur_off += sizeof(tlv) + tlv.len; in is_valid_tlv_boundary()
231 struct sr6_tlv_t tlv; in delete_tlv() local
240 err = bpf_skb_load_bytes(skb, tlv_off, &tlv, sizeof(tlv)); in delete_tlv()
244 err = bpf_lwt_seg6_adjust_srh(skb, tlv_off, -(sizeof(tlv) + tlv.len)); in delete_tlv()
248 pad_off -= sizeof(tlv) + tlv.len; in delete_tlv()
[all …]
H A Dtest_seg6_loop.c141 struct sr6_tlv_t tlv; in is_valid_tlv_boundary() local
149 err = bpf_skb_load_bytes(skb, cur_off, &tlv, sizeof(tlv)); in is_valid_tlv_boundary()
153 if (tlv.type == SR6_TLV_PADDING) { in is_valid_tlv_boundary()
154 *pad_size = tlv.len + sizeof(tlv); in is_valid_tlv_boundary()
163 } else if (tlv.type == SR6_TLV_HMAC) { in is_valid_tlv_boundary()
167 cur_off += sizeof(tlv) + tlv.len; in is_valid_tlv_boundary()
240 uint8_t tlv[20] = {2, 18, 0, 0, 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, in __add_egr_x() local
244 (struct sr6_tlv_t *)&tlv, 20); in __add_egr_x()
/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 …]
/linux/drivers/net/ethernet/intel/i40e/
H A Di40e_dcb.c37 static void i40e_parse_ieee_etscfg_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_etscfg_tlv() argument
41 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_etscfg_tlv()
103 static void i40e_parse_ieee_etsrec_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_etsrec_tlv() argument
106 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_etsrec_tlv()
156 static void i40e_parse_ieee_pfccfg_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_pfccfg_tlv() argument
159 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_pfccfg_tlv()
180 static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_app_tlv() argument
189 typelength = ntohs(tlv->typelength); in i40e_parse_ieee_app_tlv()
191 buf = tlv->tlvinfo; in i40e_parse_ieee_app_tlv()
194 length -= (sizeof(tlv->ouisubtype) + 1); in i40e_parse_ieee_app_tlv()
[all …]
/linux/drivers/net/wireless/mediatek/mt76/mt7996/
H A Dmcu.c384 struct tlv *tlv = (struct tlv *)data; in mt7996_mcu_rx_log_message() local
393 if (le16_to_cpu(tlv->tag) != UNI_EVENT_FW_LOG_FORMAT) in mt7996_mcu_rx_log_message()
396 data += sizeof(*tlv) + 4; in mt7996_mcu_rx_log_message()
397 len = le16_to_cpu(tlv->len) - sizeof(*tlv) - 4; in mt7996_mcu_rx_log_message()
440 struct tlv *tlv = (struct tlv *)(data + 4); in mt7996_mcu_ie_countdown() local
450 while (data + sizeof(struct tlv) < tail && le16_to_cpu(tlv->len)) { in mt7996_mcu_ie_countdown()
451 switch (le16_to_cpu(tlv->tag)) { in mt7996_mcu_ie_countdown()
464 data += le16_to_cpu(tlv->len); in mt7996_mcu_ie_countdown()
465 tlv = (struct tlv *)data; in mt7996_mcu_ie_countdown()
735 static struct tlv *
[all …]
/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
250 tlv = seg6_get_tlv_hmac(srh); in seg6_hmac_validate_skb()
253 /* mandatory check but no tlv */ in seg6_hmac_validate_skb()
254 if (require_hmac > 0 && !tlv) in seg6_hmac_validate_skb()
262 if (require_hmac == 0 && !tlv) in seg6_hmac_validate_skb()
331 struct sr6_tlv_hmac *tlv; seg6_push_hmac() local
[all...]
/linux/drivers/net/wireless/intel/iwlwifi/fw/
H A Dpnvm.c39 const struct iwl_ucode_tlv *tlv; in iwl_pnvm_handle_section() local
48 while (len >= sizeof(*tlv)) { in iwl_pnvm_handle_section()
51 len -= sizeof(*tlv); in iwl_pnvm_handle_section()
52 tlv = (const void *)data; in iwl_pnvm_handle_section()
54 tlv_len = le32_to_cpu(tlv->length); in iwl_pnvm_handle_section()
55 tlv_type = le32_to_cpu(tlv->type); in iwl_pnvm_handle_section()
63 data += sizeof(*tlv); in iwl_pnvm_handle_section()
172 const struct iwl_ucode_tlv *tlv; in iwl_pnvm_parse() local
176 while (len >= sizeof(*tlv)) { in iwl_pnvm_parse()
180 len -= sizeof(*tlv); in iwl_pnvm_parse()
[all …]
/linux/drivers/infiniband/hw/usnic/
H A Dusnic_fwd.c183 static void fill_tlv(struct filter_tlv *tlv, struct filter *filter, in fill_tlv() argument
186 tlv->type = CLSF_TLV_FILTER; in fill_tlv()
187 tlv->length = sizeof(struct filter); in fill_tlv()
188 *((struct filter *)&tlv->val) = *filter; in fill_tlv()
190 tlv = (struct filter_tlv *)((char *)tlv + sizeof(struct filter_tlv) + in fill_tlv()
192 tlv->type = CLSF_TLV_ACTION; in fill_tlv()
193 tlv->length = sizeof(struct filter_action); in fill_tlv()
194 *((struct filter_action *)&tlv->val) = *action; in fill_tlv()
201 struct filter_tlv *tlv; in usnic_fwd_alloc_flow() local
217 tlv = dma_alloc_coherent(&pdev->dev, tlv_size, &tlv_pa, GFP_ATOMIC); in usnic_fwd_alloc_flow()
[all …]
/linux/drivers/net/ethernet/cisco/enic/
H A Dvnic_vic.c38 struct vic_provinfo_tlv *tlv; in vic_provinfo_add_tlv() local
47 tlv = (struct vic_provinfo_tlv *)((u8 *)vp->tlv + in vic_provinfo_add_tlv()
50 tlv->type = htons(type); in vic_provinfo_add_tlv()
51 tlv->length = htons(length); in vic_provinfo_add_tlv()
52 unsafe_memcpy(tlv->value, value, length, in vic_provinfo_add_tlv()

123456789