Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 1995 08:10:11 +0600 (GMT+0600)
From:      "Serge A. Babkin" <babkin@hq.icb.chel.su>
To:        smace@crash.ops.neosoft.com (Scott Mace)
Cc:        hackers@freebsd.org
Subject:   Re: if_ep driver
Message-ID:  <199507100210.IAA27305@hq.icb.chel.su>
In-Reply-To: <199507061725.MAA00423@crash.ops.neosoft.com> from "Scott Mace" at Jul 6, 95 12:25:36 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507100210.IAA27305>