• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/usb/net/

Lines Matching refs:ue

208 static int muge_attach_post_sub(struct usb_ether *ue);
1165 struct usb_ether *ue = &sc->sc_ue;
1166 struct ifnet *ifp = uether_getifp(ue);
1321 uether_rxmbuf(ue, m, pktlen - 4);
1335 uether_rxflush(ue);
1462 * @ue: the USB ethernet device
1468 muge_set_mac_addr(struct usb_ether *ue)
1470 struct muge_softc *sc = uether_getsc(ue);
1473 memset(ue->ue_eaddr, 0xff, ETHER_ADDR_LEN);
1481 ue->ue_eaddr[5] = (uint8_t)((mac_h >> 8) & 0xff);
1482 ue->ue_eaddr[4] = (uint8_t)((mac_h) & 0xff);
1483 ue->ue_eaddr[3] = (uint8_t)((mac_l >> 24) & 0xff);
1484 ue->ue_eaddr[2] = (uint8_t)((mac_l >> 16) & 0xff);
1485 ue->ue_eaddr[1] = (uint8_t)((mac_l >> 8) & 0xff);
1486 ue->ue_eaddr[0] = (uint8_t)((mac_l) & 0xff);
1494 if (ETHER_IS_VALID(ue->ue_eaddr)) {
1497 ETH_E2P_MAC_OFFSET, ue->ue_eaddr, ETHER_ADDR_LEN) == 0 &&
1498 ETHER_IS_VALID(ue->ue_eaddr)) {
1500 } else if (lan78xx_otp_read(sc, OTP_MAC_OFFSET, ue->ue_eaddr,
1501 ETHER_ADDR_LEN) == 0 && ETHER_IS_VALID(ue->ue_eaddr)) {
1506 /* ue->ue_eaddr modified only if config exists for this dev instance. */
1507 usb_fdt_get_mac_addr(ue->ue_dev, ue);
1508 if (ETHER_IS_VALID(ue->ue_eaddr)) {
1513 if (!ETHER_IS_VALID(ue->ue_eaddr)) {
1515 arc4rand(ue->ue_eaddr, ETHER_ADDR_LEN, 0);
1516 ue->ue_eaddr[0] &= ~0x01; /* unicast */
1517 ue->ue_eaddr[0] |= 0x02; /* locally administered */
1523 * @ue: the USB ethernet device
1529 muge_set_leds(struct usb_ether *ue)
1532 struct muge_softc *sc = uether_getsc(ue);
1538 if ((node = usb_fdt_get_node(ue->ue_dev, ue->ue_udev)) != -1 &&
1557 * @ue: the USB ethernet device
1565 muge_attach_post(struct usb_ether *ue)
1567 struct muge_softc *sc = uether_getsc(ue);
1574 muge_set_mac_addr(ue);
1575 muge_set_leds(ue);
1583 * @ue: the USB ethernet device
1593 muge_attach_post_sub(struct usb_ether *ue)
1599 sc = uether_getsc(ue);
1601 ifp = ue->ue_ifp;
1640 error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, uether_ifmedia_upd,
1641 ue->ue_methods->ue_mii_sts, BMSR_DEFCAPMASK, sc->sc_phyno,
1650 * @ue: USB ether interface
1653 muge_start(struct usb_ether *ue)
1655 struct muge_softc *sc = uether_getsc(ue);
1680 struct usb_ether *ue = ifp->if_softc;
1688 sc = uether_getsc(ue);
1711 uether_init(ue);
1861 * @ue: usb ethernet device context
1870 muge_setmulti(struct usb_ether *ue)
1872 struct muge_softc *sc = uether_getsc(ue);
1873 struct ifnet *ifp = uether_getifp(ue);
1929 * @ue: usb ethernet device context
1935 muge_setpromisc(struct usb_ether *ue)
1937 struct muge_softc *sc = uether_getsc(ue);
1938 struct ifnet *ifp = uether_getifp(ue);
2029 * @ue: USB ether interface
2038 muge_init(struct usb_ether *ue)
2040 struct muge_softc *sc = uether_getsc(ue);
2042 struct ifnet *ifp = uether_getifp(ue);
2052 muge_stop(ue);
2058 muge_setmulti(ue);
2070 muge_start(ue);
2075 * @ue: USB ether interface
2078 muge_stop(struct usb_ether *ue)
2080 struct muge_softc *sc = uether_getsc(ue);
2081 struct ifnet *ifp = uether_getifp(ue);
2097 * @ue: USB ether interface
2105 muge_tick(struct usb_ether *ue)
2108 struct muge_softc *sc = uether_getsc(ue);
2115 lan78xx_miibus_statchg(ue->ue_dev);
2117 muge_start(ue);
2181 struct usb_ether *ue = &sc->sc_ue;
2200 ue->ue_sc = sc;
2201 ue->ue_dev = dev;
2202 ue->ue_udev = uaa->device;
2203 ue->ue_mtx = &sc->sc_mtx;
2204 ue->ue_methods = &muge_ue_methods;
2206 err = uether_ifattach(ue);
2213 uether_ifattach_wait(ue);
2220 uether_ifdetach(ue);
2240 struct usb_ether *ue = &sc->sc_ue;
2243 uether_ifdetach(ue);