From 50ab3b569da8e761f6bdf8d8811b1bfe42b7b8c5 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Mon, 19 May 2014 19:19:14 +0200 Subject: [PATCH] Message type for DL_CONF{,_REPLY} Change-Id: Ib0e435875b6f5cacdcbc8593f9a887b0a4c472c1 --- drivers/atl2/atl2.c | 7 ++++--- drivers/dec21140A/dec21140A.c | 13 ++++++++----- drivers/dp8390/dp8390.c | 22 +++++++++++++--------- drivers/dpeth/dp.c | 13 ++++++++----- drivers/e1000/e1000.c | 7 ++++--- drivers/fxp/fxp.c | 14 ++++++++------ drivers/lan8710a/lan8710a.c | 8 +++++--- drivers/lance/lance.c | 18 ++++++++++-------- drivers/orinoco/orinoco.c | 13 +++++++------ drivers/rtl8139/rtl8139.c | 14 ++++++++------ drivers/rtl8169/rtl8169.c | 14 ++++++++------ drivers/virtio_net/virtio_net.c | 7 +++---- include/minix/com.h | 2 -- include/minix/ipc.h | 19 +++++++++++++++++++ servers/inet/mnx_eth.c | 8 +++++--- servers/lwip/driver.c | 3 ++- servers/lwip/eth.c | 8 ++++---- 17 files changed, 116 insertions(+), 74 deletions(-) diff --git a/drivers/atl2/atl2.c b/drivers/atl2/atl2.c index 760f18dfb..b8fc1bf09 100644 --- a/drivers/atl2/atl2.c +++ b/drivers/atl2/atl2.c @@ -1026,7 +1026,7 @@ static void atl2_conf(message *m) ether_addr_t addr; int r; - state.mode = m->DL_MODE; + state.mode = m->m_net_netdrv_dl_conf.mode; atl2_set_mode(); @@ -1037,10 +1037,11 @@ static void atl2_conf(message *m) addr.ea_addr[4] = (state.hwaddr[0] >> 8) & 0xff; addr.ea_addr[5] = state.hwaddr[0] & 0xff; - memcpy(m->DL_HWADDR, &addr, sizeof(addr)); + memcpy(m->m_netdrv_net_dl_conf.hw_addr, &addr, + sizeof(m->m_netdrv_net_dl_conf.hw_addr)); m->m_type = DL_CONF_REPLY; - m->DL_STAT = OK; + m->m_netdrv_net_dl_conf.stat = OK; if ((r = ipc_send(m->m_source, m)) != OK) printf("ATL2: unable to send reply (%d)\n", r); diff --git a/drivers/dec21140A/dec21140A.c b/drivers/dec21140A/dec21140A.c index 8c5a4a184..35514e3b3 100644 --- a/drivers/dec21140A/dec21140A.c +++ b/drivers/dec21140A/dec21140A.c @@ -230,10 +230,12 @@ static void do_conf(const message * mp) /* TODO CHECK PROMISC AND MULTI */ dep->de_flags &= NOT(DEF_PROMISC | DEF_MULTI | DEF_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) dep->de_flags |= DEF_PROMISC | DEF_MULTI | DEF_BROAD; - if (mp->DL_MODE & DL_MULTI_REQ) dep->de_flags |= DEF_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) dep->de_flags |= DEF_BROAD; + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) + dep->de_flags |= DEF_MULTI; + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) + dep->de_flags |= DEF_BROAD; break; case DEM_SINK: @@ -246,9 +248,10 @@ static void do_conf(const message * mp) } reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = r; + reply_mess.m_netdrv_net_dl_conf.stat = r; if(r == OK){ - *(ether_addr_t *) reply_mess.DL_HWADDR = dep->de_address; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, dep->de_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); } if (ipc_send(mp->m_source, &reply_mess) != OK) diff --git a/drivers/dp8390/dp8390.c b/drivers/dp8390/dp8390.c index 660cfc04a..cfd50a846 100644 --- a/drivers/dp8390/dp8390.c +++ b/drivers/dp8390/dp8390.c @@ -514,8 +514,8 @@ static void do_init(message *mp) if (dep->de_mode == DEM_DISABLED) { /* Probe failed, or the device is configured off. */ - reply_mess.m_type= DL_CONF_REPLY; - reply_mess.DL_STAT= ENXIO; + reply_mess.m_type = DL_CONF_REPLY; + reply_mess.m_netdrv_net_dl_conf.stat = ENXIO; mess_reply(mp, &reply_mess); return; } @@ -529,8 +529,10 @@ static void do_init(message *mp) dep->de_address.ea_addr[5] = de_instance; dp_confaddr(dep); reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = dep->de_address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, + dep->de_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); return; } @@ -539,18 +541,20 @@ static void do_init(message *mp) dep->de_flags &= ~(DEF_PROMISC | DEF_MULTI | DEF_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) dep->de_flags |= DEF_PROMISC | DEF_MULTI | DEF_BROAD; - if (mp->DL_MODE & DL_MULTI_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) dep->de_flags |= DEF_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) dep->de_flags |= DEF_BROAD; dp_reinit(dep); reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = dep->de_address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, dep->de_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); } diff --git a/drivers/dpeth/dp.c b/drivers/dpeth/dp.c index e8f2b8097..7c0edbc73 100644 --- a/drivers/dpeth/dp.c +++ b/drivers/dpeth/dp.c @@ -278,10 +278,12 @@ static void do_init(const message * mp) dep->de_flags |= DEF_ENABLED; } dep->de_flags &= NOT(DEF_PROMISC | DEF_MULTI | DEF_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) dep->de_flags |= DEF_PROMISC | DEF_MULTI | DEF_BROAD; - if (mp->DL_MODE & DL_MULTI_REQ) dep->de_flags |= DEF_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) dep->de_flags |= DEF_BROAD; + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) + dep->de_flags |= DEF_MULTI; + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) + dep->de_flags |= DEF_BROAD; (*dep->de_flagsf) (dep); break; @@ -295,9 +297,10 @@ static void do_init(const message * mp) } reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = r; + reply_mess.m_netdrv_net_dl_conf.stat = r; if (r == OK) - *(ether_addr_t *) reply_mess.DL_HWADDR = dep->de_address; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, dep->de_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); DEBUG(printf("\t reply %d\n", reply_mess.m_type)); if (ipc_send(mp->m_source, &reply_mess) != OK) /* Can't send */ panic(SendErrMsg, mp->m_source); diff --git a/drivers/e1000/e1000.c b/drivers/e1000/e1000.c index afbf4160e..0b1449d99 100644 --- a/drivers/e1000/e1000.c +++ b/drivers/e1000/e1000.c @@ -189,14 +189,15 @@ static void e1000_init(message *mp) if (!(e->status & E1000_ENABLED) && !(e1000_init_hw(e))) { reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = ENXIO; + reply_mess.m_netdrv_net_dl_conf.stat = ENXIO; mess_reply(mp, &reply_mess); return; } /* Reply back to INET. */ reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = e->address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, e->address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); } diff --git a/drivers/fxp/fxp.c b/drivers/fxp/fxp.c index ff24d7f5e..d53c27f48 100644 --- a/drivers/fxp/fxp.c +++ b/drivers/fxp/fxp.c @@ -366,7 +366,7 @@ message *mp; { /* Probe failed, or the device is configured off. */ reply_mess.m_type= DL_CONF_REPLY; - reply_mess.DL_STAT= ENXIO; + reply_mess.m_netdrv_net_dl_conf.stat= ENXIO; mess_reply(mp, &reply_mess); return; } @@ -380,18 +380,20 @@ message *mp; fp->fxp_flags &= ~(FF_PROMISC | FF_MULTI | FF_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) fp->fxp_flags |= FF_PROMISC; - if (mp->DL_MODE & DL_MULTI_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) fp->fxp_flags |= FF_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) fp->fxp_flags |= FF_BROAD; fxp_rec_mode(fp); reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = fp->fxp_address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, + fp->fxp_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); } diff --git a/drivers/lan8710a/lan8710a.c b/drivers/lan8710a/lan8710a.c index 69e37b9d7..4f6452dce 100644 --- a/drivers/lan8710a/lan8710a.c +++ b/drivers/lan8710a/lan8710a.c @@ -246,14 +246,16 @@ message *m; if (!(lan8710a_state.status & LAN8710A_ENABLED) && !(lan8710a_init_hw())) { reply.m_type = DL_CONF_REPLY; - reply.DL_STAT = ENXIO; + reply.m_netdrv_net_dl_conf.stat = ENXIO; mess_reply(m, &reply); return; } /* Reply back to INET. */ reply.m_type = DL_CONF_REPLY; - reply.DL_STAT = OK; - *(ether_addr_t *) reply.DL_HWADDR = lan8710a_state.address; + reply.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply.m_netdrv_net_dl_conf.hw_addr, + lan8710a_state.address, + sizeof(reply.m_netdrv_net_dl_conf.hw_addr)); mess_reply(m, &reply); } diff --git a/drivers/lance/lance.c b/drivers/lance/lance.c index 05e177f68..0d2017de5 100644 --- a/drivers/lance/lance.c +++ b/drivers/lance/lance.c @@ -485,7 +485,7 @@ message *mp; { /* Probe failed, or the device is configured off. */ reply_mess.m_type= DL_CONF_REPLY; - reply_mess.DL_STAT = ENXIO; + reply_mess.m_netdrv_net_dl_conf.stat = ENXIO; mess_reply(mp, &reply_mess); return; } @@ -503,8 +503,9 @@ message *mp; ec->mac_address.ea_addr[5] = 0; ec_confaddr(ec); reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = ec->mac_address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, ec->mac_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); return; } @@ -513,18 +514,19 @@ message *mp; ec->flags &= ~(ECF_PROMISC | ECF_MULTI | ECF_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) ec->flags |= ECF_PROMISC | ECF_MULTI | ECF_BROAD; - if (mp->DL_MODE & DL_MULTI_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) ec->flags |= ECF_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) ec->flags |= ECF_BROAD; ec_reinit(ec); reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = ec->mac_address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, ec->mac_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); } diff --git a/drivers/orinoco/orinoco.c b/drivers/orinoco/orinoco.c index 501638a57..234320147 100644 --- a/drivers/orinoco/orinoco.c +++ b/drivers/orinoco/orinoco.c @@ -434,7 +434,7 @@ static void or_init (message * mp) { or_init_struct (orp); if (orp->or_mode == OR_M_DISABLED) { reply.m_type = DL_CONF_REPLY; - reply.DL_STAT = ENXIO; + reply.m_netdrv_net_dl_conf.stat = ENXIO; mess_reply (mp, &reply); return; } @@ -452,19 +452,20 @@ static void or_init (message * mp) { * multicasting, promiscuity, broadcasting, depending on the users * needs */ orp->or_flags &= ~(OR_F_PROMISC | OR_F_MULTI | OR_F_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) orp->or_flags |= OR_F_PROMISC; - if (mp->DL_MODE & DL_MULTI_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) orp->or_flags |= OR_F_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) orp->or_flags |= OR_F_BROAD; or_rec_mode (orp); /* reply the caller that the configuration succeeded */ reply.m_type = DL_CONF_REPLY; - reply.DL_STAT = OK; - *(ether_addr_t *) reply.DL_HWADDR = orp->or_address; + reply.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply.m_netdrv_net_dl_conf.hw_addr, orp->or_address.ea_addr, + sizeof(reply.m_netdrv_net_dl_conf.hw_addr)); mess_reply (mp, &reply); } diff --git a/drivers/rtl8139/rtl8139.c b/drivers/rtl8139/rtl8139.c index f13966bc0..09b33fe2b 100644 --- a/drivers/rtl8139/rtl8139.c +++ b/drivers/rtl8139/rtl8139.c @@ -350,7 +350,7 @@ message *mp; { /* Probe failed, or the device is configured off. */ reply_mess.m_type= DL_CONF_REPLY; - reply_mess.DL_STAT= ENXIO; + reply_mess.m_netdrv_net_dl_conf.stat= ENXIO; mess_reply(mp, &reply_mess); return; } @@ -366,18 +366,20 @@ message *mp; rep->re_flags &= ~(REF_PROMISC | REF_MULTI | REF_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) rep->re_flags |= REF_PROMISC; - if (mp->DL_MODE & DL_MULTI_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) rep->re_flags |= REF_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) rep->re_flags |= REF_BROAD; rl_rec_mode(rep); reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = rep->re_address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, + rep->re_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); } diff --git a/drivers/rtl8169/rtl8169.c b/drivers/rtl8169/rtl8169.c index ed5e9588f..f80cf77f6 100644 --- a/drivers/rtl8169/rtl8169.c +++ b/drivers/rtl8169/rtl8169.c @@ -557,7 +557,7 @@ message *mp; if (rep->re_mode == REM_DISABLED) { /* Probe failed, or the device is configured off. */ reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = ENXIO; + reply_mess.m_netdrv_net_dl_conf.stat = ENXIO; mess_reply(mp, &reply_mess); return; } @@ -570,18 +570,20 @@ message *mp; rep->re_flags &= ~(REF_PROMISC | REF_MULTI | REF_BROAD); - if (mp->DL_MODE & DL_PROMISC_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_PROMISC_REQ) rep->re_flags |= REF_PROMISC; - if (mp->DL_MODE & DL_MULTI_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_MULTI_REQ) rep->re_flags |= REF_MULTI; - if (mp->DL_MODE & DL_BROAD_REQ) + if (mp->m_net_netdrv_dl_conf.mode & DL_BROAD_REQ) rep->re_flags |= REF_BROAD; rl_rec_mode(rep); reply_mess.m_type = DL_CONF_REPLY; - reply_mess.DL_STAT = OK; - *(ether_addr_t *) reply_mess.DL_HWADDR = rep->re_address; + reply_mess.m_netdrv_net_dl_conf.stat = OK; + memcpy(reply_mess.m_netdrv_net_dl_conf.hw_addr, + rep->re_address.ea_addr, + sizeof(reply_mess.m_netdrv_net_dl_conf.hw_addr)); mess_reply(mp, &reply_mess); } diff --git a/drivers/virtio_net/virtio_net.c b/drivers/virtio_net/virtio_net.c index 10a8363d2..fd6ac4d3c 100644 --- a/drivers/virtio_net/virtio_net.c +++ b/drivers/virtio_net/virtio_net.c @@ -531,12 +531,11 @@ virtio_net_conf(message *m) } /* Prepare reply */ - for (i = 0; i < sizeof(virtio_net_mac); i++) - ((u8_t*)reply.DL_HWADDR)[i] = virtio_net_mac[i]; + memcpy(reply.m_netdrv_net_dl_conf.hw_addr, virtio_net_mac, + sizeof(reply.m_netdrv_net_dl_conf.hw_addr)); reply.m_type = DL_CONF_REPLY; - reply.DL_STAT = OK; - reply.DL_COUNT = 0; + reply.m_netdrv_net_dl_conf.stat = OK; if ((r = ipc_send(m->m_source, &reply)) != OK) panic("%s: ipc_send to %d failed (%d)", name, m->m_source, r); diff --git a/include/minix/com.h b/include/minix/com.h index 7736cb0c3..6ca15fabd 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -180,11 +180,9 @@ /* Field names for data link layer messages. */ #define DL_COUNT m2_i3 -#define DL_MODE m2_l1 #define DL_FLAGS m2_l1 #define DL_GRANT m2_l2 #define DL_STAT m3_i1 -#define DL_HWADDR m3_ca1 /* Bits in 'DL_FLAGS' field of DL replies. */ # define DL_NOFLAGS 0x00 diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 9e362a91d..051c7b7b2 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -813,6 +813,21 @@ typedef struct { } mess_lsys_vfs_mapdriver; _ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver); +typedef struct { + int mode; + + uint8_t padding[52]; +} mess_net_netdrv_dl_conf; +_ASSERT_MSG_SIZE(mess_net_netdrv_dl_conf); + +typedef struct { + int stat; + uint8_t hw_addr[6]; + + uint8_t padding[46]; +} mess_netdrv_net_dl_conf; +_ASSERT_MSG_SIZE(mess_netdrv_net_dl_conf); + typedef struct { uid_t egid; @@ -1393,6 +1408,10 @@ typedef struct { mess_lsys_vfs_copyfd m_lsys_vfs_copyfd; mess_lsys_vfs_mapdriver m_lsys_vfs_mapdriver; + mess_net_netdrv_dl_conf m_net_netdrv_dl_conf; + + mess_netdrv_net_dl_conf m_netdrv_net_dl_conf; + mess_pci_lsys_busc_get_bar m_pci_lsys_busc_get_bar; mess_pm_lexec_exec_new m_pm_lexec_exec_new; diff --git a/servers/inet/mnx_eth.c b/servers/inet/mnx_eth.c index 1625b4fb6..002e22fd1 100644 --- a/servers/inet/mnx_eth.c +++ b/servers/inet/mnx_eth.c @@ -232,7 +232,9 @@ void eth_rec(message *m) loc_port->etp_osdep.etp_state= OEPS_IDLE; loc_port->etp_flags |= EPF_ENABLED; - loc_port->etp_ethaddr= *(ether_addr_t *)m->DL_HWADDR; + memcpy(loc_port->etp_ethaddr.ea_addr, + m->m_netdrv_net_dl_conf.hw_addr, + sizeof(loc_port->etp_ethaddr.ea_addr)); if (!(loc_port->etp_flags & EPF_GOT_ADDR)) { loc_port->etp_flags |= EPF_GOT_ADDR; @@ -475,7 +477,7 @@ u32_t flags; dl_flags |= DL_PROMISC_REQ; mess.m_type= DL_CONF; - mess.DL_MODE= dl_flags; + mess.m_net_netdrv_dl_conf.mode = dl_flags; assert(eth_port->etp_osdep.etp_state == OEPS_IDLE); r= asynsend(eth_port->etp_osdep.etp_task, &mess); @@ -795,7 +797,7 @@ static void eth_restart(eth_port_t *eth_port, endpoint_t endpoint) if (flags & NWEO_EN_PROMISC) dl_flags |= DL_PROMISC_REQ; mess.m_type= DL_CONF; - mess.DL_MODE= dl_flags; + mess.m_net_netdrv_dl_conf.mode= dl_flags; compare(eth_port->etp_osdep.etp_state, ==, OEPS_IDLE); r= asynsend(eth_port->etp_osdep.etp_task, &mess); diff --git a/servers/lwip/driver.c b/servers/lwip/driver.c index b0761ee66..96464d4a7 100644 --- a/servers/lwip/driver.c +++ b/servers/lwip/driver.c @@ -156,7 +156,8 @@ static void driver_setup_read(struct nic * nic) static void nic_up(struct nic * nic, message * m) { - memcpy(nic->netif.hwaddr, m->DL_HWADDR, NETIF_MAX_HWADDR_LEN); + memcpy(nic->netif.hwaddr, m->m_netdrv_net_dl_conf.hw_addr, + sizeof(nic->netif.hwaddr)); debug_print("device %s is up MAC : %02x:%02x:%02x:%02x:%02x:%02x", nic->name, diff --git a/servers/lwip/eth.c b/servers/lwip/eth.c index 74890e5e6..8b65c01ca 100644 --- a/servers/lwip/eth.c +++ b/servers/lwip/eth.c @@ -103,13 +103,13 @@ static void low_level_init(struct netif *netif) /* device capabilities */ netif->flags = NETIF_FLAG_ETHARP; - m.DL_MODE = DL_NOMODE; + m.m_net_netdrv_dl_conf.mode = DL_NOMODE; if (nic->flags & NWEO_EN_BROAD) - m.DL_MODE |= DL_BROAD_REQ; + m.m_net_netdrv_dl_conf.mode |= DL_BROAD_REQ; if (nic->flags & NWEO_EN_MULTI) - m.DL_MODE |= DL_MULTI_REQ; + m.m_net_netdrv_dl_conf.mode |= DL_MULTI_REQ; if (nic->flags & NWEO_EN_PROMISC) - m.DL_MODE |= DL_PROMISC_REQ; + m.m_net_netdrv_dl_conf.mode |= DL_PROMISC_REQ; m.m_type = DL_CONF;