Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pcmcia Identify the SMC 2632W as a Prism II. From R...



details:   https://anonhg.NetBSD.org/src/rev/bb195d5631e0
branches:  trunk
changeset: 500863:bb195d5631e0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Dec 19 16:55:57 2000 +0000

description:
Identify the SMC 2632W as a Prism II.  From Rafal Boni, kern/11776.

diffstat:

 sys/dev/pcmcia/if_wi.c |  37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)

diffs (79 lines):

diff -r 65d53f6f6565 -r bb195d5631e0 sys/dev/pcmcia/if_wi.c
--- a/sys/dev/pcmcia/if_wi.c    Tue Dec 19 16:54:14 2000 +0000
+++ b/sys/dev/pcmcia/if_wi.c    Tue Dec 19 16:55:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wi.c,v 1.45 2000/12/14 06:29:38 thorpej Exp $       */
+/*     $NetBSD: if_wi.c,v 1.46 2000/12/19 16:55:57 thorpej Exp $       */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -215,6 +215,12 @@
          PCMCIA_STR_SAMSUNG_SWL_2000N,
          1 },
 
+       { PCMCIA_VENDOR_LUCENT,
+         PCMCIA_PRODUCT_LUCENT_WAVELAN_IEEE,
+         PCMCIA_CIS_SMC_2632W,
+         PCMCIA_STR_SMC_2632W,
+         1 },
+
        { 0,
          0,
          { NULL, NULL, NULL, NULL },
@@ -1594,17 +1600,16 @@
            ntohs(eh->ether_type) == ETHERTYPE_ARP ||
            ntohs(eh->ether_type) == ETHERTYPE_REVARP ||
            ntohs(eh->ether_type) == ETHERTYPE_IPV6) {
-               bcopy((char *)&eh->ether_dhost,
-                   (char *)&tx_frame.wi_addr1, ETHER_ADDR_LEN);
-               bcopy((char *)&eh->ether_shost,
-                   (char *)&tx_frame.wi_addr2, ETHER_ADDR_LEN);
-               bcopy((char *)&eh->ether_dhost,
-                   (char *)&tx_frame.wi_dst_addr, ETHER_ADDR_LEN);
-               bcopy((char *)&eh->ether_shost,
-                   (char *)&tx_frame.wi_src_addr, ETHER_ADDR_LEN);
+               bcopy(eh->ether_dhost, &tx_frame.wi_80211frame.i_addr1,
+                   ETHER_ADDR_LEN);
+               bcopy(eh->ether_shost, &tx_frame.wi_80211frame.i_addr2,
+                   ETHER_ADDR_LEN);
+
+               bcopy(eh->ether_dhost, tx_frame.wi_dst_addr, ETHER_ADDR_LEN);
+               bcopy(eh->ether_shost, tx_frame.wi_src_addr, ETHER_ADDR_LEN);
 
                tx_frame.wi_dat_len = m0->m_pkthdr.len - WI_SNAPHDR_LEN;
-               tx_frame.wi_frame_ctl = WI_FTYPE_DATA;
+               tx_frame.wi_80211frame.i_fc[0] = IEEE80211_FC0_TYPE_DATA;
                tx_frame.wi_dat[0] = htons(WI_SNAP_WORD0);
                tx_frame.wi_dat[1] = htons(WI_SNAP_WORD1);
                tx_frame.wi_len = htons(m0->m_pkthdr.len - WI_SNAPHDR_LEN);
@@ -1660,24 +1665,24 @@
 {
        struct wi_frame         tx_frame;
        int                     id;
-       struct wi_80211_hdr     *hdr;
+       struct ieee80211_frame_addr4 *hdr;
        caddr_t                 dptr;
 
-       hdr = (struct wi_80211_hdr *)data;
-       dptr = data + sizeof(struct wi_80211_hdr);
+       hdr = (struct ieee80211_frame_addr4 *)data;
+       dptr = data + sizeof(struct ieee80211_frame_addr4);
 
        bzero((char *)&tx_frame, sizeof(tx_frame));
        id = sc->wi_tx_mgmt_id;
 
-       bcopy((char *)hdr, (char *)&tx_frame.wi_frame_ctl,
-          sizeof(struct wi_80211_hdr));
+       bcopy((char *)hdr, (char *)&tx_frame.wi_80211frame,
+          sizeof(struct ieee80211_frame_addr4));
 
        tx_frame.wi_dat_len = len - WI_SNAPHDR_LEN;
        tx_frame.wi_len = htons(len - WI_SNAPHDR_LEN);
 
        wi_write_data(sc, id, 0, (caddr_t)&tx_frame, sizeof(struct wi_frame));
        wi_write_data(sc, id, WI_802_11_OFFSET_RAW, dptr,
-           (len - sizeof(struct wi_80211_hdr)) + 2);
+           (len - sizeof(struct ieee80211_frame_addr4)) + 2);
 
        if (wi_cmd(sc, WI_CMD_TX|WI_RECLAIM, id)) {
                printf("%s: xmit failed\n", sc->sc_dev.dv_xname);



Home | Main Index | Thread Index | Old Index