aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2022-01-25staging: r8188eu: fix phy_RF6052_Config_ParaFile error handlingMartin Kaiser1-6/+0
Fix the error handling in phy_RF6052_Config_ParaFile. We can simply return rtStatus. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220110124638.6909-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: we always enqueue in rtw_set_chplan_cmdMartin Kaiser3-19/+11
The only caller of rtw_set_chplan_cmd requests that the message be enqueued and not sent directly. Remove the enqueue parameter and the code for direct sending. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove HAL_*_ENABLE definesMartin Kaiser1-10/+0
HAL_(MAC|BB|RF)_ENABLE are always set. Remove the defines and the checks where they are used. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: HW_VAR_MEDIA_STATUS1 is never setMartin Kaiser2-10/+0
The HW_VAR_MEDIA_STATUS1 hal variable is never set. Remove its define and the code to set it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: CurrentCckTxPwrIdx is set but not usedMartin Kaiser2-13/+0
CurrentCckTxPwrIdx in struct hal_data_8188e is set but not used. It can be removed. The phy_PowerIndexCheck88E function is now empty. Remove it as well. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: CurrentOfdm24GTxPwrIdx is set but not usedMartin Kaiser2-2/+0
CurrentOfdm24GTxPwrIdx in struct hal_data_8188e is set but not used. It can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: CurrentBW2024GTxPwrIdx is set but not usedMartin Kaiser2-2/+0
CurrentBW2024GTxPwrIdx in struct hal_data_8188e is set but not used. It can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: CurrentBW4024GTxPwrIdx is set but not usedMartin Kaiser2-2/+0
CurrentBW4024GTxPwrIdx in struct hal_data_8188e is set but not used. It can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove obsolete defines and commentsMartin Kaiser1-19/+0
Remove some unused phycfg defines and obsolete comments. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove unused chip type settingsMartin Kaiser1-5/+0
Remove some unused defines and macros related to chip type. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: ODM_BB_CCK_PD is always setMartin Kaiser3-4/+0
The ODM_BB_CCK_PD flag is always set. Remove the flag and the check if ODM_BB_CCK_PD is not set. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: ODM_BB_FA_CNT is always setMartin Kaiser3-10/+2
The ODM_BB_FA_CNT flag is always set. Remove the flag and the code to check if ODM_BB_FA_CNT is not set. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: ODM_MAC_EDCA_TURBO is always setMartin Kaiser3-7/+0
The ODM_MAC_EDCA_TURBO flag is always set for chips that are supported by this driver. Remove the flag and the one place where it's checked. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220108124959.313215-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: rtl8723bs: remove redundant result variableMinghao Chi1-5/+1
Return value from ips_netdrv_open() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com> Link: https://lore.kernel.org/r/20220110013240.644190-1-chi.minghao@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove rtw_os_recv_resource_alloc()Michael Straube3-12/+2
Merge rtw_os_recv_resource_alloc() into _rtw_init_recv_priv() and remove rtw_os_recv_resource_alloc(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220108082736.16788-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rtw_os_recv_resource_init() does nothingMichael Straube3-10/+0
The function rtw_os_recv_resource_init() just returns _SUCCESS and the return value is not checked by the caller. Remove the function. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220108082736.16788-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rtw_os_recv_resource_free() is emptyMichael Straube3-8/+0
The function rtw_os_recv_resource_free() is empty. Remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220108082736.16788-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert switch to if statement in mgt_dispatcher()Michael Straube1-13/+2
The 'switch (GetFrameSubType(pframe))' in mgt_dispatcher() has only one case that does something different than the default case. Convert the switch to an if statement to improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220108082736.16788-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rtw_hostapd_mlme_rx() is emptyMichael Straube3-8/+0
The function rtw_hostapd_mlme_rx() is empty. Remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220108082736.16788-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert/remove DBG_88E calls in os_dep/usb_ops_linux.cPhillip Potter1-13/+11
Convert DBG_88E macro calls in os_dep/usb_ops_linux.c to use netdev_dbg when they may display useful information, and remove erroneous DBG_88E calls entirely. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220108005550.26264-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert DBG_88E call in core/rtw_cmd.cPhillip Potter1-1/+3
Convert the DBG_88E macro call in core/rtw_cmd.c to use netdev_dbg as its information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220108005550.26264-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove DBG_88E call from os_dep/osdep_service.cPhillip Potter1-2/+0
Remove the single DBG_88E macro call from os_dep/osdep_service.c, as it is unreachable anyway. This gets the driver closer to the eventual removal of DBG_88E itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220108005550.26264-4-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert DBG_88E calls in os_dep/xmit_linux.cPhillip Potter1-3/+3
Convert three DBG_88E macro calls in core/rtw_ap.c to use netdev_dbg as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220108005550.26264-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert/remove DBG_88E calls in core/rtw_ap.cPhillip Potter1-89/+56
Convert DBG_88E macro calls in core/rtw_ap.c to use netdev_dbg when they may display useful information, and remove erroneous DBG_88E calls entirely. This leaves six empty static functions which only had DBG_88E calls, so just remove them: update_bcn_fixed_ie update_bcn_htcap_ie update_bcn_htinfo_ie update_bcn_rsn_ie update_bcn_wpa_ie update_bcn_wmm_ie also modifying the if blocks/switch cases that invoke them to no longer do so. This goes further towards the goal of removing this non-standard debugging code. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220108005550.26264-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove HW_VAR_APFM_ON_MACMichael Straube2-9/+0
SetHwReg8188EU() and GetHwReg8188EU() are never called with HW_VAR_APFM_ON_MAC. Remove that case from both functions. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107215033.12257-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: EfuseUsedBytes is set but never usedMichael Straube4-9/+0
The field EfuseUsedBytes of struct hal_data_8188e is set but never used. Remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107215033.12257-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove HW_VAR_EFUSE_BYTES from GetHwReg8188EU()Michael Straube1-3/+0
GetHwReg8188EU() is never called with HW_VAR_EFUSE_BYTES. Remove that case from the function. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107215033.12257-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove HW_VAR_CURRENT_ANTENNA from GetHwReg8188EU()Michael Straube2-4/+0
GetHwReg8188EU() is never called with HW_VAR_CURRENT_ANTENNA. Remove that case from the function. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107215033.12257-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove HW_VAR_TXPAUSEMichael Straube2-7/+0
SetHwReg8188EU() and GetHwReg8188EU() are never called with HW_VAR_TXPAUSE. Remove that case from both functions. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107215033.12257-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove HW_VAR_BASIC_RATE from GetHwReg8188EU()Michael Straube1-3/+0
GetHwReg8188EU() is never called with HW_VAR_BASIC_RATE. Remove that case from the function. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107215033.12257-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: move firmware related macros to rtw_fw.hMichael Straube2-12/+9
Move firmware related macros from rtl8188e_hal.h to rtw_fw.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107143617.2214-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: add spaces around & operator in IS_FW_HEADER_EXISTMichael Straube1-4/+4
Add spaces around & operator in the macro IS_FW_HEADER_EXIST to improve readability and follow kernel coding style. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107143617.2214-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename _pFwHdr in IS_FW_HEADER_EXISTMichael Straube1-5/+5
Rename _pFwHdr in the macro IS_FW_HEADER_EXIST to avoid camel case. _pFwHdr -> _fwhdr Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107143617.2214-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: move firmware loading code out of the hal layerMichael Straube6-287/+301
Move the firmware loading functions from rtl8188e_hal_init.c into the new file core/rtw_fw.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-20-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename pFirmwareBuf and FirmwareLenMichael Straube1-7/+7
Rename the variables pFirmwareBuf and FirmwareLen in rtl8188e_firmware_download() to avoid camel case. pFirmwareBuf -> fw_data FirmwareLen -> fw_size Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-19-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename pFwHdr in rtl8188e_firmware_download()Michael Straube1-6/+6
Rename the variable pFwHdr in rtl8188e_firmware_download() to avoid camel case. pFwHdr -> fwhdr Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-18-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename writeFW_retryMichael Straube1-4/+4
Rename the variable writeFW_retry in rtl8188e_firmware_download() to avoid camel case. writeFW_retry -> write_fw_retry Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-17-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename FWDL_ChkSum_rptMichael Straube2-3/+3
Rename FWDL_ChkSum_rpt to avoid camel case. FWDL_ChkSum_rpt -> FWDL_CHKSUM_RPT Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-16-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename rtSatus in rtl8188e_firmware_download()Michael Straube1-9/+9
Rename the variable rtStatus in rtl8188e_firmware_download() to avoid camel case. rtStatus -> ret Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-15-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename Exit label in rtl8188e_firmware_download()Michael Straube1-4/+4
Rename the Exit label in rtl8188e_firmware_download() to avoid camel case. Exit -> exit Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-14-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert two functions from s32 to intMichael Straube2-4/+4
Convert the return type of fw_free_to_go() and rtl8188e_firmware_download() from s32 to the more common int. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-13-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: clean up rtw_reset_8051()Michael Straube1-5/+4
Rename the local variable u1bTmp in rtw_reset_8051() to avoid camel case and remove a call to DBG_88E that contains no important information. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-12-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename fw related functions to avoid camel caseMichael Straube3-20/+20
Rename firmware related functions to avoid camel case. rtl8188e_FirmwareDownload -> rtl8188e_firmware_download _FWDownloadEnable -> fw_download_enable _8051Reset88E -> rtw_reset_8051 _FWFreeToGo -> fw_free_to_go _BlockWrite -> block_write _PageWrite -> page_write _WriteFW -> write_fw Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-11-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: use kmemdup instead of kzalloc and memcpyMichael Straube2-7/+1
Use kmemdup instead of kzalloc and memcpy in load_firmware(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-10-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename fields of struct rt_firmwareMichael Straube3-15/+15
Rename fields of struct rt_firmware to avoid camel case. szFwBuffer -> data ulFwLength -> size Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename parameter pFirmware of load_firmware()Michael Straube1-7/+7
Rename the parameter pFirmware of load_firmware() to avoid camel case. pFirmware -> rtfw Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert type of return variable in load_firmware()Michael Straube1-1/+1
The return type of load_firmware() is int. Change the type of the return variable from s32 to int to match the function return type. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename rtStatus in load_firmware()Michael Straube1-6/+6
Rename the local variable rtStatus in load_firmware() to avoid camel case. rtStatus -> ret Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: rename Exit label in load_firmware()Michael Straube1-5/+5
Rename Exit label in load_firmware() to avoid camel case. Exit -> exit Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: release_firmware is not called if allocation failsMichael Straube1-1/+1
In function load_firmware() release_firmware() is not called if the allocation of pFirmware->szFwBuffer fails or if fw->size is greater than FW_8188E_SIZE. Move the call to release_firmware() to the exit label at the end of the function to fix this. Fixes: 8cd574e6af54 ("staging: r8188eu: introduce new hal dir for RTL8188eu driver") Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220107103620.15648-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>