Lines Matching +full:g +full:- +full:rx +full:- +full:fifo +full:- +full:size

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * LiMon Monitor (LiMon) - Network.
5 * Copyright 1994 - 2000 Neil Russell.
41 * The size of a MAC address in string form, each digit requires two chars
44 #define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1)
46 /* IPv4 addresses are always 32 bits in size */
89 * struct eth_pdata - Platform data for Ethernet MAC controllers
93 * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_...
112 * struct eth_ops - functions of Ethernet MAC controllers
118 * indicate that the hardware receive FIFO is empty. If 0 is returned, the
123 * called when no error was returned from recv - optional
124 * stop: Stop the hardware from looking for packets - may be called even if
126 * mcast: Join or leave a multicast group (for TFTP) - optional
130 * return -ENOSYS to indicate that this is not implemented for
131 this hardware - optional.
135 * eth_pdata::enetaddr field - optional
148 #define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops)
199 return eth_current->enetaddr; in eth_get_ethaddr()
208 eth_get_dev()->state = ETH_STATE_ACTIVE; in eth_init_state_only()
215 eth_get_dev()->state = ETH_STATE_PASSIVE; in eth_halt_state_only()
222 * base_name - base name for device (normally "eth")
223 * eth_number - value of %d (0 for first device of this type)
225 * 0 is success, non-zero is error status from driver.
240 * eth_env_set_enetaddr_by_index() - set the MAC address environment variable
259 * 0 is success, non-zero is error status.
266 * base_name - base name for device (normally "eth")
267 * index - device index number (0 for first)
268 * enetaddr - returns 6 byte hardware address
302 /* Ethernet header size */
320 /* 802 + SNAP + ethernet header size */
334 /* VLAN Ethernet header size */
339 #define PROT_WOL 0x0842 /* ether-wake WoL protocol */
344 #define PROT_NCSI 0x88f8 /* NC-SI control packets */
394 #define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE)
414 * The remaining fields are variable in size, according to
431 #define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */
470 * Maximum packet size; used to allocate packet storage. Use
471 * the maxium Ethernet frame size as specified by the Ethernet
473 * maximum packet size = 1522
474 * maximum packet size and multiple of 32 bytes = 1536
480 * Maximum receive ring size; that is, the number of packets
519 extern int net_rx_packet_len; /* Current rx packet length */
538 /* The actual transferred size of the bootfile (in bytes) */
540 /* Boot file size in blocks as reported by the DHCP server */
580 /* Get size of the ethernet header when we send */
583 /* Set ethernet header; returns the size of the header */
594 * compute_ip_checksum() - Compute IP checksum
596 * @addr: Address to check (must be 16-bit aligned)
598 * @return 16-bit IP checksum
603 * add_ip_checksums() - add two IP checksums
605 * @offset: Offset of first sum (if odd we do a byte-swap)
608 * @return updated 16-bit IP checksum
613 * ip_checksum_ok() - check if a checksum is correct
617 * @addr: Address to check (must be 16-bit aligned)
624 rxhand_f *net_get_udp_handler(void); /* Get UDP RX packet handler */
625 void net_set_udp_handler(rxhand_f *); /* Set UDP RX packet handler */
626 rxhand_f *net_get_arp_handler(void); /* Get ARP RX packet handler */
627 void net_set_arp_handler(rxhand_f *); /* Set ARP RX packet handler */
629 void net_set_icmp_handler(rxhand_icmp_f *f); /* Set ICMP RX handler */
643 debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); in net_set_state()
648 * net_get_async_tx_pkt_buf - Get a packet buffer that is not in use for
651 * returns - ptr to packet buffer
757 * is_zero_ethaddr - Determine if give Ethernet address is all zeros.
758 * @addr: Pointer to a six-byte array containing the Ethernet address
768 * is_multicast_ethaddr - Determine if the Ethernet address is a multicast.
769 * @addr: Pointer to a six-byte array containing the Ethernet address
780 * is_broadcast_ethaddr - Determine if the Ethernet address is broadcast
781 * @addr: Pointer to a six-byte array containing the Ethernet address
792 * is_valid_ethaddr - Determine if the given Ethernet address is valid
793 * @addr: Pointer to a six-byte array containing the Ethernet address
808 * net_random_ethaddr - Generate software assigned random Ethernet address
809 * @addr: Pointer to a six-byte array containing the Ethernet address
842 void copy_filename(char *dst, const char *src, int size);
848 * net_parse_bootfile - Parse the bootfile env var / cmd line param
850 * @param ipaddr - a pointer to the ipaddr to populate if included in bootfile
851 * @param filename - a pointer to the string to save the filename part
852 * @param max_len - The longest - 1 that the filename part can be
862 * update_tftp - Update firmware over TFTP (via DFU)
866 * @param addr - memory address where data is stored
867 * @param interface - the DFU medium name - e.g. "mmc"
868 * @param devstring - the DFU medium number - e.g. "1"
870 * @return - 0 on success, other value on failure