Mercurial > ecos
changeset 1293:d1261134d7f8
Remove duplicated structure __local_enet_addr
| author | gthomas |
|---|---|
| date | Thu, 09 Oct 2003 20:23:52 +0000 |
| parents | 2f008c4111e7 |
| children | 162280f0d804 |
| files | packages/io/eth/current/ChangeLog packages/io/eth/current/src/stand_alone/eth_drv.c |
| diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/eth/current/ChangeLog +++ b/packages/io/eth/current/ChangeLog @@ -1,3 +1,8 @@ +2003-10-09 Gary Thomas <gary@mlbassoc.com> + + * src/stand_alone/eth_drv.c: Obviate __local_enet_addr, since this + same information is already kept in the driver structure *__local_enet_sc + 2003-08-19 Gary Thomas <gary@mlbassoc.com> * src/stand_alone/eth_drv.c:
--- a/packages/io/eth/current/src/stand_alone/eth_drv.c +++ b/packages/io/eth/current/src/stand_alone/eth_drv.c @@ -86,7 +86,6 @@ int cyg_io_eth_net_debug = CYGDBG_IO_ETH #define DIAG_DUMP_BUF_BDY( a, b ) #endif -unsigned char __local_enet_addr[ETHER_ADDR_LEN+2]; struct eth_drv_sc *__local_enet_sc = NULL; #ifdef CYGSEM_IO_ETH_DRIVERS_PASS_PACKETS @@ -227,7 +226,6 @@ eth_drv_init(struct eth_drv_sc *sc, unsi if (enaddr != 0) { // Set up hardware address memcpy(&sc->sc_arpcom.esa, enaddr, ETHER_ADDR_LEN); - memcpy(__local_enet_addr, enaddr, ETHER_ADDR_LEN); __local_enet_sc = sc; eth_drv_start(sc); } @@ -280,7 +278,7 @@ eth_drv_write(char *eth_hdr, char *buf, old_state = sc->state; if (!old_state & ETH_DRV_STATE_ACTIVE) { // This interface not fully initialized, do it now - (sc->funs->start)(sc, (unsigned char *)&__local_enet_addr, 0); + (sc->funs->start)(sc, (unsigned char *)sc->sc_arpcom.esa, 0); sc->state |= ETH_DRV_STATE_ACTIVE; } } @@ -392,7 +390,7 @@ eth_drv_read(char *eth_hdr, char *buf, i old_state = sc->state; if (!old_state & ETH_DRV_STATE_ACTIVE) { // This interface not fully initialized, do it now - (sc->funs->start)(sc, (unsigned char *)&__local_enet_addr, 0); + (sc->funs->start)(sc, (unsigned char *)sc->sc_arpcom.esa, 0); sc->state |= ETH_DRV_STATE_ACTIVE; } }
