From owner-freebsd-mobile Thu Apr 13 18:42:24 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from lily.ezo.net (lily.ezo.net [206.102.130.13]) by hub.freebsd.org (Postfix) with ESMTP id ED38137B55B; Thu, 13 Apr 2000 18:42:15 -0700 (PDT) (envelope-from jflowers@ezo.net) Received: from lily.ezo.net (jflowers@localhost.ezo.net [127.0.0.1]) by lily.ezo.net (8.8.7/8.8.7) with SMTP id VAA01609; Thu, 13 Apr 2000 21:41:50 -0400 (EDT) Date: Thu, 13 Apr 2000 21:41:49 -0400 (EDT) From: Jim Flowers To: Nick Sayer Cc: freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG, adam@ezo.net Subject: Re: RFC: if_wi.c bridging patch In-Reply-To: <200004132355.QAA70429@medusa.kfu.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org We were unable to get a wi configured on 4.0 release yesterday but it may be that we didn't have the time to check out the configuration fully. Was never recognized on boot-up. We've got a few more to get configured over the next week so we'll put your patch in and try again. Jim Flowers #4 ISP on C|NET, #1 in Ohio On Thu, 13 Apr 2000, Nick Sayer wrote: > > I have had some wi cards for a while, and while I have managed to get > an Airport to work (a friend helped me out), I believe that adding wi > to the list of bridge compatible interfaces may be helpful. > > According to the documentation, the IBSS mode of the driver doesn't > work. That's too bad, as in combination with this patch, you could > make your own "airport" this way. IBSS is desirable because it allows > power management mode to work on the BSS client machines. C'est la > guerre. > > I don't have a wi in a position that is comfortable for me to test. > But if someone can verify that this works, I will commit it. > > This is relative to RELENG_4. > > --- if_wi.c.orig Thu Apr 13 16:36:37 2000 > +++ if_wi.c Thu Apr 13 16:48:53 2000 > @@ -102,6 +102,10 @@ > > #include > > +#ifdef BRIDGE > +#include > +#endif > + > #include > #include > > @@ -425,8 +429,31 @@ > ifp->if_ipackets++; > > /* Handle BPF listeners. */ > - if (ifp->if_bpf) { > + if (ifp->if_bpf) > bpf_mtap(ifp, m); > + > +#ifdef BRIDGE > + if (do_bridge) { > + struct ifnet *bdg_ifp; > + bdg_ifp = bridge_in(m); > + if (bdg_ifp == BDG_DROP) { > + if (m) > + m_free(m); > + return; /* and drop */ > + } > + if (bdg_ifp != BDG_LOCAL) > + bdg_forward(&m, bdg_ifp); > + if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_BCAST && > + bdg_ifp != BDG_MCAST) { > + if (m) > + m_free(m); > + return; /* and drop */ > + } > + /* all others accepted locally */ > + } > + else > +#endif > + { > if (ifp->if_flags & IFF_PROMISC && > (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, > ETHER_ADDR_LEN) && (eh->ether_dhost[0] & 1) == 0)) { > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message