summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-08-24 12:23:58 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-08-24 12:23:58 +0000
commit12ffd26cc538e865e25a12264d55af13f09c6997 (patch)
treefb6f5c2a2cef6a2a5356e0f7eef96504e9be7f0b
parent57a8da4451d266f1c20587632c1da7a7e62e375f (diff)
defines and struct for the ieee80211 framework; deraadt@ ok.
-rw-r--r--sys/dev/ic/if_wi_ieee.h19
-rw-r--r--sys/net/if_media.h4
2 files changed, 21 insertions, 2 deletions
diff --git a/sys/dev/ic/if_wi_ieee.h b/sys/dev/ic/if_wi_ieee.h
index 2a3b8d9eb32..6ba345f6b46 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.16 2002/10/27 16:20:48 millert Exp $ */
+/* $OpenBSD: if_wi_ieee.h,v 1.17 2003/08/24 12:23:57 fgsch Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -83,6 +83,8 @@ struct wi_req {
#define WI_RID_IFACE_STATS 0x0100
#define WI_RID_MGMT_XMIT 0x0200
#define WI_RID_MONITOR_MODE 0x0500
+#define WI_RID_SCAN_APS 0x0600
+#define WI_RID_READ_APS 0x0700
struct wi_80211_hdr {
u_int16_t frame_ctl;
@@ -225,6 +227,7 @@ struct wi_counters {
#define WI_RID_CNFAUTHMODE 0xFC2A
#define WI_RID_SYMBOL_KEYLENGTH 0xFC2B
#define WI_RID_ROAMING_MODE 0xFC2D /* Roaming mode (1:firm,3:disable) */
+#define WI_RID_CUR_BEACON_INT 0xFC33 /* beacon xmit time for BSS creation */
#define WI_RID_CNF_DBM_ADJUST 0xFC46 /* Get DBM adjustment factor */
#define WI_RID_SYMBOL_PREAMBLE 0xFC8C /* Enable/disable short preamble */
#define WI_RID_P2_SHORT_PREAMBLE 0xFCB0 /* Short preamble support */
@@ -342,6 +345,20 @@ struct wi_ltv_keys {
#define WI_RID_CHANNEL_REQ 0xFCE4 /* Channel Information Request (AP) */
#define WI_RID_SCAN_RES 0xFD88 /* Scan Results Table */
+struct wi_apinfo {
+ int scanreason; /* ScanReason */
+ char bssid[6]; /* BSSID (mac address) */
+ int channel; /* Channel */
+ int signal; /* Signal level */
+ int noise; /* Average Noise Level*/
+ int quality; /* Quality */
+ int namelen; /* Length of SSID string */
+ char name[32]; /* SSID string */
+ int capinfo; /* Capability info. */
+ int interval; /* BSS Beacon Interval */
+ int rate; /* Data Rate */
+};
+
/*
* The following do not get passed down to the card, they are used
* by wicontrol to modify the behavior of the driver (use WEP in software or
diff --git a/sys/net/if_media.h b/sys/net/if_media.h
index 5b3eda3ca79..5e8dd5f1b28 100644
--- a/sys/net/if_media.h
+++ b/sys/net/if_media.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_media.h,v 1.11 2002/11/26 06:01:28 nate Exp $ */
+/* $OpenBSD: if_media.h,v 1.12 2003/08/24 12:23:57 fgsch Exp $ */
/* $NetBSD: if_media.h,v 1.22 2000/02/17 21:53:16 sommerfeld Exp $ */
/*-
@@ -217,6 +217,7 @@ int ifmedia_baudrate(int);
#define IFM_IEEE80211_HOSTAP 0x200 /* Operate in Host AP mode */
#define IFM_IEEE80211_IBSS 0x400 /* Operate in IBSS mode */
#define IFM_IEEE80211_IBSSMASTER 0x800 /* Operate as an IBSS master */
+#define IFM_IEEE80211_MONITOR 0x1000 /* Operate in Monitor mode */
/*
* Shared media sub-types
@@ -411,6 +412,7 @@ struct ifmedia_description {
{ IFM_IEEE80211|IFM_IEEE80211_HOSTAP, "hostap" }, \
{ IFM_IEEE80211|IFM_IEEE80211_IBSS, "ibss" }, \
{ IFM_IEEE80211|IFM_IEEE80211_IBSSMASTER, "ibss-master" }, \
+ { IFM_IEEE80211|IFM_IEEE80211_MONITOR, "monitor" }, \
\
{ 0, NULL }, \
}