aboutsummaryrefslogtreecommitdiffstats
path: root/host/apps/omap_debug/usrp-e-crc-rw.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/apps/omap_debug/usrp-e-crc-rw.c')
-rw-r--r--host/apps/omap_debug/usrp-e-crc-rw.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/host/apps/omap_debug/usrp-e-crc-rw.c b/host/apps/omap_debug/usrp-e-crc-rw.c
index 6659b790b..2fa692429 100644
--- a/host/apps/omap_debug/usrp-e-crc-rw.c
+++ b/host/apps/omap_debug/usrp-e-crc-rw.c
@@ -75,9 +75,12 @@ static void *read_thread(void *threadid)
unsigned int rx_crc, pkt_len, pkt_seq;
unsigned long bytes_transfered;
struct timeval start_time;
+ unsigned int prev_seq = 0;
+ int first = 1;
__u8 *p;
+
printf("Greetings from the reading thread!\n");
// IMPORTANT: must assume max length packet from fpga
@@ -111,6 +114,15 @@ static void *read_thread(void *threadid)
// printf("Pkt len = %X, pkt seq = %X, driver len = %X\n", pkt_len, pkt_seq, cnt);
+ if (pkt_len != (cnt - 4))
+ printf("Packet length check fail, driver len = %ud, content = %ud\n",
+ cnt, pkt_len);
+
+ if (!first && (pkt_seq != (prev_seq + 1)))
+ printf("Sequence number check fail, pkt_seq = %ud, prev_seq = %ud\n",
+ pkt_seq, prev_seq);
+ first = 0;
+
for (i = 0; i < cnt-4; i++) {
ck_sum += p[i];