Commit Graph

1042892 Commits

Author SHA1 Message Date
Jérôme Pouiller 9885474d45 staging: wfx: reformat comment
The new comment takes only one line instead of three.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-27-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller 31f8da6331 staging: wfx: update files descriptions
Each file of the driver contains a short description of its purpose.
These description were a bit outdated.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-26-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller a99f20b667 staging: wfx: remove references to WFxxx in comments
The WF200 is the only representative of the WFxxx series and the
development of any successor is not expected. So, for clarity, replace
occurrences of "WFxxx" with "WF200".

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-25-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller 34ac73a400 staging: wfx: fix space after cast operator
checkpatch.pl reports that cast operators should not been followed by a
space.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-24-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller ade1d528bc staging: wfx: remove useless debug statement
In the early age, it was unexpected to access a VIF that did not exist.
With current code, this happens frequently. Having a trace associated on
this event brings absolutely no informations.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-23-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller 6742a9685c staging: wfx: remove unused definition
The enum hif_fw_type is never used in the driver. Drop it.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-22-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller 46d7eb5eda staging: wfx: apply naming rules in hif_tx_mib.c
All the functions of hif_tx_mib.c format data to be sent to the
hardware. In this file, the struct to be sent is always named 'arg'.

Also applies this rule to hif_set_macaddr().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-21-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller cbba71c22c staging: wfx: fix error names
ENOTSUP is an alias of EOPNOTSUPP. However, EOPNOTSUPP is preferred.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-20-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller f22f9fdfd5 staging: wfx: reorder function for slightly better eye candy
For a code more eye candy, group all the unconditional assignments
together.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-19-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:33 +02:00
Jérôme Pouiller 2af2790cb2 staging: wfx: simplify hif_join()
The new code is smaller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-18-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 07509c2a25 staging: wfx: declare variables at beginning of functions
For better code, we prefer to declare all the local variables at
beginning of the functions.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-17-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller ec61163806 staging: wfx: fix misleading 'rate_id' usage
The driver sometime use the term 'rate_id' to identify a retry policy
(which is in fact a series of rate IDs). This is misleading.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-16-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller e95c7ae9e3 staging: wfx: uniformize counter names
The device provide some internal statistic counters. However, the names
of counter were not very meaningful.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-15-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 46c5ab7c7c staging: wfx: update with the firmware API 3.8
The firmware API 3.8 introduces new statistic counters. These changes
are backward compatible.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-14-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 2ac7521bf9 staging: wfx: simplify API coherency check
The 'channel' argument of hif_join() should never be NULL. hif_join()
does not have the responsibility to recover bug of caller.

In current code, if the argument channel is NULL, memory leaks. The new
code just emit a warning and does not give the illusion that it is
supported (and indeed a Oops will probably raise a few lines below).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-13-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 08127ad2a7 staging: wfx: relax the PDS existence constraint
The PDS file contains antenna parameters. The file is specific to each
hardware design. Normally, the board designer should add a line in the
of_device_id table with his own antenna parameters.

Until, now the absence of PDS file is a hard fatal error. However,
during the development, in most of the cases, an empty PDS file is
sufficient to start WiFi communication.

This patch keep an error, but allow the user to play with the device.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-12-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 583f188e0c staging: wfx: fix support for CSA
The WF200 is able to filter beacons. However, it uses a positive filter:
any change to an IE not listed won't be reported.

In current code, the changes in Channel Switch Announcement (CSA) are
not reported to the host. Thus, it fixes the support for CSA in station
mode.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-11-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 07903f0147 staging: wfx: declare support for TDLS
Since the firmware API 3.8, the device is able to support TDLS.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-10-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller d417232352 staging: wfx: take advantage of wfx_tx_queue_empty()
wfx_tx_queues_check_empty() can be slightly simplified by calling
wfx_tx_queue_empty().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-9-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 14a26aa497 staging: wfx: fix atomic accesses in wfx_tx_queue_empty()
Checking if a skb_queue is empty is not an atomic operation. We should
take some precautions to do it.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-8-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 9f91e736c1 staging: wfx: drop unused argument from hif_scan()
It is no more necessary to compute the expected duration of the scan
request.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-7-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:32 +02:00
Jérôme Pouiller 8bce06b06b staging: wfx: avoid possible lock-up during scan
If the environment is noisy, the device may take time to send scan
requests. Thus, scan requests durations > 5s have already been observed.
During the scan, traffic is neither received, neither sent. From the
user point-of-view, the traffic is frozen for a long time.

