int port;
ether_card_t *ec;
message reply_mess;
- static int first_time = 1;
pci_init();
ec->flags |= ECF_BROAD;
ec->client = mp->m_source;
- if (first_time)
- {
- first_time = 0;
- ec_reinit(ec);
- }
+
+ ec_reinit(ec);
reply_mess.m_type = DL_CONF_REPLY;
reply_mess.m3_i1 = mp->DL_PORT;
eth_port->etp_osdep.etp_port= ecp->ec_port;
eth_port->etp_osdep.etp_task= tasknr;
+ eth_port->etp_osdep.etp_recvconf= 0;
eth_port->etp_osdep.etp_send_ev= 0;
ev_init(ð_port->etp_osdep.etp_recvev);
u32_t flags;
{
int r;
- unsigned dl_flags;
+ unsigned dl_flags, mask;
message mess, repl_mess;
assert(!eth_port->etp_vlan);
return;
}
+ mask = NWEO_EN_BROAD | NWEO_EN_MULTI | NWEO_EN_PROMISC;
+ if ((eth_port->etp_osdep.etp_recvconf & mask) == (flags & mask))
+ {
+ /* No change for the driver, so don't send an update */
+ return;
+ }
+
eth_port->etp_osdep.etp_recvconf= flags;
dl_flags= DL_NOMODE;
if (flags & NWEO_EN_BROAD)
#endif
FORWARD _PROTOTYPE ( void sr_reply_, (mq_t *m, int reply, int is_revive) );
FORWARD _PROTOTYPE ( sr_fd_t *sr_getchannel, (int minor));
-FORWARD _PROTOTYPE ( acc_t *sr_get_userdata, (int fd, vir_bytes offset,
- vir_bytes count, int for_ioctl) );
-FORWARD _PROTOTYPE ( int sr_put_userdata, (int fd, vir_bytes offset,
+FORWARD _PROTOTYPE ( acc_t *sr_get_userdata, (int fd, size_t offset,
+ size_t count, int for_ioctl) );
+FORWARD _PROTOTYPE ( int sr_put_userdata, (int fd, size_t offset,
acc_t *data, int for_ioctl) );
#ifdef __minix_vmd
#define sr_select_res 0
PRIVATE acc_t *sr_get_userdata (fd, offset, count, for_ioctl)
int fd;
-vir_bytes offset;
-vir_bytes count;
+size_t offset;
+size_t count;
int for_ioctl;
{
sr_fd_t *loc_fd;
PRIVATE int sr_put_userdata (fd, offset, data, for_ioctl)
int fd;
-vir_bytes offset;
+size_t offset;
acc_t *data;
int for_ioctl;
{