android_kernel_sony_sdm845/drivers/net/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jeremy Kerr 6c8b6312d6 net: usb: ax88179_178a: fix packet alignment padding
[ Upstream commit e869e7a17798d85829fa7d4f9bbe1eebd4b2d3f6 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:38:38 -04:00
..
asix.h
asix_common.c asix: Check for supported Wake-on-LAN modes 2018-11-10 07:42:43 -08:00
asix_devices.c net: usb: asix: init MAC address buffers 2019-08-04 09:33:24 +02:00
ax88172a.c ax88172a: fix information leak on short answers 2019-11-25 09:51:53 +01:00
ax88179_178a.c net: usb: ax88179_178a: fix packet alignment padding 2020-06-30 15:38:38 -04:00
catc.c
cdc-phonet.c
cdc_eem.c
cdc_ether.c cdc_ether: fix rndis support for Mediatek based smartphones 2019-09-21 07:14:01 +02:00
cdc_mbim.c net: usb: cdc_mbim: add flag FLAG_SEND_ZLP 2018-06-13 16:16:42 +02:00
cdc_ncm.c net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size() 2019-11-25 09:53:10 +01:00
cdc_subset.c
ch9200.c ch9200: use skb_cow_head() to deal with cloned skbs 2019-02-20 10:18:34 +01:00
cx82310_eth.c cx82310_eth: fix a memory leak bug 2019-09-10 10:31:01 +01:00
dm9601.c
gl620a.c
hso.c hso: fix NULL-deref on tty open 2019-10-07 18:53:20 +02:00
huawei_cdc_ncm.c
int51x1.c
ipheth.c usbnet: ipheth: fix racing condition 2019-06-22 08:17:20 +02:00
kalmia.c net: kalmia: fix memory leaks 2019-09-10 10:31:01 +01:00
kaweth.c kaweth: use skb_cow_head() to deal with cloned skbs 2019-02-20 10:18:34 +01:00
Kconfig
lan78xx.c net: usb: lan78xx: Add .ndo_features_check 2020-01-29 10:24:37 +01:00
lan78xx.h
lg-vl600.c
Makefile
mcs7830.c
net1080.c
pegasus.c net: usb: pegasus: fix improper read if get_registers() fail 2019-08-25 10:51:45 +02:00
pegasus.h
plusb.c
qmi_wwan.c net: usb: qmi_wwan: add Telit LE910C1-EUX composition 2020-06-11 09:22:21 +02:00
r8152.c r8152: check disconnect status after long sleep 2020-03-20 09:07:38 +01:00
rndis_host.c
rtl8150.c net: usb: rtl8150: demote allmulti message to dev_dbg() 2018-08-24 13:12:40 +02:00
sierra_net.c
smsc75xx.c smsc75xx: Check for Wake-on-LAN modes 2018-11-10 07:42:43 -08:00
smsc75xx.h
smsc95xx.c smsc95xx: Use skb_cow_head to deal with cloned skbs 2019-02-20 10:18:33 +01:00
smsc95xx.h
sr9700.c
sr9700.h
sr9800.c net: usb: sr9800: fix uninitialized local variable 2019-11-06 12:18:25 +01:00
sr9800.h
usbnet.c usbnet: sanity checking of packet sizes and device mtu 2019-10-05 12:30:14 +02:00
zaurus.c