Commit Graph

1072320 Commits

Author SHA1 Message Date
Michael Straube
7ef976e0dc staging: r8188eu: remove UsbRxAggPage* from struct hal_data_8188e
UsbRxAggPageCount and UsbRxAggPageTimeout in struct hal_data_8188e
are set and never changed. Define these constants and remove the
variables from the hal_data_8188e structure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-10-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:34 +01:00
Michael Straube
eb5e767e56 staging: r8188eu: remove UsbRxAggBlock* from struct hal_data_8188e
UsbRxAggBlockCount and UsbRxAggBlockTimeout in struct hal_data_8188e
are set but not used. Remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Michael Straube
0646c21855 staging: r8188eu: remove UsbRxAggMode from struct hal_data_8188e
UsbRxAggMode in struct hal_data_8188e is set to USB_RX_AGG_DMA and
never changed. Remove UsbRxAggMode from the hal_data_8188e structure
and remove related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Michael Straube
0da7027455 staging: r8188eu: remove UsbTxAggMode from struct hal_data_8188e
UsbTxAggMode in struct hal_data_r8188e is only used in a single if
statement. Remove UsbTxAggMode from the hal_data_8188e structure and
adjust the if statement.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Michael Straube
b57774ccf5 staging: r8188eu: remove UsbTxAggDescNum from struct hal_data_8188e
UsbTxAggDescNum in struct hal_data_8188e is set to 0x6 and never
changed. Define this constant and remove UsbTxAggDescNum from the
hal_data_8188e structure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Michael Straube
2687230c07 staging: r8188eu: BasicRateSet is set but never used
The varaible BasicRateSet in struct hal_data_8188e is set but never
used. Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Michael Straube
513750ab92 staging: r8188eu: remove ReceiveConfig from struct hal_data_8188e
The ReceiveConfig variable in struct hal_data_8188e is only used
to store a local value. Use a local variable instead and remove
ReceiveConfig from struct hal_data_8188e.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Michael Straube
75ba99b402 staging: r8188eu: remove PGMaxGroup from struct hal_data_8188e
the variable PGMaxGroup in struct hal_data_8188e is set to 13 and
never changed. We can use the already defined constant MAX_PG_GROUP,
which is 13, and remove PGMaxGroup from struct hal_data_8188e.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Michael Straube
999bae66ba staging: r8188eu: ExternalPA is read-only
The variable ExternalPA in struct hal_data_8188e is never set.
It stays at the default value 0. Remove it and remove related
dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220201084259.7497-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:33 +01:00
Gustavo A. R. Silva
b47f6db34c staging: r8188eu: Silence out-of-bounds warning in HT_caps_handler()
Silence the following out-of-bounds warning (caught with -Warray-bounds=2):

drivers/staging/r8188eu/core/rtw_wlan_util.c: In function ‘HT_caps_handler’:
drivers/staging/r8188eu/core/rtw_wlan_util.c:719:54: error: array subscript 2 is above array bounds of ‘u8[1]’ {aka ‘unsigned char[1]’} [-Werror=array-bounds]
  719 |                                             pIE->data[i] & 0x3);
      |                                             ~~~~~~~~~^~~
./include/linux/minmax.h:32:39: note: in definition of macro ‘__cmp_once’
   32 |                 typeof(y) unique_y = (y);               \
      |                                       ^
./include/linux/minmax.h:45:25: note: in expansion of macro ‘__careful_cmp’
   45 | #define min(x, y)       __careful_cmp(x, y, <)
      |                         ^~~~~~~~~~~~~
