aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-01-27 08:13:17 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-28 15:44:29 -0500
commit6d744bacee8195c915c514409a81d470ce7b1177 (patch)
tree5697c3b9211b2ebae666f42a35c174ad15ee73a5 /include
parentebefce3d13f8b5a871337ff7c3821ee140c1ea8a (diff)
mac80211: add MCS information to radiotap
This adds the MCS information we currently get from the drivers into radiotap. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/ieee80211_radiotap.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index af49f8ab7f81..b0be5fb9de19 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -178,6 +178,11 @@ struct ieee80211_radiotap_header {
178 * 178 *
179 * Number of unicast retries a transmitted frame used. 179 * Number of unicast retries a transmitted frame used.
180 * 180 *
181 * IEEE80211_RADIOTAP_MCS u8, u8, u8 unitless
182 *
183 * Contains a bitmap of known fields/flags, the flags, and
184 * the MCS index.
185 *
181 */ 186 */
182enum ieee80211_radiotap_type { 187enum ieee80211_radiotap_type {
183 IEEE80211_RADIOTAP_TSFT = 0, 188 IEEE80211_RADIOTAP_TSFT = 0,
@@ -199,6 +204,8 @@ enum ieee80211_radiotap_type {
199 IEEE80211_RADIOTAP_RTS_RETRIES = 16, 204 IEEE80211_RADIOTAP_RTS_RETRIES = 16,
200 IEEE80211_RADIOTAP_DATA_RETRIES = 17, 205 IEEE80211_RADIOTAP_DATA_RETRIES = 17,
201 206
207 IEEE80211_RADIOTAP_MCS = 19,
208
202 /* valid in every it_present bitmap, even vendor namespaces */ 209 /* valid in every it_present bitmap, even vendor namespaces */
203 IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29, 210 IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29,
204 IEEE80211_RADIOTAP_VENDOR_NAMESPACE = 30, 211 IEEE80211_RADIOTAP_VENDOR_NAMESPACE = 30,
@@ -245,6 +252,24 @@ enum ieee80211_radiotap_type {
245#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ 252#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
246#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ 253#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
247 254
255
256/* For IEEE80211_RADIOTAP_MCS */
257#define IEEE80211_RADIOTAP_MCS_HAVE_BW 0x01
258#define IEEE80211_RADIOTAP_MCS_HAVE_MCS 0x02
259#define IEEE80211_RADIOTAP_MCS_HAVE_GI 0x04
260#define IEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08
261#define IEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10
262
263#define IEEE80211_RADIOTAP_MCS_BW_MASK 0x03
264#define IEEE80211_RADIOTAP_MCS_BW_20 0
265#define IEEE80211_RADIOTAP_MCS_BW_40 1
266#define IEEE80211_RADIOTAP_MCS_BW_20L 2
267#define IEEE80211_RADIOTAP_MCS_BW_20U 3
268#define IEEE80211_RADIOTAP_MCS_SGI 0x04
269#define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08
270#define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10
271
272
248/* Ugly macro to convert literal channel numbers into their mhz equivalents 273/* Ugly macro to convert literal channel numbers into their mhz equivalents
249 * There are certianly some conditions that will break this (like feeding it '30') 274 * There are certianly some conditions that will break this (like feeding it '30')
250 * but they shouldn't arise since nothing talks on channel 30. */ 275 * but they shouldn't arise since nothing talks on channel 30. */