diff options
Diffstat (limited to 'sys/i386/isa/if_el.c')
-rw-r--r-- | sys/i386/isa/if_el.c | 109 |
1 files changed, 4 insertions, 105 deletions
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c index 0a15537..c67aaee 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -6,7 +6,7 @@ * * Questions, comments, bug reports and fixes to kimmel@cs.umass.edu. * - * $Id: if_el.c,v 1.40 1999/01/12 01:29:42 eivind Exp $ + * $Id: if_el.c,v 1.41 1999/07/06 19:22:45 des Exp $ */ /* Except of course for the portions of code lifted from other FreeBSD * drivers (mainly elread, elget and el_ioctl) @@ -33,21 +33,6 @@ #include <net/if.h> -#ifdef INET -#include <netinet/in.h> -#include <netinet/if_ether.h> -#endif - -#ifdef IPX -#include <netipx/ipx.h> -#include <netipx/ipx_if.h> -#endif - -#ifdef NS -#include <netns/ns.h> -#include <netns/ns_if.h> -#endif - #if NBPF > 0 #include <net/bpf.h> #endif @@ -651,7 +636,6 @@ el_ioctl(ifp, command, data) u_long command; caddr_t data; { - register struct ifaddr *ifa = (struct ifaddr *)data; struct el_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -659,82 +643,10 @@ el_ioctl(ifp, command, data) s = splimp(); switch (command) { - - case SIOCSIFADDR: - ifp->if_flags |= IFF_UP; - - switch (ifa->ifa_addr->sa_family) { -#ifdef INET - case AF_INET: - el_init(ifp->if_unit); /* before arpwhohas */ - arp_ifinit((struct arpcom *)ifp, ifa); - break; -#endif -#ifdef IPX - /* - * XXX - This code is probably wrong - */ - case AF_IPX: - { - register struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); - - if (ipx_nullhost(*ina)) - ina->x_host = - *(union ipx_host *)(sc->arpcom.ac_enaddr); - else { - /* - * - */ - bcopy((caddr_t)ina->x_host.c_host, - (caddr_t)sc->arpcom.ac_enaddr, - sizeof(sc->arpcom.ac_enaddr)); - } - /* - * Set new address - */ - el_init(ifp->if_unit); - break; - } -#endif -#ifdef NS - /* - * XXX - This code is probably wrong - */ - case AF_NS: - { - register struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr); - - if (ns_nullhost(*ina)) - ina->x_host = - *(union ns_host *)(sc->arpcom.ac_enaddr); - else { - /* - * - */ - bcopy((caddr_t)ina->x_host.c_host, - (caddr_t)sc->arpcom.ac_enaddr, - sizeof(sc->arpcom.ac_enaddr)); - } - /* - * Set new address - */ - el_init(ifp->if_unit); - break; - } -#endif - default: - el_init(ifp->if_unit); - break; - } - break; - + case SIOCSIFADDR: case SIOCGIFADDR: - { - struct sockaddr *sa; - sa = (struct sockaddr *)&ifr->ifr_data; - bcopy((caddr_t)sc->arpcom.ac_enaddr, - (caddr_t) sa->sa_data, ETHER_ADDR_LEN); - } + case SIOCSIFMTU: + error = ether_ioctl(ifp, command, data); break; case SIOCSIFFLAGS: @@ -754,19 +666,6 @@ el_ioctl(ifp, command, data) el_init(ifp->if_unit); } break; - - case SIOCSIFMTU: - - /* - * Set the interface MTU. - */ - if (ifr->ifr_mtu > ETHERMTU) { - error = EINVAL; - } else { - ifp->if_mtu = ifr->ifr_mtu; - } - break; - default: error = EINVAL; } |