summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
AgeCommit message (Collapse)Author
2021-08-01staging: rtl8188eu: remove rtl8188eu driver from staging dirPhillip Potter
This driver was deprecated with the introduction of the r8188eu driver, based upon Realtek sources that were modified for CFG80211 support and other fixes on GitHub by Larry Finger. As that driver is now progressing at pace, we should remove this one. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210731133809.196681-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-28staging: r8188eu: attach newly imported driver to build systemPhillip Potter
Modify Kconfig and Makefile to import new r8188eu driver into build system, and allow it to build alongside deprecated older driver, by tweaking build parameters and module name for the older driver at the same time. Suggested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210727232219.2948-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove unused IQKMatrixRegSetting arrayMartin Kaiser
The IQKMatrixRegSetting array in struct odm_rf_cal is initialised but never used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-18-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: simplify phy_lc_calibrateMartin Kaiser
phy_lc_calibrate's is2t parameter is always false. Remove some code that would be called only for is2t == true. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-17-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: simplify path_adda_onMartin Kaiser
path_adda_on's is2t parameter is always false. Remove some code that would be called only for is2t == true. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-16-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: simplify phy_iq_calibrateMartin Kaiser
phy_iq_calibrate's is2t parameter is always false. Remove some code that would be called only for is2t == true. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-15-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: simplify rtl88eu_phy_iq_calibrateMartin Kaiser
The boolean is2t variable in rtl88eu_phy_iq_calibrate is always false. Remove some code that's unused in this case. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210726195354.28548-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove write-only HwRxPageSizeMartin Kaiser
HwRxPageSize from struct hal_data_8188e is set but never read. Remove the component and the code to initialise it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove unused IntrMaskMartin Kaiser
The IntrMask array is set but never read. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove two write-only hal componentsMartin Kaiser
RegTxPause and RegBcnCtrlVal from struct hal_data_8188e are set but never read. Remove them. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove write-only power struct componentMartin Kaiser
pwrpriv->bFwCurrentInPSMode is initialized and updated but nobody reads its value. Remove this write-only component. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove unused _HAL_INTF_C_ defineMartin Kaiser
This define can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove yet another unused enumMartin Kaiser
The hardware_type enum is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove a bunch of unused definesMartin Kaiser
Only RF_CHANGE_BY_PS is used by this driver, the other RF_CHANGE_BY_... defines can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove another unused enumMartin Kaiser
The rt_eeprom_type enum is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove an unused enumMartin Kaiser
The hal_intf_ps_func enum is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: simplify Hal_EfuseParseMACAddr_8188EUMartin Kaiser
The hwinfo and AutoLoadFail parameters can be obtained from struct adapter, there's no need to pass them as separate function parameters. Use memcpy instead of bytewise copy if we have to fall back to the hard-coded mac address. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove HW_VAR_TXPAUSEMartin Kaiser
The "HAL layer variable" HW_VAR_TXPAUSE is not used in this driver. Remove its define and the code for setting and for reading a value. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove HW_VAR_MEDIA_STATUS1Martin Kaiser
The "HAL layer variable" HW_VAR_MEDIA_STATUS1 is not used in this driver. Remove its define and the code for setting a value. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove unused definesMartin Kaiser
Now that power cut mask is not used any more, we can also remove the defines for power cut masks. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove braces from single line if blocksMichael Straube
Remove braces from single line if blocks to clear checkpatch warnings. WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210726092129.30334-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove blank linesMichael Straube
Remove unnecessary blank lines reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210726091014.21405-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: Remove no more used functions and variablesFabio M. De Francesco
Remove the functions and variables from rtw_security.c that are no more necessary since the patch that replaces getcrc32() with crc32_le(). Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210723192620.10669-3-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: Replace a custom function with crc32_le()Fabio M. De Francesco
Use crc32_le() in place of the custom getcrc32(). Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210723192620.10669-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: Line over 100 charactersJignesh Patel
Break lines into multiple lines to respect 100 character width limit. Reported by checkpatch.pl Signed-off-by: Jignesh Patel <jigs0101@gmail.com> Link: https://lore.kernel.org/r/20210723094524.8811-1-jigs0101@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove unnecessary blank lines in core/rtw_ap.cBenjamin Philip
This commit fixes some checkpatch checks for blank lines before and after braces in drivers/staging/rtl8188eu/core/rtw_ap.c Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com> Link: https://lore.kernel.org/r/20210722064451.10331-1-benjamin.philip495@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: Remove unused iw_operation_mode[]Fabio M. De Francesco
Remove unused iw_operation_mode array. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210721112829.17317-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove unnecessary loggingJan Gruber
This commit fixes the following checkpatch.pl issues: + pr_debug("===> %s\n", __func__); WARNING: Unnecessary ftrace-like logging - prefer using ftrace 158: FILE: drivers/staging/rtl8188eu/os_dep/usb_intf.c:158: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 177: FILE: drivers/staging/rtl8188eu/os_dep/usb_intf.c:177: + pr_debug("<=== %s\n", __func__); and removes another line of unnecessary logging, which was not identified by checkpatch.pl in an automated manner. Signed-off-by: Jan Gruber <j4n6ru@gmail.com> Link: https://lore.kernel.org/r/20210705172101.239899-1-j4n6ru@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove cut_mask field from wl_pwr_cfgMartin Kaiser
We're no longer matching power transitions and commands against a power cut version mask. The cut_mask field from struct wl_pwr_cfg can be removed. It was set to PWR_CUT_ALL_MSK for all remaining commands. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove PWR_CMD_READMartin Kaiser
None of the power flows and transitions includes a read command. PWR_CMD_READ can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove constant function parameterMartin Kaiser
The rtl88eu_pwrseqcmdparsing function takes a parameter to restrict commands to certain power cut versions of the rtl8188eu chipset. This mechanism is not used, the callers always select all versions. Remove the power cut parameter. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove unused power flows and transitionsMartin Kaiser
The driver defines a couple of "flows" to move the chip into a certain power state. Each flow is a sequence of "transitions". This patch removes flows and transitions which are not used. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove efuse write supportMartin Kaiser
This driver does not need write access to the rtl1888eu chip's efuses. Remove the code to set the voltages for writing the efuses. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove struct eeprom_priv's EepromOrEfuseMartin Kaiser
This setting is used only in one place. There's no need to store it in a global struct. While at it, merge the two-line Hal_InitPGData88E function and its only caller. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove _CHIP_TYPE enumMartin Kaiser
This enum is not used and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove RTL871X_HCI_TYPE enumMartin Kaiser
This enum is not used and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove the "trigger gpio 0" hal variableMartin Kaiser
The hal variable to trigger gpio 0 seems to be a leftover from debugging code that was removed. An empty function is called when this variable is written to. Remove the empty function and the variable itself. It should be safe to remove an entry from the hw_variables enum as this enum is used only within the rtl8188eu driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: merge two functionsMartin Kaiser
All that rtw_hal_read_chip_info does is call _ReadPROMContent. Merge the two functions. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: move hal/mac_cfg.c and rename function and arrayPhillip Potter
Move source file hal/mac_cfg.c to the 'core' driver directory, and also rename its array from array_MAC_REG_8188E to array_MAC_REG, as well as renaming the function rtl88eu_phy_mac_config to phy_mac_config. Also modify single call-site for this function to reflect new name. This file contains no code which touches the adapter's HalData structure, and is a good candidate for therefore moving out of 'hal'. Also, no need for these signatures to include the model number as this driver only supports RTL8188eu. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210720225826.454516-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: r8188eu: Fix while-loop that iterates only onceColin Ian King
The while-loop only iterates once becase the post increment test of count being non-zero is false on the first iteration because count is zero. Fix this by using a for-loop instead. Static analysis found the issue on the count > POLLING_LLT_THRESHOLD check always being false since the loop currently just iterates once. Thanks to David Laight for suggesting using for-loop instead to improve the readability of the fix. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210630065647.5641-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove unnecessary bracesJan Gruber
This commit fixes the following checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Jan Gruber <j4n6ru@gmail.com> Link: https://lore.kernel.org/r/20210705072125.199810-1-j4n6ru@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove rtw_wx_set_rate handler functionPhillip Potter
Remove rtw_wx_set_rate handler function, which currently handles the SIOCSIWRATE wext ioctl. This function (although containing a lot of code) set nothing outside its own local variables, and did nothing other than call a now removed debugging statement repeatedly. Removing it and leaving its associated entry in rtw_handlers as NULL is therefore the better option. Removing this function also fixes a kernel test robot warning. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625191658.1299-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-21staging: rtl8188eu: remove set but unused variable from rtw_get_sec_iePhillip Potter
Remove set but unused variable 'sec_idx' from the rtw_get_sec_ie function inside core/rtw_ieee80211.c, to fix a kernel test robot warning introduced by recent removal of erroneous debug statements. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625183007.7065-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove include/rtw_debug.h headerPhillip Potter
Remove include/rtw_debug.h header file, as this isn't used and gets rid of the various other definitions we don't need. Also move the DRIVERVERSION constant value directly to os_dep/os_intfs.c as it is only used there anyway. This results in removal of more unnecessary code. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-24-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove GlobalDebugLevel variablePhillip Potter
Remove GlobalDebugLevel variable and all of its uses, as it is now no longer used anywhere in this driver. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-23-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove DRIVER_PREFIX preprocessor definitionPhillip Potter
Remove DRIVER_PREFIX preprocessor definition, as well as the short block of dumping code that uses it in core/rtw_recv.c - this code is unneeded, as normal debugging facilities can tell us what driver this is simply by pathname etc. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-22-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove RT_TRACE macroPhillip Potter
Remove RT_TRACE macro from include/rtw_debug.h, as it now has no callers, and does not follow best practices and kernel coding conventions. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-21-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove all RT_TRACE calls from hal/rtl8188eu_recv.cPhillip Potter
Remove all RT_TRACE calls from hal/rtl8188eu_recv.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-20-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove all RT_TRACE calls from hal/hal_intf.cPhillip Potter
Remove all RT_TRACE calls from hal/hal_intf.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-19-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove all RT_TRACE calls from hal/rtl8188eu_xmit.cPhillip Potter
Remove all RT_TRACE calls from hal/rtl8188eu_xmit.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-18-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>