aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/pensando/ionic/ionic_lif.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2020-06-15 10:54:56 +0800
committerDavid S. Miller <davem@davemloft.net>2020-06-17 14:58:11 -0700
commite869e7a17798d85829fa7d4f9bbe1eebd4b2d3f6 (patch)
treeecc1bc27dff5de16bfde22f729718cad30e16806 /drivers/net/ethernet/pensando/ionic/ionic_lif.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (diff)
downloadwireguard-linux-e869e7a17798d85829fa7d4f9bbe1eebd4b2d3f6.tar.xz
wireguard-linux-e869e7a17798d85829fa7d4f9bbe1eebd4b2d3f6.zip
net: usb: ax88179_178a: fix packet alignment padding
Using a AX88179 device (0b95:1790), I see two bytes of appended data on every RX packet. For example, this 48-byte ping, using 0xff as a payload byte: 04:20:22.528472 IP 192.168.1.1 > 192.168.1.2: ICMP echo request, id 2447, seq 1, length 64 0x0000: 000a cd35 ea50 000a cd35 ea4f 0800 4500 0x0010: 0054 c116 4000 4001 f63e c0a8 0101 c0a8 0x0020: 0102 0800 b633 098f 0001 87ea cd5e 0000 0x0030: 0000 dcf2 0600 0000 0000 ffff ffff ffff 0x0040: ffff ffff ffff ffff ffff ffff ffff ffff 0x0050: ffff ffff ffff ffff ffff ffff ffff ffff 0x0060: ffff 961f Those last two bytes - 96 1f - aren't part of the original packet. In the ax88179 RX path, the usbnet rx_fixup function trims a 2-byte 'alignment pseudo header' from the start of the packet, and sets the length from a per-packet field populated by hardware. It looks like that length field *includes* the 2-byte header; the current driver assumes that it's excluded. This change trims the 2-byte alignment header after we've set the packet length, so the resulting packet length is correct. While we're moving the comment around, this also fixes the spelling of 'pseudo'. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions