Xingquan Liu [Thu, 3 Oct 2024 07:03:53 +0000 (15:03 +0800)]
staging: rtl8712: remove parentheses after &
Remove parentheses after & to fix checkpatch warning
Unnecessary parentheses.
Signed-off-by: Xingquan Liu <b1n@b1n.io>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241003070353.65998-1-b1n@b1n.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tudor Gheorghiu [Sun, 22 Sep 2024 19:41:14 +0000 (22:41 +0300)]
staging: rtl8712: use kmalloc_array
Adhere to Linux kernel coding style.
Reported by checkpatch:
WARNING: Prefer kmalloc_array over kmalloc with multiply
+ pxmitpriv->pxmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf), GFP_ATOMIC);
Signed-off-by: Tudor Gheorghiu <tudor.reda@gmail.com>
Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ZvBy2lB_ok_OCmVI@redaops
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Tue, 1 Oct 2024 08:57:51 +0000 (10:57 +0200)]
staging: Switch back to struct platform_driver::remove()
After commit
0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.
Convert all staging drivers to use .remove(), with the eventual goal to
drop struct platform_driver::remove_new(). As .remove() and .remove_new()
have the same prototypes, conversion is done by just changing the structure
member name in the driver initializer.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20241001085751.282113-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Fri, 20 Sep 2024 15:34:34 +0000 (17:34 +0200)]
staging: olpc_dcon: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.
This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240920153430.503212-16-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Fri, 20 Sep 2024 15:34:33 +0000 (17:34 +0200)]
staging: most: i2c: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.
This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.
While touching the initializer, also remove the comma after the sentinel
entry.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240920153430.503212-15-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:22:02 +0000 (19:22 +0000)]
staging: vt6655: s_uGetDataDuration: Fix declaration formatting
This patch fixes formatting of s_uGetDataDuration function declaration.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-15-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:56 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename uNextPktTime variable
This patch renames uNextPktTime to next_pkt_time in s_uGetDataDuration
function in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-14-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:51 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename uAckTime variable
This patch renames uAckTime to ack_time in s_uGetDataDuration function
in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-13-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:44 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename bLastFrag variable
This patch renames bLastFrag to last_frag in s_uGetDataDuration function
in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-12-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:38 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename byFBOption parameter
This patch renames byFBOption to fb_option in s_uGetDataDuration
function in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-11-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:32 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename uMACfragNum parameter
This patch renames uMACfragNum to mac_frag_num in s_uGetDataDuration
function in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-10-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:26 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename cbLastFragmentSize parameter
This patch renames cbLastFragmentSize to last_fragment_size in
s_uGetDataDuration function in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-9-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:20 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename uFragIdx parameter
This patch renames uFragIdx to frag_idx in s_uGetDataDuration function in
order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-8-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:15 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename bNeedAck parameter
This patch renames bNeedAck to need_ack in s_uGetDataDuration function
in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-7-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:11 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename wRate parameter
This patch renames wRate to rate in s_uGetDataDuration function in order
to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-6-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:07 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename byPktType parameter
This patch renames byPktType to pkt_type in s_uGetDataDuration function
in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-5-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:21:03 +0000 (19:21 +0000)]
staging: vt6655: s_uGetDataDuration: Rename cbFrameLength parameter
This patch renames cbFrameLength to frame_length in s_uGetDataDuration
function in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-4-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:20:57 +0000 (19:20 +0000)]
staging: vt6655: s_uGetDataDuration: Rename byDurType parameter
This patch renames byDurType to dur_type in s_uGetDataDuration function
in order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-3-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 19:20:51 +0000 (19:20 +0000)]
staging: vt6655: s_uGetDataDuration: Rename pDevice parameter
This patch renames pDevice to priv in s_uGetDataDuration function in
order to avoid using camel case.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240918191959.51539-2-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Wed, 18 Sep 2024 16:51:40 +0000 (16:51 +0000)]
staging: vt6655: rxtx.c: Fix too long lines in get_rtscts_time
This patch fixes the lines exceeding 100 columns in get_rtscts_time
function.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240918165052.30386-1-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dominik Karol Piątkowski [Tue, 17 Sep 2024 17:19:55 +0000 (17:19 +0000)]
staging: vt6656: Update maintainer in TODO
Commit
ed394dbf5371b03a5335a7ba1973ba124c0ced3d replaced Forest Bond
with Philipp Hortmann as vt665X maintainer in MAINTAINERS, but
drivers/staging/vt6656/TODO was not changed, rendering it stale. This
patch fixes it.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Link: https://lore.kernel.org/r/20240917171937.22801-1-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manuel Quintero F [Sat, 5 Oct 2024 23:33:08 +0000 (16:33 -0700)]
staging: rtl8723bs: core: rtw_cmd: Missing a blank line after declarations
Fix checkpatch: WARNING: Missing a blank line after declarations
Signed-off-by: Manuel Quintero F <sakunix@yahoo.com>
Link: https://lore.kernel.org/r/20241005233308.4520-1-sakunix@yahoo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:58 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer disable_interrupt
Remove function pointer disable_interrupt and use
DisableInterrupt8723BSdio directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fee97dadc88bbdaebd82c99d0b6106d58315bd85.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:57 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer enable_interrupt
Remove function pointer enable_interrupt and use
EnableInterrupt8723BSdio directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/728827e155bdcd9951683e485d789d60bc203815.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:56 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer read_adapter_info
Remove function pointer read_adapter_info and use
ReadAdapterInfo8723BS directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/24eec4df528051fee3cf850308e009f114e14288.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:55 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer intf_chip_configure
Remove function pointer intf_chip_configure and use
rtl8723bs_interface_configure directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d542f172438c333c015b87376a20645eeeae1b99.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:54 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer init_default_value
Remove function pointer init_default_value and use
rtl8723bs_init_default_value directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d0bb58235d54d1c7e4806c5ea3a50dbf77c293e7.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:53 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer read_chip_version
Remove function pointer read_chip_version and use
rtl8723b_read_chip_version directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/79b26478a2493a1d7c27f8e88e0bec56a653d082.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:52 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer dm_deinit
Remove function pointer dm_deinit as it is not linked to any function.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/bb03b1309e9aa6bae988c5b7003b4f925f5c7027.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:51 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer dm_init
Remove function pointer dm_init and use rtl8723b_init_dm_priv directly to
increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e25134aacd3f784300f527d7e367b9f0f066254a.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:50 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer free_recv_priv
Remove function pointer free_recv_priv and use rtl8723bs_free_recv_priv
directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/17f06e3495abea1f6ad2a2f8d4f4ff1f23bef654.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:49 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer init_recv_priv
Remove function pointer init_recv_priv and use rtl8723bs_init_recv_priv
directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d9576e47920b045d702069fd3167e38d889412e7.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:48 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer free_xmit_priv
Remove function pointer free_xmit_priv and use rtl8723bs_free_xmit_priv
directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/01ee48c459ddda882c7616e6cf257d96429027c2.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:47 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer init_xmit_priv
Remove function pointer init_xmit_priv and use rtl8723bs_init_xmit_priv
directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/322d2412d89ae384365ec1d000bb0fc62128a261.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:46 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer free_hal_data
Remove function pointer free_hal_data and function rtl8723b_free_hal_data
as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/455b7a4645e6652815020635a7b34e56c2b96423.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:45 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer hal_deinit
Remove function pointer hal_deinit and use rtl8723bs_hal_deinit directly
to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b0acbbdc372e01baabd1d98f824bc2a3c6c4c600.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 5 Oct 2024 20:33:44 +0000 (22:33 +0200)]
staging: rtl8723bs: Remove function pointer hal_init
Remove function pointer hal_init and use rtl8723bs_hal_init directly to
increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5c838981141aad1275cbcbe862ac7885de9bb8e9.1727966761.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Harris [Sat, 28 Sep 2024 02:53:36 +0000 (19:53 -0700)]
Staging: rtl8723bs: hal: odm: removed unnecessary braces
Removed unnecessary braces.
Signed-off-by: Michael Harris <michaelharriscode@gmail.com>
Link: https://lore.kernel.org/r/20240928025336.55940-1-michaelharriscode@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:31 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused enum with first entry IFACE_PORT0
Remove unused enum with first entry IFACE_PORT0.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ff820d921ba3e3cd777d76213f39d8a1ad93f7f9.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:30 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove constant result macro get_iface_type
Remove macro get_iface_type that returns always false to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/d382321bdd67fdce0ec2357920f67b5dd81ef426.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:29 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove constant result macro is_primary_adapter
Remove macro is_primary_adapter that returns always true to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/72673acf8b0ada07530b0cb3705cde4cda5e752b.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:28 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function rtl8723bs_inirp_deinit
Remove unused function rtl8723bs_inirp_deinit and belonging unused
function pointer in struct hal_ops inirp_deinit.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/dc6d35602d44cc676bebbd6d84733ea5420ac3f3.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:27 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function rtl8723bs_inirp_init
Remove unused function rtl8723bs_inirp_init and belonging unused
function pointer in struct hal_ops inirp_init.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/617f5fe59abf5f44c70566db60cc624e304c678f.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:26 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function GetHalODMVar
Remove unused function GetHalODMVar.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/f6f589189a72a55d3a57bd37299929c307f31b4f.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:25 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function rtl8723b_GetHalODMVar
Remove unused function rtl8723b_GetHalODMVar and belonging unused
function pointer in struct hal_ops GetHalODMVarHandler.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/3837617badf7c81b2914074b56c5064276eb1946.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:24 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function Hal_BT_EfusePowerSwitch
Remove unused function Hal_BT_EfusePowerSwitch and belonging unused
function pointer in struct hal_ops BTEfusePowerSwitch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/2768736f969eaf935df1492ffd5afd98b05db11e.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:23 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function PHY_GetTxPowerLevel8723B
Remove unused function PHY_GetTxPowerLevel8723B and belonging unused
function pointer in struct hal_ops get_tx_power_level_handler.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/65e86a58b513c580325fe93cc47a114f51437eea.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:22 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function PHY_SetBWMode8723B
Remove unused function PHY_SetBWMode8723B and belonging unused function
pointer in struct hal_ops set_bwmode_handler.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/4f3a76bce3dc309a179e588d184765e54816d3d9.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:21 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused entries from struct hal_ops
Remove unused function pointers from struct hal_ops.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/d4c1f7b6765ec246c797f4d0ac4d429fe6826180.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:20 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function _ReadCAM
Remove unused function _ReadCAM.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/f8ce4d176c2aa1d312183263658c4683a23a1e4c.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:19 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function rtw_get_oper_bw
Remove unused function rtw_get_oper_bw.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/5918320008abc9a14c00fd61f00b40f35f1a5bef.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:18 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function rtw_get_oper_choffset
Remove unused function rtw_get_oper_choffset.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/23623deed7bb225c614693d9b871e2d6f49744a0.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:17 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function read_cam
Remove unused function read_cam.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/a4d6cce804f23d4ac8267a572d168356bc7e84ed.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:16 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function rtw_search_max_mac_id
Remove unused function rtw_search_max_mac_id.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/34c5f2ef44641c5151dde12b161d3f0aa963de5c.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 15 Sep 2024 06:38:15 +0000 (08:38 +0200)]
staging: rtl8723bs: Remove unused function dvobj_get_port0_adapter
Remove unused function dvobj_get_port0_adapter.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/11091c00a57600a79a623f92ca8435034f0dfb3c.1726339782.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Abhishek Tamboli [Sat, 14 Sep 2024 18:49:35 +0000 (00:19 +0530)]
staging: octeon: Use new initialization api for tasklet
Use the new api DECLARE_TASKLET instead of DECLARE_TASKLET_OLD
introduced in commit
12cc923f1ccc ("tasklet: Introduce new
initialization API").
This change updates the tasklet initialization
process without introducing any functional changes,
ensuring the code aligns with the new API.
Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
Link: https://lore.kernel.org/r/20240914184935.848999-1-abhishektamboli9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 9 Oct 2024 09:25:27 +0000 (11:25 +0200)]
Merge wireless-next into staging-next
This merges up to commit
a0efa2f362a6 ("Merge net-next/main to resolve
conflicts") from wireless-next into the staging-next branch to handle
the removal of a staging driver easier (it happened in the wireless-next
branch). That way we don't have developers confused and start
submitting changes for this driver that is now deleted.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Berg [Wed, 9 Oct 2024 06:59:14 +0000 (08:59 +0200)]
Merge net-next/main to resolve conflicts
The wireless-next tree was based on something older, and there
are now conflicts between -rc2 and work here. Merge net-next,
which has enough of -rc2 for the conflicts to happen, resolving
them in the process.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 9 Oct 2024 06:33:05 +0000 (08:33 +0200)]
Revert "wifi: cfg80211: unexport wireless_nlevent_flush()"
Revert this, I neglected to take into account the fact that
cfg80211 itself can be a module, but wext is always builtin.
Fixes:
aee809aaa2d1 ("wifi: cfg80211: unexport wireless_nlevent_flush()")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tarun Alle [Mon, 7 Oct 2024 06:39:43 +0000 (12:09 +0530)]
net: phy: microchip_t1: SQI support for LAN887x
Add support for measuring Signal Quality Index for LAN887x T1 PHY.
Signal Quality Index (SQI) is measure of Link Channel Quality from
0 to 7, with 7 as the best. By default, a link loss event shall
indicate an SQI of 0.
Signed-off-by: Tarun Alle <Tarun.Alle@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241007063943.3233-1-tarun.alle@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jakub Kicinski [Wed, 9 Oct 2024 01:18:21 +0000 (18:18 -0700)]
Merge branch 'net-phy-marvell-88q2xxx-enable-auto-negotiation-for-mv88q2110'
Niklas Söderlund says:
====================
net: phy: marvell-88q2xxx: Enable auto negotiation for mv88q2110
This series enables auto negotiation for the mv88q2110 device.
Previously this feature have been disabled for mv88q2110, while enabled
for other devices supported by this driver.
The initial driver implementation states this is due to the
configuration sequence provided by the vendor did not work. By comparing
the initialization sequence of other devices this driver supports and
the out-of-tree PHY driver for mv88q2110 found in the Renesas BSP [1]
I was able to figure out a working configuration.
As I have no access to the datasheets of either of these devices it
would be super if someone who has could sanity check the initialization
sequence.
With this series I'm able to auto negotiate both 1000Mbps and 100Mbps
links without issue.
# ethtool eth0
Settings for eth0:
Supported ports: [ ]
Supported link modes: 100baseT1/Full
1000baseT1/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT1/Full
1000baseT1/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 100baseT1/Full
1000baseT1/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred master
master-slave status: slave
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Link detected: yes
SQI: 15/15
And the performance is good too. Without this change I was not able to
manually configure a 1000Mbps link, only 100Mbps ones. So this gives a
huge performance boost for my use-case.
[ 5] local 10.1.0.2 port 5201 connected to 10.1.0.1 port 38346
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 96.8 MBytes 812 Mbits/sec 0 469 KBytes
[ 5] 1.00-2.00 sec 94.3 MBytes 791 Mbits/sec 0 469 KBytes
[ 5] 2.00-3.00 sec 96.1 MBytes 806 Mbits/sec 0 469 KBytes
[ 5] 3.00-4.00 sec 98.3 MBytes 825 Mbits/sec 0 469 KBytes
[ 5] 4.00-5.00 sec 98.4 MBytes 825 Mbits/sec 0 469 KBytes
[ 5] 5.00-6.00 sec 98.4 MBytes 826 Mbits/sec 0 469 KBytes
[ 5] 6.00-7.00 sec 98.9 MBytes 830 Mbits/sec 0 469 KBytes
[ 5] 7.00-8.00 sec 91.7 MBytes 769 Mbits/sec 0 469 KBytes
[ 5] 8.00-9.00 sec 99.4 MBytes 834 Mbits/sec 0 747 KBytes
[ 5] 9.00-10.00 sec 101 MBytes 851 Mbits/sec 0 747 KBytes
Patch 1/3 and 2/3 are preparation patches that align and move functions
around as the mv88q2110 code paths can now reuses much of what is done
for mv88q2220. While patch 3/3 adds the new initialization sequence and
removes the auto negotiation limit for mv88q2110.
1. https://github.com/renesas-rcar/linux-bsp/commit/
2a1f07d0e722a18188cfe62842b61f2fbc0ba812
====================
Link: https://patch.msgid.link/20241005112412.544360-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Niklas Söderlund [Sat, 5 Oct 2024 11:24:12 +0000 (13:24 +0200)]
net: phy: marvell-88q2xxx: Enable auto negotiation for mv88q2110
The initial marvell-88q2xxx driver only supported the Marvell 88Q2110
PHY without auto negotiation support. The reason documented states that
the provided initialization sequence did not to work. Now a method to
enable auto negotiation have been found by comparing the initialization
of other supported devices and an out-of-tree PHY driver.
Perform the minimal needed initialization of the PHY to get auto
negotiation working and remove the limitation that disables the auto
negotiation feature for the mv88q2110 device.
With this change a 1000Mbps full duplex link is able to be negotiated
between two mv88q2110 and the link works perfectly. The other side also
reflects the manually configure settings of the master device.
# ethtool eth0
Settings for eth0:
Supported ports: [ ]
Supported link modes: 100baseT1/Full
1000baseT1/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT1/Full
1000baseT1/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 100baseT1/Full
1000baseT1/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred master
master-slave status: slave
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Link detected: yes
SQI: 15/15
Before this change I was not able to manually configure 1000Mbps link,
only a 100Mpps link so this change providers an improvement in
performance for this device.
[ 5] local 10.1.0.2 port 5201 connected to 10.1.0.1 port 38346
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 96.8 MBytes 812 Mbits/sec 0 469 KBytes
[ 5] 1.00-2.00 sec 94.3 MBytes 791 Mbits/sec 0 469 KBytes
[ 5] 2.00-3.00 sec 96.1 MBytes 806 Mbits/sec 0 469 KBytes
[ 5] 3.00-4.00 sec 98.3 MBytes 825 Mbits/sec 0 469 KBytes
[ 5] 4.00-5.00 sec 98.4 MBytes 825 Mbits/sec 0 469 KBytes
[ 5] 5.00-6.00 sec 98.4 MBytes 826 Mbits/sec 0 469 KBytes
[ 5] 6.00-7.00 sec 98.9 MBytes 830 Mbits/sec 0 469 KBytes
[ 5] 7.00-8.00 sec 91.7 MBytes 769 Mbits/sec 0 469 KBytes
[ 5] 8.00-9.00 sec 99.4 MBytes 834 Mbits/sec 0 747 KBytes
[ 5] 9.00-10.00 sec 101 MBytes 851 Mbits/sec 0 747 KBytes
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Stefan Eichenberger <eichest@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241005112412.544360-4-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Niklas Söderlund [Sat, 5 Oct 2024 11:24:11 +0000 (13:24 +0200)]
net: phy: marvell-88q2xxx: Make register writer function generic
In preparation to adding auto negotiation support to mv88q2110 move and
rename the helper function used to write an array of register values to
the PHY.
Just as for mv88q2220 devices this helper will be needed to for the
initial configuration of the mv88q2110 to support auto negotiation.
The function is moved verbatim, there is no change in behavior.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Dimitri Fedrau <dima.fedrau@gmail.com>
Tested-by: Stefan Eichenberger <eichest@gmail.com>
Link: https://patch.msgid.link/20241005112412.544360-3-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Niklas Söderlund [Sat, 5 Oct 2024 11:24:10 +0000 (13:24 +0200)]
net: phy: marvell-88q2xxx: Align soft reset for mv88q2110 and mv88q2220
The soft reset implementations for mv88q2110 and mv88q2220 differ as the
later need to consider that auto negation is supported on mv88q2220
devices. In preparation of enabling auto negotiation on mv88q2110 merge
the two rest functions into a device generic one.
The mv88q2220 behavior is kept as is but extended to wait for the reset
bit to be clears before continuing, as was done previously on mv88q2220.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Dimitri Fedrau <dima.fedrau@gmail.com>
Tested-by: Stefan Eichenberger <eichest@gmail.com>
Link: https://patch.msgid.link/20241005112412.544360-2-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Andrew Kreimer [Sun, 6 Oct 2024 13:08:29 +0000 (16:08 +0300)]
fsl/fman: Fix a typo
Fix a typo in comments: bellow -> below.
Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241006130829.13967-1-algonell@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Daniel Golle [Fri, 4 Oct 2024 16:18:16 +0000 (17:18 +0100)]
net: phy: aquantia: allow forcing order of MDI pairs
Despite supporting Auto MDI-X, it looks like Aquantia only supports
swapping pair (1,2) with pair (3,6) like it used to be for MDI-X on
100MBit/s networks.
When all 4 pairs are in use (for 1000MBit/s or faster) the link does not
come up with pair order is not configured correctly, either using
MDI_CFG pin or using the "PMA Receive Reserved Vendor Provisioning 1"
register.
Normally, the order of MDI pairs being either ABCD or DCBA is configured
by pulling the MDI_CFG pin.
However, some hardware designs require overriding the value configured
by that bootstrap pin. The PHY allows doing that by setting a bit in
"PMA Receive Reserved Vendor Provisioning 1" register which allows
ignoring the state of the MDI_CFG pin and another bit configuring
whether the order of MDI pairs should be normal (ABCD) or reverse
(DCBA). Pair polarity is not affected and remains identical in both
settings.
Introduce property "marvell,mdi-cfg-order" which allows forcing either
normal or reverse order of the MDI pairs from DT.
If the property isn't present, the behavior is unchanged and MDI pair
order configuration is untouched (ie. either the result of MDI_CFG pin
pull-up/pull-down, or pair order override already configured by the
bootloader before Linux is started).
Forcing normal pair order is required on the Adtran SDG-8733A Wi-Fi 7
residential gateway.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/9ed760ff87d5fc456f31e407ead548bbb754497d.1728058550.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Daniel Golle [Fri, 4 Oct 2024 16:18:05 +0000 (17:18 +0100)]
dt-bindings: net: marvell,aquantia: add property to override MDI_CFG
Usually the MDI pair order reversal configuration is defined by
bootstrap pin MDI_CFG. Some designs, however, require overriding the MDI
pair order and force either normal or reverse order.
Add property 'marvell,mdi-cfg-order' to allow forcing either normal or
reverse order of the MDI pairs.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/7ccf25d6d7859f1ce9983c81a2051cfdfb0e0a99.1728058550.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jakub Kicinski [Tue, 8 Oct 2024 22:37:26 +0000 (15:37 -0700)]
Merge branch 'selftests-mlxsw-stabilize-red-tests'
Petr Machata says:
====================
selftests: mlxsw: Stabilize RED tests
Tweak the mlxsw-specific RED selftests to increase stability on
Spectrum-3 and Spectrum-4 machines.
====================
Link: https://patch.msgid.link/cover.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Petr Machata [Mon, 7 Oct 2024 16:26:09 +0000 (18:26 +0200)]
selftests: mlxsw: sch_red_core: Lower TBF rate
The RED test uses a pair of TBF shapers. The first to get predictably-sized
stream of traffic, and second to get a 100% saturated chokepoint. To this
chokepoint it injects individual packets. Because the chokepoint is
saturated, these additional packets go straight to the backlog. This allows
the test to check RED behavior across various queue sizes.
The shapers are rated at 1Gbps, for historical reasons (before mlxsw
supported TBF offload, the test used port speed to create the chokepoints).
Machines with a low-power CPU may have trouble consistently generating
1Gbps of traffic, and the test then spuriously fails.
Instead, drop the rate to 200Mbps (Spectrum has a guaranteed shaper rate
granularity of 200Mbps, so anything lower is not guaranteed to work well).
Because that means fewer packets will be mirrored in the ECN-mark test,
adjust the passing condition accordingly.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/c6712f9c5de75ae0bc2ab3d8ea7d92aaaf93af95.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Petr Machata [Mon, 7 Oct 2024 16:26:08 +0000 (18:26 +0200)]
selftests: mlxsw: sch_red_core: Send more packets for drop tests
This test works by injecting into a port with a maxed-out queue a couple
packets and checks if a corresponding number of packets were dropped. This
has worked well on Spectrum<4, but on Spectrum-4 it has been noisy. This
is in line with the observation that on Spectrum-4, queue size tends to
fluctuate more. A handful of packets could then still be accepted to the
queue even though it was nominally full just recently.
In order to accommodate this behavior, send many more packets. The buffer
can fit N extra packets, but not N% packets. This therefore allows us to
set wider absolute margins, while actually narrowing them relatively.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/abc869b9f6003d400d6293ddd5edb2f4517f44d5.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Petr Machata [Mon, 7 Oct 2024 16:26:07 +0000 (18:26 +0200)]
selftests: mlxsw: sch_red_core: Sleep before querying queue depth
The qdisc stats are taken from the port's periodic HW stats, which are
updated once a second. We try to accommodate the latency by using busywait
in build_backlog().
The issue in that seems to be that when do_mark_test() builds the backlog,
it makes the decision whether to send more packets based on the first
instance of the queue depth stat exceeding the current value, when in fact
more traffic is on the way and the queue depth would increase further. This
leads to failures in TC 1 of mark-mirror test, where we see the following
failure:
TEST: TC 0: marked packets mirror'd [ OK ]
TEST: TC 1: marked packets mirror'd [FAIL]
Spurious packets (1680 -> 2290) observed without buffer pressure
Fix by waiting for the full second before reading the queue depth for the
first time, to make sure it reflects all in-flight traffic.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Link: https://patch.msgid.link/321dcf8b3e9a1f0766429c8cf3e3f1746f1bc375.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Petr Machata [Mon, 7 Oct 2024 16:26:06 +0000 (18:26 +0200)]
selftests: mlxsw: sch_red_core: Increase backlog size tolerance
Backlog fluctuates on Spectrum-4 much more than on <4. In practice we can
sample queue depth values going from about -12% to about +7% of the
configured RED limit. The test which checks the queue size has a limit of
+-10%, and as a result often fails. We attempted to fix the issue by
busywaiting for several seconds hoping to get within the bounds, but that
still proved to be too noisy (or the wait time would be impractically
long). Unfortunately we have to bump the value tolerance from 10% to 15%,
which in this patch do.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Link: https://patch.msgid.link/f54950df2a8fcba46c3ddc1053376352fa2e592b.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Petr Machata [Mon, 7 Oct 2024 16:26:05 +0000 (18:26 +0200)]
selftests: mlxsw: sch_red_ets: Increase required backlog
Backlog fluctuates on Spectrum-4 much more than on <4. Increasing the
desired backlog seems to help, as the constant fluctuations do not overlap
into the territory where packets are marked.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Link: https://patch.msgid.link/0821fb3aa8bb6a6c0d3000baab04995517c9a0cc.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Bartosz Golaszewski [Mon, 7 Oct 2024 13:41:00 +0000 (15:41 +0200)]
net: phy: smsc: use devm_clk_get_optional_enabled_with_rate()
Fold the separate call to clk_set_rate() into the clock getter.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241007134100.107921-1-brgl@bgdev.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Dr. David Alan Gilbert [Mon, 7 Oct 2024 00:46:52 +0000 (01:46 +0100)]
chelsio/chtls: Remove unused chtls_set_tcb_tflag
chtls_set_tcb_tflag() has been unused since 2021's commit
827d329105bf ("chtls: Remove invalid set_tcb call")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241007004652.150065-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Dr. David Alan Gilbert [Mon, 7 Oct 2024 00:44:56 +0000 (01:44 +0100)]
caif: Remove unused cfsrvl_getphyid
cfsrvl_getphyid() has been unused since 2011's commit
f36214408470 ("caif: Use RCU and lists in cfcnfg.c for managing caif link layers")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241007004456.149899-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Jason Xing [Sat, 5 Oct 2024 22:26:09 +0000 (07:26 +0900)]
net-timestamp: namespacify the sysctl_tstamp_allow_data
Let it be tuned in per netns by admins.
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20241005222609.94980-1-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Aryan Srivastava [Sun, 6 Oct 2024 21:29:05 +0000 (10:29 +1300)]
net: dsa: mv88e6xxx: Add FID map cache
Add a cached FID bitmap. This mitigates the need to walk all VTU entries
to find the next free FID.
When flushing the VTU (during init), zero the FID bitmap. Use and
manipulate this bitmap from now on, instead of reading HW for the FID
map.
The repeated VTU walks are costly and can take ~40 mins if ~4000 vlans
are added. Caching the FID map reduces this time to <2 mins.
Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241006212905.3142976-1-aryan.srivastava@alliedtelesis.co.nz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Johannes Berg [Mon, 7 Oct 2024 20:00:03 +0000 (22:00 +0200)]
wireless: wext: shorten struct iw_ioctl_description
There's no need for "future" extensions in an internal
struct, and we don't need a u32 for flags, use just a
u8. Also remove the unused IW_DESCR_FLAG_WAIT flag.
Link: https://patch.msgid.link/20241007220003.309bd52fa763.I9a1229fa7f2be53d4f50e63671ed441d0968bb41@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 19:50:25 +0000 (21:50 +0200)]
wifi: wext: merge adjacent CONFIG_COMPAT ifdef blocks
Simplify this, and also add a comment at the #endif.
Link: https://patch.msgid.link/20241007215025.5ecdad1e02ed.I54efa895efc496e06ba41e1c39c9df9e23b0171f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 19:47:16 +0000 (21:47 +0200)]
wifi: cfg80211: unexport wireless_nlevent_flush()
This no longer needs to be exported, so don't export it.
Link: https://patch.msgid.link/20241007214715.3dd736dc3ac0.I1388536e99c37f28a007dd753c473ad21513d9a9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 19:35:25 +0000 (21:35 +0200)]
wifi: remove iw_public_data from struct net_device
Given the previous patches, we no longer need the
struct iw_public_data etc., it's only used by the
old Intel drivers (and ps3_gelic creates it but
then doesn't use it). Remove all of that, including
the pointer in struct net_device.
Link: https://patch.msgid.link/20241007213525.8b2d52b60531.I6a27aaf30bded9a0977f07f47fba2bd31a3b3330@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 19:14:30 +0000 (21:14 +0200)]
wifi: cfg80211: stop exporting wext symbols
CFG80211_WEXT_EXPORT is no longer needed, if we only make
ipw2200 return the static name for SIOCGIWNAME itself.
Link: https://patch.msgid.link/20241007211431.8d4a7242ce92.I66ceb885ddfa52c368feeea1ea884bf988c525f2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 19:02:53 +0000 (21:02 +0200)]
wifi: wext/libipw: move spy implementation to libipw
There's no driver left using this other than ipw2200,
so move the data bookkeeping and code into libipw.
Link: https://patch.msgid.link/20241007210254.037d864cda7d.Ib2197cb056ff05746d3521a5fba637062acb7314@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 18:26:56 +0000 (20:26 +0200)]
staging: don't recommend using lib80211
No longer document drivers should switch to lib80211,
they really should never have done that. While at it,
also remove the recommendation to use cfg80211, if it
switches to mac80211 then it implicitly uses cfg80211
but doesn't need to do anything about that, normally.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20241007202707.87481ddcfc00.I2cfb9940807e9c5017a052efcd3d1f2b6dc15fb1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 18:26:55 +0000 (20:26 +0200)]
wifi: ipw2x00/lib80211: move remaining lib80211 into libipw
There's already much code in libipw that used to be shared
with more drivers, but now with the prior cleanups, those old
Intel ipw2x00 drivers are also the only ones using whatever is
now left of lib80211. Move lib80211 entirely into libipw.
Link: https://patch.msgid.link/20241007202707.915ef7b9e7c7.Ib9876d2fe3c90f11d6df458b16d0b7d4bf551a8d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 18:26:54 +0000 (20:26 +0200)]
staging: rtl8192e: delete the driver
This driver is using lib80211 and any driver that plans to ever
leave staging should never have done that, so remove the driver
to enable cleaning up lib80211 into libipw inside the old Intel
drivers.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20241007202707.d0e59cdd2cdc.I8e4d74a6e1d09eefe1f5e2e208735ba2ccef1d4f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 18:26:53 +0000 (20:26 +0200)]
wifi: libertas: don't select/include lib80211
This isn't used in this driver, and should't be, so
remove the include as well as the select.
Link: https://patch.msgid.link/20241007202706.f8a6dd67f650.I74bc1f334c02043a238303d3e71c955d0d9b01b0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 18:26:52 +0000 (20:26 +0200)]
wifi: mwifiex: don't include lib80211.h
This really should never have been used, it's ancient code,
but then the driver needs its own define for NUM_WEP_KEYS.
Link: https://patch.msgid.link/20241007202706.74be9cca3eb8.I47b2e8e2d09c0a0be1f8346478d3d908b4021abd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 7 Oct 2024 18:26:51 +0000 (20:26 +0200)]
wifi: qtnfmac: don't include lib80211.h
This driver doesn't use it, and really can't, so don't
include lib80211.h.
Link: https://patch.msgid.link/20241007202706.d92615cbf659.I2dc8ea3df0760121dc202616bdf3942caf51b232@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Dmitry Kandybka [Thu, 3 Oct 2024 09:59:12 +0000 (12:59 +0300)]
wifi: nl80211: remove redundant null pointer check in coalescing
In 'cfg80211_free_coalesce', '&coalesce->rules[i]' is a pointer
to VLA member of 'struct cfg80211_coalesce' and should never be NULL,
so redundant check may be dropped.
I think this is correct, but I haven't tested it seriously.
Compile tested only.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com>
Link: https://patch.msgid.link/20241003095912.218465-1-d.kandybka@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Julia Lawall [Mon, 30 Sep 2024 11:21:13 +0000 (13:21 +0200)]
mac80211: Reorganize kerneldoc parameter names
Reorganize kerneldoc parameter names to match the parameter
order in the function header.
Problems identified using Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://patch.msgid.link/20240930112121.95324-28-Julia.Lawall@inria.fr
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Karthikeyan Periyasamy [Tue, 17 Sep 2024 14:02:39 +0000 (19:32 +0530)]
wifi: cfg80211: check radio iface combination for multi radio per wiphy
Currently, wiphy_verify_combinations() fails for the multi-radio per wiphy
due to the condition check on new global interface combination that DFS
only works on one channel. In a multi-radio scenario, new global interface
combination encompasses the capabilities of all radio combinations, so it
supports more than one channel with DFS. For multi-radio per wiphy,
interface combination verification needs to be performed for radio specific
interface combinations. This is necessary as the new global interface
combination combines the capabilities of all radio combinations.
Fixes:
a01b1e9f9955 ("wifi: mac80211: add support for DFS with multiple radios")
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Link: https://patch.msgid.link/20240917140239.886083-1-quic_periyasa@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Dmitry Antipov [Fri, 13 Sep 2024 08:49:19 +0000 (11:49 +0300)]
wifi: mac80211, cfg80211: miscellaneous spelling fixes
Correct spelling here and there as suggested by codespell.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20240913084919.118862-1-dmantipov@yandex.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jeff Johnson [Tue, 10 Sep 2024 20:40:03 +0000 (13:40 -0700)]
wifi: mac80211: constify ieee80211_ie_build_{he,eht}_oper() chandef
The chandef parameter passed to ieee80211_ie_build_he_oper() and
ieee80211_ie_build_eht_oper is read-only. Since it is never modified,
add the const qualifier to this parameter. This makes these consistent
with ieee80211_ie_build_ht_oper() and ieee80211_ie_build_vht_oper().
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://patch.msgid.link/20240910-wireless-utils-constify-v1-1-e59947bcb3c3@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jakub Kicinski [Mon, 7 Oct 2024 15:53:11 +0000 (08:53 -0700)]
tools: ynl-gen: refactor check validation for TypeBinary
We only support a single check at a time for TypeBinary.
Refactor the code to cover 'exact-len' and make adding
new checks easier.
Link: https://lore.kernel.org/20241004063855.1a693dd1@kernel.org
Link: https://patch.msgid.link/20241007155311.1193382-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Joe Damato [Fri, 4 Oct 2024 10:54:07 +0000 (10:54 +0000)]
idpf: Don't hard code napi_struct size
The sizeof(struct napi_struct) can change. Don't hardcode the size to
400 bytes and instead use "sizeof(struct napi_struct)".
Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Joe Damato <jdamato@fastly.com>
Acked-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/20241004105407.73585-1-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Paolo Abeni [Tue, 8 Oct 2024 13:17:01 +0000 (15:17 +0200)]
Merge branch 'rtnetlink-per-netns-rtnl'
Kuniyuki Iwashima says:
====================
rtnetlink: Per-netns RTNL.
rtnl_lock() is a "Big Kernel Lock" in the networking slow path and
serialised all rtnetlink requests until 4.13.
Since RTNL_FLAG_DOIT_UNLOCKED and RTNL_FLAG_DUMP_UNLOCKED have been
introduced in 4.14 and 6.9, respectively, rtnetlink message handlers
are ready to be converted to RTNL-less/free.
15 out of 44 dumpit()s have been converted to RCU so far, and the
progress is pretty good. We can now dump various major network
resources without RTNL.
12 out of 87 doit()s have been converted, but most of the converted
doit()s are also on the reader side of RTNL; their message types are
RTM_GET*.
So, most of RTM_(NEW|DEL|SET)* operations are still serialised by RTNL.
For example, one of our services creates 2K netns and a small number
of network interfaces in each netns that require too many writer-side
rtnetlink requests, and setting up a single host takes 10+ minutes.
RTNL is still a huge pain for network configuration paths, and we need
more granular locking, given converting all doit()s would be unfeasible.
Actually, most RTNL users do not need to freeze multiple netns, and such
users can be protected by per-netns RTNL mutex. The exceptions would be
RTM_NEWLINK, RTM_DELLINK, and RTM_SETLINK. (See [0] and [1])
This series is the first step of the per-netns RTNL conversion that
gradually replaces rtnl_lock() with rtnl_net_lock(net) under
CONFIG_DEBUG_NET_SMALL_RTNL.
[0]: https://netdev.bots.linux.dev/netconf/2024/index.html
[1]: https://lpc.events/event/18/contributions/1959/
====================
Link: https://patch.msgid.link/20241004221031.77743-1-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Kuniyuki Iwashima [Fri, 4 Oct 2024 22:10:31 +0000 (15:10 -0700)]
rtnetlink: Add ASSERT_RTNL_NET() placeholder for netdev notifier.
The global and per-netns netdev notifier depend on RTNL, and its
dependency is not so clear due to nested calls.
Let's add a placeholder to place ASSERT_RTNL_NET() for each event.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Kuniyuki Iwashima [Fri, 4 Oct 2024 22:10:30 +0000 (15:10 -0700)]
rtnetlink: Add assertion helpers for per-netns RTNL.
Once an RTNL scope is converted with rtnl_net_lock(), we will replace
RTNL helper functions inside the scope with the following per-netns
alternatives:
ASSERT_RTNL() -> ASSERT_RTNL_NET(net)
rcu_dereference_rtnl(p) -> rcu_dereference_rtnl_net(net, p)
Note that the per-netns helpers are equivalent to the conventional
helpers unless CONFIG_DEBUG_NET_SMALL_RTNL is enabled.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>