summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ieee80211-radio.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-06-28 09:51:22 -0700
committerGuy Harris <guy@alum.mit.edu>2015-06-28 16:51:52 +0000
commit276299531692afc09c7610a7837d74312969bfc0 (patch)
treea12bec953f0ffc99283d955fbab2f39fa98ff1da /epan/dissectors/packet-ieee80211-radio.c
parentad18161c79e84062ed4a6c6630a76a2294b81c1f (diff)
downloadwireshark-276299531692afc09c7610a7837d74312969bfc0.tar.gz
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. Change-Id: I7ffd1b0e79e45fee526305846aadca04eb135b11 Reviewed-on: https://code.wireshark.org/review/9205 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-radio.c')
-rw-r--r--epan/dissectors/packet-ieee80211-radio.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ieee80211-radio.c b/epan/dissectors/packet-ieee80211-radio.c
index 5456663d5b..94ba5d69f7 100644
--- a/epan/dissectors/packet-ieee80211-radio.c
+++ b/epan/dissectors/packet-ieee80211-radio.c
@@ -833,13 +833,6 @@ dissect_wlan_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
}
for (i = 0; i < 4; i++) {
- guint nsts;
-
- if ((phdr->phy_info.info_11ac.presence_flags & PHDR_802_11AC_HAS_STBC) &&
- phdr->phy_info.info_11ac.stbc)
- nsts = 2 * phdr->phy_info.info_11ac.nss[i];
- else
- nsts = phdr->phy_info.info_11ac.nss[i];
if (phdr->phy_info.info_11ac.nss[i] != 0) {
proto_item *it;
@@ -861,8 +854,20 @@ dissect_wlan_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
proto_tree_add_uint(user_tree, hf_wlan_radio_11ac_nss, tvb, 0, 0,
phdr->phy_info.info_11ac.nss[i]);
- proto_tree_add_uint(user_tree, hf_wlan_radio_11ac_nsts, tvb, 0, 0,
+ /*
+ * If we don't know whether space-time block coding is being
+ * used, we don't know the number of space-time streams.
+ */
+ if (phdr->phy_info.info_11ac.presence_flags & PHDR_802_11AC_HAS_STBC) {
+ guint nsts;
+
+ if (phdr->phy_info.info_11ac.stbc)
+ nsts = 2 * phdr->phy_info.info_11ac.nss[i];
+ else
+ nsts = phdr->phy_info.info_11ac.nss[i];
+ proto_tree_add_uint(user_tree, hf_wlan_radio_11ac_nsts, tvb, 0, 0,
nsts);
+ }
proto_tree_add_uint(user_tree, hf_wlan_radio_11ac_fec, tvb, 0, 0,
(phdr->phy_info.info_11ac.fec >> i) & 0x01);