Age | Commit message (Collapse) | Author | Files | Lines |
|
Function rtl8188e_SetHalODMVar is always called with HAL_ODM_STA_INFO.
Remove the unneeded parameter eVariable from the function.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220104090732.13994-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
cmd_issued_cnt in struct cmd_priv is set but not used. It can
be removed.
Acked-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220102175932.89127-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
bInternalAutoSuspend is always false. Remove the variable and related
checks.
Acked-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220102175932.89127-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The structures rt_channel_plan and rt_channel_plan_2g are identical.
Keep rt_channel_plan and remove rt_channel_plan_2g.
Acked-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220102131141.12310-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
rfoff_reason in struct pwrctrl_priv is never set, its value remains 0.
Remove rfoff_reason, related defines and a check in rtw_led_control
that is always false.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-22-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
rtw_led_control is the only caller of SwLedControlMode1.
Pull SwLedControlMode1 into rtw_led_control.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-21-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
blink_work is the only caller of SwLedBlink1. Merge the two functions.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-20-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Move BlinkingLedState updates out of if clauses where the same update
is done for all possible paths.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-19-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove the temporary variable bStopBlinking and check the conditions
directly in the if clauses. There's no need to save the result of
these checks.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-18-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
None of the callers sets LED_CTL_START_WPS_BOTTON. Remove the define
and related dead code.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-17-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The LED_CTL_POWER_ON mode is not used by this driver.
Remove the define and related dead code.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-16-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Export the function that other layers use for setting the led.
Remove the function pointer and the macro to make the led control function
configurable. This driver supports only a single configuration.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The defines for led blink intervals are used only by the led layer.
Move them into rtw_led.c.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove bLedStartToLinkBlinkInProgress from struct LED_871x.
It's set but not used.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Clean up the macros that check the blinking mode of a LED.
The macro IS_LED_BLINKING is not used and can be removed.
The IS_LED_WPS_BLINKING macro is used only by rtw_led.c. Move the macro
into this file. The macro parameter is always a struct LED_871x *,
there's no need for a cast. Rename the parameter to l and put it in
parentheses, which is good practice for macro parameters.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Merge the BlinkWorkItemCallback and BlinkHandler functions.
Rename the resulting function to blink_work and make it
internal to the led layer.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The ResetLedStatus function is used only by the led layer.
Make it static.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Merge DeInitLed871x and rtl8188eu_DeInitSwLeds, both of which are
small and simple.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Copy InitLed871x into rtl8188eu_InitSwLeds. There's no need for two
separate functions.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Move the led init and deinit functions from the hal layer to rtw_led.c.
rtl8188eu_led.c and rtl8188e_led.h can now be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Move the low-level functions SwLedOn and SwLedOff from the hal layer
into rtw_led.c. This is the only place where they're used.
There's no need to go through the hal layer for a simple register access
if the driver supports only a single chipset.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
When the driver is unloaded or when the system goes into standby mode,
DeInitLed871x is called to stop the led layer. In this case, we stop
the blinking worker but we do not switch the led off explicitly. On my
system, I can go into standby mode with the LED enabled.
Add a call to SwLedOff to fix this.
Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Cc: stable@vger.kernel.org
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The _linked_rx_signal_strength_display function is used only in
rtw_mlme_ext.c. Make the function static and remove the prototype.
While at it, fix a typo in the function name.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211218120423.29906-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Clean up the rtl8188e_sreset_linked_status_check, which has just
been moved to rtw_mlme_ext.
Don't initialise variables to 0 if the first access sets a new value.
Check the value of fw_status only once.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211212185833.22000-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Move rtl8188e_sreset_linked_status_check from the hal layer into
rtw_mlme_ext.c.
Like the xmit status check, this is a simple function that's only
called from one place.
With this function gone, hal/rtl8188e_sreset.c and
include/rtl8188e_sreset.h are now empty and can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211212185833.22000-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Move rtl8188e_sreset_xmit_status_check from the hal layer into
rtw_cmd.c.
As this driver supports only the 8188 chipset, there's no need
to go through the hal layer for simple operations that have only
one caller.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211212185833.22000-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
We only support a single LED. LedPin in struct struct LED_871x is
always LED_PIN_LED0. There's no need to store this info or to pass it
to functions as a parameter.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211207210537.23382-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Convert two DBG_88E calls within core/rtw_cmd.c to netdev_dbg calls, and
remove three commented DBG_88E calls. Considering the original driver
author commented them, it seems better to delete these three than
convert.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211206234952.1238-3-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Convert all DBG_88E calls in core/rtw_security.c to netdev_dbg calls.
These calls seem to contain useful information/assertions and so are
probably worth keeping. In doing this conversion, also convert
static aes_decipher to take a struct adapter * parameter, as per the
convention elsewhere in the driver currently. This allows us to pass
this through and access its pnetdev member for the netdev_dbg call in
the function.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211206234952.1238-2-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
bWIFI_Direct in odm_dm_struct is set but never used. Remove it.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211205171342.20551-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove two variables related to wifidirect which are set but not used.
Acked-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211205151251.6861-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Move opening brace to next line to conform to kernel coding style.
Fixes the following checkpatch error:
ERROR: open brace '{' following function definitions go on the next line
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/20211201153039.305245-1-abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The led layer uses a combination of timer and worker for periodic led
updates, e.g. for blinking. The reason seems to be that blocking
operations like a usb read are not allowed in a timer handler.
Replace the combination of timer and worker with a delayed worker.
Convert the timeout defines from milliseconds to jiffies to make them
usable as delays for the delayed worker. Shorten the names of the defines
and rename the work item to make checkpatch happy.
Other layers may call SwLedControlMode1 to update the led state. Such
an update may result in cancelling the delayed worker. SwLedControlMode1
might be called in interrupt context, we must use cancel_delayed_work to
cancel the worker. cancel_delayed_work_sync waits until the worker is
finished, this is not allowed in interrupt context.
DeInitLed871x is called when the driver is removed or when the system
goes into standby. We may use cancel_delayed_work_sync here to cancel
the delayed worker.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211126114135.18228-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Convert all DBG_88E_LEVEL macro calls in core/rtw_ioctl_set.c to plain
netdev_dbg calls, as although the information is potentially useful,
we should be exposing it using standard kernel debugging functionality.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211129002041.865-5-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Convert single DBG_88E_LEVEL macro call in core/rtw_xmit.c to plain
netdev_dbg call, as although the information is potentially useful,
we should be exposing it using standard kernel debugging functionality.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211129002041.865-4-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Convert all DBG_88E_LEVEL macro calls in core/rtw_pwrctrl.c to plain
netdev_dbg calls, as although the information is potentially useful,
we should be exposing it using standard kernel debugging functionality.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211129002041.865-3-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Convert all DBG_88E_LEVEL macro calls in core/rtw_mlme_ext.c to plain
netdev_dbg calls, as although the information is potentially useful, we
should be exposing it using standard kernel debugging functionality.
Also fix some indentation issues in the block of one such call, and
remove usage of FUNC_ADPT_FMT/FUNC_ADPT_ARG macros in another, as
netdev_dbg provides equivalent functionality.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211129002041.865-2-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
rf_type is always RF_1T1R. Remove it from issue_assocreq() and remove
related dead code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211128170924.5874-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
rf_type is always RF_1T1R. Remove it from rtw_update_ht_cap() and
remove related dead code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211128170924.5874-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
We need the staging driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove the _cancel_workitem_sync wrapper and call
cancel_work_sync directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125162513.25039-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove the _init_workitem wrapper and call INIT_WORK directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125162513.25039-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove the _set_workitem wrapper and call schedule_work directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125162513.25039-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch removes some unused defines, macros and include statements
related to efuses.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The efuse_WordEnableDataRead function is not used and can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove the Efuse_CalculateWordCnts function, which is not used.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
use max() and min() macros to fix following cocci warnings:
drivers/staging/r8188eu/core/rtw_wlan_util.c:719: WARNING opportunity for min()
drivers/staging/r8188eu/core/rtw_wlan_util.c:724: WARNING opportunity for max()
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Mak <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20211124190436.251312-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
rf_type is always RF_1T1R. Remove it from HT_caps_handler() and
remove related dead code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211119122635.28435-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
rf_type is always RF_1T1R. Remove it from add_RATid() and remove
related dead code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211119122635.28435-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
rf_type is always RF_1T1R. Remove it from rtw_mcs_rate() and remove
related dead code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211118215052.5215-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|