63935 Commits

Author SHA1 Message Date
Martin Kaiser
6a936ea652 staging: r8188eu: remove an obsolete comment
Remove an obsolete comment in rtw_dequeue_xframe. There is no break
statement any more.

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/20230123205342.229589-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 10:10:36 +01:00
Martin Kaiser
ce2e8fa206 staging: r8188eu: simplify the code to initialise inx
Simplify the code to initialise the inx array in function
rtw_dequeue_xframe and make the code a tiny bit smaller.

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/20230123205342.229589-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 10:10:35 +01:00
Martin Kaiser
36b7dd48b3 staging: r8188eu: simplify the sta loop in rtw_dequeue_xframe
Use list_for_each_entry_safe to iterate over the station entries in
function rtw_dequeue_xframe instead of coding the loop manually.

We have to use the safe version, the loop body may remove a station from
the list over which we iterate.

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/20230123205342.229589-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 10:10:35 +01:00
Martin Kaiser
6feaef197f staging: r8188eu: remove struct intf_priv
struct intf_priv is not used in the r8188eu driver. It can be removed.

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/20230123205342.229589-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 10:10:35 +01:00
Martin Kaiser
f9e39a96f1 staging: r8188eu: remove struct intf_hdl
There are no more users of struct intf_hdl in the r8188eu driver. We can
now remove this struct.

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/20230123205342.229589-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 10:10:35 +01:00
Martin Kaiser
efa1c4e56c staging: r8188eu: pass struct adapter to usb_write
The usb_write 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/20230123205342.229589-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 10:10:35 +01:00
Martin Kaiser
11617b77ad staging: r8188eu: we use a constant number of hw_xmit entries
struct xmit_priv contains a pointer to an array of struct hw_xmit entries.
xmit_priv's (ill-named) hwxmit_entry component stores the size of this
array, i.e. the number of hw_xmit entries that are used.

