/u-boot/net/ |
A D | fastboot.c | 56 uchar *packet; in fastboot_udp_send_info() local 68 packet_base = packet; in fastboot_udp_send_info() 76 packet += strlen(response); in fastboot_udp_send_info() 78 len = packet - packet_base; in fastboot_udp_send_info() 123 uchar *packet; in fastboot_send() local 139 packet_base = packet; in fastboot_send() 158 packet += sizeof(tmp); in fastboot_send() 163 packet += sizeof(tmp); in fastboot_send() 166 packet += sizeof(tmp); in fastboot_send() 208 len = packet - packet_base; in fastboot_send() [all …]
|
A D | eth_legacy.c | 359 int eth_send(void *packet, int length) in eth_send() argument 366 ret = eth_current->send(eth_current, packet, length); in eth_send() 369 pcap_post(packet, length, true); in eth_send() 383 static void eth_save_packet(void *packet, int length) in eth_save_packet() argument 385 char *p = packet; in eth_save_packet() 401 int eth_receive(void *packet, int length) in eth_receive() argument 403 char *p = packet; in eth_receive()
|
A D | dsa-uclass.c | 114 static int dsa_port_send(struct udevice *pdev, void *packet, int length) in dsa_port_send() argument 130 memcpy(dsa_packet_tmp + head, packet, length); in dsa_port_send() 133 memcpy(packet, dsa_packet_tmp, length); in dsa_port_send() 136 err = ops->xmit(dev, port_pdata->index, packet, length); in dsa_port_send() 140 return eth_get_ops(master)->send(master, packet, length); in dsa_port_send() 181 static int dsa_port_free_pkt(struct udevice *pdev, uchar *packet, int length) in dsa_port_free_pkt() argument 190 packet -= priv->headroom; in dsa_port_free_pkt() 193 return eth_get_ops(master)->free_pkt(master, packet, length); in dsa_port_free_pkt()
|
A D | eth-uclass.c | 348 int eth_send(void *packet, int length) in eth_send() argument 360 ret = eth_get_ops(current)->send(current, packet, length); in eth_send() 367 pcap_post(packet, length, true); in eth_send() 375 uchar *packet; in eth_rx() local 390 ret = eth_get_ops(current)->recv(current, flags, &packet); in eth_rx() 393 net_process_received_packet(packet, ret); in eth_rx() 395 eth_get_ops(current)->free_pkt(current, packet, ret); in eth_rx()
|
A D | pcap.c | 99 int pcap_post(const void *packet, size_t len, bool outgoing) in pcap_post() argument 123 memcpy(buf + pos, packet, len); in pcap_post()
|
/u-boot/test/dm/ |
A D | eth.c | 269 struct ethernet_hdr *eth = packet; in sb_check_arp_reply() 277 arp = packet + ETHER_HDR_SIZE; in sb_check_arp_reply() 307 struct ethernet_hdr *eth = packet; in sb_with_async_arp_handler() 308 struct arp_hdr *arp = packet + ETHER_HDR_SIZE; in sb_with_async_arp_handler() 325 sandbox_eth_arp_req_to_reply(dev, packet, len); in sb_with_async_arp_handler() 328 return sb_check_arp_reply(dev, packet, len); in sb_with_async_arp_handler() 354 struct ethernet_hdr *eth = packet; in sb_check_ping_reply() 363 ip = packet + ETHER_HDR_SIZE; in sb_check_ping_reply() 392 struct ethernet_hdr *eth = packet; in sb_with_async_ping_handler() 393 struct arp_hdr *arp = packet + ETHER_HDR_SIZE; in sb_with_async_ping_handler() [all …]
|
/u-boot/drivers/video/ |
A D | mipi_dsi.c | 177 int mipi_dsi_create_packet(struct mipi_dsi_packet *packet, in mipi_dsi_create_packet() argument 180 if (!packet || !msg) in mipi_dsi_create_packet() 191 memset(packet, 0, sizeof(*packet)); in mipi_dsi_create_packet() 192 packet->header[0] = ((msg->channel & 0x3) << 6) | (msg->type & 0x3f); in mipi_dsi_create_packet() 204 packet->header[1] = (msg->tx_len >> 0) & 0xff; in mipi_dsi_create_packet() 205 packet->header[2] = (msg->tx_len >> 8) & 0xff; in mipi_dsi_create_packet() 207 packet->payload_length = msg->tx_len; in mipi_dsi_create_packet() 208 packet->payload = msg->tx_buf; in mipi_dsi_create_packet() 212 packet->header[1] = (msg->tx_len > 0) ? tx[0] : 0; in mipi_dsi_create_packet() 213 packet->header[2] = (msg->tx_len > 1) ? tx[1] : 0; in mipi_dsi_create_packet() [all …]
|
/u-boot/drivers/net/ |
A D | sandbox.c | 59 int sandbox_eth_arp_req_to_reply(struct udevice *dev, void *packet, in sandbox_eth_arp_req_to_reply() argument 63 struct ethernet_hdr *eth = packet; in sandbox_eth_arp_req_to_reply() 71 arp = packet + ETHER_HDR_SIZE; in sandbox_eth_arp_req_to_reply() 114 int sandbox_eth_ping_req_to_reply(struct udevice *dev, void *packet, in sandbox_eth_ping_req_to_reply() argument 118 struct ethernet_hdr *eth = packet; in sandbox_eth_ping_req_to_reply() 128 ip = packet + ETHER_HDR_SIZE; in sandbox_eth_ping_req_to_reply() 144 memcpy(eth_recv, packet, len); in sandbox_eth_ping_req_to_reply() 266 static int sb_default_handler(struct udevice *dev, void *packet, in sb_default_handler() argument 269 if (!sandbox_eth_arp_req_to_reply(dev, packet, len)) in sb_default_handler() 271 if (!sandbox_eth_ping_req_to_reply(dev, packet, len)) in sb_default_handler() [all …]
|
A D | ethoc.c | 184 void __iomem *packet; member 412 if (priv->packet) in ethoc_rx_common() 479 if (priv->packet) { in ethoc_send_common() 480 void *p = priv->packet + entry * PKTSIZE_ALIGN; in ethoc_send_common() 482 memcpy(p, packet, length); in ethoc_send_common() 483 packet = p; in ethoc_send_common() 485 bd.addr = virt_to_phys(packet); in ethoc_send_common() 487 flush_dcache_range((ulong)packet, (ulong)packet + length); in ethoc_send_common() 527 if (priv->packet) in ethoc_free_pkt_common() 528 src = priv->packet + entry * PKTSIZE_ALIGN; in ethoc_free_pkt_common() [all …]
|
A D | ftmac100.c | 188 static int _ftmac100_send(struct ftmac100_data *priv, void *packet, int length) in _ftmac100_send() argument 199 debug ("%s(%lx, %x)\n", __func__, (unsigned long)packet, length); in _ftmac100_send() 205 flush_dcache_range((unsigned long)packet,(unsigned long)packet+length); in _ftmac100_send() 206 curr_des->txdes2 = (unsigned int)(unsigned long)packet; /* TXBUF_BADR */ in _ftmac100_send() 276 static int ftmac100_send(struct eth_device *dev, void *packet, int length) in ftmac100_send() argument 279 return _ftmac100_send(priv , packet , length); in ftmac100_send() 334 static int ftmac100_send(struct udevice *dev, void *packet, int length) in ftmac100_send() argument 338 ret = _ftmac100_send(priv , packet , length); in ftmac100_send() 355 static int ftmac100_free_pkt(struct udevice *dev, uchar *packet, int length) in ftmac100_free_pkt() argument
|
A D | sandbox-raw.c | 41 static int sb_eth_raw_send(struct udevice *dev, void *packet, int length) in sb_eth_raw_send() argument 48 struct ethernet_hdr *eth = packet; in sb_eth_raw_send() 51 struct arp_hdr *arp = packet + ETHER_HDR_SIZE; in sb_eth_raw_send() 61 packet += ETHER_HDR_SIZE; in sb_eth_raw_send() 64 return sandbox_eth_raw_os_send(packet, length, priv); in sb_eth_raw_send()
|
A D | pcnet.c | 338 packet); in pcnet_send_common() 340 flush_dcache_range((unsigned long)packet, in pcnet_send_common() 341 (unsigned long)packet + pkt_len); in pcnet_send_common() 362 addr = pcnet_virt_to_mem(lp, packet); in pcnet_send_common() 468 static int pcnet_send(struct eth_device *dev, void *packet, int pkt_len) in pcnet_send() argument 472 return pcnet_send_common(lp, packet, pkt_len); in pcnet_send() 478 uchar *packet; in pcnet_recv() local 481 ret = pcnet_recv_common(lp, &packet); in pcnet_recv() 483 net_process_received_packet(packet, ret); in pcnet_recv() 603 static int pcnet_send(struct udevice *dev, void *packet, int length) in pcnet_send() argument [all …]
|
A D | altera_tse.c | 158 static int altera_tse_send_sgdma(struct udevice *dev, void *packet, int length) in altera_tse_send_sgdma() argument 166 packet, /* read addr */ in altera_tse_send_sgdma() 202 static int altera_tse_free_pkt_sgdma(struct udevice *dev, uchar *packet, in altera_tse_free_pkt_sgdma() argument 313 static int altera_tse_send_msgdma(struct udevice *dev, void *packet, in altera_tse_send_msgdma() argument 318 u32 tx_buf = virt_to_phys(packet); in altera_tse_send_msgdma() 356 static int altera_tse_free_pkt_msgdma(struct udevice *dev, uchar *packet, in altera_tse_free_pkt_msgdma() argument 480 static int altera_tse_send(struct udevice *dev, void *packet, int length) in altera_tse_send() argument 483 unsigned long tx_buf = (unsigned long)packet; in altera_tse_send() 487 return priv->ops->send(dev, packet, length); in altera_tse_send() 497 static int altera_tse_free_pkt(struct udevice *dev, uchar *packet, in altera_tse_free_pkt() argument [all …]
|
A D | rtl8139.c | 375 void *packet, int length) in rtl8139_send_common() argument 382 memcpy(tx_buffer, packet, length); in rtl8139_send_common() 581 static int rtl8139_send(struct eth_device *dev, void *packet, int length) in rtl8139_send() argument 585 return rtl8139_send_common(priv, packet, length); in rtl8139_send() 592 uchar *packet; in rtl8139_recv() local 595 ret = rtl8139_recv_common(priv, rxdata, &packet); in rtl8139_recv() 597 net_process_received_packet(packet, ret); in rtl8139_recv() 678 static int rtl8139_send(struct udevice *dev, void *packet, int length) in rtl8139_send() argument 683 ret = rtl8139_send_common(priv, packet, length); in rtl8139_send() 696 static int rtl8139_free_pkt(struct udevice *dev, uchar *packet, int length) in rtl8139_free_pkt() argument
|
A D | sh_eth.c | 75 if (!packet || len > 0xffff) { in sh_eth_send_common() 82 if ((uintptr_t)packet & 3) { in sh_eth_send_common() 90 flush_cache_wback(packet, len); in sh_eth_send_common() 91 port_info->tx_desc_cur->td2 = ADDR_TO_PHY(packet); in sh_eth_send_common() 550 return sh_eth_send_common(eth, packet, len); in sh_eth_send_legacy() 557 uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2); in sh_eth_recv_common() local 561 invalidate_cache(packet, len); in sh_eth_recv_common() 562 net_process_received_packet(packet, len); in sh_eth_recv_common() 700 return sh_eth_send_common(eth, packet, len); in sh_ether_send() 713 invalidate_cache(packet, len); in sh_ether_recv() [all …]
|
A D | ravb.c | 119 u8 packet[PKTSIZE_ALIGN]; member 148 static int ravb_send(struct udevice *dev, void *packet, int len) in ravb_send() argument 155 ravb_flush_dcache((uintptr_t)packet, len); in ravb_send() 158 desc->dptr = (uintptr_t)packet; in ravb_send() 186 u8 *packet; in ravb_recv() local 200 packet = (u8 *)(uintptr_t)desc->data.dptr; in ravb_recv() 201 ravb_invalidate_dcache((uintptr_t)packet, len); in ravb_recv() 203 *packetp = packet; in ravb_recv() 207 static int ravb_free_pkt(struct udevice *dev, uchar *packet, int length) in ravb_free_pkt() argument 289 eth->rx_desc[i].data.dptr = (uintptr_t)eth->rx_desc[i].packet; in ravb_rx_desc_init()
|
A D | mt7628-eth.c | 157 static int mt7628_eth_free_pkt(struct udevice *dev, uchar *packet, int length); 381 static int mt7628_eth_send(struct udevice *dev, void *packet, int length) in mt7628_eth_send() argument 393 char *p = (char *)packet; in mt7628_eth_send() 408 flush_dcache_range((u32)packet, (u32)packet + length); in mt7628_eth_send() 410 priv->tx_ring[idx].txd1 = CPHYSADDR(packet); in mt7628_eth_send() 458 static int mt7628_eth_free_pkt(struct udevice *dev, uchar *packet, int length) in mt7628_eth_free_pkt() argument 481 uchar packet[MTK_QDMA_PAGE_SIZE]; in mt7628_eth_start() local 541 packetp = &packet[0]; in mt7628_eth_start()
|
/u-boot/arch/sandbox/include/asm/ |
A D | eth-raw-os.h | 67 int sandbox_eth_raw_os_send(void *packet, int length, 69 int sandbox_eth_raw_os_recv(void *packet, int *length,
|
A D | eth.h | 28 int sandbox_eth_arp_req_to_reply(struct udevice *dev, void *packet, 41 int sandbox_eth_ping_req_to_reply(struct udevice *dev, void *packet,
|
/u-boot/doc/driver-model/ |
A D | ethernet.rst | 79 int (*send)(struct udevice *dev, void *packet, int length); 81 int (*free_pkt)(struct udevice *dev, uchar *packet, int length); 117 If a packet has been received, make sure it is accessible to the CPU 120 long packet), return 0 if you require the packet to be cleaned up normally, 122 The U-Boot network stack will then process the packet. 129 being the last packet that recv() handled. 130 The common code sets up packet buffers for you already in the .bss 153 (process packet) 209 each packet it must call the net_process_received_packet() function, 211 the packet, before checking for new data. [all …]
|
/u-boot/arch/sandbox/cpu/ |
A D | eth-raw-os.c | 195 int sandbox_eth_raw_os_send(void *packet, int length, in sandbox_eth_raw_os_send() argument 199 struct udphdr *udph = packet + sizeof(struct iphdr); in sandbox_eth_raw_os_send() 219 struct iphdr *iph = packet; in sandbox_eth_raw_os_send() 249 retval = sendto(priv->sd, packet, length, 0, in sandbox_eth_raw_os_send() 260 int sandbox_eth_raw_os_recv(void *packet, int *length, in sandbox_eth_raw_os_recv() argument 269 retval = recvfrom(priv->sd, packet, 1536, 0, in sandbox_eth_raw_os_recv()
|
/u-boot/include/net/ |
A D | dsa.h | 76 int (*xmit)(struct udevice *dev, int port, void *packet, int length); 77 int (*rcv)(struct udevice *dev, int *portp, void *packet, int length);
|
A D | pcap.h | 55 int pcap_post(const void *packet, size_t len, bool outgoing);
|
/u-boot/drivers/virtio/ |
A D | virtio_net.c | 77 static int virtio_net_send(struct udevice *dev, void *packet, int length) in virtio_net_send() argument 83 struct virtio_sg data_sg = { packet, length }; in virtio_net_send() 123 static int virtio_net_free_pkt(struct udevice *dev, uchar *packet, int length) in virtio_net_free_pkt() argument 126 void *buf = packet - priv->net_hdr_len; in virtio_net_free_pkt()
|
/u-boot/test/log/ |
A D | syslog_test.h | 46 int sb_log_tx_handler(struct udevice *dev, void *packet, unsigned int len);
|