diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-07-02 21:57:20 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-07-02 21:57:20 +0000 |
commit | 360a1d83e4a679e850f74d856ddb2d514f53c41e (patch) | |
tree | 1ed1dcf69220f42b1a313fdfa8610bb4f37599fc /sys | |
parent | eb8f274932c791388bd6f5c932cfd5384a8c2420 (diff) |
- mbuf external storage is of (caddr_t), not (caddr_t *).
- check for MTU being too small with ETHERMIN
- don't bother reseting the card since it'll default to allowing Jumbos
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_sk.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 15627140236..f9b8bb3f3d0 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.67 2005/05/17 19:18:18 jason Exp $ */ +/* $OpenBSD: if_sk.c,v 1.68 2005/07/02 21:57:19 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -771,7 +771,7 @@ sk_newbuf(struct sk_if_softc *sc_if, int i, struct mbuf *m, struct sk_rx_desc *r; if (m == NULL) { - caddr_t *buf = NULL; + caddr_t buf = NULL; MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) @@ -1006,13 +1006,10 @@ sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) } break; case SIOCSIFMTU: - if (ifr->ifr_mtu > ETHERMTU_JUMBO) + if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU_JUMBO) error = EINVAL; - else { + else if (ifp->if_mtu != ifr->ifr_mtu) ifp->if_mtu = ifr->ifr_mtu; - ifp->if_flags &= ~IFF_RUNNING; - sk_init(sc_if); - } break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { |