Larry Finger [Tue, 3 Aug 2021 13:52:23 +0000 (08:52 -0500)]
staging: r8188eu: Remove some bit manipulation macros
This driver defines a set of macros that get or set a bitfield in the
RX and TX descriptors. Most of these have been replaced by the appropriate
use of the system macros BIT() or GENMASK().
While reworking these routines, I also fixed camel case variables and
missing spaces. Some comments were also converted to the
drivers/net/wireless preferred format.
Larry Finger [Tue, 3 Aug 2021 13:52:22 +0000 (08:52 -0500)]
staging: r8188eu: Remove some unused and ugly macros
This driver contains a number of macros that are intended to do endian
conversion. The first step in getting rid of them is to delete the
ones that are not used.
Commit 55dfa29b43d2 ("staging: rtl8188eu: remove rtl8188eu driver from
staging dir") removes ./drivers/staging/rtl8188eu, but misses to adjust
the STAGING - REALTEK RTL8188EU DRIVERS section in MAINTAINERS.
A refurnished rtl8188eu driver is available in ./drivers/staging/r8188eu/
and there is no existing section in MAINTAINERS for that directory.
So, reuse the STAGING - REALTEK RTL8188EU DRIVERS section and point to the
refurnished driver with its current developers and maintainers according
to the current git log.
Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Link: https://lore.kernel.org/r/20210803071811.8142-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Mon, 2 Aug 2021 19:27:19 +0000 (14:27 -0500)]
staging: r8188eu: Remove 4 empty routines from os_sep/service.c
Routines rtw_suspend_lock_init(), rtw_suspend_lock_uninit(),
rtw_lock_suspend(), and rtw_unlock_suspend() do not conti=ain any code.
Simplify by removing them.
Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Sat, 31 Jul 2021 23:56:48 +0000 (00:56 +0100)]
staging: r8188eu: remove RT_PRINT_DATA macro
Remove RT_PRINT_DATA definition from include/rtw_debug.h, and its
two calling statements in hal/hal_com.c, as this code was not written
with best practices in mind and is safer to simply remove.
Phillip Potter [Sat, 31 Jul 2021 13:38:09 +0000 (14:38 +0100)]
staging: rtl8188eu: remove rtl8188eu driver from staging dir
This driver was deprecated with the introduction of the r8188eu driver,
based upon Realtek sources that were modified for CFG80211 support and
other fixes on GitHub by Larry Finger. As that driver is now progressing
at pace, we should remove this one.
Phillip Potter [Sat, 31 Jul 2021 13:38:04 +0000 (14:38 +0100)]
staging: r8188eu: correct set/defined but unused warnings from debug cleanup
The recent include/odm_debug.h removal series caused a few kernel test
robot warnings. This patch fixes them as well as an existing warning
related to an array within include/rtw_security.h not being used.
Phillip Potter [Sat, 31 Jul 2021 00:39:37 +0000 (01:39 +0100)]
staging: r8188eu: remove include/odm_debug.h
Remove include/odm_debug.h in its entirety. To do this, first:
(1) Remove DebugLevel and DebugComponents members from the struct
odm_dm_struct definition, and any uses of these elsewhere in
the driver.
(2) Remove the function ODM_InitDebugSetting from hal/odm_debug.c
whilst leaving the file in place for now as it contains a global
which is still used and will be removed by further cleanup code.
Also remove all of its callers. All the function does is set the
members mentioned above.
(3) Remove the now redundant constants and their usages:
ODM_CMNINFO_DBG_LEVEL
ODM_CMNINFO_DBG_COMP
HW_DEF_ODM_DBG_FLAG
HW_DEF_FA_CNT_DUMP
This includes usage within a few hexadecimal ioctl switch cases
in os_dep/ioctl_linux.c (although only the call itself within
0x11 as it contains additional code currently).
(4) Finally, remove the file itself and its inclusion within
include/odm_precomp.h, as none of the remaining content is used
from anywhere else in the driver.
Phillip Potter [Sat, 31 Jul 2021 00:39:36 +0000 (01:39 +0100)]
staging: r8188eu: remove DbgPrint and RT_PRINTK macro definitions
Remove DbgPrint and RT_PRINTK macro definitions from include/odm_debug.h,
as they are called from nowhere and are therefore superfluous. Also
remove comment in core/rtw_xmit.c referring to DbgPrint so that future
confusion is prevented.
Phillip Potter [Sat, 31 Jul 2021 00:39:34 +0000 (01:39 +0100)]
staging: r8188eu: remove ODM_RT_TRACE calls from hal/odm.c
Remove ODM_RT_TRACE calls from hal/odm.c, as by removing these calls
in this file and others, we can ultimately then remove the macro
definition itself, which does not follow best practice.
Also remove three empty functions and their calls from hal/odm.c, as
they only contained ODM_RT_TRACE calls, and remove the corresponding
include/odm_precomp.h declarations.
Phillip Potter [Sat, 31 Jul 2021 00:39:33 +0000 (01:39 +0100)]
staging: r8188eu: remove ODM_RT_TRACE calls from hal/odm_RegConfig8188E.c
Remove ODM_RT_TRACE calls from hal/odm_RegConfig8188E.c, as by removing these
calls in this file and others, we can ultimately then remove the macro
definition itself, which does not follow best practice.
Phillip Potter [Sat, 31 Jul 2021 00:39:32 +0000 (01:39 +0100)]
staging: r8188eu: remove ODM_RT_TRACE calls from hal/odm_RTL8188E.c
Remove ODM_RT_TRACE calls from hal/odm_RTL8188E.c, as by removing these
calls in this file and others, we can ultimately then remove the macro
definition itself, which does not follow best practice.
Phillip Potter [Sat, 31 Jul 2021 00:39:31 +0000 (01:39 +0100)]
staging: r8188eu: remove ODM_RT_TRACE calls from hal/odm_HWConfig.c
Remove ODM_RT_TRACE calls from hal/odm_HWConfig.c, as by removing these
calls in this file and others, we can ultimately then remove the macro
definition itself, which does not follow best practice.
Phillip Potter [Sat, 31 Jul 2021 00:39:30 +0000 (01:39 +0100)]
staging: r8188eu: remove ODM_RT_TRACE calls from hal/HalPhyRf_8188e.c
Remove ODM_RT_TRACE calls from hal/HalPhyRf_8188e.c, as by removing these
calls in this file and others, we can ultimately then remove the macro
definition itself, which does not follow best practice.
Phillip Potter [Sat, 31 Jul 2021 00:39:29 +0000 (01:39 +0100)]
staging: r8188eu: remove ODM_RT_TRACE calls from hal/Hal8188ERateAdaptive.c
Remove ODM_RT_TRACE calls from hal/Hal8188ERateAdaptive.c, as by removing
these calls in this file and others, we can ultimately then remove the
macro definition itself, which does not follow best practice.
staging: rtl8723bs: align condition to match open parentheses
fix following checkpatch issue:
CHECK: Alignment should match open parenthesis
54: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:609:
+ if (target->reserved[0] != 2 &&
+ target->reserved[0] >=
pnetwork->network.reserved[0]
The driver seems to want to include a specific directory for all include
files on the build path, but that breaks when trying to build only the
module directory, or when building with "O=" option.
Fix this up by making all includes for the driver be relative locations.
It is a wrapper around usb_control_msg() that does nothing, so remove
the macro and just call the correct USB function instead in the one
place it is used.
It is just a wrapper around kfree(), so just replace all calls with
kfree() instead. The pointer is also set to NULL and the length set to
0 to emulate the original logic, just to be "safe" as I do not have a
device to test with, but odds are that can be removed later on.
Larry Finger [Thu, 29 Jul 2021 17:09:30 +0000 (12:09 -0500)]
staging: r8188eu: Add "fallthrough" statement to quiet compiler
Compiler gcc11, and possibly others, emit a warning when a fall-through
case is found in a switch statement. Add a "fallthrough" statement to
eliminate this warning.
This file contains only the definition of the driver version. This statement
is moved into a header called by all the affected source files, and the now
empty header is deleted.
This header only includes one prototype and one define statement. The
new definition is used once, thus it can be removed. The prototype is
moved to a header that is already called by the supplier and the user
of that routine, thus the small header is removed.
Larry Finger [Thu, 29 Jul 2021 17:09:26 +0000 (12:09 -0500)]
staging: r8188eu: Remove tests of kernel version
In the GitHub repository from which this driver was derived, old kernels
had to be supported. Now that the driver is included in the kernel,
this code can be removed as well as all mention of version.h.
Larry Finger [Thu, 29 Jul 2021 16:48:14 +0000 (11:48 -0500)]
staging: r8188eu: Convert copyright header info to SPDX format, part 6
Before this driver can be incorporated in the drivers/net/wireless tree,
the copyright info in all files must be converted to SPDX notation.
This patch converts the C source files in hal/.
Larry Finger [Thu, 29 Jul 2021 16:48:13 +0000 (11:48 -0500)]
staging: r8188eu: Convert header copyright info to SPDX format, part 5
Before this driver can be incorporated in the drivers/net/wireless tree,
the copyright info in all files must be converted to SPDX notation.
This patch converts the 9 C source files in os_dep/.
Larry Finger [Thu, 29 Jul 2021 16:48:12 +0000 (11:48 -0500)]
staging: r8188eu: Convert header copyright info to SPDX format, part 4
Before this driver can be incorporated in the drivers/net/wireless tree,
the copyright info in all files must be converted to SPDX notation.
This patch converts the 23 C source files in core/.
Larry Finger [Thu, 29 Jul 2021 16:48:11 +0000 (11:48 -0500)]
staging: r8188eu: Convert header copyright info to SPDX format, part 3
Before this driver can be incorporated in the drivers/net/wireless tree,
the copyright info in all files must be converted to SPDX notation.
This patch converts the next 49 files.
Larry Finger [Thu, 29 Jul 2021 16:48:10 +0000 (11:48 -0500)]
staging: r8188eu: Convert header copyright info to SPDX format, part 2
Before this driver can be incorporated in the drivers/net/wireless tree,
the copyright info in all files must be converted to SPDX notation.
This patch converts the next 23 files.
Larry Finger [Thu, 29 Jul 2021 16:48:09 +0000 (11:48 -0500)]
staging: r8188eu: Convert header copyright info to SPDX format, part 1
Before this driver can be incorporated in the drivers/net/wireless tree,
the copyright info in all files must be converted to SPDX notation.
This patch converts the first 20 files.
The vt6655 and vt6656 drivers have an unused CONFIG_PATH define floating
around in the code, but it is never used. Remove it as drivers should
never be reading from config files anyway, even if these were valid
files.
Len Baker [Sun, 18 Jul 2021 13:12:17 +0000 (15:12 +0200)]
staging/vc04_services: Remove all strcpy() uses in favor of strscpy()
strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehaviors. The safe replacement is strscpy().
remove some unused static variables. One of them
is used to toggle on the BT coexistence mechanism,
but it is always enabled and it's not conditioned
to the value of the related parameter.
Remove unused field of the registry_priv struct as
well, they were intended for hosting the parameters
this patch rids.
Benjamin Philip [Tue, 27 Jul 2021 19:19:53 +0000 (00:49 +0530)]
staging: sm750fb: Rename vScreen to v_screen in lynxfb_crtc
The struct lynxfb_crtc has a member named vScreen. This name is
CamelCase and is frowned upon. This commit renames it to v_screen
and makes the necessary changes for the module to build.
This change also fixes the following checkpatch CHECKs:
Benjamin Philip [Tue, 27 Jul 2021 19:19:52 +0000 (00:49 +0530)]
staging: sm750fb: Rename vCursor to v_cursor in lynxfb_crtc
The struct lynxfb_crtc has a member named vCursor. This name is
CamelCase and is frowned upon. This commit renames it to v_cursor
and makes the necessary changes for the module to build.
This change also fixes the following checkpatch CHECK:
Benjamin Philip [Tue, 27 Jul 2021 19:19:51 +0000 (00:49 +0530)]
staging: sm750fb: Rename oCursor to o_cursor in lynxfb_crtc
The struct lynxfb_crtc has a member named oCursor. This name is
CamelCase and is frowned upon. This commit renames it to o_cursor
and makes the necessary changes for the module to build.
This change also fixes the following checkpatch CHECK:
CHECK: Avoid CamelCase: <oCursor>
137: FILE: sm750.h:137:
+ int oCursor; /* cursor address offset in vidmem */
Benjamin Philip [Tue, 27 Jul 2021 19:19:50 +0000 (00:49 +0530)]
staging: sm750fb: Rename oScreen to o_screen in lynxfb_crtc
The struct lynxfb_crtc has a member named oScreen. This name is
CamelCase and is frowned upon. This commit renames it to o_screen
and makes the necessary changes for the module to build.
This change also fixes the following checkpatch CHECKs:
CHECK: Avoid CamelCase: <oScreen>
138: FILE: sm750.h:138:
+ int oScreen; /* onscreen address offset in vidmem */
Phillip Potter [Tue, 27 Jul 2021 23:22:19 +0000 (00:22 +0100)]
staging: r8188eu: attach newly imported driver to build system
Modify Kconfig and Makefile to import new r8188eu driver into build
system, and allow it to build alongside deprecated older driver, by
tweaking build parameters and module name for the older driver at
the same time.
Phillip Potter [Tue, 27 Jul 2021 23:22:18 +0000 (00:22 +0100)]
staging: r8188eu: introduce new supporting files for RTL8188eu driver
This patchset is split in order to keep the file sizes down. These
supporting files are part of the newer/better driver from GitHub modified by
Larry Finger. Import this as the basis for all future work going
forward. Also, modify Makefile so that driver has same module filename
as original rtl8188eu driver from staging, and rename config params to
fit the Kconfig file taken from the old driver. Finally, reword Kconfig
description to make it clear this is a newer driver.