]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: mscc: ocelot: split xmit into FDMA and register injection paths
authorZiyi Guo <n7l8m4@u.northwestern.edu>
Sun, 8 Feb 2026 22:56:01 +0000 (22:56 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 13 Feb 2026 03:01:15 +0000 (19:01 -0800)
commit47f79b20e7fb885aa1623b759a68e8e27401ec4d
treea65c4d77ad9e066af4031d8fd1bb23bdd5856d7e
parent29372f07f7969a2f0490793226ecf6c8c6bde0fa
net: mscc: ocelot: split xmit into FDMA and register injection paths

Split ocelot_port_xmit() into two separate functions:
- ocelot_port_xmit_fdma(): handles the FDMA injection path
- ocelot_port_xmit_inj(): handles the register-based injection path

The top-level ocelot_port_xmit() now dispatches to the appropriate
function based on the ocelot_fdma_enabled static key.

This is a pure refactor with no behavioral change. Separating the two
code paths makes each one simpler and prepares for adding proper locking
to the register injection path without affecting the FDMA path.

Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20260208225602.1339325-3-n7l8m4@u.northwestern.edu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mscc/ocelot_net.c