aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-10-27 20:29:25 -0700
committerGuy Harris <guy@alum.mit.edu>2017-10-28 03:29:59 +0000
commita1218446d9990fd2710c3f9fe565907c202393a9 (patch)
treede94708c429babcee2209cca52fb911671fdb612
parent7ddfee9aead225465cbcdd5a29d7af5332bdccb7 (diff)
Put all the 11n vs. 11ac stuff together.
Also, there's no need to zero out the NSS values for 11ac - we zero out the entire pseudo-header at the beginning. We only need to set them if we *have* them. Change-Id: I9ebda7e246c24941ca77314bba6f86dea41e5992 Reviewed-on: https://code.wireshark.org/review/24135 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/dissectors/packet-peekremote.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/epan/dissectors/packet-peekremote.c b/epan/dissectors/packet-peekremote.c
index 409d67b..2733ca7 100644
--- a/epan/dissectors/packet-peekremote.c
+++ b/epan/dissectors/packet-peekremote.c
@@ -471,10 +471,15 @@ dissect_peekremote_new(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
offset += 4;
mcs_index = tvb_get_ntohs(tvb, offset);
extflags = tvb_get_ntohl(tvb, offset+12);
- if (extflags & EXT_FLAG_802_11ac)
+ if (extflags & EXT_FLAG_802_11ac) {
proto_tree_add_item(peekremote_tree, &hfi_peekremote_mcs_index_ac, tvb, offset, 2, ENC_BIG_ENDIAN);
- else
+ phdr.phy = PHDR_802_11_PHY_11AC;
+ } else {
proto_tree_add_item(peekremote_tree, &hfi_peekremote_mcs_index, tvb, offset, 2, ENC_BIG_ENDIAN);
+ phdr.phy = PHDR_802_11_PHY_11N;
+ phdr.phy_info.info_11n.has_mcs_index = TRUE;
+ phdr.phy_info.info_11n.mcs_index = mcs_index;
+ }
offset += 2;
phdr.has_channel = TRUE;
phdr.channel = tvb_get_ntohs(tvb, offset);
@@ -489,17 +494,6 @@ dissect_peekremote_new(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
offset += 4;
proto_tree_add_item(peekremote_tree, &hfi_peekremote_band, tvb, offset, 4, ENC_BIG_ENDIAN);
offset +=4;
- if (extflags & EXT_FLAG_802_11ac) {
- guint i;
- phdr.phy = PHDR_802_11_PHY_11AC;
- for (i = 0; i < 4; i++) {
- phdr.phy_info.info_11ac.nss[i] = 0;
- }
- } else {
- phdr.phy = PHDR_802_11_PHY_11N;
- phdr.phy_info.info_11n.has_mcs_index = TRUE;
- phdr.phy_info.info_11n.mcs_index = mcs_index;
- }
offset += dissect_peekremote_extflags(tvb, pinfo, peekremote_tree, offset);
phdr.has_signal_percent = TRUE;
phdr.signal_percent = tvb_get_guint8(tvb, offset);