net: mctp: usb: initialise mac header in RX path
We're not currently setting skb->mac_header on ingress, and the netdev
core rx path expects it. Without it, we'll hit a warning on DEBUG_NETDEV
from commit 1e4033b53db4 ("net: skb_reset_mac_len() must check if
mac_header was set")
Initialise the mac_header to refer to the USB transport header.
Fixes: 0791c0327a6e ("net: mctp: Add MCTP USB transport driver")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://patch.msgid.link/20250829-mctp-usb-mac-header-v1-1-338ad725e183@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
773b27a8a2
commit
e27e34bc99
@ -183,6 +183,7 @@ static void mctp_usb_in_complete(struct urb *urb)
|
||||
struct mctp_usb_hdr *hdr;
|
||||
u8 pkt_len; /* length of MCTP packet, no USB header */
|
||||
|
||||
skb_reset_mac_header(skb);
|
||||
hdr = skb_pull_data(skb, sizeof(*hdr));
|
||||
if (!hdr)
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user