diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-06-28 10:28:38 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-06-28 17:29:42 +0000 |
commit | 8aaf42d2b11b993d54283a5944841813a06881d5 (patch) | |
tree | 4c2fd5772fc4f09410db7b95989f201542adb4a2 /epan/dissectors | |
parent | 276299531692afc09c7610a7837d74312969bfc0 (diff) |
If we don't know whether STBC is being used, we don't know NSTS.
If we don't know whether space-time block coding is being used, we don't
know the number of space-time streams, so don't try to calculate it and
don't put it into the protocol tree.
Mark it as generated, while we're at it, as it's not a value from the
radiotap header, and make it a guint.
Change-Id: Ib0b14f2f4f94e042d034311e10bb96b9b29a9d3e
Reviewed-on: https://code.wireshark.org/review/9206
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-ieee80211-radiotap.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c index cd0dcd2da4..58452aae13 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.c +++ b/epan/dissectors/packet-ieee80211-radiotap.c @@ -1525,7 +1525,7 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) case IEEE80211_RADIOTAP_VHT: { proto_item *it, *it_root = NULL; proto_tree *vht_tree = NULL, *vht_known_tree = NULL, *user_tree = NULL; - guint16 known, nsts; + guint16 known; guint8 vht_flags, bw, mcs_nss; guint bandwidth = 0; guint gi_length = 0; @@ -1661,11 +1661,6 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) phdr.phy_info.info_11ac.mcs[i] = mcs; phdr.phy_info.info_11ac.nss[i] = nss; - if ((known & IEEE80211_RADIOTAP_VHT_HAVE_STBC) && (vht_flags & IEEE80211_RADIOTAP_VHT_STBC)) - nsts = 2 * nss; - else - nsts = nss; - if (nss) { if (vht_tree) { it = proto_tree_add_item(vht_tree, hf_radiotap_vht_user, @@ -1686,8 +1681,18 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_tree_add_item(user_tree, hf_radiotap_vht_nss[i], tvb, offset + 4 + i, 1, ENC_LITTLE_ENDIAN); - proto_tree_add_uint(user_tree, hf_radiotap_vht_nsts[i], - tvb, offset + 4 + i, 1, nsts); + if (known & IEEE80211_RADIOTAP_VHT_HAVE_STBC) { + guint nsts; + proto_item *nsts_ti; + + if (vht_flags & IEEE80211_RADIOTAP_VHT_STBC) + nsts = 2 * nss; + else + nsts = nss; + nsts_ti = proto_tree_add_uint(user_tree, hf_radiotap_vht_nsts[i], + tvb, offset + 4 + i, 1, nsts); + PROTO_ITEM_SET_GENERATED(nsts_ti); + } proto_tree_add_item(user_tree, hf_radiotap_vht_coding[i], tvb, offset + 8, 1,ENC_LITTLE_ENDIAN); } |