summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-07-02 11:00:33 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-02 11:00:33 +0200
commit149d4764a30436b6de4073966c01376c234c215a (patch)
tree6317281865ac79ee3695d7018b3b0ce37424d77b /include
parenta461805f26bf25883bcaa3a4cfe2b8ffe5a3dde1 (diff)
parent69e07e2afb650702dad23bea882731fe02dbb964 (diff)
downloadbarebox-149d4764a30436b6de4073966c01376c234c215a.tar.gz
barebox-149d4764a30436b6de4073966c01376c234c215a.tar.xz
Merge branch 'for-next/ethernet'
Diffstat (limited to 'include')
-rw-r--r--include/miidev.h4
-rw-r--r--include/net.h8
2 files changed, 8 insertions, 4 deletions
diff --git a/include/miidev.h b/include/miidev.h
index 622784f681..4bbf94c237 100644
--- a/include/miidev.h
+++ b/include/miidev.h
@@ -31,6 +31,8 @@
#define MIIDEV_FORCE_10 (1 << 0)
#define MIIDEV_FORCE_LINK (1 << 1)
+#define MIIDEV_CAPABLE_1000M (1 << 0)
+
struct mii_device {
struct device_d dev;
struct device_d *parent;
@@ -40,6 +42,7 @@ struct mii_device {
int (*write) (struct mii_device *dev, int addr, int reg, int value);
int flags;
+ int capabilities;
struct eth_device *edev;
struct cdev cdev;
@@ -55,6 +58,7 @@ int miidev_get_status(struct mii_device *mdev);
#define MIIDEV_STATUS_IS_FULL_DUPLEX (1 << 1)
#define MIIDEV_STATUS_IS_10MBIT (1 << 2)
#define MIIDEV_STATUS_IS_100MBIT (1 << 3)
+#define MIIDEV_STATUS_IS_1000MBIT (1 << 4)
int miidev_print_status(struct mii_device *mdev);
static int inline mii_write(struct mii_device *dev, int addr, int reg, int value)
diff --git a/include/net.h b/include/net.h
index 08f897e958..9152943812 100644
--- a/include/net.h
+++ b/include/net.h
@@ -38,8 +38,8 @@ struct eth_device {
int (*send) (struct eth_device*, void *packet, int length);
int (*recv) (struct eth_device*);
void (*halt) (struct eth_device*);
- int (*get_ethaddr) (struct eth_device*, unsigned char *adr);
- int (*set_ethaddr) (struct eth_device*, unsigned char *adr);
+ int (*get_ethaddr) (struct eth_device*, u8 adr[6]);
+ int (*set_ethaddr) (struct eth_device*, u8 adr[6]);
struct eth_device *next;
void *priv;
@@ -287,8 +287,8 @@ int string_to_ip(const char *s, IPaddr_t *ip);
IPaddr_t getenv_ip(const char *name);
int setenv_ip(const char *name, IPaddr_t ip);
-int string_to_ethaddr(const char *str, char *enetaddr);
-void ethaddr_to_string(const unsigned char *enetaddr, char *str);
+int string_to_ethaddr(const char *str, u8 enetaddr[6]);
+void ethaddr_to_string(const u8 enetaddr[6], char *str);
#ifdef CONFIG_NET_RESOLV
IPaddr_t resolv(char *host);