- 13 Sep, 2021 40 commits
-
-
Michael Straube authored
Remove dm_deinit from hal_ops and remove its wrapper rtw_hal_dm_deinit(). Call rtl8188e_deinit_dm_priv() directly instead. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210906190223.11396-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove dm_init from hal_ops and remove its wrapper rtw_hal_dm_init(). Call rtl8188e_init_dm_priv() directly instead. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210906190223.11396-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove DeInitSwLeds from hal_ops and remove its wrapper rtw_hal_sw_led_deinit(). Call rtl8188eu_DeInitSwLeds() directly instead. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210906190223.11396-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove InitSwLeds from hal_ops and remove its wrapper rtw_hal_sw_led_init(). Call rtl8188eu_InitSwLeds() directly instead. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210906190223.11396-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Remove _enter_critical_mutex() and _exit_critical_mutex(). They are unnecessary wrappers, respectively to mutex_lock_interruptible() and to mutex_unlock(). They also have an odd interface that takes an unused argument named pirqL of type unsigned long. The original code enters the critical section if the mutex API is interrupted while waiting to acquire the lock; therefore it could lead to a race condition. Use mutex_lock() because it is uninterruptible and so avoid that above-mentioned potential race condition. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Reviewed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210828113656.6963-1-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Pavel Skripkin authored
While testing Fabio's patch I hit lockdep warning about possible deadlock: [ 252.063305] WARNING: possible recursive locking detected [ 252.063642] 5.14.0+ #9 Tainted: G C [ 252.063946] -------------------------------------------- [ 252.064282] ip/335 is trying to acquire lock: [ 252.064560] ffff888009ebad28 (pmutex){+.+.}-{4:4}, at: usbctrl_vendorreq+0xc5/0x4a0 [r8188eu] [ 252.065168] [ 252.065168] but task is already holding lock: [ 252.065536] ffffffffc021b3b8 (pmutex){+.+.}-{4:4}, at: netdev_open+0x3a/0x5f [r8188eu] [ 252.066085] [ 252.066085] other info that might help us debug this: [ 252.066494] Possible unsafe locking scenario: [ 252.066494] [ 252.066866] CPU0 [ 252.067025] ---- [ 252.067184] lock(pmutex); [ 252.067367] lock(pmutex); There is one problem with this warning: there is no pmutex in this driver, *BUT* all mutexes are initialized via private _rtw_mutex_init API, which had struct mutex *pmutex argument. So, all mutexes in this driver had same name in lockdep map. Of course, lockdep will complain about any nested locking. Fix it by open-coding _rtw_mutex_{init,free} wrappers, because we do not need them at all. Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210904124747.30050-1-paskripkin@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Pavel Skripkin authored
smatch says: usb_intf.c:326 rtw_hw_suspend() warn: variable dereferenced before check 'padapter' (see line 323) usb_intf.c:387 rtw_hw_resume() warn: variable dereferenced before check 'padapter' (see line 385) There is only one caller of rtw_hw_suspend() and it does not check padapter pointer, so let's just omit this check to make smatch happy. Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210905204218.19317-1-paskripkin@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Saurav Girepunje authored
Remove below duplicate declaration from rtl8188e_led.h file void SwLedOn(struct adapter *padapter, struct LED_871x *pLed); void SwLedOff(struct adapter *padapter, struct LED_871x *pLed); Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YTRuXTu/kePBDwAF@userSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove c2h_id_filter_ccx function pointer from struct hal_ops, as it is unused. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-15-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_hal_c2h_id_filter_ccx from hal/hal_intf.c and its one caller from core/rtw_cmd.c. This function is a wrapper function which returns the c2h_id_filter_ccx function pointer of struct hal_ops unconditionally. As this function pointer is never set, and the function call's return value is subsequently called inside an if condition, this could lead to an attempt to deference a NULL pointer, which would crash the driver. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-14-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove Efuse_PgPacketWrite_BT function pointer from struct hal_ops, as it is unused. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-13-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove static Efuse_PgPacketWrite_BT and its one caller from core/rtw_efuse.c. This function is a wrapper function which calls the Efuse_PgPacketWrite_BT function pointer of struct hal_ops unconditionally. As this function pointer is never set, and this function call is possible to reach, this could lead to an attempt to deference a NULL pointer, which would crash the driver. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-12-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove hal_xmitframe_enqueue function pointer from struct hal_ops, as it is unused. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-11-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_hal_xmitframe_enqueue from hal/hal_intf.c and its one caller from core/rtw_recv.c, and remove its declaration from include/hal_intf.h as well. This is just a wrapper function that calls the function pointer hal_xmitframe_enqueue in struct hal_ops if it is set, which it never is. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-10-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove interrupt_handler function pointer from struct hal_ops, as it is unused. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-9-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_hal_interrupt_handler from hal/hal_intf.c, and remove its declaration from include/hal_intf.h as well. This is just a wrapper function that calls the function pointer interrupt_handler in struct hal_ops if it is set, which it never is. In addition, this wrapper function is unused anyway. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-8-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove disable_interrupt function pointer from struct hal_ops, as it is unused. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-7-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_hal_disable_interrupt from hal/hal_intf.c, and remove its declaration from include/hal_intf.h as well. This is just a wrapper function that calls the function pointer disable_interrupt in struct hal_ops if it is set, which it never is. In addition, this wrapper function is unused anyway. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-6-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove enable_interrupt function pointer from struct hal_ops, as it is unused. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-5-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_hal_enable_interrupt from hal/hal_intf.c, and remove its declaration from include/hal_intf.h as well. This is just a wrapper function that calls the function pointer enable_interrupt in struct hal_ops if it is set, which it never is. In addition, this wrapper function is unused anyway. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-4-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove hal_reset_security_engine function pointer from struct hal_ops, as it is unused. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-3-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_hal_reset_security_engine and its one caller from hal/hal_intf.c, and remove its declaration from include/hal_intf.h as well. This is just a wrapper function that calls the function pointer hal_reset_security_engine in struct hal_ops if it is set, which it never is. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210906010106.898-2-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Saurav Girepunje authored
Remove condition which never get execute. as pattrib->mdata is always zero before if condition check. Acked-by: Phillip Potter <phil@philpotter.co.uk> Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YTNrjG1y05ByN54+@userSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove init_default_value from hal_ops and remove its wrapper rtw_hal_def_value_init(). Call rtl8188eu_init_default_value() directly instead Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210904124033.14244-7-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove GetHalODMVarHandler from hal_ops ant remove its wrapper rtw_hal_get_odm_var(), both are unused. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210904124033.14244-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function ReadChipVersion8188E() is only called by the wrapper rtl8188e_read_chip_version(). Rename ReadChipVersion8188E() to rtl8188e_read_chip_version() and change the return type to void since the return value is never used. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210904124033.14244-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove read_chip_version from hal_ops and remove its wrapper rtw_hal_read_chip_version(). Call rtl8188e_read_chip_version() directly instead Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210904124033.14244-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove read_adapter_info from hal_ops and remove its wrapper rtw_hal_read_chip_info(). Call ReadAdapterInfo8188EU() directly instead. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210904124033.14244-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove intf_chip_configure from hal_ops and remove its wrapper rtw_hal_chip_configure(). Call rtl8188eu_interface_configure() directly instead. Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210904124033.14244-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Srivathsa Dara authored
Fix coding style error 'trailing statements should be on next line' Signed-off-by: Srivathsa Dara <srivathsa729.8@gmail.com> Link: https://lore.kernel.org/r/20210904080916.15476-1-srivathsa729.8@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Pavel Skripkin authored
psetkeyparm is kzalloced buffer, there is no need in zeroing it one more time, since kzalloc had already set memory to 0. Fixes: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/97a283ed5b97632033b0fc7c6aa0fbfc82f06da3.1630692375.git.paskripkin@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Pavel Skripkin authored
Before returning with an error we should free allocated buffers, since they are not assigned to anywhere. Fixes: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/ee783fbb71abb549505b84542223be7a7c905eea.1630692375.git.paskripkin@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Saurav Girepunje authored
Fixes coccicheck warning: Remove the condition with no effect (if == else) in odm.c Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YTMHxQJXKZHE5mg0@userSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_use_tkipkey_handler() is unused, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210903190444.15585-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Replace custom arc4 implementation with in-kernel one. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210903190444.15585-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unused constant CRC32_POLY. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210903190444.15585-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
From enum hardware_type only HARDWARE_TYPE_RTL8188EU is used in the driver. Remove the enum and define HARDWARE_TYPE_RTL8188EU. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210903093354.12645-7-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The IS_HARDWARE_TYPE_8188* macros are not needed because the driver is for RTL8188EU chips, remove them. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210903093354.12645-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unused enum rt_eeprom_type. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210903093354.12645-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unused enum from ieee80211.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210903093354.12645-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-