summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-05-03 18:32:31 -0700
committerGuy Harris <guy@alum.mit.edu>2017-05-04 01:33:10 +0000
commit6b7d99022b1007d8762e4c46bd5a746674349cca (patch)
treea667136447235dd4e8e25dc8372e47573a4eb0ff /wiretap
parent81292f3ac786578f0cadee55f16f6dfb8315b705 (diff)
downloadwireshark-6b7d99022b1007d8762e4c46bd5a746674349cca.tar.gz
Fix some comments, shuffle some code, change a constant in an assignment.
Fix "VHTPPDU" to be "VHT PPDU". Move the code that processes the RSSI values before the code that processes the next two bytes of the header, so it's done in order; that makes it a bit easier to see the layout of that header (although 2 bytes of it are processed below). Fix the comment describing what the first 16 bytes of the record data after the stats are. Don't use vVW510021_W_STATS_HEADER_LEN - that's for the Series II hardware. Fix some indentation. Change-Id: If47c4a44fd5e72971a28daf6af88d5e19c53abbe Reviewed-on: https://code.wireshark.org/review/21482 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/vwr.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c
index 53b93e167b..40445ddd90 100644
--- a/wiretap/vwr.c
+++ b/wiretap/vwr.c
@@ -1883,11 +1883,6 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
}
}
- if (IS_TX == 0 || IS_TX == 4){
- L1InfoC = s_start_ptr[8];
- }
-
- msdu_length = pntoh24(&s_start_ptr[9]);
for (i = 0; i < 4; i++)
{
if (IS_TX == 1)
@@ -1900,6 +1895,12 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
}
}
+ if (IS_TX == 0 || IS_TX == 4){
+ L1InfoC = s_start_ptr[8];
+ }
+
+ msdu_length = pntoh24(&s_start_ptr[9]);
+
/*** 16 bytes of PLCP header + 1 byte of L1P for user position ***/
plcp_ptr = &(rec[stats_offset+16]);
@@ -1985,7 +1986,7 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
else if (plcp_type == vVW510021_W_PLCP_VHT_MIXED)
{
/*
- * According to section 22.3.2 "VHTPPDU format" of IEEE Std
+ * According to section 22.3.2 "VHT PPDU format" of IEEE Std
* 802.11ac-2013, the VHT PLCP header has a "non-HT SIGNAL field"
* (L-SIG), which looks like an 11a SIGNAL field, followed by
* a VHT Signal A field (VHT-SIG-A) described in section
@@ -2426,9 +2427,9 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
/* The packet is constructed as a 38-byte VeriWave-extended Radiotap header plus the raw */
/* MAC octets. */
static gboolean vwr_read_rec_data_ethernet(vwr_t *vwr, struct wtap_pkthdr *phdr,
- Buffer *buf, const guint8 *rec,
- int rec_size, int IS_TX, int *err,
- gchar **err_info)
+ Buffer *buf, const guint8 *rec,
+ int rec_size, int IS_TX, int *err,
+ gchar **err_info)
{
guint8 *data_ptr;
int bytes_written = 0; /* bytes output to buf so far */
@@ -2898,10 +2899,18 @@ static void setup_defaults(vwr_t *vwr, guint16 fpga)
vwr->PLCP_LENGTH_OFF = 16;
/*
- * 4 bytes of something, 4 bytes of layer 2-4 stuff,
- * 16 bytes of PLCP.
+ * The 16 + 16 is:
+ *
+ * 2 bytes of l1p_1/l1p_2;
+ * 1 byte of signal bandwidth mask;
+ * 1 byte of antenna port energy;
+ * 4 bytes of per-antenna RSSI;
+ * 1 byte of L1InfoC;
+ * 3 bytes of MSDU length;
+ * 4 bytes of something;
+ * 16 bytes of PLCP.
*/
- vwr->MPDU_OFF = vVW510021_W_STATS_HEADER_LEN + 4 + 4 + 16;
+ vwr->MPDU_OFF = 16 + 16;
break;