Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Get rid of duplicate RID definitions.



details:   https://anonhg.NetBSD.org/src/rev/544653921e10
branches:  trunk
changeset: 517347:544653921e10
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Nov 11 00:16:07 2001 +0000

description:
Get rid of duplicate RID definitions.

diffstat:

 sys/dev/ic/wi.c      |  10 +++---
 sys/dev/ic/wi_ieee.h |  34 +++++++++-------------
 sys/dev/ic/wireg.h   |  79 +++++----------------------------------------------
 3 files changed, 27 insertions(+), 96 deletions(-)

diffs (truncated from 318 to 300 lines):

diff -r 03d8650b362b -r 544653921e10 sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c   Sun Nov 11 00:03:20 2001 +0000
+++ b/sys/dev/ic/wi.c   Sun Nov 11 00:16:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wi.c,v 1.27 2001/10/14 12:33:18 ichiro Exp $   */
+/*     $NetBSD: wi.c,v 1.28 2001/11/11 00:16:07 christos Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -1069,7 +1069,7 @@
 allmulti:
                ifp->if_flags |= IFF_ALLMULTI;
                memset((char *)&mcast, 0, sizeof(mcast));
-               mcast.wi_type = WI_RID_MCAST;
+               mcast.wi_type = WI_RID_MCAST_LIST;
                mcast.wi_len = ((ETHER_ADDR_LEN / 2) * 16) + 1;
 
                wi_write_record(sc, (struct wi_ltv_gen *)&mcast);
@@ -1092,7 +1092,7 @@
        }
 
        ifp->if_flags &= ~IFF_ALLMULTI;
-       mcast.wi_type = WI_RID_MCAST;
+       mcast.wi_type = WI_RID_MCAST_LIST;
        mcast.wi_len = ((ETHER_ADDR_LEN / 2) * i) + 1;
        wi_write_record(sc, (struct wi_ltv_gen *)&mcast);
 }
@@ -1868,7 +1868,7 @@
 
        /* getting chip identity */
        memset(&ver, 0, sizeof(ver));
-       ver.wi_type = WI_RID_CARDID;
+       ver.wi_type = WI_RID_CARD_ID;
        ver.wi_len = 5;
        wi_read_record(sc, (struct wi_ltv_gen *)&ver);
        printf("%s: using ", sc->sc_dev.dv_xname);
@@ -1918,7 +1918,7 @@
        if (sc->sc_prism2) {
                /* try to get prism2 firm version */
                memset(&ver, 0, sizeof(ver));
-               ver.wi_type = WI_RID_IDENT;
+               ver.wi_type = WI_RID_STA_IDENTITY;
                ver.wi_len = 5;
                wi_read_record(sc, (struct wi_ltv_gen *)&ver);
                LE16TOH(ver.wi_ver[1]);
diff -r 03d8650b362b -r 544653921e10 sys/dev/ic/wi_ieee.h
--- a/sys/dev/ic/wi_ieee.h      Sun Nov 11 00:03:20 2001 +0000
+++ b/sys/dev/ic/wi_ieee.h      Sun Nov 11 00:16:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wi_ieee.h,v 1.4 2001/09/22 17:22:25 explorer Exp $     */
+/*     $NetBSD: wi_ieee.h,v 1.5 2001/11/11 00:16:07 christos Exp $     */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -200,21 +200,6 @@
 };
 
 /*
- * These are all the LTV record types that we can read or write
- * from the WaveLAN. Not all of them are temendously useful, but I
- * list as many as I know about here for completeness.
- */
-
-#define WI_RID_DNLD_BUF                0xFD01
-#define WI_RID_MEMSZ           0xFD02
-#define WI_RID_CARDID          0xFD0B
-#define WI_RID_DOMAINS         0xFD11
-#define WI_RID_CIS             0xFD13
-#define WI_RID_COMMQUAL                0xFD43
-#define WI_RID_SCALETHRESH     0xFD46
-#define WI_RID_PCF             0xFD87
-
-/*
  * Network parameters, static configuration entities.
  */
 #define WI_RID_PORTTYPE                0xFC00 /* Connection control characteristics */
