]> Zhao Yanbai Git Server - minix.git/commitdiff
Message type for DL_CONF{,_REPLY}
authorLionel Sambuc <lionel@minix3.org>
Mon, 19 May 2014 17:19:14 +0000 (19:19 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:45 +0000 (17:05 +0200)
Change-Id: Ib0e435875b6f5cacdcbc8593f9a887b0a4c472c1

17 files changed:
drivers/atl2/atl2.c
drivers/dec21140A/dec21140A.c
drivers/dp8390/dp8390.c
drivers/dpeth/dp.c
drivers/e1000/e1000.c
drivers/fxp/fxp.c
drivers/lan8710a/lan8710a.c
drivers/lance/lance.c
drivers/orinoco/orinoco.c
drivers/rtl8139/rtl8139.c
drivers/rtl8169/rtl8169.c
drivers/virtio_net/virtio_net.c
include/minix/com.h
include/minix/ipc.h
servers/inet/mnx_eth.c
servers/lwip/driver.c
servers/lwip/eth.c

index 760f18dfbd5211363f9d80b585e102a9dedc9cf0..b8fc1bf097b87df9e84d232fa5242f6979f5c965 100644 (file)
@@ -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);
index 8c5a4a184ab828dadadf9b5d9413e9c45fe3d86c..35514e3b3dbbd3cb3458f634e00a7b81df4c181a 100644 (file)
@@ -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)
index 660cfc04a497ae90457649f23faf8fbb7b1808c9..cfd50a84678d6b31c6a9b3277cb975c87a4aa586 100644 (file)
@@ -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);
 }
index e8f2b8097a65320a791385527a58dbc5244f4d10..7c0edbc737f3b8d7f5f72dbf849ab4b13bac7a79 100644 (file)
@@ -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);
index afbf4160e1458bb411c3cb65e96c5f1107de323c..0b1449d99d620c798c5c542a0a47092f69440c0a 100644 (file)
@@ -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);
 }
 
index ff24d7f5e7c2e672e405b408f7c45f872e3bf198..d53c27f489d9cd68e946039f33d4dc5848602317 100644 (file)
@@ -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);
 }
index 69e37b9d74ba142f5fe4273caf597709e501b44f..4f6452dce4e9bd6adb25a0c8fb98c9f74c9fb0d2 100644 (file)
@@ -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);
 }
 
index 05e177f68a636a275ddbb026dba0baef921c3adb..0d2017de5d3d10c565c5975f01876d66914b127b 100644 (file)
@@ -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);
 }
index 501638a571b53785ad04271deb00c34889d52f93..234320147a63e27d8138767faf10c0258ba75d22 100644 (file)
@@ -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);
 }
 
index f13966bc0b2ed2e3c8658be298223404b2bf6f11..09b33fe2b5dc0a30e9deb160e037f2fd7be35a09 100644 (file)
@@ -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);
 }
index ed5e9588f82fc6ba4ea36b85b5c84a483b8f3d0a..f80cf77f603ca538079db011c3dfc84237ffda50 100644 (file)
@@ -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);
 }
index 10a8363d2971f97ed89e1b85666398fbd4ff7701..fd6ac4d3c37170d2f11717c0c99cdd1b16f182e1 100644 (file)
@@ -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);
index 7736cb0c38433c09a0a16dd3e02bbef186716b78..6ca15fabdc5f5d23b02f10b3e6b26dee0f0ff0f6 100644 (file)
 
 /* 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
index 9e362a91d13aad4424fdbb9ab518786f21cfff07..051c7b7b2ceab8995be1a91d99d00ebe11f2e62e 100644 (file)
@@ -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;
index 1625b4fb65b243a6228f5424f5d43026326b984c..002e22fd1e9df3920c81ea1477e348b138a54d79 100644 (file)
@@ -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);
index b0761ee66c263a25831913a6abe5dd4991eac936..96464d4a787c3834d54123253b70cd1755486103 100644 (file)
@@ -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,
index 74890e5e6f0c9300e0e46f03f2cb14640ec17bab..8b65c01cabe7ea428ce1317638072f30b9caf552 100644 (file)
@@ -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;