Commit graph

1,154,327 commits

Author SHA1 Message Date
Philipp Hortmann
2636455b28 staging: rtl8192e: Remove unused variable DM_Type
DM_Type is initialized and then never evaluated. Remove resulting dead
code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/380fa2767d1f1cc32a5ad271057683d67ceb1b6f.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
a749318330 staging: rtl8192e: Remove unused variable RF_C_TxPwDiff
RF_C_TxPwDiff is set to a value and then never evaluated. Remove resulting
dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/bcace15cc05057ab310f807f27619ef6ff391d91.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
5190cd2a20 staging: rtl8192e: Remove unused variable H2CTxCmdSeq
H2CTxCmdSeq is never used. Remove resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3e6da78dff15cb5e5e26450d8e3f23e2e10ce61f.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
bc989fff45 staging: rtl8192e: Remove unused variable PwrDomainProtect
PwrDomainProtect is initialized and then never evaluated. Remove resulting
dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/769f4d3337872d29d8fc5e31613aac52b6bae95b.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
1032f497c5 staging: rtl8192e: Remove unused variable framesyncC34
framesyncC34 is written and then never evaluated. Remove resulting dead
code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e641717f1b89dd9bba99a0f14fc2c24996cb6bd7.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
f48cc55bf3 staging: rtl8192e: Remove unused variable SifsTime
SifsTime is written and then never evaluated. Remove resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/40234d0b1ab1eff23c71d96e8b0f1f0085e2bbac.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
779c9e938d staging: rtl8192e: Rename PHYRegDef, CurrentChannelBW and CustomerID
Rename variable PHYRegDef to phy_reg_def, CurrentChannelBW to
current_chnl_bw and CustomerID to customer_id to avoid CamelCase which is
not accepted by checkpatch.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d609d1edfaa500a9512c2e3c950efc2e2a266a70.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
0dd7c4d8c5 staging: rtl8192e: Rename LastRxDescTSF, LoopbackMode and pFirmware
Rename variable LastRxDescTSF to last_rx_desc_tsf, LoopbackMode to
loopback_mode and pFirmware to fw_info to avoid CamelCase which is not
accepted by checkpatch.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d6c77644d5602ad6e5b4889336a1a4700401321d.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Philipp Hortmann
448a586b71 staging: rtl8192e: Rename LongRetryL.., ShortRetryL.. and ReceiveConfig
Rename variable LongRetryLimit to long_retry_limit, ShortRetryLimit to
short_retry_limit and ReceiveConfig to receive_config to avoid CamelCase
which is not accepted by checkpatch.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6e3920f3353ebc6dd1d039f54688fa1966cc431b.1674071236.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:24:21 +01:00
Deepak R Varma
049e40ef20 staging: wlan-ng: Remove unused code
Following structs are defined but never used. Remove such dead code.
	hfa384x_pdr_pcb_partnum
	hfa384x_pdr_pcb_tracenum
	hfa384x_pdr_nic_serial
	hfa384x_pdr_mkk_measurements
	hfa384x_pdr_nic_ramsize
	hfa384x_pdr_refdac_measurements
	hfa384x_pdr_vgdac_measurements
	hfa384x_pdr_level_comp_measurements
	hfa384x_pdr_mac_address
	hfa384x_pdr_mkk_callname
	hfa384x_pdr_regdomain
	hfa384x_pdr_allowed_channel
	hfa384x_pdr_default_channel
	hfa384x_pdr_privacy_option
	hfa384x_pdr_temptype
	hfa384x_pdr_refdac_setup
	hfa384x_pdr_vgdac_setup
	hfa384x_pdr_level_comp_setup
	hfa384x_pdr_trimdac_setup
	hfa384x_pdr_ifr_setting
	hfa384x_pdr_rfr_setting
	hfa384x_pdr_hfa3861_baseline
	hfa384x_pdr_hfa3861_shadow
	hfa384x_pdr_hfa3861_ifrf
	hfa384x_pdr_hfa3861_chcalsp
	hfa384x_pdr_hfa3861_chcali
	hfa384x_pdr_hfa3861_nic_config
	hfa384x_pdr_hfo_delay
	hfa384x_pdr_hfa3861_manf_testsp
	hfa384x_pdr_hfa3861_manf_testi
	hfa384x_pdr_end_of_pda

