Lines Matching +full:extra +full:- +full:byte

4  * SPDX-License-Identifier: Apache-2.0
10 /* Enable verbose debug printing extra hexdumps */
178 /* high-level transfer mgmt */
183 /* high-level transfer mgmt */
193 *len, setup->bmRequestType, setup->bRequest, in ecm_class_handler()
198 return -ENODEV; in ecm_class_handler()
201 if (setup->bmRequestType != USB_CDC_ECM_REQ_TYPE) { in ecm_class_handler()
203 * Only host-to-device, type class, recipient interface in ecm_class_handler()
206 return -EINVAL; in ecm_class_handler()
209 if (setup->bRequest == USB_CDC_SET_ETH_PKT_FILTER) { in ecm_class_handler()
211 setup->wIndex, setup->wValue); in ecm_class_handler()
215 return -ENOTSUP; in ecm_class_handler()
230 switch (ntohs(hdr->type)) { in ecm_eth_size()
233 ip_len = ntohs(((struct net_ipv4_hdr *)ip_data)->len); in ecm_eth_size()
236 ip_len = ntohs(((struct net_ipv6_hdr *)ip_data)->len); in ecm_eth_size()
239 LOG_DBG("Unknown hdr type 0x%04x", hdr->type); in ecm_eth_size()
257 return -ENOMEM; in ecm_send()
261 return -ENOBUFS; in ecm_send()
269 return -EINVAL; in ecm_send()
285 * a short packet containing a null byte. Handle by checking the IP in ecm_read_cb()
286 * header length and dropping the extra byte. in ecm_read_cb()
288 if (rx_buf[size - 1] == 0U) { /* last byte is null */ in ecm_read_cb()
289 if (ecm_eth_size(rx_buf, size) == (size - 1)) { in ecm_read_cb()
290 /* last byte has been appended as delimiter, drop it */ in ecm_read_cb()
291 size--; in ecm_read_cb()
340 uint8_t iface_num = if_desc->bInterfaceNumber; in ecm_status_interface()
341 uint8_t alt_set = if_desc->bAlternateSetting; in ecm_status_interface()
343 LOG_DBG("iface %u alt_set %u", iface_num, if_desc->bAlternateSetting); in ecm_status_interface()