From ac96b2cebde5de03172dae89581d7980a776d9f4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 17 Jun 2015 19:08:13 -0700 Subject: The STBC subfield of the radiotap MCS field is a count, not a flag. It's a 2-bit field that is the "number of STBC streams", according to the radiotap Web site item for the MCS field: http://www.radiotap.org/defined-fields/MCS Correctly label both the FCS type and STBC stream count fields. Change-Id: Ic49f6faec3335096c6bb8ce96ce0dec2f9342a37 Reviewed-on: https://code.wireshark.org/review/8971 Reviewed-by: Guy Harris --- epan/dissectors/packet-ieee80211-radiotap-defs.h | 6 +++++- epan/dissectors/packet-ieee80211-radiotap.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'epan') diff --git a/epan/dissectors/packet-ieee80211-radiotap-defs.h b/epan/dissectors/packet-ieee80211-radiotap-defs.h index fb82b20745..5777e63dae 100644 --- a/epan/dissectors/packet-ieee80211-radiotap-defs.h +++ b/epan/dissectors/packet-ieee80211-radiotap-defs.h @@ -275,8 +275,12 @@ enum ieee80211_radiotap_type { #define IEEE80211_RADIOTAP_MCS_SGI 0x04 #define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 -#define IEEE80211_RADIOTAP_MCS_STBC 0x20 +#define IEEE80211_RADIOTAP_MCS_STBC_MASK 0x60 +#define IEEE80211_RADIOTAP_MCS_STBC_1 1 +#define IEEE80211_RADIOTAP_MCS_STBC_2 2 +#define IEEE80211_RADIOTAP_MCS_STBC_3 3 +#define IEEE80211_RADIOTAP_MCS_STBC_SHIFT 5 /* For IEEE80211_RADIOTAP_AMPDU_STATUS */ #define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c index d875f9e9ea..179c650956 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.c +++ b/epan/dissectors/packet-ieee80211-radiotap.c @@ -1186,7 +1186,7 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) tvb, offset + 1, 1, mcs_flags); } if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_STBC) { - proto_tree_add_boolean(mcs_tree, hf_radiotap_mcs_stbc, + proto_tree_add_uint(mcs_tree, hf_radiotap_mcs_stbc, tvb, offset + 1, 1, mcs_flags); } if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_MCS) { @@ -1972,14 +1972,14 @@ void proto_register_radiotap(void) "Format information present", HFILL}}, {&hf_radiotap_mcs_have_fec, - {"FEC", "radiotap.mcs.have_fec", + {"FEC type", "radiotap.mcs.have_fec", FT_BOOLEAN, 8, NULL, IEEE80211_RADIOTAP_MCS_HAVE_FEC, - "Forward error correction information present", HFILL}}, + "Forward error correction type information present", HFILL}}, {&hf_radiotap_mcs_have_stbc, - {"STBC", "radiotap.mcs.have_stbc", + {"STBC streams", "radiotap.mcs.have_stbc", FT_BOOLEAN, 8, NULL, IEEE80211_RADIOTAP_MCS_HAVE_STBC, - "Space Time Block Coding information present", HFILL}}, + "Space Time Block Coding streams information present", HFILL}}, {&hf_radiotap_mcs_have_index, {"MCS index", "radiotap.mcs.have_index", @@ -2002,14 +2002,14 @@ void proto_register_radiotap(void) NULL, HFILL}}, {&hf_radiotap_mcs_fec, - {"FEC", "radiotap.mcs.fec", + {"FEC type", "radiotap.mcs.fec", FT_UINT8, BASE_DEC, VALS(mcs_fec), IEEE80211_RADIOTAP_MCS_FEC_LDPC, - "forward error correction", HFILL}}, + "Forward error correction type", HFILL}}, {&hf_radiotap_mcs_stbc, - {"STBC", "radiotap.mcs.stbc", - FT_BOOLEAN, 8, TFS(&tfs_on_off), IEEE80211_RADIOTAP_MCS_STBC, - "Space Time Block Code", HFILL}}, + {"STBC streams", "radiotap.mcs.stbc", + FT_UINT8, BASE_DEC, NULL, IEEE80211_RADIOTAP_MCS_STBC_MASK, + "Number of Space Time Block Code streams", HFILL}}, {&hf_radiotap_mcs_index, {"MCS index", "radiotap.mcs.index", -- cgit v1.2.3