Lines Matching refs:packet_len
472 u32 packet_len; in asix_send_common() local
475 PKTSIZE + sizeof(packet_len)); in asix_send_common()
479 packet_len = (((length) ^ 0x0000ffff) << 16) + (length); in asix_send_common()
480 cpu_to_le32s(&packet_len); in asix_send_common()
482 memcpy(msg, &packet_len, sizeof(packet_len)); in asix_send_common()
483 memcpy(msg + sizeof(packet_len), (void *)packet, length); in asix_send_common()
488 length + sizeof(packet_len), in asix_send_common()
492 length + sizeof(packet_len), actual_len, err); in asix_send_common()
522 u32 packet_len; in asix_recv() local
549 if (actual_len < sizeof(packet_len)) { in asix_recv()
553 memcpy(&packet_len, buf_ptr, sizeof(packet_len)); in asix_recv()
554 le32_to_cpus(&packet_len); in asix_recv()
555 if (((~packet_len >> 16) & 0x7ff) != (packet_len & 0x7ff)) { in asix_recv()
557 packet_len, (~packet_len >> 16) & 0x7ff, in asix_recv()
558 packet_len & 0x7ff); in asix_recv()
561 packet_len = packet_len & 0x7ff; in asix_recv()
562 if (packet_len > actual_len - sizeof(packet_len)) { in asix_recv()
563 debug("Rx: too large packet: %d\n", packet_len); in asix_recv()
568 net_process_received_packet(buf_ptr + sizeof(packet_len), in asix_recv()
569 packet_len); in asix_recv()
572 if (packet_len & 1) in asix_recv()
573 packet_len++; in asix_recv()
574 actual_len -= sizeof(packet_len) + packet_len; in asix_recv()
575 buf_ptr += sizeof(packet_len) + packet_len; in asix_recv()
770 u32 packet_len; in asix_eth_recv() local
789 if (len < sizeof(packet_len)) { in asix_eth_recv()
793 memcpy(&packet_len, ptr, sizeof(packet_len)); in asix_eth_recv()
794 le32_to_cpus(&packet_len); in asix_eth_recv()
795 if (((~packet_len >> 16) & 0x7ff) != (packet_len & 0x7ff)) { in asix_eth_recv()
797 packet_len, (~packet_len >> 16) & 0x7ff, in asix_eth_recv()
798 packet_len & 0x7ff); in asix_eth_recv()
801 packet_len = packet_len & 0x7ff; in asix_eth_recv()
802 if (packet_len > len - sizeof(packet_len)) { in asix_eth_recv()
803 debug("Rx: too large packet: %d\n", packet_len); in asix_eth_recv()
807 *packetp = ptr + sizeof(packet_len); in asix_eth_recv()
808 return packet_len; in asix_eth_recv()
815 static int asix_free_pkt(struct udevice *dev, uchar *packet, int packet_len) in asix_free_pkt() argument
819 if (packet_len & 1) in asix_free_pkt()
820 packet_len++; in asix_free_pkt()
821 usb_ether_advance_rxbuf(&priv->ueth, sizeof(u32) + packet_len); in asix_free_pkt()