aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-01-31staging: r8188eu: remove HW_VAR_AC_PARAM_VOMichael Straube3-5/+1
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-31staging: r8188eu: remove HW_VAR_CAM_INVALID_ALLMichael Straube3-6/+2
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-31staging: r8188eu: remove HW_VAR_SEC_CFGMichael Straube3-10/+3
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-31staging: r8188eu: remove HW_VAR_BEACON_INTERVALMichael Straube3-5/+1
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-31staging: r8188eu: convert rtw_p2p_got_wpsinfo to return voidAbdun Nihaal1-5/+3
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-31staging: r8188eu: convert rtw_p2p_prov_disc to return voidAbdun Nihaal1-7/+5
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-31staging: r8188eu: convert rtw_p2p_set_persistent to return voidAbdun Nihaal1-6/+4
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-31staging: r8188eu: convert rtw_p2p_invite_req to return voidAbdun Nihaal1-7/+5
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-31staging: r8188eu: convert rtw_p2p_get_op_ch to return voidAbdun Nihaal1-5/+3
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-31staging: r8188eu: convert rtw_p2p_get_groupid to return voidAbdun Nihaal1-5/+3
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-31staging: r8188eu: convert rtw_p2p_get_peer_devaddr_by_invitation to return voidAbdun Nihaal1-5/+4
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-31staging: r8188eu: convert rtw_p2p_get_peer_devaddr to return voidAbdun Nihaal1-5/+3
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-31staging: r8188eu: convert rtw_p2p_get_peer_ifaddr to return voidAbdun Nihaal1-5/+3
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-31staging: r8188eu: convert rtw_p2p_get_role to return voidAbdun Nihaal1-5/+3
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-31staging: r8188eu: convert rtw_p2p_get_req_cm to return voidAbdun Nihaal1-3/+1
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-31staging: r8188eu: convert rtw_p2p_get_status to return voidAbdun Nihaal1-4/+1
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-31staging: r8188eu: convert rtw_p2p_setDN to return voidAbdun Nihaal1-6/+3
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-31staging: r8188eu: convert rtw_p2p_set_go_nego_ssid to return voidAbdun Nihaal1-6/+3
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-31staging: r8188eu: propagate error code in rtw_p2p_get2Abdun Nihaal1-5/+5
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-31staging: r8188eu: remove unneeded variable in rtw_p2p_get_invitation_procedureAbdun Nihaal1-2/+1
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-31staging: r8188eu: remove unneeded variable in rtw_p2p_get_device_nameAbdun Nihaal1-2/+1
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-31staging: r8188eu: remove unneeded variable in rtw_p2p_get_device_typeAbdun Nihaal1-2/+1
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-31staging: r8188eu: remove unneeded variable in rtw_p2p_get_go_device_addressAbdun Nihaal1-2/+1
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-31staging: r8188eu: remove unneeded variable in rtw_p2p_get_wps_configmethodAbdun Nihaal1-2/+1
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-31staging: r8188eu: remove unneeded variable in rtw_p2p_getAbdun Nihaal1-3/+1
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-31staging: r8188eu: remove unneeded variable in rtw_wx_get_encAbdun Nihaal1-2/+2
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-31staging: r8188eu: remove unneeded variable in rtw_wx_get_essidAbdun Nihaal1-2/+2
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-31staging: rt8188eu: Remove dead codeMuhammad Usama Anjum1-3/+0
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>
2022-01-31staging: r8188eu: remove hal_init_macaddr()Michael Straube4-23/+12
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-31staging: r8188eu: remove unused parameter from hw_var_set_*Michael Straube1-8/+8
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-31staging: r8188eu: remove c2h_evt_clear()Michael Straube3-8/+2
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-31staging: pi433: remove coding style item from the TODO filePaulo Miguel Almeida3-10/+6
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-31staging: r8188eu: remove IS_*_CUT macrosMichael Straube2-26/+16
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>
2022-01-31staging: r8188eu: convert SetHalDefVar8188EUsb() to voidMichael Straube2-6/+2
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>
2022-01-31staging: r8188eu: convert GetHalDefVar8188EUsb() to voidMichael Straube2-6/+2
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>
2022-01-31staging: r8188eu: max_rx_ampdu_factor is always MAX_AMPDU_FACTOR_64KMichael Straube5-32/+3
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>
2022-01-31staging: r8188eu: remove unused cases from GetHalDefVar8188EUsb()Michael Straube2-25/+0
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>
2022-01-31staging: r8188eu: rx_packet_offset and max_recvbuf_sz are write-onlyMichael Straube3-12/+0
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>
2022-01-31selftests/net: timestamping: Fix bind_phc checkGerhard Engleder1-2/+2
timestamping checks socket options during initialisation. For the field bind_phc of the socket option SO_TIMESTAMPING it expects the value -1 if PHC is not bound. Actually the value of bind_phc is 0 if PHC is not bound. This results in the following output: SIOCSHWTSTAMP: tx_type 0 requested, got 0; rx_filter 0 requested, got 0 SO_TIMESTAMP 0 SO_TIMESTAMPNS 0 SO_TIMESTAMPING flags 0, bind phc 0 not expected, flags 0, bind phc -1 This is fixed by setting default value and expected value of bind_phc to 0. Fixes: 2214d7032479 ("selftests/net: timestamping: support binding PHC") Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31Merge branch 'renesas-dead-code'David S. Miller2-7/+2
Sergey Shtylyov says: ==================== Remove some dead code in the Renesas Ethernet drivers Here are 2 patches against DaveM's 'net-next.git' repo. The Renesas drivers call their ndo_stop() methods directly and they always return 0, making the result checks pointless, hence remove them... ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31sh_eth: sh_eth_close() always returns 0Sergey Shtylyov1-3/+1
sh_eth_close() always returns 0, hence the check in sh_eth_wol_restore() is pointless (however we cannot change the prototype of sh_eth_close() as it implements the driver's ndo_stop() method). Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31ravb: ravb_close() always returns 0Sergey Shtylyov1-4/+1
ravb_close() always returns 0, hence the check in ravb_wol_restore() is pointless (however, we cannot change the prototype of ravb_close() as it implements the driver's ndo_stop() method). Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31net/fsl: xgmac_mdio: fix return value check in xgmac_mdio_probe()Wei Yongjun1-2/+2
In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 1d14eb15dc2c ("net/fsl: xgmac_mdio: Use managed device resources") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31ipv4: Make ip_idents_reserve staticDavid Ahern2-3/+1
ip_idents_reserve is only used in net/ipv4/route.c. Make it static and remove the export. Signed-off-by: David Ahern <dsahern@kernel.org> Cc: Eric Dumazet <edumazet@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31r8169: add rtl_disable_exit_l1()Heiner Kallweit1-5/+16
Add rtl_disable_exit_l1() for ensuring that the chip doesn't inadvertently exit ASPM L1 when being in a low-power mode. The new function is called from rtl_prepare_power_down() which has to be moved in the code to avoid a forward declaration. According to Realtek OCP register 0xc0ac shadows ERI register 0xd4 on RTL8168 versions from RTL8168g. This allows to simplify the code a little. v2: - call rtl_disable_exit_l1() also if DASH or WoL are enabled Suggested-by: Chun-Hao Lin <hau@realtek.com> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31phy: make phy_set_max_speed() *void*Sergey Shtylyov5-33/+13
After following the call tree of phy_set_max_speed(), it became clear that this function never returns anything but 0, so we can change its result type to *void* and drop the result checks from the three drivers that actually bothered to do it... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31Merge branch 'dsa-mv88e6xxx-Improve-indirect-addressing-performance'David S. Miller3-15/+34
Tobias Waldekranz says: ==================== net: dsa: mv88e6xxx: Improve indirect addressing performance The individual patches have all the details. This work was triggered by recent work on a platform that took 16s (sic) to load the mv88e6xxx module. The first patch gets rid of most of that time by replacing a very long delay with a tighter poll loop to wait for the busy bit to clear. The second patch shaves off some more time by avoiding redundant busy-bit-checks, saving 1 out of 4 MDIO operations for every register read/write in the optimal case. v1 -> v2: - Make sure that we always poll the busy bit at least twice, in the unlikely event that the first one is quick to query the hardware, but is then scheduled out for a long time before the timeout is checked. v2 -> v3: - Fallback to the longer sleeps after the initial two poll attempts. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31net: dsa: mv88e6xxx: Improve indirect addressing performanceTobias Waldekranz2-10/+15
Before this change, both the read and write callback would start out by asserting that the chip's busy flag was cleared. However, both callbacks also made sure to wait for the clearing of the busy bit before returning - making the initial check superfluous. The only time that would ever have an effect was if the busy bit was initially set for some reason. With that in mind, make sure to perform an initial check of the busy bit, after which both read and write can rely the previous operation to have waited for the bit to clear. This cuts the number of operations on the underlying MDIO bus by 25% Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31net: dsa: mv88e6xxx: Improve performance of busy bit pollingTobias Waldekranz2-5/+19
Avoid a long delay when a busy bit is still set and has to be polled again. Measurements on a system with 2 Opals (6097F) and one Agate (6352) show that even with this much tighter loop, we have about a 50% chance of the bit being cleared on the first poll, all other accesses see the bit being cleared on the second poll. On a standard MDIO bus running MDC at 2.5MHz, a single access with 32 bits of preamble plus 32 bits of data takes 64*(1/2.5MHz) = 25.6us. This means that mv88e6xxx_smi_direct_wait took 26us + CPU overhead in the fast scenario, but 26us + 1500us + 26us + CPU overhead in the slow case - bringing the average close to 1ms. With this change in place, the slow case is closer to 2*26us + CPU overhead, with the average well below 100us - a 10x improvement. This translates to real-world winnings. On a 3-chip 20-port system, the modprobe time drops by 88%: Before: root@coronet:~# time modprobe mv88e6xxx real 0m 15.99s user 0m 0.00s sys 0m 1.52s After: root@coronet:~# time modprobe mv88e6xxx real 0m 2.21s user 0m 0.00s sys 0m 1.54s Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-31net: bonding: Add support for IPV6 ns/na to balance-alb/balance-tlb modeSun Shouxin1-2/+28
Since ipv6 neighbor solicitation and advertisement messages isn't handled gracefully in bond6 driver, we can see packet drop due to inconsistency between mac address in the option message and source MAC . Another examples is ipv6 neighbor solicitation and advertisement messages from VM via tap attached to host bridge, the src mac might be changed through balance-alb mode, but it is not synced with Link-layer address in the option message. The patch implements bond6's tx handle for ipv6 neighbor solicitation and advertisement messages. Suggested-by: Hu Yadi <huyd12@chinatelecom.cn> Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: Sun Shouxin <sunshouxin@chinatelecom.cn> Signed-off-by: David S. Miller <davem@davemloft.net>