radiotap: Fixes because the meaning of some fields changed.
authorRichard Sharpe <realrichardsharpe@gmail.com>
Tue, 20 Feb 2018 16:00:24 +0000 (08:00 -0800)
committerAnders Broman <a.broman58@gmail.com>
Thu, 22 Feb 2018 05:13:26 +0000 (05:13 +0000)
Two sets of reserved bits now have a meaning:

1. The pri/sec 80 MHz fields in D2
2. The RU allocation offset fields, also in D2.

Change-Id: I9acfce4e3dc61579a686fd53c570c9aceebad10b
Reviewed-on: https://code.wireshark.org/review/25927
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/dissectors/packet-ieee80211-radiotap-defs.h
epan/dissectors/packet-ieee80211-radiotap.c

index a753fbe47ab2229da21e9d4e4fd1191e1afdd5e5..2c0a9e2dd204e4f3260620a401012920bfdd47d3 100644 (file)
@@ -405,7 +405,7 @@ enum ieee80211_radiotap_type {
 #define IEEE80211_RADIOTAP_HE_SPATIAL_REUSE_4_KNOWN            0x2000
 #define IEEE80211_RADIOTAP_HE_DATA_BW_RU_ALLOCATION_KNOWN      0x4000
 #define IEEE80211_RADIOTAP_HE_DOPPLER_KNOWN                    0x8000
-#define IEEE80211_RADIOTAP_HE_RESERVED_D2_B1                   0x0001
+#define IEEE80211_RADIOTAP_HE_PRI_SEC_80_MHZ_KNOWN             0x0001
 #define IEEE80211_RADIOTAP_HE_GI_KNOWN                         0x0002
 #define IEEE80211_RADIOTAP_HE_LTF_SYMBOLS_KNOWN                        0x0004
 #define IEEE80211_RADIOTAP_HE_PRE_FEC_PADDING_FACTOR_KNOWN     0x0008
@@ -413,7 +413,9 @@ enum ieee80211_radiotap_type {
 #define IEEE80211_RADIOTAP_HE_PE_DISAMBIGUITY_KNOWN            0x0020
 #define IEEE80211_RADIOTAP_HE_TXOP_KNOWN                       0x0040
 #define IEEE80211_RADIOTAP_HE_MIDAMBLE_PERIODICITY_KNOWN       0x0080
-#define IEEE80211_RADIOTAP_HE_RESERVED_D2_FF00                 0xFF00
+#define IEEE80211_RADIOTAP_HE_RU_ALLOCATION_OFFSET             0x3F00
+#define IEEE80211_RADIOTAP_HE_RU_ALLOCATION_OFFSET_KNOWN       0x4000
+#define IEEE80211_RADIOTAP_HE_PRI_SEC_80_MHZ                   0x8000
 #define IEEE80211_RADIOTAP_HE_BSS_COLOR_MASK                   0x003F
 #define IEEE80211_RADIOTAP_HE_BEAM_CHANGE                      0x0040
 #define IEEE80211_RADIOTAP_HE_UL_DL                            0x0080
index 7068edd962096f58b1aa7583c55e3362970a3e1e..162dabc6294376d4750c0e435b3a416ed7fc337f 100644 (file)
@@ -214,7 +214,7 @@ static int hf_radiotap_he_spatial_reuse_3_known = -1;
 static int hf_radiotap_he_spatial_reuse_4_known = -1;
 static int hf_radiotap_he_data_bw_ru_allocation_known = -1;
 static int hf_radiotap_he_doppler_known = -1;
-static int hf_radiotap_he_d2_reserved_b1 = -1;
+static int hf_radiotap_he_pri_sec_80_mhz_known = -1;
 static int hf_radiotap_he_gi_known = -1;
 static int hf_radiotap_he_ltf_symbols_known = -1;
 static int hf_radiotap_he_pre_fec_padding_factor_known = -1;
@@ -222,7 +222,9 @@ static int hf_radiotap_he_txbf_known = -1;
 static int hf_radiotap_he_pe_disambiguity_known = -1;
 static int hf_radiotap_he_txop_known = -1;
 static int hf_radiotap_he_midamble_periodicity_known = -1;
-static int hf_radiotap_he_d2_reserved_ff00 = -1;
+static int hf_radiotap_he_ru_allocation_offset = -1;
+static int hf_radiotap_he_ru_allocation_offset_known = -1;
+static int hf_radiotap_he_pri_sec_80_mhz = -1;
 static int hf_radiotap_he_bss_color = -1;
 static int hf_radiotap_he_bss_color_unknown = -1;
 static int hf_radiotap_he_beam_change = -1;
@@ -776,7 +778,7 @@ static const value_string he_pdu_format_vals[] = {
 };
 
 static const int *data2_headers[] = {
-       &hf_radiotap_he_d2_reserved_b1,
+       &hf_radiotap_he_pri_sec_80_mhz_known,
        &hf_radiotap_he_gi_known,
        &hf_radiotap_he_ltf_symbols_known,
        &hf_radiotap_he_pre_fec_padding_factor_known,
@@ -784,10 +786,17 @@ static const int *data2_headers[] = {
        &hf_radiotap_he_pe_disambiguity_known,
        &hf_radiotap_he_txop_known,
        &hf_radiotap_he_midamble_periodicity_known,
-       &hf_radiotap_he_d2_reserved_ff00,
+       &hf_radiotap_he_ru_allocation_offset,
+       &hf_radiotap_he_ru_allocation_offset_known,
+       &hf_radiotap_he_pri_sec_80_mhz,
        NULL
 };
 
+static const true_false_string tfs_pri_sec_80_mhz = {
+       "secondary",
+       "primary"
+};
+
 static const int *data3_headers[] = {
        &hf_radiotap_he_bss_color,
        &hf_radiotap_he_beam_change,
@@ -3417,9 +3426,9 @@ void proto_register_radiotap(void)
                  FT_UINT16, BASE_HEX, NULL, 0x0,
                  "Data 1 of the HE Info field", HFILL}},
 
-               {&hf_radiotap_he_d2_reserved_b1,
-                {"Reserved", "radiotap.he.data_2.reserved_ff00",
-                 FT_UINT16, BASE_HEX, NULL, IEEE80211_RADIOTAP_HE_RESERVED_D2_B1,
+               {&hf_radiotap_he_pri_sec_80_mhz_known,
+                {"pri/sec 80 MHz known", "radiotap.he.data_2.pri_sec_80_mhz_known",
+                 FT_BOOLEAN, 16, NULL, IEEE80211_RADIOTAP_HE_PRI_SEC_80_MHZ_KNOWN,
                  NULL, HFILL}},
 
                {&hf_radiotap_he_gi_known,
@@ -3457,9 +3466,21 @@ void proto_register_radiotap(void)
                  FT_BOOLEAN, 16, TFS(&tfs_known_unknown), IEEE80211_RADIOTAP_HE_MIDAMBLE_PERIODICITY_KNOWN,
                  NULL, HFILL}},
 
-               {&hf_radiotap_he_d2_reserved_ff00,
-                {"Reserved", "radiotap.he.data_2.reserved_ff00",
-                 FT_UINT16, BASE_HEX, NULL, IEEE80211_RADIOTAP_HE_RESERVED_D2_FF00,
+               {&hf_radiotap_he_ru_allocation_offset,
+                {"RU allocation offset", "radiotap.he.data_2.ru_allocation_offset",
+                 FT_UINT16, BASE_HEX, NULL, IEEE80211_RADIOTAP_HE_RU_ALLOCATION_OFFSET,
+                 NULL, HFILL}},
+
+               {&hf_radiotap_he_ru_allocation_offset_known,
+                {"RU allocation offset known", "radiotap.he.data_2.ru_allocation_offseti_known",
+                 FT_BOOLEAN, 16, TFS(&tfs_known_unknown),
+                       IEEE80211_RADIOTAP_HE_RU_ALLOCATION_OFFSET_KNOWN,
+                 NULL, HFILL}},
+
+               {&hf_radiotap_he_pri_sec_80_mhz,
+                {"pri/sec 80 MHz", "radiotap.he.data_2.pri_sec_80_mhz",
+                 FT_BOOLEAN, 16, TFS(&tfs_pri_sec_80_mhz),
+                       IEEE80211_RADIOTAP_HE_PRI_SEC_80_MHZ,
                  NULL, HFILL}},
 
                {&hf_radiotap_he_bss_color,