Lines Matching refs:clock_desc

43 	struct ptp_tlv_mgmt_clock_desc *clock_desc;  in tlv_mgmt_post_recv()  local
75 clock_desc = &container->clock_desc; in tlv_mgmt_post_recv()
79 clock_desc->type = (uint16_t *)data; in tlv_mgmt_post_recv()
80 data += sizeof(*clock_desc->type); in tlv_mgmt_post_recv()
81 data_length -= sizeof(*clock_desc->type); in tlv_mgmt_post_recv()
85 tlv_ntohs(&clock_desc->type); in tlv_mgmt_post_recv()
87 clock_desc->phy_protocol = (struct ptp_text *)data; in tlv_mgmt_post_recv()
88 data += sizeof(*clock_desc->phy_protocol); in tlv_mgmt_post_recv()
89 data_length -= sizeof(*clock_desc->phy_protocol); in tlv_mgmt_post_recv()
93 data += clock_desc->phy_protocol->length; in tlv_mgmt_post_recv()
94 data_length -= clock_desc->phy_protocol->length; in tlv_mgmt_post_recv()
99 clock_desc->phy_addr_len = (uint16_t *)data; in tlv_mgmt_post_recv()
100 data += sizeof(*clock_desc->phy_addr_len); in tlv_mgmt_post_recv()
101 data_length -= sizeof(*clock_desc->phy_addr_len); in tlv_mgmt_post_recv()
105 tlv_ntohs(&clock_desc->phy_addr_len); in tlv_mgmt_post_recv()
106 if (*clock_desc->phy_addr_len > TLV_ADDR_LEN_MAX) { in tlv_mgmt_post_recv()
110 clock_desc->phy_addr = data; in tlv_mgmt_post_recv()
111 data += *clock_desc->phy_addr_len; in tlv_mgmt_post_recv()
112 data_length -= *clock_desc->phy_addr_len; in tlv_mgmt_post_recv()
117 clock_desc->protocol_addr = (struct ptp_port_addr *)data; in tlv_mgmt_post_recv()
118 data += sizeof(*clock_desc->protocol_addr); in tlv_mgmt_post_recv()
119 data_length -= sizeof(*clock_desc->protocol_addr); in tlv_mgmt_post_recv()
123 tlv_ntohs(&clock_desc->protocol_addr->protocol); in tlv_mgmt_post_recv()
124 tlv_ntohs(&clock_desc->protocol_addr->addr_len); in tlv_mgmt_post_recv()
125 if (clock_desc->protocol_addr->addr_len > TLV_ADDR_LEN_MAX) { in tlv_mgmt_post_recv()
129 data += clock_desc->protocol_addr->addr_len; in tlv_mgmt_post_recv()
130 data_length -= clock_desc->protocol_addr->addr_len; in tlv_mgmt_post_recv()
135 clock_desc->manufacturer_id = data; in tlv_mgmt_post_recv()
143 clock_desc->product_desc = (struct ptp_text *)data; in tlv_mgmt_post_recv()
144 data += sizeof(*clock_desc->product_desc); in tlv_mgmt_post_recv()
145 data_length -= sizeof(*clock_desc->product_desc); in tlv_mgmt_post_recv()
149 data += clock_desc->product_desc->length; in tlv_mgmt_post_recv()
150 data_length -= clock_desc->product_desc->length; in tlv_mgmt_post_recv()
155 clock_desc->revision_data = (struct ptp_text *)data; in tlv_mgmt_post_recv()
156 data += sizeof(*clock_desc->revision_data); in tlv_mgmt_post_recv()
157 data_length -= sizeof(*clock_desc->revision_data); in tlv_mgmt_post_recv()
161 data += clock_desc->revision_data->length; in tlv_mgmt_post_recv()
162 data_length -= clock_desc->revision_data->length; in tlv_mgmt_post_recv()
167 clock_desc->user_desc = (struct ptp_text *)data; in tlv_mgmt_post_recv()
168 data += sizeof(*clock_desc->user_desc); in tlv_mgmt_post_recv()
169 data_length -= sizeof(*clock_desc->user_desc); in tlv_mgmt_post_recv()
173 data += clock_desc->user_desc->length; in tlv_mgmt_post_recv()
174 data_length -= clock_desc->user_desc->length; in tlv_mgmt_post_recv()
179 clock_desc->profile_id = data; in tlv_mgmt_post_recv()
190 container->clock_desc.user_desc = (struct ptp_text *)mgmt_tlv->data; in tlv_mgmt_post_recv()
262 struct ptp_tlv_mgmt_clock_desc *clock_desc; in tlv_mgmt_pre_send() local
274 clock_desc = &container->clock_desc; in tlv_mgmt_pre_send()
276 tlv_htons(&clock_desc->type); in tlv_mgmt_pre_send()
277 tlv_htons(&clock_desc->phy_addr_len); in tlv_mgmt_pre_send()
278 tlv_htons(&clock_desc->protocol_addr->protocol); in tlv_mgmt_pre_send()
279 tlv_htons(&clock_desc->protocol_addr->addr_len); in tlv_mgmt_pre_send()