summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-05-05 11:40:22 -0700
committerGuy Harris <guy@alum.mit.edu>2017-05-05 18:43:22 +0000
commit1a5c6da9fe25e768a45587d8ffb00f38dd1a82e4 (patch)
treebced8a663cf0a3189665205b55e5a14905e4780b /wiretap
parent8493630f0cc67d640cb3ffbbe1e7a80840570c1f (diff)
downloadwireshark-1a5c6da9fe25e768a45587d8ffb00f38dd1a82e4.tar.gz
Series I only handles pre-HT, so rename and remove variables.
Change-Id: Id9f086983544647267854446932a3ffe2ec2cc55 Reviewed-on: https://code.wireshark.org/review/21522 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/vwr.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index dc36155f23..48ffa7559e 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -1107,7 +1107,7 @@ static gboolean vwr_read_s1_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
guint32 info; /* INFO/ERRORS fields in stats blk */
gint8 rssi; /* RSSI, signed 8-bit number */
int f_tx; /* flag: if set, is a TX frame */
- guint8 plcp_type, rate_mcs_index, nss; /* PLCP type 0: Legacy, 1: Mixed, 2: Green field, 3: VHT Mixed */
+ guint8 rate_index; /* pre-HT only */
guint16 vc_id, ht_len=0; /* VC ID, total ip length */
guint flow_id; /* flow ID */
guint32 d_time, errors; /* packet duration & errors */
@@ -1159,14 +1159,12 @@ static gboolean vwr_read_s1_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
/* Decode OFDM or CCK PLCP header and determine rate and short preamble flag. */
/* The SIGNAL byte is always the first byte of the PLCP header in the frame. */
- plcp_type = vVW510021_W_PLCP_LEGACY;
- nss = 1;
if (m_type == vwr->MT_OFDM)
- rate_mcs_index = get_ofdm_rate(rec);
+ rate_index = get_ofdm_rate(rec);
else if ((m_type == vwr->MT_CCKL) || (m_type == vwr->MT_CCKS))
- rate_mcs_index = get_cck_rate(rec);
+ rate_index = get_cck_rate(rec);
else
- rate_mcs_index = 1;
+ rate_index = 1;
rflags = (m_type == vwr->MT_CCKS) ? FLAGS_SHORTPRE : 0;
/* Calculate the MPDU size/ptr stuff; MPDU starts at 4 or 6 depending on OFDM/CCK. */
/* Note that the number of octets in the frame also varies depending on OFDM/CCK, */
@@ -1299,14 +1297,14 @@ static gboolean vwr_read_s1_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
phtoles(&data_ptr[bytes_written], CHAN_CCK);
}
bytes_written += 2;
- phyRate = (guint16)(get_legacy_rate(rate_mcs_index) * 10);
+ phyRate = (guint16)(get_legacy_rate(rate_index) * 10);
phtoles(&data_ptr[bytes_written], phyRate);
bytes_written += 2;
- data_ptr[bytes_written] = plcp_type;
+ data_ptr[bytes_written] = vVW510021_W_PLCP_LEGACY; /* pre-HT */
bytes_written += 1;
- data_ptr[bytes_written] = rate_mcs_index;
+ data_ptr[bytes_written] = rate_index;
bytes_written += 1;
- data_ptr[bytes_written] = nss;
+ data_ptr[bytes_written] = 1; /* pre-VHT, so NSS = 1 */
bytes_written += 1;
data_ptr[bytes_written] = rssi;
bytes_written += 1;