The array size is constant, it's initialised to HWXMIT_ENTRY and never
updated. Simplify the code accordingly. Remove hwxmit_entry, do not pass
the array size as a function parameter and use HWXMIT_ENTRY in the code
that handles the array.

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/20230123205342.229589-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-27 10:10:35 +01:00
Umang Jain
2529ca2114 staging: vc04_services: interface: Drop include Makefile directive
Drop the include directive. They can break the build, when one only
wants to build a subdirectory. Replace with "../" for the includes,
in the interface/ files instead.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230120201104.606876-6-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:05:42 +01:00
Umang Jain
74d5eb7de9 staging: vc04_services: vchiq-mmal: Drop include Makefile directive
Drop the include directive. They can break the build, when one only
wants to build a subdirectory. Replace with "../" for the includes,
in the mmal-vchiq.c instead.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230120201104.606876-5-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:05:39 +01:00
Umang Jain
5395fb3b39 staging: vc04_services: bcm2835-camera: Drop include Makefile directive
Drop the include directive. They can break the build, when one only
wants to build a subdirectory. Replace with "../" for the includes,
in the bcm2835-camera files instead.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20230120201104.606876-4-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:05:36 +01:00
Umang Jain
29d49a76c5 staging: vc04_services: bcm2835-audio: Drop include Makefile directive
Drop the include directive. They can break the build, when one only
wants to build a subdirectory. Replace with "../" for the includes,
in the bcm2835.h instead.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230120201104.606876-3-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:05:33 +01:00
Umang Jain
2beeddb320 staging: vc04_services: Drop __VCCOREVER__ remnants
Commit 8ba5f91bab63 ("staging: vc04_services: remove __VCCOREVER__")
was meant to remove all of __VCCOREVER__ definitions but missed to
remove a few. Hence, drop them now.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20230120201104.606876-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:57 +01:00
Philipp Hortmann
3f954e227f staging: rtl8192e: Rename btxpower_trackin.., Slide_Beaco.. and Slide_B..
Rename variable btxpower_trackingInit to tx_pwr_tracking_init,
Slide_Beacon_pwdb to slide_beacon_pwdb and Slide_Beacon_Total to
slide_beacon_total 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/b722cd913d04d07ac1952da2add2a16cfeb2dc8c.1674336211.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:49 +01:00
Philipp Hortmann
b441257594 staging: rtl8192e: Rename eeprom_CustomerID, SwChnlStage and SwChnlStep
Rename variable eeprom_CustomerID to eeprom_customer_id, SwChnlStage to
sw_chnl_stage and SwChnlStep to sw_chnl_step 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/0d2e7bbd3a2f80d4652d4131c82294e172a2de30.1674336211.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:49 +01:00
Philipp Hortmann
5440dade68 staging: rtl8192e: Remove unused variable bfirst_init
bfirst_init is six times set but never evaluated. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d4f4552e5dbaa036a762590bf47bd5faff15b598.1674336211.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:49 +01:00
Philipp Hortmann
0d9943b8b2 staging: rtl8192e: Remove repeated set to zero of powerlevel and friend
Variables powerlevel and powerlevelOFDM24G are initialized to zero and
unchanged. No reason to set them to zero again. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/50f28816aa006821d3e3a8346e39ae68c4d53963.1674244819.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:38 +01:00
Philipp Hortmann
9fb469870f staging: rtl8192e: Remove u4RegValue which is always zero
As the array antenna_tx_pwr_diff is always zero, u4RegValue is always set
to zero. Replace u4RegValue 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/2aa104c0f7a5cede7eea289fe92390295592b0e9.1674244819.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:38 +01:00
Philipp Hortmann
44eac9d81f staging: rtl8192e: Remove ant_pwr_diff which is always zero
ant_pwr_diff is set to zero and then masked which will always result in
zero. Remove ant_pwr_diff and use zero direct as it is just useless
code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a550004dcdeb9e0b716f69033a541457c1f12c86.1674244819.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:38 +01:00
Philipp Hortmann
39902d6a7d staging: rtl8192e: Remove zeroed arrays tx_pwr_level_cck_a and friends
The arrays tx_pwr_level_cck_a, tx_pwr_level_ofdm_24g_a,
tx_pwr_level_cck_c and tx_pwr_level_ofdm_24g_c are initialized to zero
and never changed. Delete the upper named arrays and set the variables
directly to zero to avoid useless code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b88e6bdd5569ac651692074060fba6f79c68c687.1674244819.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:38 +01:00
Philipp Hortmann
e198f3a6d7 staging: rtl8192e: Init tx_pwr_level_cck_a and friends directly
The arrays EEPROMRfACCKChnl1TxPwLevel, EEPROMRfAOfdmChnlTxPwLevel,
EEPROMRfCCCKChnl1TxPwLevel, EEPROMRfCOfdmChnlTxPwLevel are initialized to
zero and never changed. Delete the arrays and set the variables directly
to zero 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/9874e99fb9a803be2a89e81e2ecd01ba80398ea1.1674244819.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:38 +01:00
Philipp Hortmann
4f79170fe0 staging: rtl8192e: Combine three loops to one to init tx_pwr_level_...
The arrays EEPROMRfACCKChnl1TxPwLevel, EEPROMRfAOfdmChnlTxPwLevel,
EEPROMRfCCCKChnl1TxPwLevel, EEPROMRfCOfdmChnlTxPwLevel are initialized to
zero and never changed. The three loops contain the same code. Only the
index of the upper named arrays go from 0 to 2. Therefore the three loops
can be combined to one loop from 0 to 13 which removes useless code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/c268ccf158997c65756b7b092ae79cc2b69bd47f.1674244819.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:04:38 +01:00
Larry Finger
f63f856086 staging: r8188eu: Fix some endian problems
Sparse lists the following warnings:

  CHECK   drivers/staging/r8188eu/core/rtw_mlme.c
drivers/staging/r8188eu/core/rtw_mlme.c:1197:49: warning: incorrect type in argument 2 (different base types)
drivers/staging/r8188eu/core/rtw_mlme.c:1197:49:    expected restricted __le16 [usertype] mstatus_rpt
drivers/staging/r8188eu/core/rtw_mlme.c:1197:49:    got unsigned short [assigned] [usertype] media_status_rpt
drivers/staging/r8188eu/core/rtw_mlme.c:1275:57: warning: incorrect type in argument 2 (different base types)
drivers/staging/r8188eu/core/rtw_mlme.c:1275:57:    expected restricted __le16 [usertype] mstatus_rpt
drivers/staging/r8188eu/core/rtw_mlme.c:1275:57:    got unsigned short [assigned] [usertype] media_status
  CHECK   drivers/staging/r8188eu/core/rtw_mlme_ext.c
drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58: warning: incorrect type in argument 2 (different base types)
drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58:    expected restricted __le16 [usertype] mstatus_rpt
drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58:    got unsigned short [assigned] [usertype] media_status

The second argument of rtl8188e_set_FwMediaStatus_cmd() needs to be in CPU
order, not little-endian; however, when it uses that value to call
FillH2CCmd_88E() the parameter must be in little-endian order as that
value will be sent to the firmware. Note that the conversion from LE to CPU
order was le16_to_cpu() rather than the correct cpu_to_le16.

The definition of FillH2CCmd_88E() is revised, and the proper conversion
routine is used.

Note that the original code performed one byte swap on the secong argument
of FillH2CCmd_88E(), and got the correct answer even though the semantics
were very wrong.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Reviewed-by: Dan Carpenter <error27@gmail.com>
Reported-by: Gaurav Pathak <gauravpathak129@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/r/20230120191119.13163-1-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-23 19:03:53 +01:00
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