Moved MAC and ethernet definitions to include/net/ethernet.h

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@443 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-12-11 14:28:16 +00:00
parent 92f5f04d9c
commit 177e5b34d5
2 changed files with 6 additions and 4 deletions

View File

@ -57,6 +57,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <net/ethernet.h>
#include <net/uip/uip.h> #include <net/uip/uip.h>
#include <net/uip/uip-arp.h> #include <net/uip/uip-arp.h>
#include <net/uip/uip-arch.h> #include <net/uip/uip-arch.h>
@ -2054,7 +2055,7 @@ static void c5471_reset(struct c5471_driver_s *c5471)
static void c5471_macassign(struct c5471_driver_s *c5471) static void c5471_macassign(struct c5471_driver_s *c5471)
{ {
struct uip_driver_s *dev = &c5471->c_dev; struct uip_driver_s *dev = &c5471->c_dev;
uint8 *mptr = dev->d_mac.addr; uint8 *mptr = dev->d_mac.ether_addr_octet;
register uint32 tmp; register uint32 tmp;
ndbg("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n", ndbg("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",

View File

@ -50,6 +50,7 @@
#include <sched.h> #include <sched.h>
#include <nuttx/net.h> #include <nuttx/net.h>
#include <net/ethernet.h>
#include <net/uip/uip.h> #include <net/uip/uip.h>
#include <net/uip/uip-arch.h> #include <net/uip/uip-arch.h>
#include <net/uip/uip-arp.h> #include <net/uip/uip-arp.h>
@ -106,9 +107,9 @@ void timer_reset(struct timer *t)
#ifdef CONFIG_NET_PROMISCUOUS #ifdef CONFIG_NET_PROMISCUOUS
# define up_comparemac(a,b) (0) # define up_comparemac(a,b) (0)
#else #else
static inline int up_comparemac(struct uip_eth_addr *paddr1, struct uip_eth_addr *paddr2) static inline int up_comparemac(struct ether_addr *paddr1, struct ether_addr *paddr2)
{ {
return memcmp(paddr1, paddr2, sizeof(struct uip_eth_addr)); return memcmp(paddr1, paddr2, sizeof(struct ether_addr));
} }
#endif #endif
@ -212,7 +213,7 @@ int uipdriver_init(void)
timer_set(&g_periodic_timer, 500); timer_set(&g_periodic_timer, 500);
tapdev_init(); tapdev_init();
(void)tapdev_getmacaddr(g_sim_dev.d_mac.addr); (void)tapdev_getmacaddr(g_sim_dev.d_mac.ether_addr_octet);
/* Register the device with the OS so that socket IOCTLs can be performed */ /* Register the device with the OS so that socket IOCTLs can be performed */