Date: Mon, 11 Dec 2006 23:21:11 GMT From: Bernd Walter <ticso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111509 for review Message-ID: <200612112321.kBBNLBdW027393@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111509 Change 111509 by ticso@ticso on 2006/12/11 23:20:33 add VLAN_MTU support Affected files ... .. //depot/projects/arm/src/sys/arm/at91/if_ate.c#65 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#65 (text+ko) ==== @@ -205,6 +205,8 @@ if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capenable |= IFCAP_VLAN_MTU; /* the hw bits already set */ ifp->if_start = atestart; ifp->if_ioctl = ateioctl; ifp->if_init = ateinit; @@ -306,6 +308,9 @@ } IF_ADDR_UNLOCK(sc->ifp); + /* enable big packets */ + WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_BIG); + /* * Write the hash to the hash register. This card can also * accept unicast packets as well as multicast packets using this @@ -822,7 +827,7 @@ */ WR4(sc, ETH_TAR, segs[0].ds_addr); WR4(sc, ETH_TCR, segs[0].ds_len); - + /* * Tap off here if there is a bpf listener. */ @@ -914,7 +919,7 @@ struct ate_softc *sc = ifp->if_softc; struct mii_data *mii; struct ifreq *ifr = (struct ifreq *)data; - int error = 0; + int mask, error = 0; switch (cmd) { case SIOCSIFFLAGS: @@ -944,6 +949,13 @@ mii = device_get_softc(sc->miibus); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd); break; + case SIOCSIFCAP: + mask = ifp->if_capenable ^ ifr->ifr_reqcap; + if (mask & IFCAP_VLAN_MTU) { + ATE_LOCK(sc); + ifp->if_capenable ^= IFCAP_VLAN_MTU; + ATE_UNLOCK(sc); + } default: error = ether_ioctl(ifp, cmd, data); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612112321.kBBNLBdW027393>