]> git.baikalelectronics.ru Git - kernel.git/commit
usbnet: fix alignment for frames with no ethernet header
authorBjørn Mork <bjorn@mork.no>
Wed, 6 Dec 2017 19:21:24 +0000 (20:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Dec 2017 19:32:30 +0000 (14:32 -0500)
commitff2eaac3f5c4a508cd54b0598be9e83b9019304c
tree2e12cda983f7c8c7c0ffe64e5ed65759b7263a54
parentc087669d4ff3b8d3832c806eb2f2bcd76b621991
usbnet: fix alignment for frames with no ethernet header

The qmi_wwan minidriver support a 'raw-ip' mode where frames are
received without any ethernet header. This causes alignment issues
because the skbs allocated by usbnet are "IP aligned".

Fix by allowing minidrivers to disable the additional alignment
offset. This is implemented using a per-device flag, since the same
minidriver also supports 'ethernet' mode.

Fixes: 22ceeb713fd3 ("net: qmi_wwan: support "raw IP" mode")
Reported-and-tested-by: Jay Foster <jay@systech.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/qmi_wwan.c
drivers/net/usb/usbnet.c
include/linux/usb/usbnet.h