summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-06-07 18:52:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-06-07 18:52:00 +0000
commitfd7713d402cf6cba0412667d5972d943dc74c3ea (patch)
treea92b80c868912b1ac05300aa8194e9b9eb49fc20 /sys/dev
parentcc9a568f7b54ff94c69b575a9034d36b5c88739c (diff)
Kill #define duplicates between if_wireg.h and if_wi_ieee.h
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/if_wi.c10
-rw-r--r--sys/dev/ic/if_wi_ieee.h22
-rw-r--r--sys/dev/ic/if_wireg.h85
3 files changed, 27 insertions, 90 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index 863d1b6f92d..63dc8610d41 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.4 2001/06/07 06:04:45 millert Exp $ */
+/* $OpenBSD: if_wi.c,v 1.5 2001/06/07 18:51:59 millert Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -120,7 +120,7 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.4 2001/06/07 06:04:45 millert Exp $";
+ "$OpenBSD: if_wi.c,v 1.5 2001/06/07 18:51:59 millert Exp $";
#endif /* lint */
#ifdef foo
@@ -894,7 +894,7 @@ wi_setmulti(sc)
bzero((char *)&mcast, sizeof(mcast));
- mcast.wi_type = WI_RID_MCAST;
+ mcast.wi_type = WI_RID_MCAST_LIST;
mcast.wi_len = ((ETHER_ADDR_LEN / 2) * 16) + 1;
if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
@@ -1474,7 +1474,7 @@ wi_get_id(sc)
/* 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);
switch (letoh16(ver.wi_ver[0])) {
@@ -1519,7 +1519,7 @@ wi_get_id(sc)
if (sc->sc_prism2) {
/* try to get prism2 firmware 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);
ver.wi_ver[1] = letoh16(ver.wi_ver[1]);
diff --git a/sys/dev/ic/if_wi_ieee.h b/sys/dev/ic/if_wi_ieee.h
index 2eaadf24795..fe05f082acc 100644
--- a/sys/dev/ic/if_wi_ieee.h
+++ b/sys/dev/ic/if_wi_ieee.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_ieee.h,v 1.2 2001/06/07 04:58:20 mickey Exp $ */
+/* $OpenBSD: if_wi_ieee.h,v 1.3 2001/06/07 18:51:59 millert Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -162,11 +162,11 @@ struct wi_counters {
#define WI_RID_DNLD_BUF 0xFD01
#define WI_RID_MEMSZ 0xFD02
-#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
+#define WI_RID_DOMAINS 0xFD11 /* List of intended regulatory domains */
+#define WI_RID_CIS 0xFD13 /* CIS info */
+#define WI_RID_COMMQUAL 0xFD43 /* Communications quality */
+#define WI_RID_SCALETHRESH 0xFD46 /* Actual system scale thresholds */
+#define WI_RID_PCF 0xFD87 /* PCF info */
/*
* Network parameters, static configuration entities.
@@ -199,20 +199,20 @@ struct wi_counters {
#define WI_RID_P2_TX_CRYPT_KEY 0xFC23
#define WI_RID_P2_CRYPT_KEY0 0xFC24
#define WI_RID_P2_CRYPT_KEY1 0xFC25
-#define WI_RID_MICROWAVE_OVEN 0xFC25
+#define WI_RID_MICROWAVE_OVEN 0xFC25 /* Microwave oven robustness */
#define WI_RID_P2_CRYPT_KEY2 0xFC26
#define WI_RID_P2_CRYPT_KEY3 0xFC27
#define WI_RID_P2_ENCRYPTION 0xFC28
#define WI_RID_WEP_MAPTABLE 0xFC29
#define WI_RID_AUTH_CNTL 0xFC2A
-#define WI_RID_ROAMING_MODE 0xFC2D
+#define WI_RID_ROAMING_MODE 0xFC2D /* Roaming mode (1:firm,3:disable) */
#define WI_RID_BASIC_RATE 0xFCB3
#define WI_RID_SUPPORT_RATE 0xFCB4
/*
* Network parameters, dynamic configuration entities
*/
-#define WI_RID_MCAST_LIST 0xFC80 /* list of multicast addrs */
+#define WI_RID_MCAST_LIST 0xFC80 /* list of multicast addrs (up to 16) */
#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 */
@@ -241,7 +241,7 @@ struct wi_counters {
#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
@@ -270,7 +270,7 @@ struct wi_ltv_keys {
#define WI_RID_REG_DOMAINS 0xFD11 /* list of intendted regulatory doms */
#define WI_RID_TEMP_TYPE 0xFD12 /* hw temp range code */
#define WI_RID_CIS 0xFD13 /* PC card info struct */
-#define WI_RID_STA_IDENEITY 0xFD20 /* station funcs firmware ident */
+#define WI_RID_STA_IDENTITY 0xFD20 /* station funcs firmware ident */
#define WI_RID_STA_SUP_RANGE 0xFD21 /* station supplier compat */
#define WI_RID_MFI_ACT_RANGE 0xFD22
#define WI_RID_CFI_ACT_RANGE 0xFD33
diff --git a/sys/dev/ic/if_wireg.h b/sys/dev/ic/if_wireg.h
index 1f414993b4c..be10328aadc 100644
--- a/sys/dev/ic/if_wireg.h
+++ b/sys/dev/ic/if_wireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wireg.h,v 1.3 2001/06/07 05:07:27 mickey Exp $ */
+/* $OpenBSD: if_wireg.h,v 1.4 2001/06/07 18:51:59 millert Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -325,10 +325,8 @@ struct wi_ltv_memsz {
};
/*
- * NIC Identification (0xFD0B)
+ * NIC Identification (0xFD0B == WI_RID_CARD_ID)
*/
-#define WI_RID_CARDID 0xFD0B
-#define WI_RID_IDENT 0xFD20
struct wi_ltv_ver {
u_int16_t wi_len;
u_int16_t wi_type;
@@ -344,9 +342,8 @@ struct wi_ltv_ver {
};
/*
- * List of intended regulatory domains (0xFD11).
+ * List of intended regulatory domains (WI_RID_DOMAINS = 0xFD11).
*/
-#define WI_RID_DOMAINS 0xFD11
struct wi_ltv_domains {
u_int16_t wi_len;
u_int16_t wi_type;
@@ -354,9 +351,8 @@ struct wi_ltv_domains {
};
/*
- * CIS struct (0xFD13).
+ * CIS struct (0xFD13 == WI_RID_CIS).
*/
-#define WI_RID_CIS 0xFD13
struct wi_ltv_cis {
u_int16_t wi_len;
u_int16_t wi_type;
@@ -364,9 +360,8 @@ struct wi_ltv_cis {
};
/*
- * Communications quality (0xFD43).
+ * Communications quality (0xFD43 == WI_RID_COMMQUAL).
*/
-#define WI_RID_COMMQUAL 0xFD43
struct wi_ltv_commqual {
u_int16_t wi_len;
u_int16_t wi_type;
@@ -375,13 +370,9 @@ struct wi_ltv_commqual {
u_int16_t wi_noise_lvl;
};
-#define WI_RID_CUR_TX_RATE 0xFD44 /* current TX rate */
-
/*
- * Actual system scale thresholds (0xFD46).
+ * Actual system scale thresholds (0xFD46 == WI_RID_SCALETHRESH).
*/
-#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;
@@ -394,9 +385,8 @@ struct wi_ltv_scalethresh {
};
/*
- * PCF info struct (0xFD87).
+ * PCF info struct (0xFD87 == WI_RID_PCF).
*/
-#define WI_RID_PCF 0xFD87
struct wi_ltv_pcf {
u_int16_t wi_len;
u_int16_t wi_type;
@@ -408,12 +398,11 @@ struct wi_ltv_pcf {
};
/*
- * Connection control characteristics.
+ * Connection control characteristics (0xFC00 == WI_RID_PORTTYPE).
* 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
@@ -421,8 +410,6 @@ struct wi_ltv_pcf {
/*
* Mac addresses.
*/
-#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;
@@ -432,8 +419,6 @@ struct wi_ltv_macaddr {
/*
* Station set identification (SSID).
*/
-#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;
@@ -441,29 +426,8 @@ struct wi_ltv_ssid {
};
/*
- * Set communications channel (radio frequency).
- */
-#define WI_RID_OWN_CHNL 0xFC03
-
-/*
- * Frame data size.
- */
-#define WI_RID_MAX_DATALEN 0xFC07
-
-/*
- * ESS power management enable
- */
-#define WI_RID_PM_ENABLED 0xFC09
-
-/*
- * ESS max PM sleep internal
- */
-#define WI_RID_MAX_SLEEP 0xFC0C
-
-/*
- * Set our station name.
+ * Set our station name (0xFC0E == WI_RID_NODENAME).
*/
-#define WI_RID_NODENAME 0xFC0E
struct wi_ltv_nodename {
u_int16_t wi_len;
u_int16_t wi_type;
@@ -471,10 +435,9 @@ struct wi_ltv_nodename {
};
/*
- * Multicast addresses to be put in filter. We're
- * allowed up to 16 addresses in the filter.
+ * Multicast addresses to be put in filter. We're allowed up
+ * to 16 addresses in the filter (0xFC80 == WI_RID_MCAST).
*/
-#define WI_RID_MCAST 0xFC80
struct wi_ltv_mcast {
u_int16_t wi_len;
u_int16_t wi_type;
@@ -482,32 +445,6 @@ struct wi_ltv_mcast {
};
/*
- * 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
- * 2 == auto fallback
- */
-#define WI_RID_TX_RATE 0xFC84
-
-/*
- * promiscuous mode.
- */
-#define WI_RID_PROMISC 0xFC85
-
-/*
- * Auxiliary Timer tick interval
- */
-#define WI_RID_TICK_TIME 0xFCE0
-
-/*
* Information frame types.
*/
#define WI_INFO_NOTIFY 0xF000 /* Handover address */