Skip to content

Commit e27e34b

Browse files
jk-ozlabsPaolo Abeni
authored andcommitted
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 1e4033b ("net: skb_reset_mac_len() must check if mac_header was set") Initialise the mac_header to refer to the USB transport header. Fixes: 0791c03 ("net: mctp: Add MCTP USB transport driver") Signed-off-by: Jeremy Kerr <[email protected]> Link: https://patch.msgid.link/20250829-mctp-usb-mac-header-v1-1-338ad725e183@codeconstruct.com.au Signed-off-by: Paolo Abeni <[email protected]>
1 parent 773b27a commit e27e34b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/mctp/mctp-usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ static void mctp_usb_in_complete(struct urb *urb)
183183
struct mctp_usb_hdr *hdr;
184184
u8 pkt_len; /* length of MCTP packet, no USB header */
185185

186+
skb_reset_mac_header(skb);
186187
hdr = skb_pull_data(skb, sizeof(*hdr));
187188
if (!hdr)
188189
break;

0 commit comments

Comments
 (0)