This patch reworks the scan processing. It gives to the device a smaller
time budget than previously. However, it does not expect the scan to be
complete and it is able to send another scan request to finish the work.

A big part of the patch aims to avoid an infinite loop if the device
goes crazy.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-6-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:31 +02:00
Jérôme Pouiller 10b72a7c59 staging: wfx: wait for SCAN_CMPL after a SCAN_STOP
When the device has finished a scan request, it send a scan complete
("SCAN_COMPL") indication. It is also possible to abort a scan request
with a "SCAN_STOP" message. A SCAN_COMPL is also send in this case.

The driver limits the delay to make a scan request. A timeout happens
almost never but is theoretically possible. Currently, if it happens
the driver does not wait for the SCAN_COMPL. Then, when the driver
starts the next scan request, the device may return -EBUSY (scan
requests often occur back-to-back).

This patch give a chance to the device to send a SCAN_COMPL after a scan
timeout.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-5-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:31 +02:00
Jérôme Pouiller a5a8eb1fe7 staging: wfx: ignore PS when STA/AP share same channel
When multiple interface are in use. One is always AP while the other is
always station. When the two interface use the same channel, it makes no
sense to enabled Power Saving (PS) on the station. Indeed, because of
the AP, the device will be kept awake on this channel anyway.

In add, when multiple interface are in use, mac80211 does not update the
PS information and delegate to the driver responsibility to do the
right thing.

Thus, in the current code, when the user enable PS in this
configuration, the driver finally enable PS-Poll which is probably not
what the user expected.

This patch detect this case and applies a sane configuration in all
cases.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-4-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:31 +02:00
Jérôme Pouiller 0ccb2c9d05 staging: wfx: do not send CAB while scanning
During the scan requests, the Tx traffic is suspended. This lock is
shared by all the network interfaces. So, a scan request on one
interface will block the traffic on a second interface. This causes
trouble when the queued traffic contains CAB (Content After DTIM Beacon)
since this traffic cannot be delayed.

It could be possible to make the lock local to each interface. But It
would only push the problem further. The device won't be able to send
the CAB before the end of the scan.

So, this patch just ignore the DTIM indication when a scan is in
progress. The firmware will send another indication on the next DTIM and
this time the system will be able to send the traffic just behind the
beacon.

The only drawback of this solution is that the stations connected to
the AP will wait for traffic after the DTIM for nothing. But since the
case is really rare it is not a big deal.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-3-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:31 +02:00
Jérôme Pouiller 22af4990ff staging: wfx: use abbreviated message for "incorrect sequence"
The wfx driver checks carefully the coherency of of the DTIM
notifications. We have noticed several times some small inconsistencies
from the firmware on these notification. They have never been critical.

However on the driver side they lead to big fat warnings. Worse, if
these warning are displayed on UART console, they can be long to display
(several hundreds of millisecs). Since, this warning is generated from a
work queue, it can delay all the workqueue users. Especially, it can
drastically slow down the frame management of the driver and then
generate errors that are serious this time (eg. an overflow of the
indication queue of the device).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:16:31 +02:00
Michael Straube e5a922a64b staging: r8188eu: remove unnecessary include from odm_types.h
Including basic_types.h is not needed in odm_types.h.
Remove the include.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210913192043.26527-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:42 +02:00
Michael Straube d039379b8e staging: r8188eu: remove unused defines from odm_types.h
Remove unused defines from odm_types.h. This compiles without
introducing any new warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210913192043.26527-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:42 +02:00
Michael Straube eccc581432 staging: r8188eu: remove unused enum RT_SPINLOCK_TYPE
The enum RT_SPINLOCK_TYPE is not used in the driver, remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210913192043.26527-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:42 +02:00
Martin Kaiser a2bd64135b staging: r8188eu: remove unused variable b_hw_radio_off
b_hw_radio_off in struct pwrctrl_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:14 +02:00
Martin Kaiser 1bc4e56bed staging: r8188eu: remove unused variable cpwm_tog
cpwm_tog in struct pwrctrl_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:13 +02:00
Martin Kaiser 128aeafb14 staging: r8188eu: rtw_set_ips_deny is not used
Remove the rtw_set_ips_deny function since it's not used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:13 +02:00
Martin Kaiser 1738994c22 staging: r8188eu: remove unused enum and array
PS_BBRegBackup in struct pwrctrl_priv is not used. Remove this component
and the related enum _PS_BBRegBackup_.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:13 +02:00
Martin Kaiser a077ab1936 staging: r8188eu: remove unused pwrctrl definitions
Remove a bunch of unused defines and macros and an unused struct
from rtw_pwrctrl.h.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:13 +02:00
Martin Kaiser 6729e75419 staging: r8188eu: _free_pwrlock is empty
Remove the empty _free_pwrlock function and rtw_free_pwrctrl_priv,
which is just a wrapper around _free_pwrlock.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:13 +02:00
Martin Kaiser a399a88206 staging: r8188eu: remove unused power state defines
Remove some unused defines and macros related to power states.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:13 +02:00
Martin Kaiser 0f982e7e12 staging: r8188eu: remove rtw_set_rpwm
After we dropped the call to set HW_VAR_SET_RPWM, the rtw_set_rpwm
function doesn't do anything useful.

