]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/net.h
include/configs: Whitespace fixup
[people/ms/u-boot.git] / include / net.h
index ac44d614ca335e390d801e3be50aaac6acccac71..1fb419424bf4daafcaeca7a1793684643e5e5bbc 100644 (file)
@@ -86,11 +86,13 @@ 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_...
+ * @max_speed: Maximum speed of Ethernet connection supported by MAC
  */
 struct eth_pdata {
        phys_addr_t iobase;
        unsigned char enetaddr[6];
        int phy_interface;
+       int max_speed;
 };
 
 enum eth_recv_flags {
@@ -235,6 +237,23 @@ void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
 int eth_getenv_enetaddr(const char *name, uchar *enetaddr);
 int eth_setenv_enetaddr(const char *name, const uchar *enetaddr);
 
+/**
+ * eth_setenv_enetaddr_by_index() - set the MAC address envrionment variable
+ *
+ * This sets up an environment variable with the given MAC address (@enetaddr).
+ * The environment variable to be set is defined by <@base_name><@index>addr.
+ * If @index is 0 it is omitted. For common Ethernet this means ethaddr,
+ * eth1addr, etc.
+ *
+ * @base_name:  Base name for variable, typically "eth"
+ * @index:      Index of interface being updated (>=0)
+ * @enetaddr:   Pointer to MAC address to put into the variable
+ * @return 0 if OK, other value on error
+ */
+int eth_setenv_enetaddr_by_index(const char *base_name, int index,
+                                uchar *enetaddr);
+
+
 /*
  * Get the hardware address for an ethernet interface .
  * Args:
@@ -318,6 +337,8 @@ struct vlan_ethernet_hdr {
 #define PROT_ARP       0x0806          /* IP ARP protocol              */
 #define PROT_RARP      0x8035          /* IP ARP protocol              */
 #define PROT_VLAN      0x8100          /* IEEE 802.1q protocol         */
+#define PROT_IPV6      0x86dd          /* IPv6 over bluebook           */
+#define PROT_PPP_SES   0x8864          /* PPPoE session messages       */
 
 #define IPPROTO_ICMP    1      /* Internet Control Message Protocol    */
 #define IPPROTO_UDP    17      /* User Datagram Protocol               */