- 13 Sep, 2021 40 commits
-
-
Michael Straube authored
Remove unnecessary parentheses around a variable to improve readability. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-9-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Add a missing blank line after declarations in rtw_macaddr_cfg() to clear a checkpatch warning. WARNING: Missing a blank line after declarations Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-8-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use ether_addr_copy() in rtw_macaddr_cfg() to copy the mac address. The buffers are properly aligned. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-7-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use a random default mac address instead of a fixed one to reduce the likelihood of mac address collision. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-6-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_broadcast_ether_addr() and is_zero_ether_addr() in rtw_macaddr_cfg(). The buffer is properly aligned. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-5-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use ETH_ALEN instead of hard-coding the value for the mac_addr buffer in struct eeprom_priv. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-4-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Ensure the mac address buffer in struct eeprom_priv is properly aligned for use with functions from <linux/etherdevice.h>. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-3-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Instead of a custom approach use mac_pton() to convert the mac address string. With mac_pton() the driver also validates the input now. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830121508.6411-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unused function SetBcnCtrlReg(). Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830092153.9283-5-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
IC type is always 8188E. Remove ICType from struct HAL_VERSION, all macros that check it and related code. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830092153.9283-4-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The local variable rfPath in Hal_SetAntennaPathPower() and Hal_SetTxPower() is set but not used. Remove the variable and related code. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830092153.9283-3-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
IC Type is always 8188E. Therefore, the test "if (!IS_92C_SERIAL(pHalData->VersionID))" in Hal_MPT_CCKTxPowerAdjustbyIndex() is always true and the function does nothing, remove it. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210830092153.9283-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove commented constants from wifi.h. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829180717.15393-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The constants WLAN_REASON_PWR_CAPABILITY_NOT_VALID and WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID defined in wifi.h are unused, remove them. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829180717.15393-1-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Refactor the field IQKMatrixRegSetting of struct odm_rf_cal to be not an array. The driver is for chips that operate in the 2.4 GHz band only. So only the first element of the array is used and there is no need for an array. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829175624.5915-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The local variable Indexforchannel in function odm_TXPowerTrackingCallback_ThermalMeter_8188E() is initilaized to 0 and never changed. Remove the variable and replace its usage with 0. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829175624.5915-1-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The field rx_data of struct recv_frame and the local variable pframe both have type (u8 *). Remove unnecessary type casts to (unsigned char *). Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829112555.8726-4-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Convert the type of the second parameter of the rtw_*_decrypt() functions to struct recv_frame. All callers of the functions cast the type to (u8 *) and in the functions it is casted back to the original type. Changing the type of the second parameter to struct recv_frame avoids these unnecessary casts and improves readability. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829112555.8726-3-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Convert the type of the second parameter of the rtw_*_encrypt() functions to struct xmit_frame. All callers of the functions cast the type to (u8 *) and in the functions it is casted back to the original type. Changing the type of the second parameter to struct xmit_frame avoids these unnecessary casts and improves readability. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829112555.8726-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function should_forbid_n_rate() is unused, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-7-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function is_ap_in_wep() is unused, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-6-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function CAM_empty_entry() is unused, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-5-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function get_bsstype() is unused, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-4-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_get_oper_choffset() is unused, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-3-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_get_oper_bw() is unused, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829092502.3658-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtl8188e_PHY_ConfigRFWithParaFile() is unused, remove it. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210828170834.31388-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtl8188e_PHY_ConfigRFWithHeaderFile() is not implemented, remove the declaration from Hal8188EPhyCfg.h. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210828170834.31388-1-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Saurav Girepunje authored
Remove the condition with no effect (if == else) and group multiple cases which execute same statement in rtw_mlme_ext.c Reviewed-by:
Pavel Skripkin <paskripkin@gmail.com> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YStM2wxtkDAnRemt@userSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Saurav Girepunje authored
Remove unused function proc_get_adapter_state() from rtw_debug.c file. Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YSpP0+aHdq3Roleo@userSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
xu xin authored
Remove the check of the pointer 'pregpriv' that is impossible to be NULL. There is no need to check if pregpriv is NULL. Reported-by:
Zeal Robot <zealci@zte.com.cn> Signed-off-by:
xu xin <xu.xin16@zte.com.cn> Thanks-to: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210830012811.3384-1-xu.xin16@zte.com.cnSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Saurav Girepunje authored
Remove unused static variable rtw_enusbss from os_intfs.c file. Acked-by:
Martin Kaiser <martin@kaiser.cx> Signed-off-by:
Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YSoz5Qip12K899SN@userSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Clean up comparsions to NULL reported by checkpatch. x == NULL -> !x x != NULL -> x Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210829154533.11054-1-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
remove _rtw_init_queue() left unused by previous commit in this series. Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/3c03fcfbe799195c84608b05fc54efe921bef4de.1630307025.git.fabioaiuto83@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
Fix the following post commit hook checkpatch issues: CHECK: Unnecessary parentheses around pcmdpriv->cmd_queue 103: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:169: + INIT_LIST_HEAD(&(pcmdpriv->cmd_queue).queue); CHECK: Unnecessary parentheses around pcmdpriv->cmd_queue 104: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:170: + spin_lock_init(&(pcmdpriv->cmd_queue).lock); Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/de4fcdb3ff45671333713b27f1dcf376b22f3978.1630307025.git.fabioaiuto83@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
unwrap initialization of queues to avoid false positive lockdep warning: [ 27.350258] ============================================ [ 27.350267] WARNING: possible recursive locking detected [ 27.350276] 5.14.0-rc6+ #16 Tainted: G C OE [ 27.350288] -------------------------------------------- [ 27.350295] RTW_CMD_THREAD/679 is trying to acquire lock: [ 27.350306] ffffa846c03290c8 (&(pqueue->lock)){+.-.}-{2:2}, at: rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.350441] but task is already holding lock: [ 27.350448] ffffa846c0329118 (&(pqueue->lock)){+.-.}-{2:2}, at: rtw_update_scanned_network+0x33/0x1d0 [r8723bs] [ 27.350573] other info that might help us debug this: [ 27.350581] Possible unsafe locking scenario: [ 27.350588] CPU0 [ 27.350594] ---- [ 27.350600] lock(&(pqueue->lock)); [ 27.350614] lock(&(pqueue->lock)); [ 27.350627] *** DEADLOCK *** [ 27.350634] May be due to missing lock nesting notation [ 27.350641] 2 locks held by RTW_CMD_THREAD/679: [ 27.350652] #0: ffffa846c0329038 (&pmlmepriv->lock){+...}-{2:2}, at: rtw_survey_event_callback+0x2d/0xe0 [r8723bs] [ 27.350780] #1: ffffa846c0329118 (&(pqueue->lock)){+.-.}-{2:2}, at: rtw_update_scanned_network+0x33/0x1d0 [r8723bs] [ 27.350907] stack backtrace: [ 27.350916] CPU: 3 PID: 679 Comm: RTW_CMD_THREAD Tainted: G C OE 5.14.0-rc6+ #16 [ 27.350933] Hardware name: LENOVO 80NR/Madrid, BIOS DACN25WW 08/20/2015 [ 27.350943] Call Trace: [ 27.350959] dump_stack_lvl+0x56/0x6f [ 27.350982] __lock_acquire.cold.79+0x137/0x298 [ 27.351012] lock_acquire+0xb4/0x2c0 [ 27.351031] ? rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.351140] ? rtw_update_scanned_network+0x33/0x1d0 [r8723bs] [ 27.351254] _raw_spin_lock_bh+0x34/0x40 [ 27.351271] ? rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.351378] rtw_alloc_network+0x1b/0xa0 [r8723bs] [ 27.351488] rtw_update_scanned_network+0xa5/0x1d0 [r8723bs] [ 27.351605] rtw_survey_event_callback+0x54/0xe0 [r8723bs] [ 27.351719] mlme_evt_hdl+0x4e/0x70 [r8723bs] [ 27.351839] rtw_cmd_thread+0x16c/0x3d0 [r8723bs] [ 27.351945] ? rtw_stop_cmd_thread+0x50/0x50 [r8723bs] [ 27.352045] kthread+0x136/0x160 [ 27.352064] ? set_kthread_struct+0x40/0x40 [ 27.352083] ret_from_fork+0x22/0x30 This happens because the wrapping function _rtw_init_queues() bring lockdep considering all queues as a single one. But all queues are different with their own lock. Applied the following semantic patch: @@ expression a; @@ - _rtw_init_queue(&a); + INIT_LIST_HEAD(&a.queue); + spin_lock_init(&a.lock); Reported-by:
Hans De Goede <hdegoede@redhat.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/c2c3a18cc2b883feab74f150ccbaa4f2cc11995c.1630307025.git.fabioaiuto83@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aldas Taraškevičius authored
Fix checkpatch warnings about having filenames in the files. Signed-off-by:
Aldas Taraškevičius <aldas60@gmail.com> Link: https://lore.kernel.org/r/20210828195324.68-1-aldas60@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Paulo Miguel Almeida authored
In the comments there where some grammar mistakes and references to struct names that have gotten renamed over time but not updated in the comments. Signed-off-by:
Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20210828105633.GA8421@localhost.localdomainSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_hal_c2h_handler function from hal/hal_intf.c, as well as its declaration in include/hal_intf.h, and remove its one remaining caller within core/rtw_cmd.c. This function was a wrapper function, then simplified to always return _FAIL. Since it has no further use, remove it, as part of ongoing efforts to simplify and remove the HAL layer of the driver. Acked-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210829234541.946-4-phil@philpotter.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Simplify c2h_evt_hdl function by removing majority of its code. The function always returned _FAIL anyway, due to the wrapper function it calls always returning _FAIL, and its one caller doesn't use the return value, so this function should just have a return type of void. Leave the call to c2h_evt_read in place, as without it, event handling semantics of the driver would be changed, despite nothing actually being done with the event. Acked-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210829234541.946-3-phil@philpotter.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove c2h_handler function pointer field from struct hal_ops in include/hal_intf.h, as it is never set in this driver, and remove the check for a non-NULL value in the rtw_hal_c2h_handler wrapper function in hal/hal_intf.c as well. As the function always returns _FAIL anyway, just modify it to do this unconditionally. The motivation for removing this field is that it is more code from the unwanted HAL layer that can be stripped out. Acked-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210829234541.946-2-phil@philpotter.co.ukSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-