From owner-svn-src-all@FreeBSD.ORG Sat Mar 8 14:58:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E407207; Sat, 8 Mar 2014 14:58:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B991A45; Sat, 8 Mar 2014 14:58:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s28EweYa088581; Sat, 8 Mar 2014 14:58:40 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s28EwehV088580; Sat, 8 Mar 2014 14:58:40 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201403081458.s28EwehV088580@svn.freebsd.org> From: Hiroki Sato Date: Sat, 8 Mar 2014 14:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262929 - head/sys/dev/ffec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 14:58:40 -0000 Author: hrs Date: Sat Mar 8 14:58:39 2014 New Revision: 262929 URL: http://svnweb.freebsd.org/changeset/base/262929 Log: Fix another bug in multicast filtering. i.MX uses 6 bits from MSB in LE CRC32 for the hash value, not the lowest 6 bits in BE CRC32. Tested by: Takanori Sawada PR: arm/187179 Modified: head/sys/dev/ffec/if_ffec.c Modified: head/sys/dev/ffec/if_ffec.c ============================================================================== --- head/sys/dev/ffec/if_ffec.c Sat Mar 8 12:26:17 2014 (r262928) +++ head/sys/dev/ffec/if_ffec.c Sat Mar 8 14:58:39 2014 (r262929) @@ -959,9 +959,10 @@ ffec_setup_rxfilter(struct ffec_softc *s TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; - crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) + /* 6 bits from MSB in LE CRC32 are used for hash. */ + crc = ether_crc32_le(LLADDR((struct sockaddr_dl *) ifma->ifma_addr), ETHER_ADDR_LEN); - ghash |= 1LLU << (crc & 0x3f); + ghash |= 1LLU << (((uint8_t *)&crc)[3] >> 2); } if_maddr_runlock(ifp); }