linux/drivers/staging
Guenter Roeck 20314bacd2 staging: r8188eu: Fix PPPoE tag insertion on little endian systems
In __nat25_add_pppoe_tag(), the tag length is read from the tag data
structure. The value is kept in network format, but read as raw value.
With -Warray-bounds, this results in the following gcc error/warning
when building the driver on alpha.

In function '__nat25_add_pppoe_tag',
    inlined from 'nat25_db_handle' at
	drivers/staging/r8188eu/core/rtw_br_ext.c:479:11:
arch/alpha/include/asm/string.h:22:16: error:
	'__builtin_memcpy' forming offset [40, 2051] is out of the bounds
	[0, 40] of object 'tag_buf' with type 'unsigned char[40]'

Add the missing be16_to_cpu() to fix the compile error. It should be
noted, however, that this fix means that the code did probably not work
on any little endian systems and/or that the driver has other endiannes
related issues. A build with C=1 suggests that this is indeed the case.
This patch does not attempt to fix any of those other issues.

Fixes: 15865124fe ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Cc: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220404134338.3276991-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04 16:35:20 +02:00
..
axis-fifo
board
clocking-wizard
emxx_udc
fbtft Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
fieldbus
fwserial
gdm724x Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
greybus Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
iio
ks7010
media media: atomisp: fix bad usage at error handling logic 2022-03-18 05:58:35 +01:00
most Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
nvec
octeon
octeon-usb
olpc_dcon
pi433 Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
qlge
r8188eu staging: r8188eu: Fix PPPoE tag insertion on little endian systems 2022-04-04 16:35:20 +02:00
rtl8192e staging: rtl8192e: Fix spelling mistake "RESQUEST" -> "REQUEST" 2022-03-16 15:08:53 +01:00
rtl8192u
rtl8712 Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
rtl8723bs Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
rts5208 staging: rts5208: Resolve checkpatch.pl issues. 2022-03-18 13:44:02 +01:00
sm750fb staging: sm750fb: fix naming style 2022-03-18 13:43:41 +01:00
unisys
vc04_services Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
vme
vt6655 staging: vt6655: Remove unused byRFType in card.c 2022-03-14 18:32:39 +01:00
vt6656 staging: vt6656: Removed unused variable vt3342_vnt_threshold 2022-03-15 15:17:09 +01:00
wfx Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
wlan-ng staging: Use netif_rx(). 2022-03-07 11:40:40 +00:00
Kconfig mips: dts: ralink: add MT7621 SoC 2022-03-16 15:10:23 +01:00
Makefile mips: dts: ralink: add MT7621 SoC 2022-03-16 15:10:23 +01:00