X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fnet.h;h=af8617bea6c51b5da319860c938ff64bb42aea6c;hb=6e3a51072093ae7dfb06bc877570bd950a19dcf6;hp=a99b06af097a23e06fc968c8d1887418689eb2a2;hpb=12a41aa7e19417a787ba16ddf24fadcbc21ea6f8;p=karo-tx-uboot.git diff --git a/include/net.h b/include/net.h index a99b06af09..af8617bea6 100644 --- a/include/net.h +++ b/include/net.h @@ -85,10 +85,20 @@ enum eth_state_t { * * @iobase: The base address of the hardware registers * @enetaddr: The Ethernet MAC address that is loaded from EEPROM or env + * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_... */ struct eth_pdata { phys_addr_t iobase; unsigned char enetaddr[6]; + int phy_interface; +}; + +enum eth_recv_flags { + /* + * Check hardware device for new packets (otherwise only return those + * which are already in the memory buffer ready to process) + */ + ETH_RECV_CHECK_DEVICE = 1 << 0, }; /** @@ -109,7 +119,9 @@ struct eth_pdata { * mcast: Join or leave a multicast group (for TFTP) - optional * write_hwaddr: Write a MAC address to the hardware (used to pass it to Linux * on some platforms like ARM). This function expects the - * eth_pdata::enetaddr field to be populated - optional + * eth_pdata::enetaddr field to be populated. The method can + * return -ENOSYS to indicate that this is not implemented for + this hardware - optional. * read_rom_hwaddr: Some devices have a backup of the MAC address stored in a * ROM on the board. This is how the driver should expose it * to the network stack. This function should fill in the @@ -118,7 +130,7 @@ struct eth_pdata { struct eth_ops { int (*start)(struct udevice *dev); int (*send)(struct udevice *dev, void *packet, int length); - int (*recv)(struct udevice *dev, uchar **packetp); + int (*recv)(struct udevice *dev, int flags, uchar **packetp); int (*free_pkt)(struct udevice *dev, uchar *packet, int length); void (*stop)(struct udevice *dev); #ifdef CONFIG_MCAST_TFTP