aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211-radiotap.c
diff options
context:
space:
mode:
authorSimon Barber <sbarber@parc.com>2012-05-17 14:52:40 -0700
committerMichael Mann <mmann78@netscape.net>2015-12-24 03:46:46 +0000
commit1ffd4398504d5bc69c322fd64e826fa7eb22ed3b (patch)
tree22760eee46487baa62a88c6bbb5cfc9c1ffc5b03 /epan/dissectors/packet-ieee80211-radiotap.c
parent4276ec079130f8a953158520333b34da265706ec (diff)
Add preference to interpret radiotap rates with bit 7 set as MCS.
Change-Id: Ib3a3a70e0edbaeba143703d9b5f4f9c5c8d90818 Reviewed-on: https://code.wireshark.org/review/12855 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-radiotap.c')
-rw-r--r--epan/dissectors/packet-ieee80211-radiotap.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c
index 3ba618740e..2246ba7b78 100644
--- a/epan/dissectors/packet-ieee80211-radiotap.c
+++ b/epan/dissectors/packet-ieee80211-radiotap.c
@@ -223,6 +223,7 @@ static int radiotap_tap = -1;
/* Settings */
static gboolean radiotap_bit14_fcs = FALSE;
+static gboolean radiotap_interpret_high_rates_as_mcs = FALSE;
struct _radiotap_info {
guint radiotap_length;
@@ -878,19 +879,9 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u
* to 11a or 11g, which do exist, or for 11n
* implementations that stuff a rate value into
* this field, which also appear to exist.
- *
- * We currently handle that by assuming that
- * if the 0x80 bit is set *and* the remaining
- * bits have a value between 0 and 15 it's
- * an MCS value, otherwise it's a rate. If
- * there are cases where systems that use
- * "0x80 + MCS index" for MCS indices > 15,
- * or stuff a rate value here between 64 and
- * 71.5 Mb/s in here, we'll need a preference
- * setting. Such rates do exist, e.g. 11n
- * MCS 7 at 20 MHz with a long guard interval.
*/
- if (rate >= 0x80 && rate <= 0x8f) {
+ if (radiotap_interpret_high_rates_as_mcs &&
+ rate >= 0x80 && rate <= (0x80+76)) {
/*
* XXX - we don't know the channel width
* or guard interval length, so we can't
@@ -2663,6 +2654,12 @@ void proto_register_radiotap(void)
"Some generators (e.g. AirPcap) use a non-standard radiotap flag 14 to put "
"the FCS into the header.",
&radiotap_bit14_fcs);
+
+ prefs_register_bool_preference(radiotap_module, "interpret_high_rates_as_mcs",
+ "Interpret high rates as MCS",
+ "Some generators use rates with bit 7 set to indicate an MCS, e.g. BSD. "
+ "others (Linux, AirPcap) do not.",
+ &radiotap_interpret_high_rates_as_mcs);
}
void proto_reg_handoff_radiotap(void)