Remove the function and the rpwm component of struct pwrctrl_priv,
which is not used outside of rtw_set_rpwm.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210913185110.3065-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14 09:15:13 +02:00
Gaston Gonzalez 8757f705d9 staging: vchiq_dev: cleanup code alignment issues
Fix code alignment issues.

Reported by checkpatch.pl

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/20210912133751.269885-2-gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:26:34 +02:00
Gaston Gonzalez cfb24b67bf staging: vchiq_dev: remove braces from if block
Remove unnecessary braces from if block.

Reported by checkpatch.pl

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/20210912133751.269885-1-gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:26:34 +02:00
Michael Straube d4466db8ab staging: r8188eu: remove header file odm_reg.h
After removing unused register definitions from odm_reg.h there are
only two definitions left. Move them into odm.h and remove odm_reg.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210913090831.13803-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:24:23 +02:00
Michael Straube 73374fe162 staging: r8188eu: remove unused register definitions from odm_reg.h
Remove unused register definitions from odm_reg.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210913090831.13803-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:24:22 +02:00
Saurav Girepunje b6f16ee1d7 staging: r8188eu: core: remove unused function rtw_set_tx_chksum_offload
Remove unused function rtw_set_tx_chksum_offload.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YT4xcJvvlPSIS+T6@user
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:23:52 +02:00
Michael Straube 2f4b652d74 staging: r8188eu: remove macro GET_EEPROM_EFUSE_PRIV
Replace and remove the macro GET_EEPROM_EFUSE_PRIV to get one step
closer to remove hal_intf.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210912100836.4655-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:22:42 +02:00
Michael Straube 03c3c89700 staging: r8188eu: remove header file HalHWImg8188E_FW.h
The header file HalHWImg8188E_FW.h is not used in the driver.
Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210911231844.16268-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:22:28 +02:00
Martin Kaiser 064ff00085 staging: r8188eu: remove rtw_hw_suspend
The bHWPwrPindetect cleanup removed the only call to rtw_hw_suspend.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210911161019.26881-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:21:46 +02:00
Martin Kaiser c0a099b734 staging: r8188eu: bHWPwrPindetect is always false
The bHWPwrPindetect component of struct pwrctrl_priv is never initialised
explicitly, it remains at its default value 0.

Remove bHWPwrPindetect itself and code that depends on
bHWPwrPindetect != 0.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210911161019.26881-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:21:40 +02:00
Martin Kaiser a8ccb41374 staging: r8188eu: remove write-only variable tog
tog in struct pwrctrl_priv is never read. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210911141521.24901-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:19:12 +02:00
Martin Kaiser 1d10e90a04 staging: r8188eu: remove write-only variable cpwm
cpwm in struct pwrctrl_priv is never read. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210911141521.24901-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:19:12 +02:00
Martin Kaiser db57ee8f1f staging: r8188eu: setting HW_VAR_SET_RPWM does nothing
Setting the HW_VAR_SET_RPWM "hardware variable" is an empty operation.

Remove the call to set HW_VAR_SET_RPWM, the calculation of the value to be
set and the definition of HW_VAR_SET_RPWM itself.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210911141521.24901-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:19:12 +02:00
Martin Kaiser 9a1d3a510a staging: r8188eu: btcoex_rfon is always false
btcoex_rfon is always false in this driver. Remove the variable and code
that will never be executed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210911141521.24901-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13 18:19:12 +02:00