Commit Graph

2073 Commits

Author SHA1 Message Date
Martin Kaiser
dfb1a3ae1d staging: rtl8188eu: remove unused function parameter
The struct adapter parameter of rtw_os_recvbuf_resource_alloc is not used.
Remove it.

While at it, use the same parameter name in the prototype and the function
definition.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:17:23 +02:00
Martin Kaiser
f40e1901be staging: rtl8188eu: replace switch-case with if
This switch has only one case. Replace it with an if statement.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:17:23 +02:00
Martin Kaiser
062f6d1452 staging: rtl8188eu: make ffaddr2pipehdl static
This function is used only inside usb_ops_linux.c.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:17:23 +02:00
Martin Kaiser
767d1c72aa staging: rtl8188eu: remove prototype for non-existing function
There's no usb_read_port_cancel function in this driver. Remove its
prototype.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:17:23 +02:00
Martin Kaiser
e46ff78bc2 staging: rtl8188eu: remove the last urb callback macros
Both usb_read_port_complete and usb_write_port_complete have a regs
parameter that is not used.

When this parameter is removed, the functions can be used as urb
completion callbacks directly. There's no need for the macros that
strip the second parameter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:17:23 +02:00
Martin Kaiser
3fca1c763e staging: rtl8188eu: make rtw_usb_if1_init return a status
Return an error status instead of the struct adapter that was allocated
and filled. This is more useful for the probe function, who calls
rtw_usb_if1_init.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
7a26709750 staging: rtl8188eu: make usb_dvobj_init return a status
usb_dvobj_init populates a struct dvobj_priv and installs it as interface
data of the usb interface. There's no point in returning this struct to the
caller, it makes more sense to return an error status.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
57ae96149e staging: rtl8188eu: rtw_usb_if1_init needs no dvobj parameter
rtw_usb_if1_init receives a pointer to struct usb_interface. dvobj is the
interface data for this interface.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
78ea2e2447 staging: rtl8188eu: remove unnecessary variable
We just want to check if rtw_usb_if1_init returns NULL, which means there
was an error.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
6b11645532 staging: rtl8188eu: clean up rtw_recv_entry
Change the return type to int, the function returns 0 or 1.
Remove the goto statement, we're not doing any cleanup on exit.
Summarize variable declarations and assignments.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
889ed8b5e3 staging: rtl8188eu: set pipe only once
Set the pipe for reading or writing in usbctrl_vendorreq only once. There's
no need to set it again for every retry.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
b048a8db29 staging: rtl8188eu: move defines into the .c file
Some of the defines from usb_ops_linux.h are used only inside
usb_ops_linux.c. Move them to the .c file.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
cf862de40b staging: rtl8188eu: remove unused defines
Some defines in usb_ops_linux.h are not used by the rtl8188eu driver.
Remove them.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
5c422a42d1 staging: rtl8188eu: remove unnecessary brackets
ESHUTDOWN is just a number, it needs no brackets.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
46694b686d staging: rtl8188eu: remove unused macros
usb_ops_linux.h contains a couple of macros to make functions usable as
urb completion callbacks. Most of them are unused and can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08 09:26:32 +02:00
Martin Kaiser
b92ed9dc2b staging: rtl8188eu: remove an obsolete comment
This driver does not set URB_ZERO_PACKET.

The rtl8188eu driver that's available from Realtek/Edimax has some
commented-out code that sets zero packet. It was removed from this
driver before it was imported.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
057a5a8038 staging: rtl8188eu: clean up usb_write32
Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
cecaae74ea staging: rtl8188eu: clean up usb_write16
Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
4f178eeb0d staging: rtl8188eu: clean up usb_write8
Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
e8f44d356e staging: rtl8188eu: clean up usb_read32
Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
0009261516 staging: rtl8188eu: clean up usb_read16
Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
cc23e68fdf staging: rtl8188eu: clean up usb_read8
Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
788fde0310 staging: rtl8188eu: use actual request type as parameter
At the moment, usbctrl_vendorreq's requesttype parameter must be set to 1
for reading and 0 for writing. It's then converted to the actual
bmRequestType for the USB control request. We can simplify the code and
avoid this conversion if the caller passes the actual bmRequestType.

