summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2004-11-02 02:12:17 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2004-11-02 02:12:17 +0000
commite0cf47c0de721634dc585c0294b135312565215c (patch)
treef19d42cc474b6102cde1eb8b4db243f9fbb166fa /sys/net
parent2bf8d59b2a59ca3d2f78f0cff7bf5a26ef9847e2 (diff)
added new commands to ifconfig used by net80211 interfaces:
mode (set mode for multi-mode interfaces) and chan (set the radio channel). some additional output will be printed by "ifconfig -m". ok deraadt@ millert@ damien@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_media.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/sys/net/if_media.h b/sys/net/if_media.h
index 759863f39f9..8bc0d12882d 100644
--- a/sys/net/if_media.h
+++ b/sys/net/if_media.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_media.h,v 1.16 2004/10/28 20:35:44 henning Exp $ */
+/* $OpenBSD: if_media.h,v 1.17 2004/11/02 02:12:16 reyk Exp $ */
/* $NetBSD: if_media.h,v 1.22 2000/02/17 21:53:16 sommerfeld Exp $ */
/*-
@@ -334,7 +334,8 @@ int ifmedia_baudrate(int);
*/
#define IFM_MAKEWORD(type, subtype, options, instance) \
((type) | (subtype) | (options) | ((instance) << IFM_ISHIFT))
-
+#define IFM_MAKEMODE(mode) \
+ (((mode) << IFM_MSHIFT) & IFM_MMASK)
/*
* NetBSD extension not defined in the BSDI API. This is used in various
* places to get the canonical description for a given type/subtype.
@@ -433,10 +434,10 @@ struct ifmedia_description {
\
{ IFM_IEEE80211|IFM_IEEE80211_FH1, "FH1" }, \
{ IFM_IEEE80211|IFM_IEEE80211_FH2, "FH2" }, \
- { IFM_IEEE80211|IFM_IEEE80211_DS1, "DS1" }, \
{ IFM_IEEE80211|IFM_IEEE80211_DS2, "DS2" }, \
{ IFM_IEEE80211|IFM_IEEE80211_DS5, "DS5" }, \
{ IFM_IEEE80211|IFM_IEEE80211_DS11, "DS11" }, \
+ { IFM_IEEE80211|IFM_IEEE80211_DS1, "DS1" }, \
{ IFM_IEEE80211|IFM_IEEE80211_DS22, "DS22" }, \
{ IFM_IEEE80211|IFM_IEEE80211_OFDM6, "OFDM6" }, \
{ IFM_IEEE80211|IFM_IEEE80211_OFDM9, "OFDM9" }, \
@@ -463,6 +464,16 @@ struct ifmedia_description {
{ 0, NULL }, \
}
+#define IFM_MODE_DESCRIPTIONS { \
+ { IFM_AUTO, "autoselect" }, \
+ { IFM_AUTO, "auto" }, \
+ { IFM_IEEE80211|IFM_IEEE80211_11A, "11a" }, \
+ { IFM_IEEE80211|IFM_IEEE80211_11B, "11b" }, \
+ { IFM_IEEE80211|IFM_IEEE80211_11G, "11g" }, \
+ { IFM_IEEE80211|IFM_IEEE80211_FH, "fh" }, \
+ { 0, NULL }, \
+}
+
#define IFM_OPTION_DESCRIPTIONS { \
{ IFM_FDX, "full-duplex" }, \
{ IFM_FDX, "fdx" }, \
@@ -492,6 +503,7 @@ struct ifmedia_description {
{ IFM_IEEE80211|IFM_IEEE80211_IBSS, "ibss" }, \
{ IFM_IEEE80211|IFM_IEEE80211_IBSSMASTER, "ibss-master" }, \
{ IFM_IEEE80211|IFM_IEEE80211_MONITOR, "monitor" }, \
+ { IFM_IEEE80211|IFM_IEEE80211_TURBO, "turbo" }, \
\
{ IFM_TDM|IFM_TDM_HDLC_CRC16, "hdlc-crc16" }, \
{ IFM_TDM|IFM_TDM_PPP, "ppp" }, \
@@ -538,10 +550,20 @@ struct ifmedia_baudrate {
\
{ IFM_IEEE80211|IFM_IEEE80211_FH1, IF_Mbps(1) }, \
{ IFM_IEEE80211|IFM_IEEE80211_FH2, IF_Mbps(2) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_DS1, IF_Mbps(1) }, \
{ IFM_IEEE80211|IFM_IEEE80211_DS2, IF_Mbps(2) }, \
{ IFM_IEEE80211|IFM_IEEE80211_DS5, IF_Mbps(5) }, \
{ IFM_IEEE80211|IFM_IEEE80211_DS11, IF_Mbps(11) }, \
- { IFM_IEEE80211|IFM_IEEE80211_DS1, IF_Mbps(1) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_DS22, IF_Mbps(22) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM6, IF_Mbps(6) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM9, IF_Mbps(9) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM12, IF_Mbps(12) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM18, IF_Mbps(18) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM24, IF_Mbps(24) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM36, IF_Mbps(36) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM48, IF_Mbps(48) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM54, IF_Mbps(54) }, \
+ { IFM_IEEE80211|IFM_IEEE80211_OFDM72, IF_Mbps(72) }, \
\
{ IFM_TDM|IFM_TDM_T1, IF_Kbps(1536) }, \
{ IFM_TDM|IFM_TDM_T1_AMI, IF_Kbps(1536) }, \