Date: Tue, 27 Jan 2009 01:31:52 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r187755 - user/thompsa/usb/sys/dev/usb2/ethernet Message-ID: <200901270131.n0R1Vqp4069617@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Tue Jan 27 01:31:52 2009 New Revision: 187755 URL: http://svn.freebsd.org/changeset/base/187755 Log: Retire config_td code. Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c Tue Jan 27 01:31:24 2009 (r187754) +++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c Tue Jan 27 01:31:52 2009 (r187755) @@ -45,56 +45,3 @@ usb2_ether_get_mbuf(void) } return (m); } - -/*------------------------------------------------------------------------* - * usb2_ether_cc - common ethernet config copy - *------------------------------------------------------------------------*/ -void -usb2_ether_cc(struct ifnet *ifp, usb2_ether_mchash_t *fhash, - struct usb2_ether_cc *cc) -{ - struct ifmultiaddr *ifma; - uint8_t i; - - if (ifp == NULL) { - /* Nothing to do */ - return; - } - /* Copy interface flags */ - - cc->if_flags = ifp->if_flags; - - /* Copy link layer address */ - - for (i = 0; i != ETHER_ADDR_LEN; i++) { - cc->if_lladdr[i] = IF_LLADDR(ifp)[i]; - } - - /* Check hash filter disable bits */ - - if ((ifp->if_flags & IFF_ALLMULTI) || - (ifp->if_flags & IFF_PROMISC)) { - - memset(cc->if_hash, 0xFF, sizeof(cc->if_hash)); - - } else if (fhash) { - - /* Compute hash bits for multicast filter */ - - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) { - continue; - } - fhash(cc, LLADDR((struct sockaddr_dl *) - (ifma->ifma_addr))); - } - IF_ADDR_UNLOCK(ifp); - - /* Compute hash bits for broadcast address */ - - if (ifp->if_flags & IFF_BROADCAST) { - fhash(cc, ifp->if_broadcastaddr); - } - } -} Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Tue Jan 27 01:31:24 2009 (r187754) +++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Tue Jan 27 01:31:52 2009 (r187755) @@ -48,21 +48,5 @@ #include <dev/mii/mii.h> #include <dev/mii/miivar.h> -#define USB_ETHER_HASH_MAX 64 /* bytes */ - -struct usb2_ether_cc { - uint32_t if_flags; - uint16_t if_rxfilt; - uint8_t if_lladdr[ETHER_ADDR_LEN]; - uint8_t if_mhash; - uint8_t if_nhash; - uint8_t if_hash[USB_ETHER_HASH_MAX]; -}; - -typedef void (usb2_ether_mchash_t)(struct usb2_ether_cc *cc, const uint8_t *ptr); - struct mbuf *usb2_ether_get_mbuf(void); -void usb2_ether_cc(struct ifnet *ifp, usb2_ether_mchash_t *fhash, - struct usb2_ether_cc *cc); - #endif /* _USB2_ETHERNET_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901270131.n0R1Vqp4069617>