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>
This commit is contained in:
Guy Harris 2015-06-28 10:28:38 -07:00
parent 2762995316
commit 8aaf42d2b1
1 changed files with 13 additions and 8 deletions

View File

@ -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);
}