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>
Michael Straube [Sat, 6 Aug 2022 06:09:27 +0000 (08:09 +0200)]
staging: r8188eu: use ffs() in phy_CalculateBitShift()
Use ffs() in phy_CalculateBitShift() to simplify the function and
improve readability.
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-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Tue, 2 Aug 2022 23:44:08 +0000 (00:44 +0100)]
staging: r8188eu: convert rtw_p2p_enable to correct error code semantics
Convert the rtw_p2p_enable function to use correct error code semantics
rather than _SUCCESS/_FAIL, and also make sure we allow these to be
passed through properly in the one caller where we actually check the
code, rtw_wext_p2p_enable.
This change moves these functions to a clearer 'return 0;' style at the
end of the function, and in the case of errors now returns ret instead
of jumping to the end of the function, so that these can still be passed
through but without using a goto to jump to a single return statement at
the end which is less clear.
This change moves the driver slowly closer to using standard error code
semantics everywhere.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220802234408.930-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 4 Aug 2022 10:55:32 +0000 (12:55 +0200)]
staging: r8188eu: make rtl8188eu_{init,free}_recv_priv() static
The functions rtl8188eu_init_recv_priv() and rtl8188eu_free_recv_priv()
are only used in rtw_recv.c. Make them static and remove the now empty
file rtl8188eu_recv.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/20220804105532.7532-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 4 Aug 2022 10:55:31 +0000 (12:55 +0200)]
staging: r8188eu: make handle_txrpt_ccx_88e() static
The function handle_txrpt_ccx_88e() is only used in usb_ops_linux.c.
Make it static and remove the now empty file rtl8188e_xmit.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/20220804105532.7532-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Li zeming [Tue, 2 Aug 2022 01:25:13 +0000 (09:25 +0800)]
staging/rtl8723bs/core: remove inactive initialization
The allocation address of the psta pointer variable is first performed
in the function, no initialization assignment is required, and no
invalid pointer will appear.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Li zeming <zeming@nfschina.com>
Link: https://lore.kernel.org/r/20220802012513.2824-1-zeming@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 30 Jul 2022 15:06:37 +0000 (17:06 +0200)]
staging: r8188eu: refactor dump_chip_info()
Refactor the function dump_chip_info() to make the code cleaner and
reduce the driver object file size. Instead of using sprintf() to
print all the information to a buffer use a char pointer for the cut
version string and print the other strings directly by netdev_dbg().
For the unknown cut string we can use a smaller buffer and print to
that buffer with snprintf() to be safe.
These changes avoid the possible buffer overflow that the original
code had and reduces the driver object file size by 1029 bytes.
Suggested-by: Joe Perches <joe@perches.com>
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/20220730150637.3550-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 30 Jul 2022 15:06:36 +0000 (17:06 +0200)]
staging: r8188eu: convert dump_chip_info() to use netdev_dbg()
Drivers should not spam the kernel log if they work properly. Convert
the dump_chip_info() function to use netdev_dbg() instead of pr_info()
so that developers can still enable it if they want to see this
information.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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/20220730150637.3550-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 30 Jul 2022 14:39:39 +0000 (16:39 +0200)]
staging: r8188eu: return an error code in rtw_usb_if1_init
rtw_usb_if1_init returns a pointer that isn't used by the caller. Return
an error code instead. We can then propagate errors from lower-level
functions like ReadAdapterInfo8188EU and fail the initialisation of the
driver with a proper error 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/20220730143939.671951-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 30 Jul 2022 14:39:38 +0000 (16:39 +0200)]
staging: r8188eu: make rtw_handle_dualmac a void function
The rtw_handle_dualmac function always returns _SUCCESS. Remove the return
value and update the one caller that checks it.
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/20220730143939.671951-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 30 Jul 2022 14:39:37 +0000 (16:39 +0200)]
staging: r8188eu: handle errors from ReadAdapterInfo8188EU
Update ReadAdapterInfo8188EU to return 0 for success or a negative
error code. If rtw_read8 fails, we can just relay the error it returns.
Update rtw_usb_if1_init to check the return value from
ReadAdapterInfo8188EU. For now, rtw_usb_if1_init does not yet pass errors
from ReadAdapterInfo8188EU on to its caller.
Suggested-by: Pavel Skripkin <paskripkin@gmail.com>
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/20220730143939.671951-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tong Zhang [Sat, 30 Jul 2022 03:33:24 +0000 (20:33 -0700)]
staging: rtl8192u: fix rmmod warn when device is renamed
This driver creates 4 debug files under [devname] folder. The devname
could be wlan0 initially, however it could be renamed later to e.g.
enx00e04c00000. This will cause problem during debug file teardown since
it uses netdev->name, which is no longer wlan0. To solve this problem,
add a notifier to handle device renaming. Also note that we cannot
simply do debugfs_lookup to find out old dentry since by the time the
notifier is called, netdev->name is already changed to new name.
Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Tested-by: Zheyu Ma <zheyuma97@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220730033335.74153-5-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tong Zhang [Sat, 30 Jul 2022 03:33:23 +0000 (20:33 -0700)]
staging: rtl8192u: move debug files to debugfs
There are 4 debug files created under /proc/net/[Devname].
Due to this is purely for debuging as files are created read only,
move this to debugfs like other NIC drivers do instead of using procfs.
The directory structure will be like the following
/sys/kernel/debug/r8192u_usb/wlan0/stats-rx
/sys/kernel/debug/r8192u_usb/wlan0/stats-rx
/sys/kernel/debug/r8192u_usb/wlan0/stats-ap
/sys/kernel/debug/r8192u_usb/wlan0/registers
This is also to prepare for address rmmod warn issue.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220730033335.74153-4-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tong Zhang [Sat, 30 Jul 2022 03:33:22 +0000 (20:33 -0700)]
staging: rtl8192u: remove unnecessary cast
Cast is not needed when calling ieee80211_priv, so remove them.
No functional change in this commit.
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220730033335.74153-3-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tong Zhang [Sat, 30 Jul 2022 03:33:21 +0000 (20:33 -0700)]
staging: rtl8192u: move debug stuff to its own file
This is to prepare for moving them to debugfs and fix rmmod warn issue
when wlan0 is renamed to something else.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220730033335.74153-2-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 6 Aug 2022 19:43:04 +0000 (21:43 +0200)]
staging: r8188eu: txpktbuf_bndy does not depend on wifi_spec
Remove the if clause that sets txpktbuf_bndy. Both branches set the same
value.
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/20220806194304.777059-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mingyi Kang [Sat, 30 Jul 2022 04:57:26 +0000 (12:57 +0800)]
staging: vme_user: Fix checkpatch warnings in vme_tsi148.c
This patch fix the follwing checkpatch warnings:
WARNING: quoted string split across lines
#129: FILE: drivers/staging/vme_user/vme_tsi148.c:129:
+ dev_err(tsi148_bridge->parent, "VME Mailbox %d received"
+ ": 0x%x\n", i, val);
WARNING: quoted string split across lines
#147: FILE: drivers/staging/vme_user/vme_tsi148.c:147:
+ dev_err(tsi148_bridge->parent, "PCI Exception at address: 0x%08x:%08x, "
+ "attributes: %08x\n",
WARNING: quoted string split across lines
#153: FILE: drivers/staging/vme_user/vme_tsi148.c:153:
+ dev_err(tsi148_bridge->parent, "PCI-X attribute reg: %08x, PCI-X split "
+ "completion reg: %08x\n",
WARNING: quoted string split across lines
#185: FILE: drivers/staging/vme_user/vme_tsi148.c:185:
+ dev_err(tsi148_bridge->parent, "VME Bus Exception Overflow "
+ "Occurred\n");
WARNING: quoted string split across lines
#321: FILE: drivers/staging/vme_user/vme_tsi148.c:321:
+ dev_err(tsi148_bridge->parent, "Can't get assigned pci irq "
+ "vector %02X\n", pdev->irq);
WARNING: quoted string split across lines
#533: FILE: drivers/staging/vme_user/vme_tsi148.c:533:
+ dev_err(tsi148_bridge->parent, "Invalid PCI Offset "
+ "alignment\n");
WARNING: space prohibited before semicolon
#591: FILE: drivers/staging/vme_user/vme_tsi148.c:591:
+ temp_ctl |= TSI148_LCSR_ITAT_SUPR ;
WARNING: quoted string split across lines
#766: FILE: drivers/staging/vme_user/vme_tsi148.c:766:
+ dev_err(tsi148_bridge->parent, "Failed to allocate mem "
+ "resource for window %d size 0x%lx start 0x%lx\n",
WARNING: quoted string split across lines
#831: FILE: drivers/staging/vme_user/vme_tsi148.c:831:
+ dev_err(tsi148_bridge->parent, "Invalid VME Window "
+ "alignment\n");
WARNING: quoted string split across lines
#838: FILE: drivers/staging/vme_user/vme_tsi148.c:838:
+ dev_err(tsi148_bridge->parent, "Size must be non-zero for "
+ "enabled windows\n");
WARNING: quoted string split across lines
#853: FILE: drivers/staging/vme_user/vme_tsi148.c:853:
+ dev_err(tsi148_bridge->parent, "Unable to allocate memory for "
+ "resource\n");
WARNING: quoted string split across lines
#894: FILE: drivers/staging/vme_user/vme_tsi148.c:894:
+ dev_err(tsi148_bridge->parent, "Invalid VME Offset "
+ "alignment\n");
WARNING: quoted string split across lines
#941: FILE: drivers/staging/vme_user/vme_tsi148.c:941:
+ dev_warn(tsi148_bridge->parent, "Currently not setting "
+ "Broadcast Select Registers\n");
WARNING: quoted string split across lines
#1455: FILE: drivers/staging/vme_user/vme_tsi148.c:1455:
+ dev_err(dev, "Currently not setting Broadcast Select "
+ "Registers\n");
WARNING: quoted string split across lines
#1554: FILE: drivers/staging/vme_user/vme_tsi148.c:1554:
+ dev_err(dev, "Currently not setting Broadcast Select "
+ "Registers\n");
WARNING: quoted string split across lines
#1643: FILE: drivers/staging/vme_user/vme_tsi148.c:1643:
+ dev_err(tsi148_bridge->parent, "Descriptor not aligned to 8 "
+ "byte boundary as required: %p\n",
WARNING: else is not generally useful after a break or return
#1830: FILE: drivers/staging/vme_user/vme_tsi148.c:1830:
+ return -EBUSY;
+ } else {
warning: quoted string split across lines
#1939: file: drivers/staging/vme_user/vme_tsi148.c:1939:
+ dev_err(tsi148_bridge->parent, "location monitor "
+ "callback attached, can't reset\n");
WARNING: space prohibited before semicolon
#1964: FILE: drivers/staging/vme_user/vme_tsi148.c:1964:
+ lm_ctl |= TSI148_LCSR_LMAT_SUPR ;
WARNING: quoted string split across lines
#2055: FILE: drivers/staging/vme_user/vme_tsi148.c:2055:
+ dev_err(tsi148_bridge->parent, "Location monitor not properly "
+ "configured\n");
WARNING: quoted string split across lines
#2200: FILE: drivers/staging/vme_user/vme_tsi148.c:2200:
+ dev_err(tsi148_bridge->parent, "Failed to allocate memory for "
+ "CR/CSR image\n");
WARNING: quoted string split across lines
#2241: FILE: drivers/staging/vme_user/vme_tsi148.c:2241:
+ dev_err(tsi148_bridge->parent, "Configuring flush image"
+ " failed\n");
Signed-off-by: Mingyi Kang <jerrykang026@gmail.com>
Link: https://lore.kernel.org/r/20220730045726.55452-1-jerrykang026@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sidong Yang [Sat, 30 Jul 2022 01:27:24 +0000 (02:27 +0100)]
staging: pi433: fix wrong debug message on rf69_write_fifo()
The debug message should describe error when user calls rf69_write_fifo()
not rf69_write_fifo().
Signed-off-by: Sidong Yang <realwakka@gmail.com>
Link: https://lore.kernel.org/r/20220730012724.1138-1-realwakka@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 7 Aug 2022 18:13:55 +0000 (20:13 +0200)]
staging: vt6655: Convert macro MACvDisableBarkerPreambleMd
Convert macro MACvDisableBarkerPreambleMd to static function which calls
the common static function vt6655_mac_clear_bits. This saves
codelines and multiline macros are not liked by kernel community.
Function name is also changed 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/2a1d67762d9ecf3f30f3e293ad6ab997ad278b84.1659892671.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 7 Aug 2022 18:13:51 +0000 (20:13 +0200)]
staging: vt6655: Convert macro MACvEnableBarkerPreambleMd
Convert macro MACvEnableBarkerPreambleMd to static function which calls
the common static function vt6655_mac_set_bits. This saves
codelines and multiline macros are not liked by kernel community.
Function name is also changed 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/542b9f8c0b10aa3db143b22f7425ab5bddc5bffe.1659892671.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 7 Aug 2022 18:13:46 +0000 (20:13 +0200)]
staging: vt6655: Convert macro MACvDisableProtectMD
Convert macro MACvDisableProtectMD to static function which calls the
new common static function vt6655_mac_clear_bits. This saves
codelines and multiline macros are not liked by kernel community.
Function name is also changed 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/4cb2b8025adde2a3addfd8e954faf18a0a8032aa.1659892670.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 7 Aug 2022 18:13:42 +0000 (20:13 +0200)]
staging: vt6655: Rename function MACvEnableProtectMD
Rename MACvEnableProtectMD function to vt6655_mac_en_protect_md 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/927d7c6e7c9d5214e4faeca886efd2696b2abc31.1659892670.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 7 Aug 2022 18:13:37 +0000 (20:13 +0200)]
staging: vt6655: Create one function for two macros
Create function vt6655_mac_set_bits with two parameters to cover
functionality of two macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/78883f42b2df258dbf821d7f7515a82932a157f1.1659892670.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 7 Aug 2022 18:13:33 +0000 (20:13 +0200)]
staging: vt6655: Convert macro MACvEnableProtectMD to function
Convert macro to static function. Multiline macros are not liked by
kernel community. Rename variable dwOrgValue to reg_value 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/f3a5ec5352346f1dc4bf3afbee25973fdb47d7e4.1659892670.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Fri, 29 Jul 2022 08:14:57 +0000 (10:14 +0200)]
staging: vt6655: Replace MACvTransmitAC0 with function vt6655_mac_dma_ctl
Convert macro MACvTransmitAC0 to existing static function. This saves
codelines and multiline macros are not liked by kernel community.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/013abd177d9ac129c034776f10cdf823fd87d781.1659080988.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Fri, 29 Jul 2022 08:14:46 +0000 (10:14 +0200)]
staging: vt6655: Replace MACvTransmit0 with function vt6655_mac_dma_ctl
Convert macro MACvTransmit0 to existing static function. This saves
codelines and multiline macros are not liked by kernel community.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fc412f0fda11045a55b6b5867d51e250ca841ee8.1659080988.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>