diff options
| author | Tom Rini <[email protected]> | 2026-01-15 08:50:53 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-01-15 08:50:53 -0600 |
| commit | 5665d1f4e7cfd6895417d199dd7db73500c5d36c (patch) | |
| tree | a57a8ba13152f9416a756b85a2e0abee8e288304 /include | |
| parent | d503633a36767d756c7de28305cf0de79440cbc0 (diff) | |
| parent | b61d7d95cc62525060f0d05881bdaaf994a55b11 (diff) | |
Merge tag 'net-20260115' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-20260115.
CI: https://source.denx.de/u-boot/custodians/u-boot-net/-/pipelines/29008
net:
- phy: micrel KSZ9031 and KSZ9021 fixes
- phy: marvell10g fix
- Fix "net stats" help
- Add Microsemi/Microchip MDIO driver
- tftpput: Rework to exclude code from xPL phases
net-legacy:
- Some refactoring to help with lwIP NF support
net-lwip:
- Add NFS support
Diffstat (limited to 'include')
| -rw-r--r-- | include/net-common.h | 29 | ||||
| -rw-r--r-- | include/net-legacy.h | 22 | ||||
| -rw-r--r-- | include/net-lwip.h | 1 |
3 files changed, 28 insertions, 24 deletions
diff --git a/include/net-common.h b/include/net-common.h index f5cff3e7c0c..f293b21bc0b 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -13,6 +13,7 @@ #include <time.h> #define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */ +#define DEBUG_INT_STATE 0 /* Internal network state changes */ /* * The number of receive packet buffers, and the required packet buffer @@ -114,14 +115,38 @@ struct ip_udp_hdr { #define RINGSZ 4 #define RINGSZ_LOG2 2 +/* Network loop state */ +enum net_loop_state { + NETLOOP_CONTINUE, + NETLOOP_RESTART, + NETLOOP_SUCCESS, + NETLOOP_FAIL +}; + +extern enum net_loop_state net_state; + +static inline void net_set_state(enum net_loop_state state) +{ + debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); + net_state = state; +} + extern int net_restart_wrap; /* Tried all network devices */ -extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ +extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ extern const u8 net_bcast_ethaddr[ARP_HLEN]; /* Ethernet broadcast address */ -extern char net_boot_file_name[1024];/* Boot File name */ extern struct in_addr net_ip; /* Our IP addr (0 = unknown) */ /* Indicates whether the pxe path prefix / config file was specified in dhcp option */ extern char *pxelinux_configfile; +/* Our IP addr (0 = unknown) */ +extern struct in_addr net_ip; +/* Boot File name */ +extern char net_boot_file_name[1024]; +/* The actual transferred size of the bootfile (in bytes) */ +extern u32 net_boot_file_size; +/* Boot file size in blocks as reported by the DHCP server */ +extern u32 net_boot_file_expected_size_in_blocks; + /** * compute_ip_checksum() - Compute IP checksum * diff --git a/include/net-legacy.h b/include/net-legacy.h index 9564e97d238..d489c2480cd 100644 --- a/include/net-legacy.h +++ b/include/net-legacy.h @@ -25,7 +25,6 @@ struct udevice; #define DEBUG_LL_STATE 0 /* Link local state machine changes */ #define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ #define DEBUG_NET_PKT 0 /* Packets on info on the network at large */ -#define DEBUG_INT_STATE 0 /* Internal network state changes */ /* ARP hardware address length */ #define ARP_HLEN 6 @@ -290,7 +289,6 @@ extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */ extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */ extern struct in_addr net_server_ip; /* Server IP addr (0 = unknown) */ extern uchar *net_tx_packet; /* THE transmit packet */ -extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ extern uchar *net_rx_packet; /* Current receive packet */ extern int net_rx_packet_len; /* Current rx packet length */ extern const u8 net_null_ethaddr[ARP_HLEN]; @@ -310,10 +308,6 @@ enum proto_t { /* Indicates whether the file name was specified on the command line */ extern bool net_boot_file_name_explicit; -/* The actual transferred size of the bootfile (in bytes) */ -extern u32 net_boot_file_size; -/* Boot file size in blocks as reported by the DHCP server */ -extern u32 net_boot_file_expected_size_in_blocks; #if defined(CONFIG_DNS) extern char *net_dns_resolve; /* The host to resolve */ @@ -369,22 +363,6 @@ bool arp_is_waiting(void); /* Waiting for ARP reply? */ void net_set_icmp_handler(rxhand_icmp_f *f); /* Set ICMP RX handler */ void net_set_timeout_handler(ulong t, thand_f *f);/* Set timeout handler */ -/* Network loop state */ -enum net_loop_state { - NETLOOP_CONTINUE, - NETLOOP_RESTART, - NETLOOP_SUCCESS, - NETLOOP_FAIL -}; - -extern enum net_loop_state net_state; - -static inline void net_set_state(enum net_loop_state state) -{ - debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); - net_state = state; -} - /* * net_get_async_tx_pkt_buf - Get a packet buffer that is not in use for * sending an asynchronous reply diff --git a/include/net-lwip.h b/include/net-lwip.h index c910def5719..20cb0992cce 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -51,6 +51,7 @@ int net_lwip_dns_resolve(char *name_or_ip, ip_addr_t *ip); bool wget_validate_uri(char *uri); int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_nfs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); #endif /* __NET_LWIP_H__ */ |
