Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/ic Apply patch (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/47188aa61cf9
branches:  netbsd-1-5
changeset: 490411:47188aa61cf9
user:      he <he%NetBSD.org@localhost>
date:      Sat Dec 16 02:21:55 2000 +0000

description:
Apply patch (requested by he):
  Fix multicast packet reception; handle corresponding ioctl().

diffstat:

 sys/dev/ic/an.c |  22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 2b398b23b5bd -r 47188aa61cf9 sys/dev/ic/an.c
--- a/sys/dev/ic/an.c   Sat Dec 16 02:00:50 2000 +0000
+++ b/sys/dev/ic/an.c   Sat Dec 16 02:21:55 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: an.c,v 1.5.2.2 2000/12/12 21:25:42 he Exp $    */
+/*     $NetBSD: an.c,v 1.5.2.3 2000/12/16 02:21:55 he Exp $    */
 /*
  * Copyright (c) 1997, 1998, 1999
  *     Bill Paul <wpaul%ctr.columbia.edu@localhost>.  All rights reserved.
@@ -1018,6 +1018,26 @@
                }
                sc->an_if_flags = ifp->if_flags;
                break;
+       case SIOCADDMULTI:
+       case SIOCDELMULTI:
+               if (sc->sc_enabled == 0) {
+                       error = EIO;
+                       break;
+               }
+
+               /* Update our multicast list. */
+               error = (command == SIOCADDMULTI) ?
+                   ether_addmulti(ifr, &sc->arpcom) :
+                   ether_delmulti(ifr, &sc->arpcom);
+               if (error == ENETRESET) {
+                       /*
+                        * Multicast list has changed; set the hardware filter
+                        * accordingly.  XXX Needed here?
+                        */
+                       an_init(ifp);
+                       error = 0;
+               }
+               break;
        case SIOCGAIRONET:
                error = copyin(ifr->ifr_data, &areq, sizeof(areq));
                if (error)



Home | Main Index | Thread Index | Old Index