1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 01:02:19 +02:00

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-05-10 11:39:56 -06:00
committed by Tom Rini
parent c3dc39a2f8
commit 90526e9fba
472 changed files with 501 additions and 5 deletions

View File

@@ -12,6 +12,7 @@
#ifndef __NET_H__
#define __NET_H__
#include <linux/types.h>
#include <asm/cache.h>
#include <asm/byteorder.h> /* for nton* / ntoh* stuff */
#include <env.h>
@@ -20,7 +21,9 @@
#include <linux/if_ether.h>
#include <rand.h>
struct bd_info;
struct cmd_tbl_s;
struct udevice;
#define DEBUG_LL_STATE 0 /* Link local state machine changes */
#define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */
@@ -188,12 +191,12 @@ struct eth_device {
phys_addr_t iobase;
int state;
int (*init)(struct eth_device *, bd_t *);
int (*init)(struct eth_device *eth, struct bd_info *bd);
int (*send)(struct eth_device *, void *packet, int length);
int (*recv)(struct eth_device *);
void (*halt)(struct eth_device *);
int (*mcast)(struct eth_device *, const u8 *enetaddr, int join);
int (*write_hwaddr)(struct eth_device *);
int (*write_hwaddr)(struct eth_device *eth);
struct eth_device *next;
int index;
void *priv;
@@ -246,7 +249,7 @@ static __always_inline void eth_halt_state_only(void)
int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
int eth_number);
int usb_eth_initialize(bd_t *bi);
int usb_eth_initialize(struct bd_info *bi);
#endif
int eth_initialize(void); /* Initialize network subsystem */