@@ -258,11 +243,15 @@
 /*
  * Network parameters, dynamic configuration entities
  */
-#define WI_RID_MCAST_LIST      0xFC80 /* list of multicast addrs */
+#define WI_RID_MCAST_LIST      0xFC80 /* multicast addrs to put in filter */
 #define WI_RID_CREATE_IBSS     0xFC81 /* create IBSS */
 #define WI_RID_FRAG_THRESH     0xFC82 /* frag len, unicast msg xmit */
 #define WI_RID_RTS_THRESH      0xFC83 /* frame len for RTS/CTS handshake */
-#define WI_RID_TX_RATE         0xFC84 /* data rate for message xmit */
+#define WI_RID_TX_RATE         0xFC84 /* data rate for message xmit
+                                       * 0 == Fixed 1mbps
+                                       * 1 == Fixed 2mbps
+                                       * 2 == auto fallback
+                                       */
 #define WI_RID_PROMISC         0xFC85 /* enable promisc mode */
 #define WI_RID_FRAG_THRESH0    0xFC90
 #define WI_RID_FRAG_THRESH1    0xFC91
@@ -287,7 +276,7 @@
 #define WI_RID_TX_RATE6                0xFCA4
 #define WI_RID_DEFLT_CRYPT_KEYS        0xFCB0
 #define WI_RID_TX_CRYPT_KEY    0xFCB1
-#define WI_RID_TICK_TIME       0xFCE0
+#define WI_RID_TICK_TIME       0xFCE0  /* Auxiliary Timer tick interval */
 #define WI_RID_SCAN_REQ                0xFCE1
 #define WI_RID_JOIN_REQ                0xFCE2
 
@@ -305,9 +294,11 @@
 /*
  * NIC information
  */
-#define WI_RID_FIRM_ID         0xFD02 /* Primary func firmware ID. */
+#define WI_RID_DNLD_BUF                0xFD01
+#define WI_RID_MEMSZ           0xFD02 /* memory size info */
 #define WI_RID_PRI_SUP_RANGE   0xFD03 /* primary supplier compatibility */
 #define WI_RID_CIF_ACT_RANGE   0xFD04 /* controller sup. compatibility */
+#define WI_RID_SYSTEM_SCALE    0xFC06
 #define WI_RID_SERIALNO                0xFD0A /* card serial number */
 #define WI_RID_CARD_ID         0xFD0B /* card identification */
 #define WI_RID_MFI_SUP_RANGE   0xFD0C /* modem supplier compatibility */
@@ -320,6 +311,9 @@
 #define WI_RID_STA_SUP_RANGE   0xFD21 /* station supplier compat */
 #define WI_RID_MFI_ACT_RANGE   0xFD22
 #define WI_RID_CFI_ACT_RANGE   0xFD33
+#define WI_RID_COMMQUAL                0xFD43
+#define WI_RID_SCALETHRESH     0xFD46
+#define WI_RID_PCF             0xFD87
 
 /*
  * MAC information
diff -r 03d8650b362b -r 544653921e10 sys/dev/ic/wireg.h
--- a/sys/dev/ic/wireg.h        Sun Nov 11 00:03:20 2001 +0000
+++ b/sys/dev/ic/wireg.h        Sun Nov 11 00:16:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wireg.h,v 1.12 2001/10/14 12:33:18 ichiro Exp $        */
+/*     $NetBSD: wireg.h,v 1.13 2001/11/11 00:16:07 christos Exp $      */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -377,7 +377,6 @@
 /*
  * Download buffer location and length (0xFD01).
  */
