Abdun Nihaal [Sat, 29 Jan 2022 16:28:14 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:13 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:12 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:11 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:10 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:09 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:08 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:07 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:06 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:05 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:04 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:03 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:02 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:01 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:28:00 +0000 (21:58 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:27:59 +0000 (21:57 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:27:58 +0000 (21:57 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:27:57 +0000 (21:57 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:27:56 +0000 (21:57 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:27:55 +0000 (21:57 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:04:08 +0000 (21:34 +0530)]
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>
Abdun Nihaal [Sat, 29 Jan 2022 16:04:07 +0000 (21:34 +0530)]
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>
Muhammad Usama Anjum [Fri, 28 Jan 2022 11:19:54 +0000 (16:19 +0500)]
staging: rt8188eu: Remove dead code
rtStatus is _SUCCESS when the execution reaches this if condition.
Remove the dead code.
Fixes: 67396d2dfef3 ("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>
Michael Straube [Sun, 30 Jan 2022 11:12:19 +0000 (12:12 +0100)]
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>
Michael Straube [Sun, 30 Jan 2022 11:12:18 +0000 (12:12 +0100)]
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>
Michael Straube [Sun, 30 Jan 2022 11:12:17 +0000 (12:12 +0100)]
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>
Paulo Miguel Almeida [Sun, 30 Jan 2022 05:08:38 +0000 (18:08 +1300)]
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>
Michael Straube [Fri, 28 Jan 2022 11:54:45 +0000 (12:54 +0100)]
staging: r8188eu: remove IS_*_CUT macros
Remove the IS_*_CUT macros from HalVerDef.h. They are not needed, we
can use a switch on chip_vers.CUTVersion directly in dump_chip_info()
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220128115445.6606-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 28 Jan 2022 11:54:44 +0000 (12:54 +0100)]
staging: r8188eu: convert SetHalDefVar8188EUsb() to void
The return value of SetHalDefVar8188EUsb() is not used. Convert the
function to void.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220128115445.6606-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 28 Jan 2022 11:54:43 +0000 (12:54 +0100)]
staging: r8188eu: convert GetHalDefVar8188EUsb() to void
The return value of GetHalDefVar8188EUsb() is not used. Convert the
function to void.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220128115445.6606-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 28 Jan 2022 11:54:42 +0000 (12:54 +0100)]
staging: r8188eu: max_rx_ampdu_factor is always MAX_AMPDU_FACTOR_64K
The local variable max_rx_ampdu_factor in rtw_restructure_ht_ie() and
issue_action_BA() is always set to MAX_AMPDU_FACTOR_64K. Remove the
variable from both functions and use MAX_AMPDU_FACTOR_64K directly.
The case HW_VAR_MAX_RX_AMPDU_FACTOR in GetHalDefVar8188EUsb() is now
unused and can be removed.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220128115445.6606-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 28 Jan 2022 11:54:41 +0000 (12:54 +0100)]
staging: r8188eu: remove unused cases from GetHalDefVar8188EUsb()
GetHalDefVar8188EUsb() is never called with HAL_DEF_DRVINFO_SZ,
HAL_DEF_RA_DECISION_RATE, HAL_DEF_RA_SGI and HAL_DEF_PT_PWR_STATUS.
Remove these cases from the function.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220128115445.6606-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 28 Jan 2022 11:54:40 +0000 (12:54 +0100)]
staging: r8188eu: rx_packet_offset and max_recvbuf_sz are write-only
The local variables rx_packet_offset and max_recvbuf_sz in
rtw_restructure_ht_ie() are set but never used. Remove them.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220128115445.6606-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 10 Jan 2022 11:49:30 +0000 (12:49 +0100)]
staging: mt7621-dts: align resets with binding documentation
Binding documentation for compatible 'mediatek,mt7621-sysc' has been updated
to be used as a reset provider. Align reset related bits and system controller
node with binding documentation along the dtsi file.
Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20220110114930.1406665-5-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 10 Jan 2022 11:49:27 +0000 (12:49 +0100)]
dt-bindings: reset: add dt binding header for Mediatek MT7621 resets
Add dt binding header for resets lines in Mediatek MT7621 SoCs.
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20220110114930.1406665-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo A. R. Silva [Tue, 25 Jan 2022 22:34:43 +0000 (16:34 -0600)]
staging: unisys: visorinput: Use struct_size() helper in kzalloc()
Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worst scenario, could lead to heap overflows.
Also, address the following sparse warnings:
drivers/staging/unisys/visorinput/visorinput.c:409:27: warning: using sizeof on a flexible structure
Link: https://github.com/KSPP/linux/issues/174
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20220125223443.GA76937@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arınç ÜNAL [Tue, 25 Jan 2022 15:39:03 +0000 (18:39 +0300)]
staging: mt7621-dts: fix pinctrl properties for ethernet
Add pinctrl properties with rgmii1 & mdio pins under ethernet node which
was wrongfully put under an external phy node.
GMAC1 will start working with this fix.
Link: https://lore.kernel.org/netdev/02ecce91-7aad-4392-c9d7-f45ca1b31e0b@arinc9.com/T/
Move GB-PC2 specific phy_external node to its own device tree.
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20220125153903.1469-5-arinc.unal@arinc9.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arınç ÜNAL [Tue, 25 Jan 2022 15:39:02 +0000 (18:39 +0300)]
staging: mt7621-dts: use trgmii on gmac0 and enable flow control on port@6
Change phy-mode of gmac0 to trgmii to match the other side, port@6.
Flow control needs to be enabled on both sides to work.
It is already enabled on gmac0, enable it on port@6 too.
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20220125153903.1469-4-arinc.unal@arinc9.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arınç ÜNAL [Tue, 25 Jan 2022 15:39:01 +0000 (18:39 +0300)]
staging: mt7621-dts: fix switch0@0 warnings
Remove reg property from ports node to fix this warning:
Warning (unit_address_vs_reg): /ethernet@
1e100000/mdio-bus/switch0@0/ports: node has a reg or ranges property, but no unit name
Another warning surfaces afterwards. Remove #address-cells and #size-cells
from switch0@0 node to fix this warning:
Warning (avoid_unnecessary_addr_size): /ethernet@
1e100000/mdio-bus/switch0@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20220125153903.1469-3-arinc.unal@arinc9.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arınç ÜNAL [Tue, 25 Jan 2022 15:39:00 +0000 (18:39 +0300)]
staging: mt7621-dts: fix formatting
Fix formatting on mt7621.dtsi.
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20220125153903.1469-2-arinc.unal@arinc9.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paulo Miguel Almeida [Mon, 24 Jan 2022 04:26:36 +0000 (17:26 +1300)]
staging: pi433: add missing register contants
add missing register constants present in RFM69 and/or RFM69HW so that
we don't need to hardcode values when referencing them.
this patch adds REG_TESTLNA, REG_TESTAFC constants
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220124042636.GA7962@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paulo Miguel Almeida [Fri, 14 Jan 2022 22:16:43 +0000 (11:16 +1300)]
staging: pi433: enforce tx_cfg to be set before any message can be sent
this driver relies on exposing a char device to userspace to tx
messages. Every message can be sent using different trasmitter settings
such so the tx_cfg must be written before sending any messages.
Failing to do so will cause the message to fail silently depending on
printk/dynamic_debug settings which makes it hard to troubleshoot.
This patch add a control variable that will get initialized once tx_cfg
is set for the fd used when interacting with the char device.
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220114221643.GA7843@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Tue, 18 Jan 2022 18:13:38 +0000 (19:13 +0100)]
staging: fbtft: Deduplicate driver registration macros
The two macros FBTFT_REGISTER_DRIVER and FBTFT_REGISTER_SPI_DRIVER
contain quite some duplication: Both define an spi driver and an of device
table and the differences are quite subtle.
So create two new macros and use both twice.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220118181338.207943-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paulo Miguel Almeida [Tue, 18 Jan 2022 23:05:55 +0000 (12:05 +1300)]
staging: pi433: validate max bit_rate based on modulation used
Max bit rate is dependent on which modulation is used. Previous
validation routine only took into consideration min bit rate which can
lead a misconfiguration of the rf69 chip causing the packets not to be
sent/read.
This patch enhances that input check in set_bit_rate to account for
modulation values and their respective max bit rate
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220118230555.GA4961@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paulo Miguel Almeida [Tue, 18 Jan 2022 23:05:02 +0000 (12:05 +1300)]
staging: pi433: change order in which driver config the rf69 chip
There is an explicit dependency between modulation and bit rate
configurations. To ensure proper validation of input value for the
set_bit_rate routine, we must ensure that modulation has been set
before.
This patch ensures that set_modulation is always called before
set_bit_rate for both RX and TX routines
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220118230502.GA4897@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paulo Miguel Almeida [Tue, 18 Jan 2022 23:04:13 +0000 (12:04 +1300)]
staging: pi433: fix validation for min bit rate supported by the device
rf69 datasheets establishes that the minimum supported bit rate is
1.2 kbps regardless of modulation.
this patch replaces the errouneous validation with the correct value
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220118230413.GA4859@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:23 +0000 (21:02 +0100)]
staging: vchiq_dev: Avoid unnecessary alloc in vchiq_ioc_create_service
There is no need to allocate the user service in case there is a VCHIQ
connection required, but not available. So simply check the error conditions
before doing an expensive memory allocation.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-19-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:22 +0000 (21:02 +0100)]
staging: vchiq_core: handle NULL result of find_service_by_handle
In case of an invalid handle the function find_servive_by_handle
returns NULL. So take care of this and avoid a NULL pointer dereference.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-18-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:21 +0000 (21:02 +0100)]
staging: vchiq_arm: Avoid NULL ptr deref in vchiq_dump_platform_instances
vchiq_get_state() can return a NULL pointer. So handle this cases and
avoid a NULL pointer derefence in vchiq_dump_platform_instances.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-17-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:20 +0000 (21:02 +0100)]
staging: vchiq_arm: make vchiq_get_state return early
Make vchiq_get_state return early with NULL and improve the readability.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-16-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:19 +0000 (21:02 +0100)]
staging: vchiq_core: use min_t macro
Don't try to open code min_t().
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-15-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:18 +0000 (21:02 +0100)]
staging: vchiq_core: avoid ternary operator for set_service_state
There is already a check for service->sync, so use this instead of a
separate ternary operator to update the service state.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-14-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:17 +0000 (21:02 +0100)]
staging: vchiq_core: fix alignment
This fixes some alignment found by checkpatch.pl.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-13-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:16 +0000 (21:02 +0100)]
staging: vchiq_core: reduce multi-line statements
In order to improvement readability try to reduce the multi-line statements.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-12-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:15 +0000 (21:02 +0100)]
staging: vchiq_core: drop prefix of vchiq_set_service_state
The name of this static function is unnecessary longish. So drop the prefix.
This gives us the chance to avoid some multi-line statements or fix some
indentations later.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-11-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:14 +0000 (21:02 +0100)]
staging: vchiq_core: align return statements in msg_type_str
The return statements aren't properly aligned. So fix this by using tabs.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-10-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:13 +0000 (21:02 +0100)]
staging: vchiq_core: simplify vchiq_add_service_internal
Better use kzalloc to properly init vchiq_service with zero. As a result
this saves us all the zero assignments.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-9-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:12 +0000 (21:02 +0100)]
staging: vchiq_core: fix type of parameter localport
The whole vchiq driver uses unsigned int for "localport" except of
find_service_by_port(). So fix this and get the rid of this suspicous
cast.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-8-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:11 +0000 (21:02 +0100)]
staging: vchiq: add message handling to TODO list
Recently Arnd Bergmann noticed that the message handling looks broken
to him. So add this point on the TODO list.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-7-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:10 +0000 (21:02 +0100)]
staging: vchiq: drop completed tasks from TODO
This removes all already completed tasks from the TODO file.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-6-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:09 +0000 (21:02 +0100)]
staging: vchiq: convert TODOs into unordered list
Keeping the order of the TODO items is hard and also unnecessary.
So convert it to an unordered list.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-5-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:08 +0000 (21:02 +0100)]
staging: vchiq_arm: introduce is_adjacent_block
The check for an adjacent block is hard to read. So move it into a separate
inline function.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-4-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:07 +0000 (21:02 +0100)]
staging: vchiq_debugfs: get the rid of n_log_entries
There is no need for this static variable, so use the macro directly.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-3-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sun, 23 Jan 2022 20:02:06 +0000 (21:02 +0100)]
staging: vchiq_core: fix indentation in vchiq_log_dump_mem
This align the indentation in the var declaration of vchiq_log_dump_mem to
the other code.
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-2-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vihas Mak [Sun, 23 Jan 2022 18:17:35 +0000 (23:47 +0530)]
staging: r8188eu: handle rtw_init_netdev_name() failure appropriately
rtw_init_netdev_name() calls dev_alloc_name() which allocates the name
for the device as per the given name format.
The name format is specified by the module parameter "ifname".
It returns a negative err code if the format is invalid. Handle this
error appropriately.
Cancel the timers ininitliazed by rtw_init_drv_sw() before calling
rtw_free_drv_sw() and then proceed to free the adapter.
Also, if register_netdev() fails then goto free_drv_sw instead of
goto handle_dualmac.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Mak <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220123181734.10402-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paulo Miguel Almeida [Sat, 8 Jan 2022 21:27:28 +0000 (10:27 +1300)]
staging: pi433: move get version func to where all other functions are
As a convention for the pi433 driver, all routines that deals with the
rf69 chip are defined in the rf69.c file. There was an exception to the
rule in which the uC version verification was being done directly
elsewhere. While at it, the Version Register hardcoded value was
replaced with a pre-existing constant in the driver.
This patch adds rf69_get_version function to rf69.c
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220108212728.GA7784@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 22 Jan 2022 17:05:47 +0000 (18:05 +0100)]
staging: r8188eu: merge Init_ODM_ComInfo_88E and rtl8188e_init_dm_priv
rtl8188e_init_dm_priv is the only caller of Init_ODM_ComInfo_88E.
Merge the two functions.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220122170547.68378-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 22 Jan 2022 17:05:46 +0000 (18:05 +0100)]
staging: r8188eu: ODM_RF_CALIBRATION is always set
The ODM_RF_CALIBRATION flag is set in Init_ODM_ComInfo_88E directly
after the driver is probed and it's never cleared.
Remove the flag and the code where it's set or checked.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220122170547.68378-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 22 Jan 2022 17:05:45 +0000 (18:05 +0100)]
staging: r8188eu: ODM_RF_TX_PWR_TRACK is always set
The ODM_RF_TX_PWR_TRACK flag is set in Init_ODM_ComInfo_88E directly
after the driver is probed and it's never cleared.
Remove the flag and the one place where it's checked.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220122170547.68378-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 22 Jan 2022 17:05:44 +0000 (18:05 +0100)]
staging: r8188eu: EntryMaxUndecoratedSmoothedPWDB is set but not used
The variable EntryMaxUndecoratedSmoothedPWDB in struct dm_priv
is set but not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220122170547.68378-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcelo Aloisio da Silva [Wed, 19 Jan 2022 03:49:33 +0000 (00:49 -0300)]
staging: r8188eu: remove unnecessary braces in rtw_xmit.c
Remove unnecessary braces reported by checkpatch.pl in rtw_xmit.c.
Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
Link: https://lore.kernel.org/r/20220119034933.GA29744@snoopy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:35 +0000 (17:55 +0100)]
staging: r8188eu: remove rtw_netif_stop_queue wrapper
Remove the rtw_netif_stop_queue wrapper function. Call
netif_tx_stop_all_queues directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:34 +0000 (17:55 +0100)]
staging: r8188eu: remove rtw_netif_start_queue wrapper
Remove the rtw_netif_start_queue wrapper function. Call
netif_tx_start_all_queues directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:33 +0000 (17:55 +0100)]
staging: r8188eu: remove rtw_netif_wake_queue wrapper
Remove the rtw_netif_wake_queue wrapper function. Call
netif_tx_wake_all_queues directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:32 +0000 (17:55 +0100)]
staging: r8188eu: call msecs_to_jiffies in _set_timer
The _set_timer wrapper function takes a timeout in milliseconds.
Call msecs_to_jiffies to convert the timeout to jiffies. Don't do
the calculation ourselves.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:31 +0000 (17:55 +0100)]
staging: r8188eu: remove _cancel_timer wrapper
Remove the _cancel_timer wrapper function and call del_timer_sync
directly.
None of the callers needs the bcancelled variable that's populated by
_cancel_timer, these variables can be removed in the calling functions.
rtw_surveydone_event_callback calls _cancel_timer only if it believes
that the timer is currently running. We can drop this. It's safe to
call del_timer_sync when the timer is not running. The timer in question,
scan_to_timer, is used only for the site survey command (the rtw_survey
functions) so we won't be stopping it while it's in use by someone else.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:30 +0000 (17:55 +0100)]
staging: r8188eu: remove rtw_list_delete wrapper
Remove the rtw_list_delete wrapper function. Call list_del_init directly.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:29 +0000 (17:55 +0100)]
staging: r8188eu: remove unused PATH_LENGTH_MAX define
PATH_LENGTH_MAX in osdep_service.h is not used and can
be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:28 +0000 (17:55 +0100)]
staging: r8188eu: remove unused bitshift function
The bitshift function from osdep_service.h is not used.
Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:27 +0000 (17:55 +0100)]
staging: r8188eu: remove unused macros
Remove some unused macros from osdep_service.h.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 15 Jan 2022 16:55:26 +0000 (17:55 +0100)]
staging: r8188eu: remove unused externl variables
Remove a group of external variables which are not used in
osdep_service.h or in the files where osdep_service.h is included.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Mon, 10 Jan 2022 09:00:20 +0000 (09:00 +0000)]
staging: r8188eu: convert DBG_88E calls in core/rtw_sta_mgt.c
Convert the DBG_88E macro calls in core/rtw_sta_mgt.c to use pr_debug,
as their information may be useful to observers, and this gets the
driver closer to the point of being able to remove DBG_88E itself.
These calls are at points in the call chain where use of dev_dbg or
netdev_dbg isn't possible due to lack of device pointer, so plain
pr_debug is appropriate here.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220110090020.6800-8-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Mon, 10 Jan 2022 09:00:19 +0000 (09:00 +0000)]
staging: r8188eu: convert DBG_88E calls in core/rtw_mlme_ext.c
Convert the DBG_88E macro calls in core/rtw_mlme_ext.c to use pr_debug
or netdev_dbg appropriately, as their information may be useful to
observers, and this gets the driver closer to the point of being
able to remove DBG_88E itself. Also remove some commented out
or unnecessary DBG_88E calls altogether.
Some calls are at points in the call chain where use of dev_dbg or
netdev_dbg isn't possible due to lack of device pointer, so plain
pr_debug is appropriate here.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220110090020.6800-7-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Mon, 10 Jan 2022 09:00:18 +0000 (09:00 +0000)]
staging: r8188eu: convert DBG_88E calls in core/rtw_ioctl_set.c
Convert the DBG_88E macro calls in core/rtw_ioctl_set.c to use netdev_dbg,
as their information may be useful to observers, and this gets the
driver closer to the point of being able to remove DBG_88E itself.
Also remove one unnecessary DBG_88E call which was already commented
out.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220110090020.6800-6-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Mon, 10 Jan 2022 09:00:17 +0000 (09:00 +0000)]
staging: r8188eu: convert DBG_88E calls in core/rtw_mlme.c
Convert the DBG_88E macro calls in core/rtw_mlme.c to use netdev_dbg,
as their information may be useful to observers, and this gets the
driver closer to the point of being able to remove DBG_88E itself.
Also remove some unnecessary DBG_88E calls altogether as all they do
is print the function name.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220110090020.6800-5-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Mon, 10 Jan 2022 09:00:16 +0000 (09:00 +0000)]
staging: r8188eu: convert DBG_88E calls in core/rtw_iol.c
Convert the DBG_88E macro calls in core/rtw_iol.c to use pr_debug
or netdev_dbg appropriately, as their information may be useful to
observers, and this gets the driver closer to the point of being
able to remove DBG_88E itself.
Some calls are at points in the call chain where use of dev_dbg or
netdev_dbg isn't possible due to lack of device pointer, so plain
pr_debug is appropriate here.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220110090020.6800-4-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Mon, 10 Jan 2022 09:00:15 +0000 (09:00 +0000)]
staging: r8188eu: convert DBG_88E calls in core/rtw_xmit.c
Convert the DBG_88E macro calls in core/rtw_xmit.c to use pr_debug
or netdev_dbg appropriately, as their information may be useful to
observers, and this gets the driver closer to the point of being
able to remove DBG_88E itself. Also remove some commented out
DBG_88E calls altogether.
Some calls are at points in the call chain where use of dev_dbg or
netdev_dbg isn't possible due to lack of device pointer, so plain
pr_debug is appropriate here.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220110090020.6800-3-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Potter [Mon, 10 Jan 2022 09:00:14 +0000 (09:00 +0000)]
staging: r8188eu: convert DBG_88E calls in core/rtw_ieee80211.c
Convert the DBG_88E macro calls in core/rtw_ieee80211.c to use pr_debug
as their information may be useful to observers, and this gets the
driver closer to the point of being able to remove DBG_88E itself.
These calls are at points in the call chain where use of dev_dbg or
netdev_dbg isn't possible due to lack of device pointer, so plain
pr_debug is appropriate here.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220110090020.6800-2-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jagath Jog J [Mon, 24 Jan 2022 03:44:56 +0000 (09:14 +0530)]
Staging: rtl8723bs: Inserting blank line after declaration
Fix following checkpatch.pl warning by inserting blank line
WARNING: Missing a blank line after declarations
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
Link: https://lore.kernel.org/r/20220124034456.8665-4-jagathjog1996@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jagath Jog J [Mon, 24 Jan 2022 03:44:55 +0000 (09:14 +0530)]
Staging: rtl8723bs: Removed extra spaces between datatype and variable
Fix following checkpatch.pl warning by placing single space between
datatype and variable
WARNING: please, no space before tabs
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
Link: https://lore.kernel.org/r/20220124034456.8665-3-jagathjog1996@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jagath Jog J [Mon, 24 Jan 2022 03:44:54 +0000 (09:14 +0530)]
Staging: rtl8723bs: Placing opening { braces in previous line
Fix following checkpatch.pl error by placing opening {
braces in previous line
ERROR: that open brace { should be on the previous line
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
Link: https://lore.kernel.org/r/20220124034456.8665-2-jagathjog1996@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gaston Gonzalez [Fri, 7 Jan 2022 23:46:22 +0000 (20:46 -0300)]
staging: vc04_services: use KBUILD_MODNAME instead of own module name definition
Remove own module name definition and use KBUILD_MODNAME instead, which
is the standard way of getting the module name.
While at it, one realignment was made to improve readability.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/20220107234620.49900-3-gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gaston Gonzalez [Fri, 7 Jan 2022 23:46:20 +0000 (20:46 -0300)]
staging: vc04_services: remove unneeded MODULE_VERSION() usage
MODULE_VERSION() is useless for in-tree drivers given that only the kernel
version matters. Hence, remove it.
While at it, one realignment was made to improve readability.
Suggested by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/20220107234620.49900-2-gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kees Cook [Tue, 18 Jan 2022 19:33:27 +0000 (11:33 -0800)]
staging: rtl8712: Drop get_recvframe_data()
As done for rtl8723bs and r8188eu, drop get_recvframe_data(), as it
introduces an impossible value (NULL) for the compiler to check code
paths against which could result in nonsensical warnings.
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Cc: Ivan Safonov <insafonov@gmail.com>
Cc: linux-staging@lists.linux.dev
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220118193327.2822099-4-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kees Cook [Tue, 18 Jan 2022 19:33:26 +0000 (11:33 -0800)]
staging: rtl8723bs: Drop get_recvframe_data()
When building with -Warray-bounds, the following warning is emitted:
In file included from ./include/linux/string.h:253,
from ./arch/x86/include/asm/page_32.h:22,
from ./arch/x86/include/asm/page.h:14,
from ./arch/x86/include/asm/thread_info.h:12,
from ./include/linux/thread_info.h:60,
from ./arch/x86/include/asm/preempt.h:7,
from ./include/linux/preempt.h:78,
from ./include/linux/rcupdate.h:27,
from ./include/linux/rculist.h:11,
from ./include/linux/sched/signal.h:5,
from ./drivers/staging/rtl8723bs/include/drv_types.h:17,
from drivers/staging/rtl8723bs/core/rtw_recv.c:7:
In function 'memcpy',
inlined from 'wlanhdr_to_ethhdr' at drivers/staging/rtl8723bs/core/rtw_recv.c:1554:2:
./include/linux/fortify-string.h:41:33: warning: '__builtin_memcpy' offset [0, 5] is out of the bounds [0, 0] [-Warray-bounds]
41 | #define __underlying_memcpy __builtin_memcpy
| ^
This is because the compiler sees it is possible for "ptr" to be a NULL
value, and concludes that it has zero size and attempts to copy to it
would overflow. Instead, remove the get_recvframe_data() entirely, as
it's not possible for this to ever be NULL.
Additionally add missing NULL checks after recvframe_pull() (which are
present in the rtl8712 driver).
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Phillip Potter <phil@philpotter.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Straube <straube.linux@gmail.com>
Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
Cc: linux-staging@lists.linux.dev
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220118193327.2822099-3-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kees Cook [Tue, 18 Jan 2022 19:33:25 +0000 (11:33 -0800)]
staging: r8188eu: Drop get_recvframe_data()
When building with -Warray-bounds, the following warning is emitted:
In file included from ./include/linux/string.h:253,
from ./arch/x86/include/asm/page_32.h:22,
from ./arch/x86/include/asm/page.h:14,
from ./arch/x86/include/asm/thread_info.h:12,
from ./include/linux/thread_info.h:60,
from ./arch/x86/include/asm/preempt.h:7,
from ./include/linux/preempt.h:78,
from ./include/linux/rcupdate.h:27,
from ./include/linux/rculist.h:11,
from ./include/linux/sched/signal.h:5,
from ./drivers/staging/rtl8723bs/include/drv_types.h:17,
from drivers/staging/rtl8723bs/core/rtw_recv.c:7:
In function 'memcpy',
inlined from 'wlanhdr_to_ethhdr' at drivers/staging/rtl8723bs/core/rtw_recv.c:1554:2:
./include/linux/fortify-string.h:41:33: warning: '__builtin_memcpy' offset [0, 5] is out of the bounds [0, 0] [-Warray-bounds]
41 | #define __underlying_memcpy __builtin_memcpy
| ^
This is because the compiler sees it is possible for "ptr" to be a NULL
value, and concludes that it has zero size and attempts to copy to it
would overflow. Instead, remove the get_recvframe_data() entirely, as
it's not possible for this to ever be NULL.
Additionally add missing NULL checks after recvframe_pull() (which are
present in the rtl8712 driver).
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Phillip Potter <phil@philpotter.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Straube <straube.linux@gmail.com>
Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
Cc: linux-staging@lists.linux.dev
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220118193327.2822099-2-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Thu, 13 Jan 2022 08:55:24 +0000 (09:55 +0100)]
staging: wfx: do not probe the device if not in the DT
Since the WF200 VID/PID are not reliable, it's recommended to declare it
in the DT. Until now, if the device was not declared, the driver just
printed a warning and continue. But, the risk of a collision is too
high, the driver now returns an error.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220113085524.1110708-32-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Thu, 13 Jan 2022 08:55:23 +0000 (09:55 +0100)]
staging: wfx: rename "config-file" DT attribute
"config-file" is too broad. Replace it by "silabs,antenna-config-file"
which is more explicit.
The attribute "config-file" is probably not widely used. This patch
obviously breaks setups that use this attribute.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220113085524.1110708-31-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Thu, 13 Jan 2022 08:55:22 +0000 (09:55 +0100)]
staging: wfx: drop legacy compatible values
Values "silabs,wfx-sdio" and "silabs,wfx-spi" are deprecated for a while
now. We take advantage of getting out of the staging tree to drop them
and start from a blank sheet.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220113085524.1110708-30-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérôme Pouiller [Thu, 13 Jan 2022 08:55:21 +0000 (09:55 +0100)]
staging: wfx: fix firmware location
There is currently, a mismatch between the location of the firmware in
linux-firmware and the path written in the driver.
We take this opportunity to relocate the WF200 firmware in wfx/ instead
of silabs/.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220113085524.1110708-29-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>