diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-06-26 17:37:49 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-06-27 00:38:22 +0000 |
commit | ea4d01d90eecead750c44b5531f5ec28c95b51c1 (patch) | |
tree | 60a222a2398a88bba992d129237b97c4e5502eab /epan/dissectors/packet-ieee80211-radiotap.c | |
parent | 497159f37245164dba6cb2b80b29f866c051cf25 (diff) |
The "coding" subfield of the VHT field is a bitmask.
Treat it as such. Fetch it once, regardless of whether we have any
non-zero NSS values or not, and use the per-user NSS value to decide
whether a particular bit in the bitmask is valid and worth displaying.
Make the four coding fields bitfields, with the appropriate bit.
Change-Id: I506b35afa9d07da8d800da5c304d5d0aadd87c54
Reviewed-on: https://code.wireshark.org/review/16155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-radiotap.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211-radiotap.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c index 073bd28130..8dcc0bdef7 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.c +++ b/epan/dissectors/packet-ieee80211-radiotap.c @@ -1749,6 +1749,9 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u can_calculate_rate = FALSE; /* no bandwidth */ } + phdr.phy_info.info_11ac.has_fec = TRUE; + phdr.phy_info.info_11ac.fec = tvb_get_guint8(tvb, offset + 8); + for(i=0; i<4; i++) { mcs_nss = tvb_get_guint8(tvb, offset + 4 + i); nss = (mcs_nss & IEEE80211_RADIOTAP_VHT_NSS); @@ -1765,7 +1768,6 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u if (phdr.phy != PHDR_802_11_PHY_11AC) { phdr.phy = PHDR_802_11_PHY_11AC; } - phdr.phy_info.info_11ac.has_fec = TRUE; if (vht_tree) { it = proto_tree_add_item(vht_tree, hf_radiotap_vht_user, tvb, offset + 4, 5, ENC_NA); @@ -1815,7 +1817,6 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* u } } } - phdr.phy_info.info_11ac.fec = tvb_get_guint8(tvb, offset + 8); if (known & IEEE80211_RADIOTAP_VHT_HAVE_GID) { phdr.phy_info.info_11ac.has_group_id = TRUE; @@ -2641,22 +2642,22 @@ void proto_register_radiotap(void) {&hf_radiotap_vht_coding[0], {"Coding 0", "radiotap.vht.coding.0", - FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x0, + FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x01, "Coding", HFILL}}, {&hf_radiotap_vht_coding[1], {"Coding 1", "radiotap.vht.coding.1", - FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x0, + FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x02, "Coding", HFILL}}, {&hf_radiotap_vht_coding[2], {"Coding 2", "radiotap.vht.coding.2", - FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x0, + FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x04, "Coding", HFILL}}, {&hf_radiotap_vht_coding[3], {"Coding 3", "radiotap.vht.coding.3", - FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x0, + FT_UINT8, BASE_DEC, VALS(mcs_fec), 0x08, "Coding", HFILL}}, {&hf_radiotap_vht_datarate[0], |