-#define WI_RID_DNLD_BUF                0xFD01
 struct wi_ltv_dnld_buf {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -389,7 +388,6 @@
 /*
  * Mem sizes (0xFD02).
  */
-#define WI_RID_MEMSZ           0xFD02
 struct wi_ltv_memsz {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -398,10 +396,8 @@
 };
 
 /*
- * NIC Identification (0xFD0B)
+ * NIC Identification (0xFD0B, 0xFD20)
  */
-#define WI_RID_CARDID          0xFD0B
-#define WI_RID_IDENT           0xFD20
 struct wi_ltv_ver {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -420,7 +416,6 @@
 /*
  * List of intended regulatory domains (0xFD11).
  */
-#define WI_RID_DOMAINS         0xFD11
 struct wi_ltv_domains {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -430,7 +425,6 @@
 /*
  * CIS struct (0xFD13).
  */
-#define WI_RID_CIS             0xFD13
 struct wi_ltv_cis {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -440,7 +434,6 @@
 /*
  * Communications quality (0xFD43).
  */
-#define WI_RID_COMMQUAL                0xFD43
 struct wi_ltv_commqual {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -450,10 +443,8 @@
 };
 
 /*
- * Actual system scale thresholds (0xFD46).
+ * Actual system scale thresholds (0xFC06, 0xFD46).
  */
-#define WI_RID_SYSTEM_SCALE    0xFC06
-#define WI_RID_SCALETHRESH     0xFD46
 struct wi_ltv_scalethresh {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -468,7 +459,6 @@
 /*
  * PCF info struct (0xFD87).
  */
-#define WI_RID_PCF             0xFD87
 struct wi_ltv_pcf {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -478,21 +468,18 @@
 };
 
 /*
- * Connection control characteristics.
+ * Connection control characteristics. (0xFC00)
  * 1 == Basic Service Set (BSS)
  * 2 == Wireless Distribudion System (WDS)
  * 3 == Pseudo IBSS
  */
-#define WI_RID_PORTTYPE                0xFC00
 #define WI_PORTTYPE_BSS                0x1
 #define WI_PORTTYPE_WDS                0x2
 #define WI_PORTTYPE_ADHOC      0x3
 
 /*
- * Mac addresses.
+ * Mac addresses. (0xFC01, 0xFC08)
  */
-#define WI_RID_MAC_NODE                0xFC01
-#define WI_RID_MAC_WDS         0xFC08
 struct wi_ltv_macaddr {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -500,10 +487,8 @@
 };
 
 /*
- * Station set identification (SSID).
+ * Station set identification (SSID). (0xFC02, 0xFC04)
  */
-#define WI_RID_DESIRED_SSID    0xFC02
-#define WI_RID_OWN_SSID                0xFC04
 struct wi_ltv_ssid {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -511,29 +496,8 @@
 };
 
 /*
- * Set communications channel (radio frequency).
- */
-#define WI_RID_OWN_CHNL                0xFC03
-
-/*
- * Frame data size.
- */
-#define WI_RID_MAX_DATALEN     0xFC07
-
-/*
- * ESS power management enable
+ * Set our station name. (0xFC0E)
  */
-#define WI_RID_PM_ENABLED      0xFC09
-
-/*
- * ESS max PM sleep internal
- */
-#define WI_RID_MAX_SLEEP       0xFC0C
-
-/*
- * Set our station name.
- */
-#define WI_RID_NODENAME                0xFC0E
 struct wi_ltv_nodename {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -542,9 +506,8 @@
 
 /*
  * Multicast addresses to be put in filter. We're
- * allowed up to 16 addresses in the filter.
+ * allowed up to 16 addresses in the filter. (0xFC80)
  */
-#define WI_RID_MCAST           0xFC80
 struct wi_ltv_mcast {
        u_int16_t               wi_len;
        u_int16_t               wi_type;
@@ -552,32 +515,6 @@
 };
 
 /*
- * Create IBSS.
- */
-#define WI_RID_CREATE_IBSS     0xFC81
-
-#define WI_RID_FRAG_THRESH     0xFC82
-#define WI_RID_RTS_THRESH      0xFC83
-
-/*
- * TX rate control
- * 0 == Fixed 1mbps
- * 1 == Fixed 2mbps



Home | Main Index | Thread Index | Old Index