Return-Path: tlyu@MIT.EDU Delivery-Date: Sun Mar 26 07:09:38 2000 Received: from orchard.arlington.ma.us (stack.hamachi.org [4.255.0.97]) by orchard.arlington.ma.us (8.8.8/1.34) with ESMTP id HAA27443 for ; Sun, 26 Mar 2000 07:09:38 GMT Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by orchard.arlington.ma.us (8.8.8/8.8.8) with SMTP id CAA25681 for ; Sun, 26 Mar 2000 02:09:38 -0500 (EST) Received: from SAINT-ELMOS-FIRE.MIT.EDU by MIT.EDU with SMTP id AA24748; Sun, 26 Mar 00 02:11:18 EST Received: (from tlyu@localhost) by saint-elmos-fire.mit.edu (8.9.3) id CAA10503; Sun, 26 Mar 2000 02:09:37 -0500 (EST) To: wesommer@MIT.EDU Subject: if_wi.c diffs for 1.4.x From: Tom Yu Date: 26 Mar 2000 02:09:37 -0500 Message-Id: Lines: 141 X-Mailer: Gnus v5.5/Emacs 20.3 *** if_wi.c Mon Mar 20 17:08:52 2000 --- /usr/src/sys/dev/pcmcia/if_wi.c Mon Mar 20 23:31:02 2000 *************** *** 1,3 **** --- 1,4 ---- + #define KLUDGE_14 /* $NetBSD: if_wi.c,v 1.13 2000/03/06 21:02:39 thorpej Exp $ */ /* *************** *** 125,131 **** --- 126,134 ---- static int wi_match __P((struct device *, struct cfdata *, void *)); static void wi_attach __P((struct device *, struct device *, void *)); + #ifndef KLUDGE_14 static int wi_detach __P((struct device *, int)); + #endif static int wi_activate __P((struct device *, enum devact)); static int wi_intr __P((void *arg)); *************** *** 167,175 **** --- 170,199 ---- struct wi_ssid *)); struct cfattach wi_ca = { + #ifdef KLUDGE_14 + sizeof(struct wi_softc), wi_match, wi_attach, NULL, wi_activate + #else sizeof(struct wi_softc), wi_match, wi_attach, wi_detach, wi_activate + #endif }; + #ifdef KLUDGE_14 + #define PCMCIA_VENDOR_LUCENT 0x0156 /* Lucent Technologies */ + #define PCMCIA_PRODUCT_LUCENT_WAVELAN_IEEE 0x0002 /* WaveLAN/IEEE */ + /* + * IEEE 802.11 Wireless + */ + #define IFM_IEEE80211 0x00000080 + #define IFM_IEEE80211_FH1 3 /* Frequency Hopping 1Mbps */ + #define IFM_IEEE80211_FH2 4 /* Frequency Hopping 2Mbps */ + #define IFM_IEEE80211_DS2 5 /* Direct Sequence 2Mbps */ + #define IFM_IEEE80211_DS5 6 /* Direct Sequence 5Mbps*/ + #define IFM_IEEE80211_DS11 7 /* Direct Sequence 11Mbps*/ + #define IFM_IEEE80211_DS1 8 /* Direct Sequence 1Mbps */ + + #define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc mode */ + #endif + static int wi_match(parent, match, aux) struct device *parent; *************** *** 355,361 **** --- 379,387 ---- if_attach(ifp); ether_ifattach(ifp, mac.wi_mac_addr); + #ifndef KLUDGE_14 ifp->if_baudrate = IF_Mbps(2); + #endif #if NBPFILTER > 0 bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, *************** *** 484,490 **** --- 510,528 ---- #endif /* Receive packet. */ + #if __NetBSD_Version__ > 104010000 (*ifp->if_input)(ifp, m); + #else + { + struct ether_header *eh; + eh = mtod(m, struct ether_header *); + m_adj(m, sizeof(*eh)); + #if 0 + m_adj(m, -ETHER_CRC_LEN); + #endif + ether_input(ifp, eh, m); + } + #endif } static void wi_txeof(sc, status) *************** *** 1574,1580 **** --- 1612,1620 ---- struct device *self; enum devact act; { + #ifndef KLUDGE_14 struct wi_softc *sc = (struct wi_softc *)self; + #endif int rv = 0, s; s = splnet(); *************** *** 1584,1596 **** --- 1624,1639 ---- break; case DVACT_DEACTIVATE: + #ifndef KLUDGE_14 if_deactivate(&sc->sc_ethercom.ec_if); + #endif break; } splx(s); return (rv); } + #ifndef KLUDGE_14 static int wi_detach(self, flags) struct device *self; *************** *** 1623,1628 **** --- 1666,1672 ---- return (0); } + #endif static int wi_set_ssid(ws, id, len) *************** *** 1697,1703 **** --- 1741,1749 ---- wi_init(sc); } + #ifndef KLUDGE_14 ifp->if_baudrate = ifmedia_baudrate(sc->sc_media.ifm_cur->ifm_media); + #endif return (0); }