The hwinfo and AutoLoadFail parameters can be obtained from
struct adapter, there's no need to pass them as separate
function parameters.
Use memcpy instead of bytewise copy if we have to fall back to the
hard-coded mac address.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210725155902.32433-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The "HAL layer variable" HW_VAR_TXPAUSE is not used in this driver.
Remove its define and the code for setting and for reading a value.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210725155902.32433-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The "HAL layer variable" HW_VAR_MEDIA_STATUS1 is not used in this driver.
Remove its define and the code for setting a value.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210725155902.32433-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Now that power cut mask is not used any more, we can also remove the
defines for power cut masks.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210725155902.32433-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove braces from single line if blocks to clear checkpatch warnings.
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210726092129.30334-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove the functions and variables from rtw_security.c that are no more
necessary since the patch that replaces getcrc32() with crc32_le().
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210723192620.10669-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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().
Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20210717152032.10164-1-len.baker@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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().
Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20210717160512.16176-1-len.baker@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes some checkpatch checks for blank lines before
and after braces in drivers/staging/rtl8188eu/core/rtw_ap.c
Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/20210722064451.10331-1-benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
simplify function Hal_GetChnlGroup8723B(). It returns
an unused and unnecessary bool value telling which
band the device works on. Since we work only on
2.4Ghz band and the useful return value is the
second function argument we convert the return type to
void.
remove 5Ghz dead code either (for channel > 14).
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a5536788004c44fe819c0eab0d19504824af46cd.1626874164.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes the checkpatch.pl error:
ERROR: Macros with complex values should be enclosed in parentheses
Signed-off-by: Diego Roux <me@diegoroux04.dynv6.net>
Link: https://lore.kernel.org/r/20210716024909.39411-1-me@diegoroux04.dynv6.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On Armadillo-800-EVA with CONFIG_DEBUG_SPINLOCK=y:
BUG: spinlock bad magic on CPU#0, swapper/1
lock: lcdc0_device+0x10c/0x308, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 0 PID: 1 Comm: swapper Not tainted 5.11.0-rc5-armadillo-00036-gbbca04be7a80-dirty #287
Hardware name: Generic R8A7740 (Flattened Device Tree)
[<c010c3c8>] (unwind_backtrace) from [<c010a49c>] (show_stack+0x10/0x14)
[<c010a49c>] (show_stack) from [<c0159534>] (do_raw_spin_lock+0x20/0x94)
[<c0159534>] (do_raw_spin_lock) from [<c040858c>] (dev_pm_get_subsys_data+0x8c/0x11c)
[<c040858c>] (dev_pm_get_subsys_data) from [<c05fbcac>] (genpd_add_device+0x78/0x2b8)
[<c05fbcac>] (genpd_add_device) from [<c0412db4>] (of_genpd_add_device+0x34/0x4c)
[<c0412db4>] (of_genpd_add_device) from [<c0a1ea74>] (board_staging_register_device+0x11c/0x148)
[<c0a1ea74>] (board_staging_register_device) from [<c0a1eac4>] (board_staging_register_devices+0x24/0x28)
of_genpd_add_device() is called before platform_device_register(), as it
needs to attach the genpd before the device is probed. But the spinlock
is only initialized when the device is registered.
Fix this by open-coding the spinlock initialization, cfr.
device_pm_init_common() in the internal drivers/base code, and in the
SuperH early platform code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/57783ece7ddae55f2bda2f59f452180bff744ea0.1626257398.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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().
Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20210717155145.15041-1-len.baker@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes the checkpatch.pl issue:
CHECK: Alignment should match open parenthesis.
Signed-off-by: Alexander Greyling <alexandergreyling5@gmail.com>
Link: https://lore.kernel.org/r/20210710220815.GA1654486@alexlaptop
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes the following checkpatch.pl issues:
+ pr_debug("===> %s\n", __func__);
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
158: FILE: drivers/staging/rtl8188eu/os_dep/usb_intf.c:158:
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
177: FILE: drivers/staging/rtl8188eu/os_dep/usb_intf.c:177:
+ pr_debug("<=== %s\n", __func__);
and removes another line of unnecessary logging, which was not
identified by checkpatch.pl in an automated manner.
Signed-off-by: Jan Gruber <j4n6ru@gmail.com>
Link: https://lore.kernel.org/r/20210705172101.239899-1-j4n6ru@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
We're no longer matching power transitions and commands against a
power cut version mask.
The cut_mask field from struct wl_pwr_cfg can be removed. It was set to
PWR_CUT_ALL_MSK for all remaining commands.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210718173610.894-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
None of the power flows and transitions includes a read command.
PWR_CMD_READ can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210718173610.894-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The rtl88eu_pwrseqcmdparsing function takes a parameter to restrict
commands to certain power cut versions of the rtl8188eu chipset.
This mechanism is not used, the callers always select all versions.
Remove the power cut parameter.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210718173610.894-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The driver defines a couple of "flows" to move the chip into a certain
power state. Each flow is a sequence of "transitions".
This patch removes flows and transitions which are not used.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210718173610.894-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver does not need write access to the rtl1888eu chip's efuses.
Remove the code to set the voltages for writing the efuses.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210718173610.894-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This setting is used only in one place. There's no need to store it
in a global struct.
While at it, merge the two-line Hal_InitPGData88E function and its
only caller.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210718173610.894-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>