Deleted Added
full compact
if_cue.c (194677) if_cue.c (195049)
1/*-
2 * Copyright (c) 1997, 1998, 1999, 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998, 1999, 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/usb/net/if_cue.c 194677 2009-06-23 02:19:59Z thompsa $");
34__FBSDID("$FreeBSD: head/sys/dev/usb/net/if_cue.c 195049 2009-06-26 11:45:06Z rwatson $");
35
36/*
37 * CATC USB-EL1210A USB to ethernet driver. Used in the CATC Netmate
38 * adapters and others.
39 *
40 * Written by Bill Paul <wpaul@ee.columbia.edu>
41 * Electrical Engineering Department
42 * Columbia University, New York City

--- 270 unchanged lines hidden (view full) ---

313 for (i = 0; i < 8; i++)
314 hashtbl[i] = 0xff;
315 cue_mem(sc, CUE_CMD_WRITESRAM, CUE_MCAST_TABLE_ADDR,
316 &hashtbl, 8);
317 return;
318 }
319
320 /* now program new ones */
35
36/*
37 * CATC USB-EL1210A USB to ethernet driver. Used in the CATC Netmate
38 * adapters and others.
39 *
40 * Written by Bill Paul <wpaul@ee.columbia.edu>
41 * Electrical Engineering Department
42 * Columbia University, New York City

--- 270 unchanged lines hidden (view full) ---

313 for (i = 0; i < 8; i++)
314 hashtbl[i] = 0xff;
315 cue_mem(sc, CUE_CMD_WRITESRAM, CUE_MCAST_TABLE_ADDR,
316 &hashtbl, 8);
317 return;
318 }
319
320 /* now program new ones */
321 IF_ADDR_LOCK(ifp);
321 if_maddr_rlock(ifp);
322 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
323 {
324 if (ifma->ifma_addr->sa_family != AF_LINK)
325 continue;
326 h = cue_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
327 hashtbl[h >> 3] |= 1 << (h & 0x7);
328 }
322 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
323 {
324 if (ifma->ifma_addr->sa_family != AF_LINK)
325 continue;
326 h = cue_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
327 hashtbl[h >> 3] |= 1 << (h & 0x7);
328 }
329 IF_ADDR_UNLOCK(ifp);
329 if_maddr_runlock(ifp);
330
331 /*
332 * Also include the broadcast address in the filter
333 * so we can receive broadcast frames.
334 */
335 if (ifp->if_flags & IFF_BROADCAST) {
336 h = cue_mchash(ifp->if_broadcastaddr);
337 hashtbl[h >> 3] |= 1 << (h & 0x7);

--- 311 unchanged lines hidden ---
330
331 /*
332 * Also include the broadcast address in the filter
333 * so we can receive broadcast frames.
334 */
335 if (ifp->if_flags & IFF_BROADCAST) {
336 h = cue_mchash(ifp->if_broadcastaddr);
337 hashtbl[h >> 3] |= 1 << (h & 0x7);

--- 311 unchanged lines hidden ---