drivers/staging/r8188eu/core/rtw_wlan_util.c:718:41: note: in expansion of macro ‘min’
  718 |                         max_AMPDU_len = min(pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3,
      |                                         ^~~
In file included from drivers/staging/r8188eu/core/../include/drv_types.h:16,
                 from drivers/staging/r8188eu/core/rtw_wlan_util.c:7:
drivers/staging/r8188eu/core/../include/wlan_bssdef.h:64:13: note: while referencing ‘data’
   64 |         u8  data[1];
      |             ^~~~

by transforming one-element array into a flexible-array member in
struct ndis_802_11_var_ie

This is part of the ongoing efforts to globally enable -Warray-bounds.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20220202070906.GA274379@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-04 15:16:20 +01:00
Michael Straube
d0d82cb741 staging: r8188eu: remove HW_VAR_CAM_EMPTY_ENTRY
The HW_VAR_CAM_EMPTY_ENTRY case in SetHwReg8188EU() is not used.
Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-13-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
9b80fa7e1f staging: r8188eu: remove HW_VAR_CHECK_BSSID
The HW_VAR_CHECK_BSSID case in SetHwReg8188EU() is not used.
Remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-12-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
6e28b38bad staging: r8188eu: remove HW_VAR_BCN_FUNC
The HW_VAR_BCN_FUNC case in SetHwReg8188EU() just calls
hw_var_set_bcn_func(). Remove HW_VAR_BCN_FUNC from SetHwReg8188EU(),
remove hw_var_set_bcn_func() and call rtw_write8() directly.

Since hw_var_set_bcn_func() was always called with value 0, we only
need to keep the else arm of the if statement that checks the value.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-11-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
b82f0b575a staging: r8188eu: remove HW_VAR_CAM_WRITE
Remove HW_VAR_CAM_WRITE from SetHwReg8188EU() and call rtw_write32()
directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-10-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
9838ee1cc2 staging: r8188eu: merge Set_NETYPE0_MSR() and Set_MSR()
Set_MSR() just calls Set_NETYPE0_MSR(). Merge the two functions.
Keep Set_MSR() and remove Set_NETYPE0_MSR().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
0599a490f3 staging: r8188eu: remove HW_VAR_MEDIA_STATUS
Remove HW_VAR_MEDIA_STATUS from SetHwReg8188EU() and call
rtw_read8() and rtw_write8() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
39c2b86478 staging: r8188eu: remove HW_VAR_AC_PARAM_BK
Remove HW_VAR_AC_PARAM_BK from SetHwReg8188EU() and call
rtw_write32() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
24873b8859 staging: r8188eu: remove HW_VAR_AC_PARAM_VI
Remove HW_VAR_AC_PARAM_VI from SetHwReg8188EU() and call
rtw_write32() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
111da5e574 staging: r8188eu: remove HW_VAR_AC_PARAM_VO
Remove HW_VAR_AC_PARAM_VO from SetHwReg8188EU() and call
rtw_write32() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
73e2daa8ca staging: r8188eu: remove HW_VAR_CAM_INVALID_ALL
Remove HW_VAR_CAM_INVALID_ALL from SetHwReg8188EU() and call
rtw_write32() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:30 +01:00
Michael Straube
89ba56a6fa staging: r8188eu: remove HW_VAR_SEC_CFG
Remove HW_VAR_SEC_CFG from SetHwReg8188EU() and call rtw_write8()
directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:29 +01:00
Michael Straube
9957b0e9fc staging: r8188eu: remove HW_VAR_BEACON_INTERVAL
Remove HW_VAR_BEACON_INTERVAL from SetHwReg8188EU() and call
rtw_write16() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:03:29 +01:00
Abdun Nihaal
1f6361d771 staging: r8188eu: convert rtw_p2p_got_wpsinfo to return void
rtw_p2p_got_wpsinfo always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/f63e236e3a338789265172990fea049216115105.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
7ce2b888ef staging: r8188eu: convert rtw_p2p_prov_disc to return void
rtw_p2p_prov_disc always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/a6696ce2645a07ddd5b5eca21bcc04b196038e8e.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
e636a1f7b4 staging: r8188eu: convert rtw_p2p_set_persistent to return void
rtw_p2p_set_persistent always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/2f23981bcdf4177327b9a29e88540380ef627aab.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
dd103a0641 staging: r8188eu: convert rtw_p2p_invite_req to return void
rtw_p2p_invite_req always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/059a21d40a5c6cbe621ca969f9d32ea89bc9a977.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
fa8e9aa243 staging: r8188eu: convert rtw_p2p_get_op_ch to return void
rtw_p2p_get_op_ch always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/c94caa66e738f254b7b1d967b3016975aa0df5d0.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
b63d0921ce staging: r8188eu: convert rtw_p2p_get_groupid to return void
rtw_p2p_get_groupid always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/be08b2d84a7fc836db5aa008d906dee1b282fa54.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
6f4dabe2d1 staging: r8188eu: convert rtw_p2p_get_peer_devaddr_by_invitation to return void
rtw_p2p_get_peer_devaddr_by_invitation always returns 0 and it's return
value is not used. Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/06e2dce5de14c1abe457a40ec9ca597a06095437.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
43a9e57276 staging: r8188eu: convert rtw_p2p_get_peer_devaddr to return void
rtw_p2p_get_peer_devaddr always returns 0 and it's return value is not
used. Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/cc077a7d11e4bda521294499c42164db7358b2e1.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
057d75dbce staging: r8188eu: convert rtw_p2p_get_peer_ifaddr to return void
rtw_p2p_get_peer_ifaddr always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/4a51963ce86a5f6bed4c07e545cd64091eeb0a8a.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
17a543c398 staging: r8188eu: convert rtw_p2p_get_role to return void
rtw_p2p_get_role always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/dcd4bba9910b172031ccc0f138c78e8471e36d91.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:48 +01:00
Abdun Nihaal
df1847ed07 staging: r8188eu: convert rtw_p2p_get_req_cm to return void
rtw_p2p_get_req_cm always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/a5940e6778431a4ce2d2e67543c59aae90464604.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
449dbe9de3 staging: r8188eu: convert rtw_p2p_get_status to return void
rtw_p2p_get_status always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/832c53cc201111449fccb40326084d20f676e722.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
712eed5d09 staging: r8188eu: convert rtw_p2p_setDN to return void
rtw_p2p_setDN always returns 0 and it's return value is not used.
Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/fe4a9f0176c96ec327342c793de1f55c89d16768.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
94f2746186 staging: r8188eu: convert rtw_p2p_set_go_nego_ssid to return void
rtw_p2p_set_go_nego_ssid always returns 0 and it's return value is not
used. Convert it to return void.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/90e2b3e4ff99131423c11b8f9206916791f742d9.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
8fd35553dd staging: r8188eu: propagate error code in rtw_p2p_get2
rtw_p2p_get2 calls functions that can fail with -EFAULT.
Return the error code from the called functions.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/818aad89738b66942bb66568081f1953a9494078.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
4377ab7763 staging: r8188eu: remove unneeded variable in rtw_p2p_get_invitation_procedure
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/ccec1f682fbc623381519610284530f940122d0e.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
a944d44a14 staging: r8188eu: remove unneeded variable in rtw_p2p_get_device_name
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/d94c3029128b9c094bf4e0b2e4574a177aef46e9.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
6ae1d6e380 staging: r8188eu: remove unneeded variable in rtw_p2p_get_device_type
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/83609e3c75a0bde4be612d32d76eaed6a26f72aa.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
b1b182507e staging: r8188eu: remove unneeded variable in rtw_p2p_get_go_device_address
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/26a84fbef7e06d518efc29d2cd9e3dd685c96e0d.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
ab54b196c9 staging: r8188eu: remove unneeded variable in rtw_p2p_get_wps_configmethod
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/ae35e6f6f603ef83c2bad685ac247273041bd138.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
c2e5e5f80c staging: r8188eu: remove unneeded variable in rtw_p2p_get
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/6c992e9481c7481aa5931635e162dd7a4400a2e2.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
0bc14454d3 staging: r8188eu: remove unneeded variable in rtw_wx_get_enc
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/e31a2b15673497cbd70bf62b0093f46952cc7596.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:47 +01:00
Abdun Nihaal
42475735ad staging: r8188eu: remove unneeded variable in rtw_wx_get_essid
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/d0208689dffce91c52afbd5938b2704a8b1b554e.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:02:46 +01:00
Muhammad Usama Anjum
7e41c7db27 staging: rt8188eu: Remove dead code
rtStatus is _SUCCESS when the execution reaches this if condition.
Remove the dead code.

Fixes: 67396d2dfe ("staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers")
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20220128111954.1028121-1-usama.anjum@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:01:12 +01:00
Michael Straube
81f897a712 staging: r8188eu: remove hal_init_macaddr()
hal_init_macaddr() is just a wrapper around SetHwReg8188EU() which
calls hw_var_set_macaddr(). Remove hal_init_macaddr(), remove the
HW_VAR_MAC_ADDR case from SetHwReg8188EU() and call
hw_var_set_macaddr() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130111219.6390-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:00:47 +01:00
Michael Straube
590702353c staging: r8188eu: remove unused parameter from hw_var_set_*
Remove the unused parameter 'variable' from hw_var_set_* functions.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130111219.6390-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:00:47 +01:00
Michael Straube
c264c1e487 staging: r8188eu: remove c2h_evt_clear()
Function c2h_evt_clear() is just a wrapper around rtw_write8().
Remove c2h_evt_clear() and call rtw_write8() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130111219.6390-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:00:47 +01:00
Paulo Miguel Almeida
52f11ec9b9 staging: pi433: remove coding style item from the TODO file
After several patches sent by the community along the last couple of
years, it's possible to remove the coding style item from the TODO file
in the driver's folder.

This patch addresses the last code formatting inconsistences and remove
the coding style item from the TODO file.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YfYdVokxsQ+Adl+T@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-31 14:00:11 +01:00