- 27 Sep, 2021 40 commits
-
-
Fabio M. De Francesco authored
Change the type of "data" from __le32 to __le16. The size of the data that usbctrl_vendorreq() will read is two bytes in little endian order, so the most suitable type is __le16. With the old code, since the two most significant bytes of data are not initialized, KMSan can likely detect the reading of uninitialized data, so this change can prevent the checker from complaining. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-12-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Remove an unnecessary bitwise AND because "length" can never be greater than 0xffff since VENDOR_CMD_MAX_DATA_LEN is defined as '254'. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-11-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Remove the unnecessary buffer "u8 buf[VENDOR_CMD_MAX_DATA_LEN]" and pass directly "data" to usbctrl_vendorreq(). Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-10-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Change the type of "data" from __le32 to __le16 in rtw_write16(). The argument "val", which is u16, after being conditionally swapped to little endian, is assigned to "data"; therefore, __le16 is the most suitable type for "data". Remove the bitwise AND of "val" with 0xffff because it is redundant. Use cpu_to_le16() because "data" is __le16. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-9-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Remove unnecessary casts from rtw_read{8,16,32}() and from rtw_write{8,16,32,N}(). Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-8-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Rename variables in rtw_read{8.16.32}() and in rtw_write{8,16,32,N}() because of unnecessary 'p' (that probably stand for "pointer to") and 'w' (that probably stands for "word"): pio_priv => io_priv; pintfhdl => intf; wvalue => value. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-7-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Remove an unnecessary comment from usbctrl_vendorreq(). Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-6-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Reorder comments in usbctrl_vendorreq() to follow Linux coding style. Delete two of them because they are "obvious". Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-5-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Remove unnecessary test for "!io_buf" in usbctrl_vendorreq(). This test is not necessary because io_buf has been assigned with the address of a region of dynamically allocated memory (dvobj->usb_alloc_vendor_req_buf) by rtw_init_intf_priv() in os_dep/usb_intf.c. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-4-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Reorder variables declarations according to the "Reverse Xmas Tree" style. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-3-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Clean up symbol names in usbctrl_vendorreq(): pdata => data; pio_priv => io_priv; pintfhdl => intf. Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-2-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The function ODM_CheckPowerStatus() returns always true. Checking its return value is not necessary. Remove the function and related code. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210925074013.14693-1-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
LedStrategy is set but never used. Remove it from struct led_priv and remove the now unused enum LED_STRATEGY_871x as well. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210924204917.6313-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function _InitHWLed() does nothing, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210924204917.6313-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The function names in rtw_led.c are self-explanatory. Remove unnecessary comments. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210924204917.6313-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
LedStrategy is SW_LED_MODE1 in this driver. Remove led control functions that are not used for SW_LED_MODE1. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210924204917.6313-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
LedStrategy is SW_LED_MODE1 in this driver. Remove led blink functions that are not used for SW_LED_MODE1. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210924204917.6313-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_tdls_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-18-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_setstandby_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-17-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_setrttbl_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-16-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_setrfreg_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-15-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_setphy_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-14-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_setbbreg_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-13-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_setbasicrate_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-12-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_setassocsta_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-11-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_set_csa_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-10-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_set_ch_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-9-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_readtssi_cmdrsp_callback() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-8-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_led_blink_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-7-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_getrttbl_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_getrfreg_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_getbbreg_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_createbss_cmd_ex() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_cmd_clr_isr() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923190920.3580-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The functions rtw_proc_{init,remove}_one() are empty and can be removed. There are non-empty versions of these functions covered by #if 0. Remove this dead code as well. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210923164556.9492-1-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function odm_DynamicTxPowerInit() is empty now, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210921194658.10654-9-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The field DynamicTxHighPowerLvl of struct dm_priv is set but never used. Remove it and remove now unused variables from odm_DynamicTxPowerInit(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210921194658.10654-8-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
In this driver DynamicTxHighPowerLvl is set to TxHighPwrLevel_Normal and never changed. In the file rtl8188e_rf6052.c there are some if statements that check DynamicTxHighPowerLvl for other values than TxHighPwrLevel_Normal. The code in the if blocks is never executed. Remove the dead code. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210921194658.10654-7-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The field PowerIndex_backup of struct dm_priv is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210921194658.10654-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The fields bDynamicTxPowerEnable and LastDTPLvl of struct dm_priv are set but never used. Remove them. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210921194658.10654-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-