Lines Matching refs:of

11  * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
14 * notice, this list of conditions and the following disclaimer in the
16 * 3. All advertising materials mentioning features or use of this software
19 * 4. The name of TooLs GmbH may not be used to endorse or promote products
107 struct ofnet_softc *of = device_private(self);
108 struct ifnet *ifp = &of->sc_ethercom.ec_if;
114 of->sc_dev = self;
116 of->sc_phandle = oba->oba_phandle;
121 (path[l] = 0, !(of->sc_ihandle = OF_open(path))))
128 callout_init(&of->sc_callout, 0);
130 strlcpy(ifp->if_xname, device_xname(of->sc_dev), IFNAMSIZ);
131 ifp->if_softc = of;
145 ofnet_read(struct ofnet_softc *of)
147 struct ifnet *ifp = &of->sc_ethercom.ec_if;
155 len = OF_read(of->sc_ihandle, buf, sizeof buf);
244 struct ofnet_softc *of = arg;
246 ofnet_read(of);
247 callout_reset(&of->sc_callout, 1, ofnet_timer, of);
251 ofnet_init(struct ofnet_softc *of)
253 struct ifnet *ifp = &of->sc_ethercom.ec_if;
260 ofnet_timer(of);
266 ofnet_stop(struct ofnet_softc *of)
268 callout_stop(&of->sc_callout);
269 of->sc_ethercom.ec_if.if_flags &= ~IFF_RUNNING;
275 struct ofnet_softc *of = ifp->if_softc;
285 ofnet_read(of);
323 if (OF_write(of->sc_ihandle, buf, len) != len)
333 struct ofnet_softc *of = ifp->if_softc;
351 ofnet_init(of);
360 ofnet_stop(of);
364 ofnet_init(of);
381 struct ofnet_softc *of = ifp->if_softc;
383 log(LOG_ERR, "%s: device timeout\n", device_xname(of->sc_dev));
385 ofnet_stop(of);
386 ofnet_init(of);