summaryrefslogtreecommitdiffstats
path: root/sys/dev/ie
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>1999-08-18 06:12:00 +0000
committermdodd <mdodd@FreeBSD.org>1999-08-18 06:12:00 +0000
commit1976ef16a8708201289ddbec33fc0efe7ceb061e (patch)
treeab89143e0a8b4c6b13874c23c8779c2641228422 /sys/dev/ie
parent212887c836affc05f828e3fddd4dc1b80085f08f (diff)
downloadFreeBSD-src-1976ef16a8708201289ddbec33fc0efe7ceb061e.zip
FreeBSD-src-1976ef16a8708201289ddbec33fc0efe7ceb061e.tar.gz
SIOCSIFADDR, SIOCGIFADDR, and SIOCSIFMTU are implemented in
sys/net/if_ethersubr.c:ether_ioctl(). Drivers need not implement generic behavior. PR: kern/12126 Submitted by: in part by Boris Popov <bp@butya.kz>
Diffstat (limited to 'sys/dev/ie')
-rw-r--r--sys/dev/ie/if_ie.c100
1 files changed, 5 insertions, 95 deletions
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index a41b0b0..0cfa9dd 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -47,7 +47,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.60 1999/05/13 12:21:41 bde Exp $
+ * $Id: if_ie.c,v 1.61 1999/07/06 19:22:49 des Exp $
*/
/*
@@ -127,21 +127,6 @@ iomem and and with 0xffff.
#include "bpf.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
-
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -2258,80 +2243,16 @@ ie_stop(int unit)
static int
ieioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
- struct ifaddr *ifa = (struct ifaddr *) data;
-#if defined(IPX) || defined(NS)
- struct ie_softc *ie = ifp->if_softc;
-#endif
struct ifreq *ifr = (struct ifreq *) data;
int s, error = 0;
s = splimp();
switch (command) {
- case SIOCSIFADDR:
- ifp->if_flags |= IFF_UP;
-
- switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
- case AF_INET:
- ieinit(ifp->if_unit);
- arp_ifinit((struct arpcom *) ifp, ifa);
- break;
-#endif /* INET */
-
-#ifdef IPX
- /*
- * This magic copied from if_is.c; I don't use XNS,
- * so I have no way of telling if this actually
- * works or not.
- */
- case AF_IPX:
- {
- struct ipx_addr *ina =
- &(IA_SIPX(ifa)->sipx_addr);
-
- if (ipx_nullhost(*ina)) {
- ina->x_host = *(union ipx_host *) (ie->arpcom.ac_enaddr);
- } else {
- ifp->if_flags &= ~IFF_RUNNING;
- bcopy((caddr_t) ina->x_host.c_host,
- (caddr_t) ie->arpcom.ac_enaddr,
- sizeof ie->arpcom.ac_enaddr);
- }
-
- ieinit(ifp->if_unit);
- }
- break;
-#endif /* IPX */
-
-#ifdef NS
- /*
- * This magic copied from if_is.c; I don't use XNS,
- * so I have no way of telling if this actually
- * works or not.
- */
- case AF_NS:
- {
- struct ns_addr *ina = &(IA_SNS(ifa)->sns_addr);
-
- if (ns_nullhost(*ina)) {
- ina->x_host = *(union ns_host *)(ie->arpcom.ac_enaddr);
- } else {
- ifp->if_flags &= ~IFF_RUNNING;
- bcopy((caddr_t) ina->x_host.c_host,
- (caddr_t) ie->arpcom.ac_enaddr,
- sizeof ie->arpcom.ac_enaddr);
- }
-
- ieinit(ifp->if_unit);
- }
- break;
-#endif /* NS */
-
- default:
- ieinit(ifp->if_unit);
- break;
- }
+ case SIOCSIFADDR:
+ case SIOCGIFADDR:
+ case SIOCSIFMTU:
+ error = ether_ioctl(ifp, command, data);
break;
case SIOCSIFFLAGS:
@@ -2367,17 +2288,6 @@ ieioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = 0;
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;
}
OpenPOWER on IntegriCloud