We already have defines for the read and write request types. Move them to
usb_ops_linux.c, they're used only inside this file. Replace the numeric
values with USB constants to make their meaning clearer.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
3d0be94f62 staging: rtl8188eu: ctrl vendor req index is not used
The index for rtl8188eu's vendor-specific control requests is not used.
Remove the index parameter from usbctrl_vendorreq and pass index 0 to
usb_control_msg.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
eeb4661560 staging: rtl8188eu: ctrl vendor req value is always 0x05
The bRequest value for the vendor specific control requests sent by this
driver is always 0x05. Replace the function parameter with a define. Use
the same define as the rtlwifi driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Martin Kaiser
9d32836dbb staging: rtl8188eu: remove unused efuse hal components
struct hal_data_8188e contains some components related to efuses which
are not used for rtl8188eu.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 10:24:47 +02:00
Deborah Brouwer
015a5273b6 staging: rtl8188eu: core: replace spaces with a tab
To conform to Linux kernel coding style, a tab replaces the two spaces
that were previously used to indent brackets.  Identified by the
checkpatch warning: WARNING: please, no spaces at the start of a line.

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Link: https://lore.kernel.org/r/20210403224738.28957-1-deborahbrouwer3563@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05 12:12:05 +02:00
Deborah Brouwer
b79f45e204 staging: rtl8188eu: core: add comma within a comment
Add a comma to separate repeated words in a comment. The comma preserves
the meaning of the comment while also stopping the checkpatch warning:
WARNING: Possible repeated word: 'very'.

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Link: https://lore.kernel.org/r/20210403210930.17781-1-deborahbrouwer3563@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05 12:11:16 +02:00
Martin Kaiser
8bc5cbf5b6 staging: rtl8188eu: (trivial) remove a duplicate debug print
Keep the one that shows the wakeup capability.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210329093215.16186-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-02 15:03:32 +02:00
Martin Kaiser
30310e0fa5 staging: rtl8188eu: remove unused function parameter
rtw_usb_if1_init does not use its struct usb_device_id parameter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210328175446.28063-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-02 15:03:27 +02:00
Colin Ian King
0933e51a0b staging: rtl8188eu: Fix null pointer dereference on free_netdev call
An unregister_netdev call checks if pnetdev is null, hence a later
call to free_netdev can potentially be passing a null pointer, causing
a null pointer dereference. Avoid this by adding a null pointer check
on pnetdev before calling free_netdev.

Fixes: 1665c8fdff ("staging: rtl8188eu: use netdev routines for private data")
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210324152135.254152-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26 14:58:57 +01:00
Martin Kaiser
1665c8fdff staging: rtl8188eu: use netdev routines for private data
This driver implements its own routines to allocate, access and free the
private data of its net_device. Use the functionality from the networking
core instead.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210321162009.15447-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-22 17:04:21 +01:00
Paul McQuade
6da2f76058 staging: rtl8188eu: Removed Unnecessary logging
fix the following checkpatch.pl issues:
WARNING: Unnecessary ftrace-like logging - prefer using ftrace

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
Link: https://lore.kernel.org/r/20210319144206.23439-1-paulmcquad@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-20 13:40:19 +01:00
Bhaskar Chowdhury
2e747fef26 staging: rtl8188eu: Fix couple of typos
s/pasive/passive/
s/varable/variable/

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Link: https://lore.kernel.org/r/20210319193414.10393-1-unixbhaskar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-20 13:37:07 +01:00
Greg Kroah-Hartman
b828324bba Merge 5.12-rc3 into staging-next
We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-15 07:52:17 +01:00
Ivan Safonov
97919a5764 staging:r8188eu: use ieee80211_is_ctl instead IsFrameTypeCtrl
IsFrameTypeCtrl() duplicate ieee80211_is_ctl().

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210314090247.21181-5-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-14 17:00:07 +01:00
Ivan Safonov
8aea42ea5f staging:r8188eu: replace cap_* definitions with native kernel WLAN_CAPABILITY_*
cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions,
improve code consistency.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210314090247.21181-4-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-14 17:00:07 +01:00
Ivan Safonov
c6df973f69 staging:r8188eu: remove unused definitions from wifi.h
These definitions are not used and will not be useful in the future.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210314090247.21181-3-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-14 17:00:07 +01:00
Ivan Safonov
703b830fab staging:r8188eu: replace get_(d|s)a with ieee80211_get_(D|S)A
get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions.
Remove get_(d|s)a, use ieee80211_get_(D|S)A instead.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210314090247.21181-2-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-14 17:00:07 +01:00
Gustavo A. R. Silva
f63a044747 staging: rtl8188eu: Replace one-element array with flexible-array in struct ndis_802_11_var_ie
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

