Deleted Added
sdiff udiff text old ( 20407 ) new ( 21666 )
full compact
1/*
2 * Copyright (c) 1995, David Greenman
3 * 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

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $Id: if_ed.c,v 1.110 1996/12/10 07:29:39 davidg Exp $
28 */
29
30/*
31 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
32 * adapters. By David Greenman, 29-April-1993
33 *
34 * Currently supports the Western Digital/SMC 8003 and 8013 series,
35 * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,

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

2668 }
2669 } else if (sc->vendor == ED_VENDOR_HP)
2670 ed_hpp_set_physical_link(sc);
2671 break;
2672
2673 case SIOCADDMULTI:
2674 case SIOCDELMULTI:
2675 /*
2676 * Update out multicast list.
2677 */
2678 error = (command == SIOCADDMULTI) ?
2679 ether_addmulti(ifr, &sc->arpcom) :
2680 ether_delmulti(ifr, &sc->arpcom);
2681
2682 if (error == ENETRESET) {
2683
2684 /*
2685 * Multicast list has changed; set the hardware filter
2686 * accordingly.
2687 */
2688 ed_setrcr(sc);
2689 error = 0;
2690 }
2691 break;
2692
2693 default:
2694 error = EINVAL;
2695 }
2696 (void) splx(s);
2697 return (error);
2698}

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

3415 */
3416static void
3417ds_getmcaf(sc, mcaf)
3418 struct ed_softc *sc;
3419 u_long *mcaf;
3420{
3421 register u_int index;
3422 register u_char *af = (u_char *) mcaf;
3423 register struct ether_multi *enm;
3424 register struct ether_multistep step;
3425
3426 mcaf[0] = 0;
3427 mcaf[1] = 0;
3428
3429 ETHER_FIRST_MULTI(step, &sc->arpcom, enm);
3430 while (enm != NULL) {
3431 if (bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
3432 mcaf[0] = 0xffffffff;
3433 mcaf[1] = 0xffffffff;
3434 return;
3435 }
3436 index = ds_crc(enm->enm_addrlo) >> 26;
3437 af[index >> 3] |= 1 << (index & 7);
3438
3439 ETHER_NEXT_MULTI(step, enm);
3440 }
3441}