Signed-off-by: Deepak R Varma <drv@mailo.com>
Link: https://lore.kernel.org/r/Y8d3IOQ8fry2xmz4@ubun2204.myguest.virtualbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:23:58 +01:00
Yuan Can
f6510a93cf staging: emxx_udc: Add checks for dma_alloc_coherent()
As the dma_alloc_coherent may return NULL, the return value needs to be
checked to avoid NULL poineter dereference.

Signed-off-by: Yuan Can <yuancan@huawei.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Link: https://lore.kernel.org/r/20230119083119.16956-1-yuancan@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 14:23:47 +01:00
Michael Straube
4193769b6d staging: r8188eu: convert PHY_BBConfig8188E() to common error logic
Convert the function PHY_BBConfig8188E() away from returning _FAIL or
_SUCCESS which uses inverted error logic. Use the common error logic
instead. Return 0 for success and negative values for failure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230115210734.18610-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:39:02 +01:00
Michael Straube
c58bc596a8 staging: r8188eu: convert phy_BB8188E_Config_ParaFile() to common error logic
Convert the fubction phy_BB8188E_Config_ParaFile() away from returning
_FAIL or _SUCCESS which uses inverted error logic. Use the common error
logic instead. Return 0 for success and negative values for failure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230115210734.18610-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:39:02 +01:00
Michael Straube
8ece288b16 staging: r8188eu: convert phy_RF6052_Config_ParaFile() to common error logic
Convert the function phy_RF6052_Config_ParaFile() away from returning
_FAIL or _SUCCESS which uses inverted error logic. Use the common error
logic instead. Return 0 for success and negative values for failure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230115210734.18610-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:39:02 +01:00
Michael Straube
6eacd2420a staging: r8188eu: convert PHY_MACConfig8188E() to common error logic
Convert the function PHY_MACConfig8188E() away from returning _FAIL or
_SUCCESS which uses inverted error logic. Use the common error logic
instead. Return 0 for success and negative values for failure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230115210734.18610-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:39:02 +01:00
Martin Kaiser
0d4560530d staging: r8188eu: pass struct adapter to usb_read
The usb_read function takes a struct intf_hdl only to extract the struct
adapter from it. We can pass struct adapter directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-18-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
3f7d87d4ec staging: r8188eu: remove usb buffer macros
Remove two unused macros that allocate and free usb buffers.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-17-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
944a7a7ab8 staging: r8188eu: remove struct io_req
struct io_req is not needed in the r8188eu driver. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-16-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
9196c6c186 staging: r8188eu: remove IO defines
Remove a couple of IO related defines which are not used in the r8188eu
driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
e9d28e5d3c staging: r8188eu: remove readmem and writemem prototypes
Remove the prototypes for the unused _rtw_read_mem and _rtw_write_mem
functions.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
b51ea46521 staging: r8188eu: remove interface handler prototypes
Remove prototypes for interface handler functions. They are not used by
the r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
144d2abcd1 staging: r8188eu: remove struct reg_protocol_wt
Remove struct reg_protocol_wt. It's not used in the r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
0fff48ebe3 staging: r8188eu: remove struct reg_protocol_rd
Remove struct reg_protocol_rd. It's not used in the r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:27 +01:00
Martin Kaiser
8023559769 staging: r8188eu: remove dev_power_down function prototype
The dev_power_down function is not present in the r8188eu driver. Remove
its prototype.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
7c1d57a4cb staging: r8188eu: remove rtw_write_scsi function prototype
The rtw_write_scsi function is not present in the r8188eu driver. Remove
its prototype.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
6a7c91d459 staging: r8188eu: remove attrib function prototypes
Remove the prototypes for attrib read and write functions which are not
present in the r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
e9d8bca4df staging: r8188eu: remove struct io_queue
struct io_queue is not used in the r8188eu driver. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
8009bbba02 staging: r8188eu: remove async write function prototypes
Remove some prototypes for async write functions which are not present in
the r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
caf94fd29f staging: r8188eu: remove async read function prototypes
Remove some prototypes for async read functions which are not present in
the r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
6d09e47364 staging: r8188eu: remove ioreq function prototypes
Remove some prototypes for ioreq functions which are not present in the
r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
b0f6b1142a staging: r8188eu: remove io function prototypes
Remove some prototypes for io functions which are not present in the
r8188eu driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
99438dab15 staging: r8188eu: remove struct io_priv
struct io_priv has only one member (and a pointer to the enclosing struct
adapter). We can remove struct io_priv and move its member directly into
struct adapter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111195640.306748-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:37:26 +01:00
Martin Kaiser
664f99fd54 staging: r8188eu: remove NULL check for usb_kill_urb
usb_kill_urb handles a NULL parameter. There's no need for NULL checks
before we call usb_kill_urb.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230111100201.251905-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:36:17 +01:00
Martin Kaiser
f4f52873a1 staging: r8188eu: always process urb status
Remove the if clause in usb_write_port_complete and process the urb
status regardless of bSurpriseRemoved, bDriverStopped and
bWritePortCancel.

