Philipp Hortmann [Sun, 28 Aug 2022 06:54:12 +0000 (08:54 +0200)]
staging: vt6655: Replace macro MACvSetRFLE_LatchBase
Replace macro MACvSetRFLE_LatchBase with the called function as it is
just used once and to avoid CamelCase which is not accepted by
checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/624068fef03d5226e3fb2d31d47e9dabc5562b3c.1661666677.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 28 Aug 2022 06:54:04 +0000 (08:54 +0200)]
staging: vt6655: Rename macro MACvSelectPage1
Rename MACvSelectPage1 macro to VT6655_MAC_SELECT_PAGE1 to avoid
CamelCase which is not accepted by checkpatch.pl and to clean up
namespace. Remove unnecessary line break.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8aa03e089613d49be7acedcb60a19a0133e96baa.1661666677.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 28 Aug 2022 06:53:55 +0000 (08:53 +0200)]
staging: vt6655: Rename macro MACvSelectPage0
Rename MACvSelectPage0 macro to VT6655_MAC_SELECT_PAGE0 to avoid
CamelCase which is not accepted by checkpatch.pl and to clean up
namespace. Remove unnecessary line break.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a656aa0e04c43654ba22b764cb00e27898efbe5f.1661666677.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 28 Aug 2022 06:53:47 +0000 (08:53 +0200)]
staging: vt6655: Rename function MACvSetBBType
Rename MACvSetBBType function to vt6655_mac_set_bb_type to avoid
CamelCase which is not accepted by checkpatch.pl and to clean up
namespace.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/44d0151d67e2a76e1cf3d88d254defa96990b142.1661666677.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 28 Aug 2022 06:53:29 +0000 (08:53 +0200)]
staging: vt6655: Convert macro MACvSetBBType to function
Convert macro to static function. Multiline macros are not liked by
kernel community. Rename variable dwOrgValue to reg_value and byTyp to
mask to avoid CamelCase which is not accepted by checkpatch.pl. Change
variable declaration to u32 as this improves readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/bd512f940427615ed4b134dd04f14095875eec5b.1661666677.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 28 Aug 2022 06:53:15 +0000 (08:53 +0200)]
staging: vt6655: Remove declaration of s_vCalculateOFDMRParameter
Remove declaration of s_vCalculateOFDMRParameter as definition
follows just behind.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d2d6cd4a8888e4606255276b4f86e2c11487a3a2.1661666677.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alman Khan [Fri, 26 Aug 2022 11:35:36 +0000 (12:35 +0100)]
staging: rtl8192e: Describe each kernel config option
An important thing people want to know is what each option that
they select in their kernel configuration file actually does, so
that they can select the right options for their system, and, once
booted, make sure their hardware works as expected.
Add more details describing each option in the kernel configuration
for the rtl8192e (rtllib) driver so that the end-user understands what
they mean, and, if necessary, enables/disables those features
if they are not required.
Signed-off-by: Alman Khan <ak47.almank@gmail.com>
Link: https://lore.kernel.org/r/d053abd3e60d3f2d7724d6857c28a6a255b4f46b.camel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yu Zhe [Fri, 26 Aug 2022 02:01:51 +0000 (10:01 +0800)]
staging: r8188eu: use time_after_eq(a,b) to replace "a>=b"
time_after_eq() deals with timer wrapping correctly.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Link: https://lore.kernel.org/r/20220826020151.10138-1-yuzhe@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jilin Yuan [Thu, 25 Aug 2022 12:26:45 +0000 (20:26 +0800)]
staging/rtl8192e: fix repeated words in comments
Delete the redundant word 'new'.
Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
Link: https://lore.kernel.org/r/20220825122645.27588-1-yuanjilin@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 24 Aug 2022 20:14:49 +0000 (22:14 +0200)]
staging: rtl8192e: Remove PHY_SetRFPowerState and rename StateToSet
Remove macro that replaces PHY_SetRFPowerState with
rtl92e_set_rf_power_state and rename StateToSet to avoid CamelCase
which is not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ae69fd4a09900a395de40b7cfc4fd8af81e63e13.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 24 Aug 2022 20:14:43 +0000 (22:14 +0200)]
staging: rtl8192e: Remove Unnecessary ftrace-like logging
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5240b86941ebf3a290d384744d117d436e7bad41.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 24 Aug 2022 20:14:39 +0000 (22:14 +0200)]
staging: rtl8192e: Rename Tx... and RxCheckStuckHandler
Variable name TxCheckStuckHandler and RxCheckStuckHandler is changed to
avoid CamelCase which is not accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3041cec77df10cdff18d5466beb3b0616370b112.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 24 Aug 2022 20:14:34 +0000 (22:14 +0200)]
staging: rtl8192e: Remove blank lines in rtl_core.c
Remove blank lines as requested by checkpatch. Reasons are "multiple
blank lines", "Blank lines aren't necessary after an open brace" and
"Blank lines aren't necessary before a close brace".
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/32e831619a91f00cc37e04a2da1a9aeda2ad90a0.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Minghao Chi [Wed, 24 Aug 2022 08:03:50 +0000 (08:03 +0000)]
staging: r8188eu: remove unnecessary null check
container_of is never null, so this null check is
unnecessary.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220824080350.221614-1-chi.minghao@zte.com.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christopher Carbone [Tue, 23 Aug 2022 21:05:32 +0000 (17:05 -0400)]
staging: sm750fb: split multiple assignments to lines
Adhere to Linux kernel coding style.
Reported by checkpatch:
CHECK: multiple assignments should be avoided
Signed-off-by: Christopher Carbone <chris.m.carbone@gmail.com>
Link: https://lore.kernel.org/r/YwVBHM3z0QExtuXr@valhalla
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 22 Aug 2022 20:13:29 +0000 (22:13 +0200)]
staging: r8188eu: always update the status variables
Always update the status variables in rtw_led_control when we start
blinking because of no link. The code is easier to understand without
the if conditions.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220822201329.95559-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 22 Aug 2022 20:13:28 +0000 (22:13 +0200)]
staging: r8188eu: always cancel blink_work
In rtw_led_control, we can always cancel a running blink worker when we
start blinking because of no link.
The worker will be scheduled again and there's no point in having more
than one pending blink worker.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220822201329.95559-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 22 Aug 2022 20:13:27 +0000 (22:13 +0200)]
staging: r8188eu: don't restart "no link" blinking unnecessarily
Simplify one of the cases in rtw_led_control. If we're already blinking
because we have no link, we don't have to restart this blinking when the
caller requests it again. We can simply return and keep on blinking.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220822201329.95559-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 21 Aug 2022 12:31:38 +0000 (14:31 +0200)]
staging: r8188eu: remove unused module parameter rtw_chip_version
The module parameter rtw_chip_version sets the chip_version field of
struct registry_priv but that field is never used in the driver code.
Remove the unused module parameter.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220821123138.8070-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:23 +0000 (20:16 +0200)]
staging: r8188eu: remove xmit_osdep.h
After previous cleanups the header xmit_osdep.h only contains some
structure forward declarations and extern declarations for some module
parameters. The forward declarations are not needed. We can make the
module parameters static in os_dep/os_intf.c and remove xmit_osdep.h.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-20-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:22 +0000 (20:16 +0200)]
staging: r8188eu: remove os_dep/xmit_linux.c
Move the last remaining function rtw_xmit_entry(), and the static
functions it calls, from os_dep/xmit_linux.c to core/rtw_xmit.c and
remove the now empty file os_dep/xmit_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-19-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:21 +0000 (20:16 +0200)]
staging: r8188eu: rename rtw_os_pkt_complete()
The function rtw_os_pkt_complete() was moved from the os_dep
directory. It looks like the driver was originaly written to support
different operating systems. Obviously we do not need an extra 'os'
in the function name that indicates that the function is operating
system specific. Rename it to rtw_pkt_complete().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-18-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:20 +0000 (20:16 +0200)]
staging: r8188eu: make rtw_os_pkt_complete() static
The function rtw_os_pkt_complete() is only used in rtw_xmit.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-17-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:19 +0000 (20:16 +0200)]
staging: r8188eu: rename rtw_os_xmit_complete()
The function rtw_os_xmit_complete() was moved from the os_dep
directory. It looks like the driver was originaly written to support
different operating systems. Obviously we do not need an extra 'os'
in the function name that indicates that the function is operating
system specific. Rename it to rtw_xmit_complete().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-16-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:18 +0000 (20:16 +0200)]
staging: r8188eu: move rtw_os_xmit_complete() to rtw_xmit.c
Move the function rtw_os_xmit_complete() from the os_dep/xmit_linux.c
to core/rtw_xmit.c. The goal is to get rid of os_dep/xmit_linux.c in
follow up patches.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-15-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:17 +0000 (20:16 +0200)]
staging: r8188eu: move struct pkt_file to rtw_xmit.h
The code that uses struct pkt_file has been moved to rtw_xmit.c.
Move the structure definition to rtw_xmit.h.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-14-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:16 +0000 (20:16 +0200)]
staging: r8188eu: remove unnecessary initialization to zero
The initialization to zero of the variable 'len' in rtw_pktfile_read()
is not needed. It is immediately set to another value. Remove the
initialization to zero. While at it, remove an extra space.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-13-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:15 +0000 (20:16 +0200)]
staging: r8188eu: rename _rtw_pktfile_read()
There is no need to prefix the function name of _rtw_pktfile_read()
with an underscore. Rename it to rtw_pktfile_read().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-12-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:14 +0000 (20:16 +0200)]
staging: r8188eu: make _rtw_pktfile_read() static
The function _rtw_pktfile_read() is only used in rtw_xmit.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-11-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:13 +0000 (20:16 +0200)]
staging: r8188eu: rename _rtw_open_pktfile()
There is no need to prefix the function name of _rtw_open_pktfile()
with an underscore. Rename it to rtw_open_pktfile().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-10-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:12 +0000 (20:16 +0200)]
staging: r8188eu: make _rtw_open_pktfile() static
The function _rtw_open_pktfile() is only used in rtw_xmit.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:11 +0000 (20:16 +0200)]
staging: r8188eu: rename rtw_os_xmit_resource_free()
The function rtw_os_xmit_resource_free() was moved from the os_dep
directory. It looks like the driver was originaly written to support
different operating systems. Obviously we do not need an extra 'os'
in the function name that indicates that the function is operating
system specific. Rename it to rtw_xmit_resource_free().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:10 +0000 (20:16 +0200)]
staging: r8188eu: make rtw_os_xmit_resource_free() static
The function rtw_os_xmit_resource_free() is only used in rtw_xmit.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:09 +0000 (20:16 +0200)]
staging: r8188eu: rename rtw_os_xmit_resource_alloc()
The function rtw_os_xmit_resource_alloc() was moved from the os_dep
directory. It looks like the driver was originaly written to support
different operating systems. Obviously we do not need an extra 'os'
in the function name that indicates that the function is operating
system specific. Rename it to rtw_xmit_resource_alloc().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:08 +0000 (20:16 +0200)]
staging: r8188eu: make rtw_os_xmit_resource_alloc() static
The function rtw_os_xmit_resource_alloc() is only used in rtw_xmit.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:07 +0000 (20:16 +0200)]
staging: r8188eu: rename rtw_os_xmit_schedule()
The function rtw_os_xmit_schedule() was moved from the os_dep
directory. It looks like the driver was originaly written to support
different operating systems. Obviously we do not need an extra 'os'
in the function name that indicates that the function is operating
system specific. Rename it to rtw_xmit_schedule().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:06 +0000 (20:16 +0200)]
staging: r8188eu: make rtw_os_xmit_schedule() static
The function rtw_os_xmit_schedule() is only used in rtw_mlme.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 20 Aug 2022 18:16:05 +0000 (20:16 +0200)]
staging: r8188eu: make rtw_remainder_len() static
The function rtw_remainder_len() is only used in xmit_linux.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220820181623.12497-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Sat, 20 Aug 2022 18:34:51 +0000 (20:34 +0200)]
staging: rtl8723bs: remove odm_NoiseMonitor.h and odm_NoiseMonitor.c
because the content of these files is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/6f51a3531ffe60650972bd9f288570db55e3e0ec.1661020250.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Sat, 20 Aug 2022 18:34:50 +0000 (20:34 +0200)]
staging: rtl8723bs: remove member noise_level from struct dm_odm_t
because it is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/5a8256d3823baaa72775da80d821749dfbda7ad4.1661020250.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Sat, 20 Aug 2022 18:34:49 +0000 (20:34 +0200)]
staging: rtl8723bs: remove unused function ODM_InbandNoise_Monitor
because this function is not used. Also remove function
odm_InbandNoise_Monitor_NSeries because it is a static function
which is only called from ODM_InbandNoise_Monitor.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/46d73e331bae2192a328f6691763f39ea6c18b08.1661020250.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:42 +0000 (15:49 +0200)]
staging: rtl8723bs: remove static const variable odm_comp_str
because it is not used.
Link: https://lore.kernel.org/linux-staging/202208192018.BfgiZyOY-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/678b03dad7217e70e61074d11975319cb1c1828c.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:41 +0000 (15:49 +0200)]
staging: rtl8723bs: remove function rtw_odm_dbg_comp_set
because this function is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/e1927eb6151d39b53a6ce1eed1d7ad20a2d633be.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:40 +0000 (15:49 +0200)]
staging: rtl8723bs: remove function rtw_odm_adaptivity_parm_msg
because this function is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/24c3baa696adb7633d643258b60bba9bcd18b953.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:39 +0000 (15:49 +0200)]
staging: rtl8723bs: remove function IsCommentString
because this function is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/c062f678dc8f99c18a251f6137c4c3883f8c8205.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:38 +0000 (15:49 +0200)]
staging: rtl8723bs: remove function GetFractionValueFromString
because this function is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/e782bcd3ff8c33df8da7eb6b8e4bb00b1c270edc.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:37 +0000 (15:49 +0200)]
staging: rtl8723bs: remove function rtw_odm_ability_set
because this function is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/35d0f2115fa6febd72a1a7d1c740dece3d55a3df.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:36 +0000 (15:49 +0200)]
staging: rtl8723bs: remove function rtw_get_ch_setting_union
because this function is not used.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/c8c5b0c78ee9a4cd8304efeff22b51049c75a3f2.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Fri, 19 Aug 2022 13:49:35 +0000 (15:49 +0200)]
staging: rtl8723bs: remove function rtw_odm_dbg_comp_msg
because this function is not used.
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/7ff2d658863db4fd5eecc1a53f682510c2765c3f.1660916523.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nam Cao [Thu, 18 Aug 2022 19:54:55 +0000 (21:54 +0200)]
staging: r8188eu: remove ioctl_cfg80211.h
Remove header file ioctl_cfg80211.h because it is not used.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/20220818195454.11822-1-namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 18:23:59 +0000 (20:23 +0200)]
staging: r8188eu: remove ODM_ConfigRFWithHeaderFile()
The function ODM_ConfigRFWithHeaderFile() is just a wrapper around
ODM_ReadAndConfig_RadioA_1T_8188E(). Remove the wrapper and call
ODM_ReadAndConfig_RadioA_1T_8188E() directly.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819182359.24141-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:28 +0000 (14:54 +0200)]
staging: r8188eu: remove unused function parameter
The parameter 'aborted' of rtw_indicate_scan_done() is not used.
Remove it.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-12-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:27 +0000 (14:54 +0200)]
staging: r8188eu: merge rtw_{os,}_indicate_scan_done()
Merge rtw_os_indicate_scan_done() into rtw_indicate_scan_done().
It looks like the driver was originaly written to support different
operating systems. We do not need this wrapping into an extra _os_
function obviously.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-11-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:26 +0000 (14:54 +0200)]
staging: r8188eu: merge rtw_{os,}_indicate_connect()
Merge rtw_os_indicate_connect() into rtw_indicate_connect().
It looks like the driver was originaly written to support different
operating systems. We do not need this wrapping into an extra _os_
function obviously.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-10-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:25 +0000 (14:54 +0200)]
staging: r8188eu: merge rtw_{os,}_indicate_disconnect()
Merge rtw_os_indicate_disconnect() into rtw_indicate_disconnect().
The function rtw_os_indicate_disconnect() was moved from the os_dep
directory. It looks like the driver was originaly written to support
different operating systems. We do not need this wrapping into an
extra _os_ function obviously.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:24 +0000 (14:54 +0200)]
staging: r8188eu: make rtw_reset_securitypriv() static
The function rtw_reset_securitypriv() is only used in rtw_mlme.c.
Make rtw_reset_securitypriv() and its user
rtw_os_indicate_disconnect() static to get one step closer to
removing os_dep/mlme_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:23 +0000 (14:54 +0200)]
staging: r8188eu: remove unneeded initializations
In the function rtw_reset_securitypriv() three variables are
initialized to zero. That is not necessary because they are all
set before use in the code. Remove the initializations.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:22 +0000 (14:54 +0200)]
staging: r8188eu: make rtw_report_sec_ie() static
The function rtw_report_sec_ie() is only used in rtw_mlme.c.
Make it static to get one step closer to removing
os_dep/mlme_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:21 +0000 (14:54 +0200)]
staging: r8188eu: move rtw_indicate_sta_assoc_event() to rtw_ap.c
Move the function rtw_indicate_sta_assoc_event() to core/rtw_ap.c to
get one step closer to removing os_dep/mlme_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:20 +0000 (14:54 +0200)]
staging: r8188eu: make rtw_indicate_sta_disassoc_event() static
The function rtw_indicate_sta_disassoc_event() is only used in
rtw_ap.c. Make it static to get one step closer to removing
os_dep/mlme_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:19 +0000 (14:54 +0200)]
staging: r8188eu: make init_addba_retry_timer() static
The function init_addba_retry_timer() is only used in rtw_sta_mgt.c.
Make it static to get one step closer to removing os_dep/mlme_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 19 Aug 2022 12:54:18 +0000 (14:54 +0200)]
staging: r8188eu: make init_mlme_ext_timer() static
The function init_mlme_ext_timer() is only used in rtw_mlme_ext.c.
Make it static to get one step closer to removing os_dep/mlme_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wolfram Sang [Thu, 18 Aug 2022 21:01:08 +0000 (23:01 +0200)]
staging: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220818210108.7397-1-wsa+renesas@sang-engineering.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 17 Aug 2022 06:32:23 +0000 (08:32 +0200)]
staging: r8188eu: remove rtw_endofpktfile()
The function rtw_endofpktfile() just checks for pkt_len == 0.
Remove rtw_endofpktfile() and merge the check into the caller to
improve readability and simplify the driver code.
Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220817063223.8140-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grzegorz Szymaszek [Fri, 5 Aug 2022 16:28:12 +0000 (18:28 +0200)]
staging: r8188eu: drop the DRIVERVERSION macro
Since the driver is currently in the kernel, the module version macro is
not necessary.
Link: https://lore.kernel.org/lkml/Yuy7Lc%2FTJMinuupA@kroah.com/
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Link: https://lore.kernel.org/r/39e6b702918b7bcc59dec381022c1d1b97c2046e.1659715931.git.gszymaszek@short.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grzegorz Szymaszek [Fri, 5 Aug 2022 16:28:05 +0000 (18:28 +0200)]
staging: r8188eu: drop the DRV_NAME macro
The DRV_NAME macro is not used anywhere; KBUILD_MODNAME should be used
instead. Remove the macro declaration.
Link: https://lore.kernel.org/lkml/Yuy7Lc%2FTJMinuupA@kroah.com/
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Link: https://lore.kernel.org/r/f8d7b4ba4533a315ebd6711f17bbfd81e99ccf5a.1659715931.git.gszymaszek@short.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grzegorz Szymaszek [Fri, 5 Aug 2022 16:27:53 +0000 (18:27 +0200)]
staging: r8188eu: use KBUILD_MODNAME instead of a string constant
The field .usbdrv.name of the struct rtw_usb_drv hardcoded the module
(driver) name as a constant string. Replace the string with the
KBUILD_MODNAME macro.
Link: https://lore.kernel.org/lkml/Yuy7QSh%2FclQ5Ki09@kroah.com/
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Link: https://lore.kernel.org/r/0325540ba8be0a3dc4083d22e484a8a31fb2a892.1659715931.git.gszymaszek@short.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grzegorz Szymaszek [Fri, 5 Aug 2022 16:27:41 +0000 (18:27 +0200)]
staging: r8188eu: set firmware path in a macro
The r8188eu driver requires a firmware file, the path of which was
hardcoded as constant strings in two places:
(1) in core/rtw_fw.c, in function load_firmware(),
(2) in os_dep/os_intfs.c, in the MODULE_FIRMWARE() call.
Declare the path using a macro, FW_RTL8188EU, and replace the above
constant strings with the macro. That's the way it is done in many other
drivers. The new macro is defined in include/drv_types.h, because that
file is already included by both of the above files (or at least their
headers) and because it already contains other driver constants, like
its name and version.
Link: https://lore.kernel.org/lkml/YuoQ37PIKzWO1zIY@kroah.com/
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Link: https://lore.kernel.org/r/60dc57fc73e8e6e8e3aaae68784f4be932547bf5.1659715931.git.gszymaszek@short.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grzegorz Szymaszek [Tue, 2 Aug 2022 17:18:44 +0000 (19:18 +0200)]
staging: r8188eu: add firmware dependency
The old rtl8188eu module, removed in commit
55dfa29b43d2 ("staging:
rtl8188eu: remove rtl8188eu driver from staging dir") (Linux kernel
v5.15-rc1), required (through a MODULE_FIRMWARE call()) the
rtlwifi/rtl8188eufw.bin firmware file, which the new r8188eu driver no
longer requires.
I have tested a few RTL8188EUS-based Wi-Fi cards and, while supported by
both drivers, they do not work when using the new one and the firmware
wasn't manually loaded. According to Larry Finger, the module
maintainer, all such cards need the firmware and the driver should
depend on it (see the linked mails).
Add a proper MODULE_FIRMWARE() call, like it was done in the old driver.
Thanks to Greg Kroah-Hartman and Larry Finger for quick responses to my
questions.
Link: https://answers.launchpad.net/ubuntu/+source/linux-meta-hwe-5.15/+question/702611
Link: https://lore.kernel.org/lkml/YukkBu3TNODO3or9@nx64de-df6d00/
Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Link: https://lore.kernel.org/r/YulcdKfhA8dPQ78s@nx64de-df6d00
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 7 Aug 2022 18:15:38 +0000 (20:15 +0200)]
staging: r8188eu: make rtw_init_recv_timer() static
The function rtw_init_recv_timer() is only used in rtw_sta_mgt.c.
Make it static and remove the now empty file os_dep/recv_linux.c.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220807181538.8499-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 7 Aug 2022 18:15:37 +0000 (20:15 +0200)]
staging: r8188eu: make rtw_recv_indicatepkt() static
The function rtw_recv_indicatepkt() is only used in rtw_recv.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220807181538.8499-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 7 Aug 2022 18:15:36 +0000 (20:15 +0200)]
staging: r8188eu: make rtw_handle_tkip_mic_err() static
The function rtw_handle_tkip_mic_err() is only used in rtw_recv.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220807181538.8499-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 7 Aug 2022 18:15:35 +0000 (20:15 +0200)]
staging: r8188eu: merge rtw_os_recvbuf_resource_alloc() into rtw_recv.c
Merge the functionality of the function rtw_os_recvbuf_resource_alloc()
into rtl8188eu_init_recv_priv(). Merging the functionality instead of
just making the function static improves readability and we have one
function less to care about when converting the uses of _FAIL/_SUCCESS
to normal kernel error code logic.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220807181538.8499-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 7 Aug 2022 18:15:34 +0000 (20:15 +0200)]
staging: r8188eu: merge rtw_os_recvbuf_resource_free() into rtw_recv.c
The function rtw_os_recvbuf_resource_free() is just a wrapper around
usb_free_urb(). Call usb_free_urb() directly in
rtl8188eu_free_recv_priv() and remove rtw_os_recvbuf_resource_free()
to simplify the driver code.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220807181538.8499-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Mon, 8 Aug 2022 06:50:23 +0000 (08:50 +0200)]
staging: r8188eu: do not spam the kernel log
Drivers should not spam the kernel log if they work properly. Convert
the functions Hal_EfuseParseIDCode88E() and _netdev_open() to use
netdev_dbg() instead of pr_info() so that developers can still enable
it if they want to see this information.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220808065023.3175-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 8 Aug 2022 20:14:05 +0000 (22:14 +0200)]
staging: r8188eu: the high prio queue is always selected
The high priority queue is always selected, regardless of the number of
out endpoints.
Therefore, haldata->OutEpQueueSel & TX_SELE_HQ is always true. We can
remove the check and use a define instead of the numHQ variable.
This check was the last user of TX_SELE_HQ. Rename haldata->OutEpQueueSel
to haldata->out_ep_extra_queues and store only the queues that are selected
in addition to the high priority queue.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220808201405.68966-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 8 Aug 2022 20:14:04 +0000 (22:14 +0200)]
staging: r8188eu: remove two unused defines
HPQ_PUBLIC_DIS and LPQ_PUBLIC_DIS are not used by the r8188eu driver.
Remove them.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220808201405.68966-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 8 Aug 2022 20:14:03 +0000 (22:14 +0200)]
staging: r8188eu: change all num...Q variables to u8
All of numPubQ, numHQ and numLQ variables store only u8 values. Change
their types to u8. We can then simplify the REG_RQPN expression. The
macros and the temporary variable are not needed any more.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220808201405.68966-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 8 Aug 2022 20:14:02 +0000 (22:14 +0200)]
staging: r8188eu: make numNQ a u8
The numNQ variable in _InitQueueReservedPage is defined as u32. It is
either set to 0 or to 0x1C. Change its type to u8 and remove the code that
casts the u32 value to u8.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220808201405.68966-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 8 Aug 2022 20:14:01 +0000 (22:14 +0200)]
staging: r8188eu: remove a temporary variable
Use pregistrypriv->wifi_spec directly instead of defining a temporary
variable.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220808201405.68966-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:40 +0000 (21:55 +0200)]
staging: r8188eu: simplify _InitNormalChipTwoOutEpPriority
Simplify the _InitNormalChipTwoOutEpPriority function, now that we have
only one configuration for the queues.
Remove the variables which are constant. Keep only those settings that
depend on wifi_spec.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:39 +0000 (21:55 +0200)]
staging: r8188eu: we always use HQ and NQ for two endpoints
When _InitNormalChipTwoOutEpPriority is called, pdvobjpriv->RtNumOutPipes
and haldata->OutEpQueueSel have already been initialized.
_InitNormalChipTwoOutEpPriority is called only if
pdvobjpriv->RtNumOutPipes == 2. In this case, haldata->OutEpQueueSel is
always TX_SELE_HQ | TX_SELE_NQ.
Remove the switch-case statement and set valueHi and valueLow directly.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:38 +0000 (21:55 +0200)]
staging: r8188eu: remove _InitNormalChipOneOutEpPriority
When _InitNormalChipOneOutEpPriority is called, pdvobjpriv->RtNumOutPipes
and haldata->OutEpQueueSel have already been initialized.
_InitNormalChipOneOutEpPriority is called only if
pdvobjpriv->RtNumOutPipes == 1. In this case, haldata->OutEpQueueSel is
always TX_SELE_HQ.
We can then simplify _InitNormalChipOneOutEpPriority to a single
_InitNormalChipRegPriority call, i.e. we can remove
_InitNormalChipOneOutEpPriority and call _InitNormalChipRegPriority
directly.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:37 +0000 (21:55 +0200)]
staging: r8188eu: simplify two_out_pipe
Simplify the two_out_pipe function. Move common settings out of the
if clause.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:36 +0000 (21:55 +0200)]
staging: r8188eu: simplify three_out_pipe
Only one of the mappings in three_out_pipe depends on the wifi_cfg flag.
Simplify the code accordingly.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:35 +0000 (21:55 +0200)]
staging: r8188eu: summarize common Queue2Pipe settings
Regardless of the number of endpoints, queues 4 to 7 are mapped to pipe 0.
Move these mappings to rtl8188eu_interface_configure to make the code
simpler.
It's ok to make these settings even if we exit with error later. In this
case, the driver will not be loaded and pdvobjpriv->Queue2Pipe[] will be
freed.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:34 +0000 (21:55 +0200)]
staging: r8188eu: remove comments about endpoint mapping
Remove the comments in two_out_pipe and three_out_pipe that show the
mappings. They simply repeat the settings in the code and provide no
additional information. Keep the info which RtOutPipe is high, normal
or low.
Without the removed comments, it'll be easier to summarize and reorganize
the code.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:33 +0000 (21:55 +0200)]
staging: r8188eu: remove OutEpNumber
Remove the OutEpNumber component of struct hal_data_8188e.
RtNumOutPipes in struct dvobj_priv stores the same info.
Update the only place where OutEpNumber is read.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:32 +0000 (21:55 +0200)]
staging: r8188eu: summarize endpoint-related settings
rtl8188eu_interface_configure calls _ConfigNormalChipOutEP_8188E and
Hal_MappingOutPipe.
Both of these functions make some settings based on the number of
out endpoints on the 8188eu chip. We can merge both of them into
rtl8188eu_interface_configure and summarize the common code.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:31 +0000 (21:55 +0200)]
staging: r8188eu: move endpoint init functions to usb_halinit.c
Move the Hal_MappingOutPipe function and the functions
one_/two_/three_out_pipe from hal_com.c to usb_halinit.c.
After this move, all the functions that rtl8188eu_interface_configure
calls are in one file and we can continue to summarize and merge them.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:30 +0000 (21:55 +0200)]
staging: r8188eu: merge two small functions
All that rtl8188eu_interface_configure does is call
HalUsbSetQueuePipeMapping8188EUsb. We can merge the two functions.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:29 +0000 (21:55 +0200)]
staging: r8188eu: process HalUsbSetQueuePipeMapping8188EUsb's return value
At the moment, HalUsbSetQueuePipeMapping8188EUsb returns an error status
to rtl8188eu_interface_configure, where this status is discarded.
Pass the error status from rtl8188eu_interface_configure to
rtw_usb_if1_init and handle it there.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:55:28 +0000 (21:55 +0200)]
staging: r8188eu: Hal_MappingOutPipe should return an int
Update the Hal_MappingOutPipe function to return 0 for success or -EXNIO
if the caller requested more than the number of available endpoints.
This error code is also used by usb_find_common_endpoints if a requested
endpoint was not found.
Unlike a boolean return value, a negative error code can be returned to
external functions that call the r8188eu driver, e.g. to the caller of our
probe function.
HalUsbSetQueuePipeMapping8188EUsb passes the return value of
Hal_MappingOutPipe on to its caller. We have to change its return type
from bool to int as well.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 11:13:52 +0000 (13:13 +0200)]
staging: r8188eu: simplify the calculation of ie start offset
Use offsetof to calculate the start offset of the information elements in
an association response message. This should make it easier to understand
how the offset is calculated.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806111352.690650-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 11:13:51 +0000 (13:13 +0200)]
staging: r8188eu: read aid from struct ieee80211_mgmt
Read the aid of the association response message from struct
ieee80211_mgmt. This should be easier to understand and to review than
calculating the offset manually.
Remove the cast to int, aid is a u16.
Keep the 0x3fff mask that is currently applied to the aid.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806111352.690650-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 11:13:50 +0000 (13:13 +0200)]
staging: r8188eu: read capability info from struct ieee80211_mgmt
Read the capability info of the association response message from struct
ieee80211_mgmt. This should be easier to understand and to review than
calculating the offset manually.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806111352.690650-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 11:13:49 +0000 (13:13 +0200)]
staging: r8188eu: read status_code from struct ieee80211_mgmt
Read the status code of the association response message from struct
ieee80211_mgmt. This should be easier to understand and to review than
calculating the offset manually.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806111352.690650-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 11:13:48 +0000 (13:13 +0200)]
staging: r8188eu: replace a get_da call
The r8188eu driver implements an internal get_da function to read the
destination address (da) from an incoming message. Callers of this
function should be updated to use the ieee80211 framework, with the goal
of removing get_da eventually.
This patch replaces a get_da call in the OnAssocRsp function.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806111352.690650-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 6 Aug 2022 06:09:29 +0000 (08:09 +0200)]
staging: r8188eu: clean up comment for phy_calculate_bit_shift()
Clean up the comment for function phy_calculate_bit_shift().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220806060929.11022-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 6 Aug 2022 06:09:28 +0000 (08:09 +0200)]
staging: r8188eu: avoid camel case in phy_CalculateBitShift()
Rename the function phy_CalculateBitShift() and its parameter BitMask
to avoid camel case.
phy_CalculateBitShift -> phy_calculate_bit_shift
BitMask -> bitmask
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220806060929.11022-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>