From owner-freebsd-hackers Sun Jul 9 19:14:40 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id TAA21997 for hackers-outgoing; Sun, 9 Jul 1995 19:14:40 -0700 Received: from hq.icb.chel.su (icb-rich-gw.icb.chel.su [193.125.10.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id TAA21968 for ; Sun, 9 Jul 1995 19:13:13 -0700 Received: from localhost (babkin@localhost) by hq.icb.chel.su (8.6.5/8.6.5) id IAA27305; Mon, 10 Jul 1995 08:10:12 +0600 From: "Serge A. Babkin" Message-Id: <199507100210.IAA27305@hq.icb.chel.su> Subject: Re: if_ep driver To: smace@crash.ops.neosoft.com (Scott Mace) Date: Mon, 10 Jul 1995 08:10:11 +0600 (GMT+0600) Cc: hackers@freebsd.org In-Reply-To: <199507061725.MAA00423@crash.ops.neosoft.com> from "Scott Mace" at Jul 6, 95 12:25:36 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 3329 Sender: hackers-owner@freebsd.org Precedence: bulk > Also, on a side note, does anyone have any info for programming > the RX filter on 3c509's for multicast? I currently have mine > hacked to just receive ALL multicast packets. What driver you have ? Since version from FBSD 2.0 it receives ALL multicast packets (or at least should do it). I have hacked it to process it too but I didn't tested it yet due to lack of multicast applications (I'm trying to tune gated to use multicasts now). I have heard that somebody else had added multicast support to it too. Anyway you can test my patch if you want: (the RCS version is my local one) Really most of multicast support was already there. ---------------------- cut here ------------------------------------------ *** 1.16 1995/05/19 05:36:10 --- if_ep.c 1995/06/22 11:13:32 *************** *** 38,45 **** */ /* - * $Id: if_ep.c,v 1.16 1995/05/19 05:36:10 root Exp $ - * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select * logic changed to use value from EEPROM. Autoconfiguration --- 38,43 ---- *************** *** 439,445 **** ifp->if_unit = is->id_unit; ifp->if_name = "ep"; ifp->if_mtu = ETHERMTU; ! ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS; ifp->if_init = epinit; ifp->if_output = ether_output; ifp->if_start = epstart; --- 437,444 ---- ifp->if_unit = is->id_unit; ifp->if_name = "ep"; ifp->if_mtu = ETHERMTU; ! ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | ! IFF_SIMPLEX | IFF_NOTRAILERS; ifp->if_init = epinit; ifp->if_output = ether_output; ifp->if_start = epstart; *************** *** 552,563 **** outw(BASE + EP_COMMAND, SET_INTR_MASK | S_5_INTS); ! if(ifp->if_flags & IFF_PROMISC) ! outw(BASE + EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL | ! FIL_GROUP | FIL_BRDCST | FIL_ALL); ! else ! outw(BASE + EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL | ! FIL_GROUP | FIL_BRDCST); /* * S.B. --- 551,562 ---- outw(BASE + EP_COMMAND, SET_INTR_MASK | S_5_INTS); ! if(ifp->if_flags & IFF_PROMISC) ! outw(BASE + EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL | ! FIL_GROUP | FIL_BRDCST | FIL_ALL); ! else ! outw(BASE + EP_COMMAND, SET_RX_FILTER | FIL_INDIVIDUAL | ! FIL_GROUP | FIL_BRDCST); /* * S.B. *************** *** 1191,1196 **** --- 1190,1196 ---- } /* NOTREACHED */ + #if 0 if (ifp->if_flags & IFF_UP && (ifp->if_flags & IFF_RUNNING) == 0) epinit(ifp->if_unit); *************** *** 1203,1208 **** --- 1203,1209 ---- ep_frst(F_PROMISC); epinit(ifp->if_unit); } + #endif break; #ifdef notdef *************** *** 1222,1228 **** --- 1223,1240 ---- ifp->if_mtu = ifr->ifr_mtu; } break; + case SIOCADDMULTI: + case SIOCDELMULTI: + error= (cmd==SIOCADDMULTI) ? + ether_addmulti(ifr, &sc->arpcom) : + ether_delmulti(ifr, &sc->arpcom); + if(error=ENETRESET) { + epinit(ifp->if_unit); + error=0; + } + + break; default: error = EINVAL; } ---------------------- cut here ------------------------------------------ Serge Babkin ! (babkin@hq.icb.chel.su) ! Headquarter of Joint Stock Commercial Bank "Chelindbank" ! Chelyabinsk, Russia