The first byte of the Rx frame is a copy of the Rx status register, so
0x40 corresponds to RSR_MF (meaning the frame is multicast). Replace
0x40 with RSR_MF for clarity. (All other bits of the RSR indicate
errors. The fact that the driver ignores these errors will be fixed by
a later patch.)
The first byte of the status URB is a copy of the NSR, so 0x40
corresponds to NSR_LINKST. Replace 0x40 with NSR_LINKST for clarity.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Link: https://patch.msgid.link/20260124032248.26807-1-enelsonmoore@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* one skb may contains multiple packets */
while (skb->len > SR_RX_OVERHEAD) {
- if (skb->data[0] != 0x40)
+ if (skb->data[0] != RSR_MF)
return 0;
/* ignore the CRC length */
buf = urb->transfer_buffer;
- link = !!(buf[0] & 0x40);
+ link = !!(buf[0] & NSR_LINKST);
sr9700_handle_link_change(dev->net, link);
}