From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:31:52 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE36A1065670; Tue, 27 Jan 2009 01:31:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82FDA8FC0C; Tue, 27 Jan 2009 01:31:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1Vq6t069619; Tue, 27 Jan 2009 01:31:52 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1Vqp4069617; Tue, 27 Jan 2009 01:31:52 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270131.n0R1Vqp4069617@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187755 - user/thompsa/usb/sys/dev/usb2/ethernet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:31:52 -0000 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 #include -#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_ */