From 496fb84ec0c7accecb428990234064fc62a1923f Mon Sep 17 00:00:00 2001 From: stsp Date: Sun, 4 Feb 2018 10:06:51 +0000 Subject: [PATCH] Add media types for 802.11 AC. The first driver to make use of these will probably be bwfm(4). typos spotted by and ok phessler kettenis --- sys/net/if_media.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 8a4f402da11..1da3138098d 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_media.h,v 1.40 2017/11/15 01:11:45 dlg Exp $ */ +/* $OpenBSD: if_media.h,v 1.41 2018/02/04 10:06:51 stsp Exp $ */ /* $NetBSD: if_media.h,v 1.22 2000/02/17 21:53:16 sommerfeld Exp $ */ /*- @@ -313,6 +313,16 @@ uint64_t ifmedia_baudrate(uint64_t); #define IFM_IEEE80211_HT_MCS74 93 /* 11n MCS 74 */ #define IFM_IEEE80211_HT_MCS75 94 /* 11n MCS 75 */ #define IFM_IEEE80211_HT_MCS76 95 /* 11n MCS 76 */ +#define IFM_IEEE80211_VHT_MCS0 96 /* 11ac MCS 0 */ +#define IFM_IEEE80211_VHT_MCS1 97 /* 11ac MCS 1 */ +#define IFM_IEEE80211_VHT_MCS2 98 /* 11ac MCS 2 */ +#define IFM_IEEE80211_VHT_MCS3 99 /* 11ac MCS 3 */ +#define IFM_IEEE80211_VHT_MCS4 100 /* 11ac MCS 4 */ +#define IFM_IEEE80211_VHT_MCS5 101 /* 11ac MCS 5 */ +#define IFM_IEEE80211_VHT_MCS6 102 /* 11ac MCS 6 */ +#define IFM_IEEE80211_VHT_MCS7 103 /* 11ac MCS 7 */ +#define IFM_IEEE80211_VHT_MCS8 104 /* 11ac MCS 8 */ +#define IFM_IEEE80211_VHT_MCS9 105 /* 11ac MCS 9 */ #define IFM_IEEE80211_ADHOC 0x0000000000010000ULL /* Operate in Adhoc mode */ #define IFM_IEEE80211_HOSTAP 0x0000000000020000ULL /* Operate in Host AP mode */ @@ -326,6 +336,7 @@ uint64_t ifmedia_baudrate(uint64_t); #define IFM_IEEE80211_11G 0x0000000300000000ULL /* 2GHz, CCK mode */ #define IFM_IEEE80211_FH 0x0000000400000000ULL /* 2GHz, GFSK mode */ #define IFM_IEEE80211_11N 0x0000000800000000ULL /* 11n/HT 2GHz/5GHz */ +#define IFM_IEEE80211_11AC 0x0000001000000000ULL /* 11ac/VHT 5GHz */ /* * Digitally multiplexed "Carrier" Serial Interfaces @@ -696,6 +707,16 @@ struct ifmedia_description { { IFM_IEEE80211|IFM_IEEE80211_HT_MCS74, "HT-MCS74" }, \ { IFM_IEEE80211|IFM_IEEE80211_HT_MCS75, "HT-MCS75" }, \ { IFM_IEEE80211|IFM_IEEE80211_HT_MCS76, "HT-MCS76" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS0, "VHT-MCS0" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS1, "VHT-MCS1" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS2, "VHT-MCS2" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS3, "VHT-MCS3" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS4, "VHT-MCS4" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS5, "VHT-MCS5" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS6, "VHT-MCS6" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS7, "VHT-MCS7" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS8, "VHT-MCS8" }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS9, "VHT-MCS9" }, \ \ { IFM_TDM|IFM_TDM_T1, "t1" }, \ { IFM_TDM|IFM_TDM_T1_AMI, "t1-ami" }, \ @@ -721,6 +742,7 @@ struct ifmedia_description { { IFM_IEEE80211|IFM_IEEE80211_11G, "11g" }, \ { IFM_IEEE80211|IFM_IEEE80211_FH, "fh" }, \ { IFM_IEEE80211|IFM_IEEE80211_11N, "11n" }, \ + { IFM_IEEE80211|IFM_IEEE80211_11AC, "11ac" }, \ { IFM_TDM|IFM_TDM_MASTER, "master" }, \ { 0, NULL }, \ } @@ -888,6 +910,17 @@ struct ifmedia_baudrate { { IFM_IEEE80211|IFM_IEEE80211_HT_MCS74, IF_Mbps(195) }, \ { IFM_IEEE80211|IFM_IEEE80211_HT_MCS75, IF_Mbps(195) }, \ { IFM_IEEE80211|IFM_IEEE80211_HT_MCS76, IF_Kbps(214500) }, \ + /* These VHT rates correspond to 1 SS, no SGI, 40 MHz channel.*/\ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS0, IF_Kbps(13500) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS1, IF_Mbps(27) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS2, IF_Kbps(40500) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS3, IF_Mbps(54) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS4, IF_Mbps(81) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS5, IF_Mbps(108) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS6, IF_Kbps(121500) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS7, IF_Mbps(135) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS8, IF_Mbps(162) }, \ + { IFM_IEEE80211|IFM_IEEE80211_VHT_MCS9, IF_Mbps(180) }, \ \ { IFM_TDM|IFM_TDM_T1, IF_Kbps(1536) }, \ { IFM_TDM|IFM_TDM_T1_AMI, IF_Kbps(1536) }, \ -- 2.20.1