diff options
author | Wolfgang Denk <wd@denx.de> | 2008-01-23 14:20:49 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-01-23 14:20:49 +0100 |
commit | 2468592d79891fea4f39d0a414c7316f3af03f4c (patch) | |
tree | c1fc8b7d4306e4930e5afd63793decb10be2166c /board/bf537-stamp/bf537-stamp.c | |
parent | 8f00731818f0f0deaca899bde56de98d3d95c0b6 (diff) | |
parent | e16925773211291b562e77187061e9dd1d757217 (diff) | |
download | u-boot-imx-2468592d79891fea4f39d0a414c7316f3af03f4c.zip u-boot-imx-2468592d79891fea4f39d0a414c7316f3af03f4c.tar.gz u-boot-imx-2468592d79891fea4f39d0a414c7316f3af03f4c.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-net
Diffstat (limited to 'board/bf537-stamp/bf537-stamp.c')
-rw-r--r-- | board/bf537-stamp/bf537-stamp.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c index b3d8bda..6954b30 100644 --- a/board/bf537-stamp/bf537-stamp.c +++ b/board/bf537-stamp/bf537-stamp.c @@ -30,8 +30,25 @@ #include <command.h> #include <asm/blackfin.h> #include <asm/io.h> +#include <net.h> #include "ether_bf537.h" +/** + * is_valid_ether_addr - Determine if the given Ethernet address is valid + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not + * a multicast address, and is not FF:FF:FF:FF:FF:FF. + * + * Return true if the address is valid. + */ +static inline int is_valid_ether_addr(const u8 * addr) +{ + /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to + * explicitly check for it here. */ + return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); +} + DECLARE_GLOBAL_DATA_PTR; #define POST_WORD_ADDR 0xFF903FFC |