The only possible results of urb status processing are updates to
bSurpriseRemoved and bDriverStopped. All of the three status variable are
set to true only if the whole USB processing has to be stopped (when the
driver is unloaded or when the system goes to sleep).

It's no problem if one of the "stop everything" variables is already set
and the urb status processing sets another one.

This patch removes the last goto in usb_write_port_complete. It's also
part of the ongoing effort to limit the use of the "stop everything"
variables.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230110205626.183516-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:36:14 +01:00
Martin Kaiser
8db002ed48 staging: r8188eu: remove unused function parameter
The regs parameter of the usb_write_port_complete function is not used. We
can remove it.

We can also remove the macro to hide the regs parameter when
usb_write_port_complete is used as callback function for an urb transfer.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230110205626.183516-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:36:14 +01:00
Martin Kaiser
7b42205e9d staging: r8188eu: reformat usb_write_port_complete
This trivial patch reformats the usb_write_port_complete function.
Hopefully, this makes the code a bit easier to read.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230110205626.183516-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:36:14 +01:00
Martin Kaiser
47bdd807ae staging: r8188eu: refactor status handling in usb_write_port_complete
Refactor the satus handling in usb_write_port_complete. Make it clearer
what happens for each status and avoid all the goto statements.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230110205626.183516-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:36:14 +01:00
Martin Kaiser
001c773caf staging: r8188eu: xmit_priv's vcs_setting is not used
vcs_setting in struct xmit_priv is not used any more. We can remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:25 +01:00
Martin Kaiser
eb67bf2651 staging: r8188eu: xmit_priv's vcs is not used
The vcs component in struct xmit_priv is set but not used. We can remove
vcs and the rtw_update_protection function, whose only job is to set vcs.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:25 +01:00
Martin Kaiser
393669c761 staging: r8188eu: xmit_priv's vcs_type is not used
The vcs_type component of struct xmit_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:25 +01:00
Martin Kaiser
851ae3c208 staging: r8188eu: remove unused QSLT defines
Remove unused defines for Queue Select Value in TxDesc.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:25 +01:00
Martin Kaiser
fe86c3a10c staging: r8188eu: txirp_cnt is write-only
txirp_cnt in struct xmit_priv is initialised but never read. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:25 +01:00
Martin Kaiser
069e3f9441 staging: r8188eu: remove unused hal_xmit_handler define
hal_xmit_handler is not used by the r8188eu driver. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:25 +01:00
Martin Kaiser
f2355ab565 staging: r8188eu: dir_dev is unused
dir_dev in struct adapter is not used by the r8188eu driver. It can be
removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:24 +01:00
Martin Kaiser
1511463d33 staging: r8188eu: replace switch with if
The switch statement in usb_write_port_complete has only one single case.
Replace it with an if statement.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:24 +01:00
Martin Kaiser
e7b970cc37 staging: r8188eu: voq_cnt is write-only
voq_cnt in struct xmit_priv is initialised, incremented and decremented
but never read. Remove voq_cnt and resulting dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:24 +01:00
Martin Kaiser
763f3eff5e staging: r8188eu: viq_cnt is write-only
viq_cnt in struct xmit_priv is initialised, incremented and decremented
but never read. Remove viq_cnt and resulting dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:24 +01:00
Martin Kaiser
b79601a0aa staging: r8188eu: bkq_cnt is write-only
bkq_cnt in struct xmit_priv is initialised, incremented and decremented
but never read. Remove bkq_cnt and resulting dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:24 +01:00
Martin Kaiser
2b9c7fbc1c staging: r8188eu: beq_cnt is write-only
beq_cnt in struct xmit_priv is initialised, incremented and decremented
but never read. Remove beq_cnt and resulting dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230109212852.75612-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:24 +01:00
Michael Straube
1d0d77f4ec staging: r8188eu: convert rtw_writeN() to common error logic
Convert the function rtw_writeN() away from returning _FAIL or
_SUCCESS which uses inverted error logic. Use the common error logic
instead. Return 0 for success and negative values for failure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230108123804.3754-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 19:35:22 +01:00