Add sr_spew() messages to state why the packet was found to be invalid.
Signed-off-by: Alexandru Gagniuc <redacted>
if (!(rs_packet->mode < MODE_INVALID))
return FALSE;
- if (!checksum_valid(rs_packet))
+ if (!checksum_valid(rs_packet)) {
+ sr_spew("Packet with invalid checksum. Discarding.");
return FALSE;
+ }
- if (!selection_good(rs_packet))
+ if (!selection_good(rs_packet)) {
+ sr_spew("Packet with invalid selection bits. Discarding.");
return FALSE;
+ }
return TRUE;
}