| /linux/drivers/net/ethernet/mellanox/mlxfw/ |
| H A D | mlxfw_mfa2_tlv_multi.c | 9 #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 D | mlxfw_mfa2_tlv.h | 28 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 D | mlxfw_mfa2.c | 98 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 D | mlxfw_mfa2_tlv_multi.h | 17 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 D | rocker_tlv.h | 29 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 D | rocker_tlv.c | 18 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/drivers/net/ethernet/intel/ice/ |
| H A D | ice_dcb.c | 207 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/drivers/net/wireless/marvell/mwifiex/ |
| H A D | uap_cmd.c | 300 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/net/nfc/ |
| H A D | llcp_commands.c | 32 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/mediatek/mt76/mt7925/ |
| H A D | nan.c | 227 struct tlv nan_dis_tlv; in mt7925_nan_disable() 232 .len = cpu_to_le16(sizeof(struct tlv)), in mt7925_nan_disable() 246 struct tlv *tlv = NULL; in mt7925_nan_mp_tlv() local 251 tlv = mt76_connac_mcu_add_tlv(skb, NAN_UNI_CMD_SET_MASTER_PREFERENCE, in mt7925_nan_mp_tlv() 253 if (!tlv) in mt7925_nan_mp_tlv() 256 mp_tlv = (struct mt7925_nan_master_preference_tlv *)tlv; in mt7925_nan_mp_tlv() 270 struct tlv *tlv = NULL; in mt7925_nan_dw_tlv() local 276 tlv = mt76_connac_mcu_add_tlv(skb, NAN_UNI_CMD_SET_DW_INTERVAL, in mt7925_nan_dw_tlv() 279 if (!tlv) in mt7925_nan_dw_tlv() 282 dw_tlv = (struct mt7925_nan_dw_interval_tlv *)tlv; in mt7925_nan_dw_tlv() [all …]
|
| H A D | mcu.c | 257 struct mt7925_wow_pattern_tlv *tlv; in mt7925_mcu_set_wow_pattern() local 277 tlv = (struct mt7925_wow_pattern_tlv *)skb_put_zero(skb, tlv_len); in mt7925_mcu_set_wow_pattern() 278 tlv->tag = cpu_to_le16(UNI_SUSPEND_WOW_PATTERN); in mt7925_mcu_set_wow_pattern() 279 tlv->len = cpu_to_le16(tlv_len); in mt7925_mcu_set_wow_pattern() 280 tlv->bss_idx = 0xF; in mt7925_mcu_set_wow_pattern() 281 tlv->data_len = pattern->pattern_len; in mt7925_mcu_set_wow_pattern() 282 tlv->enable = enable; in mt7925_mcu_set_wow_pattern() 283 tlv->index = index; in mt7925_mcu_set_wow_pattern() 284 tlv->offset = 0; in mt7925_mcu_set_wow_pattern() 286 memcpy(tlv->pattern, pattern->pattern, pattern->pattern_len); in mt7925_mcu_set_wow_pattern() [all …]
|
| /linux/drivers/net/wireless/nxp/nxpwifi/ |
| H A D | util.h | 96 #define nxpwifi_for_each_tlv(tlv, buf, buf_len) \ argument 97 for (tlv = (const struct nxpwifi_tlv *)(buf); \ 98 (u8 *)(tlv) + sizeof(*tlv) <= (u8 *)(buf) + (buf_len) && \ 99 (u8 *)(tlv) + sizeof(*tlv) + le16_to_cpu(tlv->len) <= \ 101 tlv = (const struct nxpwifi_tlv *)((u8 *)(tlv) + sizeof(*tlv) + \ 102 le16_to_cpu(tlv->len))) 108 const struct nxpwifi_tlv *tlv; in nxpwifi_find_tlv() local 110 nxpwifi_for_each_tlv(tlv, buf, buf_len) { in nxpwifi_find_tlv() 111 if (le16_to_cpu(tlv->type) == type) in nxpwifi_find_tlv() 112 return tlv; in nxpwifi_find_tlv()
|
| H A D | uap_cmd.c | 24 u8 *tlv = *tlv_buf; in nxpwifi_uap_bss_wpa() local 26 tlv_akmp = (struct host_cmd_tlv_akmp *)tlv; in nxpwifi_uap_bss_wpa() 33 tlv += sizeof(struct host_cmd_tlv_akmp); in nxpwifi_uap_bss_wpa() 36 pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; in nxpwifi_uap_bss_wpa() 44 tlv += sizeof(struct host_cmd_tlv_pwk_cipher); in nxpwifi_uap_bss_wpa() 48 pwk_cipher = (struct host_cmd_tlv_pwk_cipher *)tlv; in nxpwifi_uap_bss_wpa() 56 tlv += sizeof(struct host_cmd_tlv_pwk_cipher); in nxpwifi_uap_bss_wpa() 60 gwk_cipher = (struct host_cmd_tlv_gwk_cipher *)tlv; in nxpwifi_uap_bss_wpa() 67 tlv += sizeof(struct host_cmd_tlv_gwk_cipher); in nxpwifi_uap_bss_wpa() 71 passphrase = (struct host_cmd_tlv_passphrase *)tlv; in nxpwifi_uap_bss_wpa() [all …]
|
| H A D | sta_event.c | 500 struct nxpwifi_ie_types_header *tlv) in nxpwifi_process_uap_tx_pause() argument 505 tp = (void *)tlv; in nxpwifi_process_uap_tx_pause() 531 struct nxpwifi_ie_types_header *tlv) in nxpwifi_process_sta_tx_pause() argument 535 tp = (void *)tlv; in nxpwifi_process_sta_tx_pause() 676 struct nxpwifi_ie_types_header *tlv; in nxpwifi_process_multi_chan_event() local 696 tlv = (struct nxpwifi_ie_types_header *)chan_info->tlv_buffer; in nxpwifi_process_multi_chan_event() 699 tlv_type = le16_to_cpu(tlv->type); in nxpwifi_process_multi_chan_event() 700 tlv_len = le16_to_cpu(tlv->len); in nxpwifi_process_multi_chan_event() 713 grp_info = (struct nxpwifi_ie_types_mc_group_info *)tlv; in nxpwifi_process_multi_chan_event() 730 tlv = (void *)((u8 *)tlv + tlv_len + in nxpwifi_process_multi_chan_event() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | xdp_features.c | 230 struct tlv_hdr *tlv = (struct tlv_hdr *)buf; in dut_echo_thread() local 237 if (n != ntohs(tlv->len)) in dut_echo_thread() 240 if (ntohs(tlv->type) != CMD_ECHO) in dut_echo_thread() 343 struct tlv_hdr *tlv = (struct tlv_hdr *)buf; in recv_msg() local 347 if (len != ntohs(tlv->len) || len < sizeof(*tlv)) in recv_msg() 351 len -= sizeof(*tlv); in recv_msg() 355 memcpy(val, tlv->data, len); in recv_msg() 389 struct tlv_hdr *tlv = (struct tlv_hdr *)buf; in dut_run() local 395 switch (ntohs(tlv->type)) { in dut_run() 410 tlv->type = htons(CMD_ACK); in dut_run() [all …]
|
| /linux/include/uapi/linux/ |
| H A D | tipc_config.h | 254 #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/infiniband/hw/bnxt_re/ |
| H A D | qplib_tlv.h | 7 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/net/ipv6/ |
| H A D | seg6_hmac.c | 83 struct sr6_tlv_hmac *tlv; in seg6_get_tlv_hmac() local 91 tlv = (struct sr6_tlv_hmac *) in seg6_get_tlv_hmac() 94 if (tlv->tlvhdr.type != SR6_TLV_HMAC || tlv->tlvhdr.len != 38) in seg6_get_tlv_hmac() 97 return tlv; in seg6_get_tlv_hmac() 181 struct sr6_tlv_hmac *tlv; in seg6_hmac_validate_skb() local 192 tlv = seg6_get_tlv_hmac(srh); in seg6_hmac_validate_skb() 196 if (require_hmac > 0 && !tlv) in seg6_hmac_validate_skb() 204 if (require_hmac == 0 && !tlv) in seg6_hmac_validate_skb() 209 hinfo = seg6_hmac_info_lookup(net, be32_to_cpu(tlv->hmackeyid)); in seg6_hmac_validate_skb() 216 if (crypto_memneq(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN)) in seg6_hmac_validate_skb() [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_lwt_seg6local.c | 138 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 D | test_seg6_loop.c | 141 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/drivers/net/wireless/intel/iwlwifi/ |
| H A D | iwl-dbg-tlv.c | 54 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_flex(*node, tlv.data, len); 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/net/ethernet/intel/i40e/ |
| H A D | i40e_dcb.c | 37 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 D | mcu.c | 487 struct tlv *tlv = (struct tlv *)(data + 4); in mt7996_mcu_ie_countdown() local 500 while (data + sizeof(*tlv) < tail && le16_to_cpu(tlv->len)) { in mt7996_mcu_ie_countdown() 501 event = (struct mt7996_mcu_countdown_notify *)tlv->data; in mt7996_mcu_ie_countdown() 505 switch (le16_to_cpu(tlv->tag)) { in mt7996_mcu_ie_countdown() 520 data += le16_to_cpu(tlv->len); in mt7996_mcu_ie_countdown() 521 tlv = (struct tlv *)data; in mt7996_mcu_ie_countdown() 576 struct tlv *tlv = (struct tlv *)data; in mt7996_mcu_rx_log_message() local 585 if (le16_to_cpu(tlv->tag) != UNI_EVENT_FW_LOG_FORMAT) in mt7996_mcu_rx_log_message() 588 data += sizeof(*tlv) + 4; in mt7996_mcu_rx_log_message() 589 len = le16_to_cpu(tlv->len) - sizeof(*tlv) - 4; in mt7996_mcu_rx_log_message() [all …]
|
| /linux/drivers/net/ethernet/cisco/enic/ |
| H A D | vnic_vic.c | 38 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()
|
| /linux/drivers/net/wireless/intel/iwlwifi/fw/ |
| H A D | pnvm.c | 47 const struct iwl_ucode_tlv *tlv; in iwl_pnvm_handle_section() local 56 while (len >= sizeof(*tlv)) { in iwl_pnvm_handle_section() 59 len -= sizeof(*tlv); in iwl_pnvm_handle_section() 60 tlv = (const void *)data; in iwl_pnvm_handle_section() 62 tlv_len = le32_to_cpu(tlv->length); in iwl_pnvm_handle_section() 63 tlv_type = le32_to_cpu(tlv->type); in iwl_pnvm_handle_section() 71 data += sizeof(*tlv); in iwl_pnvm_handle_section() 181 const struct iwl_ucode_tlv *tlv; in iwl_pnvm_parse() local 185 while (len >= sizeof(*tlv)) { in iwl_pnvm_parse() 189 len -= sizeof(*tlv); in iwl_pnvm_parse() [all …]
|