Use flexible-array member in struct ndis_802_11_var_ie, instead of
one-element array.

Also, this helps with the ongoing efforts to enable -Warray-bounds by
fixing the following warning:

drivers/staging/rtl8188eu/core/rtw_wlan_util.c: In function ‘HT_caps_handler’:
drivers/staging/rtl8188eu/core/rtw_wlan_util.c:665:65: warning: array subscript 2 is above array bounds of ‘u8[1]’ {aka ‘unsigned char[1]’} [-Warray-bounds]
  665 |    if ((pmlmeinfo->HT_caps.ampdu_params_info & 0x3) > (pIE->data[i] & 0x3))
      |                                                        ~~~~~~~~~^~~

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/109
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20210304020228.GA45139@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:33 +01:00
Michael Straube
afbd10d98a staging: rtl8188eu: rename parameters of odm_phy_status_query()
Rename parameters of odm_phy_status_query() to avoid camel case.

pDM_Odm -> dm_odm
pPhyInfo -> phy_info
pPhyStatus -> phy_status
pPktinfo -> pkt_info

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210306081133.1272-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:33 +01:00
Michael Straube
edccaa4ced staging: rtl8188eu: rename ODM_PhyStatusQuery()
Rename ODM_PhyStatusQuery() to odm_phy_status_query() to avoid camel
case.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210306081133.1272-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:33 +01:00
Suryashankar Das
85922358fa staging: rtl8188eu: Format comments
This patch fixes the checkpatch.pl warnings:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments should align the * on each line

Signed-off-by: Suryashankar Das <suryashankardas.2002@gmail.com>
Link: https://lore.kernel.org/r/20210218182414.49107-1-suryashankardas.2002@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:25 +01:00
Dan Carpenter
74b6b20df8 staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->ssid[] array.

Fixes: a2c60d42d9 ("staging: r8188eu: Add files for new driver - part 16")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YEHymwsnHewzoam7@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:23:30 +01:00
Dan Carpenter
d4ac640322 staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data()
The "ie_len" is a value in the 1-255 range that comes from the user.  We
have to cap it to ensure that it's not too large or it could lead to
memory corruption.

Fixes: 9a7fe54ddc ("staging: r8188eu: Add source files for new driver - part 1")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YEHyQCrFZKTXyT7J@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:23:30 +01:00
Ivan Safonov
b2591ab0c9 staging:r8188eu: use IEEE80211_FCTL_* kernel definitions
_TO_DS_, _FROM_DS_, _MORE_FRAG_, _RETRY_, _PWRMGT_, _MORE_DATA_,
_PRIVACY_, _ORDER_ definitions are duplicate IEEE80211_FCTL_*
kernel definitions.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210213131148.458582-1-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-13 22:37:50 +01:00
Kumar Kartikeya Dwivedi
7ea3f3a6bf staging: rtl8188eu: Switch from strlcpy to strscpy
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20210131172838.146706-9-memxor@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-04 17:16:06 +01:00
Martin Kaiser
7a8d2f1908 staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table
The Edimax EW-7811UN V2 uses an RTL8188EU chipset and works with this
driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210204085217.9743-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-04 17:15:29 +01:00
Ivan Safonov
6ee9e6ee5c staging:r8188eu: replace enum WIFI_STATUS_CODE with native kernel definitions
Driver and kernel definitions are equal.
Avoid code duplication, improve readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210131080618.25184-1-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-31 13:37:55 +01:00
Martin Kaiser
89be5992e1 staging: rtl8188eu: fix rtw_xmit_entry's return value
A netdev xmit function should return NETDEV_TX_OK or NETDEV_TX_BUSY.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210122165749.29467-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-26 18:44:53 +01:00