linux/include/soc
David Yang ea07514700 net: mscc: ocelot: validate netdev belongs to switch in .netdev_to_port()
The .netdev_to_port() currently takes only a net_device and returns the
port index, without verifying the netdev actually belongs to the switch
being operated on. This can cause flower rule parsing to silently
resolve to a wrong port on the local hardware.

Update both implementations felix_netdev_to_port() and
ocelot_netdev_to_port() to validate ownership. Also update the callers
in ocelot_flower.c to pass through the ocelot context.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://patch.msgid.link/20260606125247.305167-1-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-09 17:54:34 -07:00
..
amlogic reset: amlogic: aux: drop aux registration helper 2025-01-15 17:59:31 +01:00
arc arc: rename aux.h to arc_aux.h 2024-12-10 10:12:56 -08:00
at91 ARM: at91: pm: Remove 2.5V regulator 2025-09-16 16:57:03 +02:00
bcm2835 clk: bcm: rpi: Add disp clock 2025-01-16 13:27:12 -08:00
canaan clk: Add RISC-V Canaan Kendryte K210 clock driver 2021-02-22 17:51:04 -08:00
fsl KEYS: trusted: caam based protected key 2025-10-20 12:10:28 +08:00
imx clk: imx25: print silicon revision during init 2023-08-14 12:41:05 +03:00
mediatek iommu/mediatek: Add enable IOMMU SMC command for INFRA masters 2023-08-07 14:15:48 +02:00
microchip reset: mpfs: add non-auxiliary bus probing 2025-11-11 16:47:24 +00:00
mscc net: mscc: ocelot: validate netdev belongs to switch in .netdev_to_port() 2026-06-09 17:54:34 -07:00
nuvoton reset: npcm: register npcm8xx clock auxiliary bus device 2024-10-17 15:17:51 -07:00
qcom soc: qcom: spmi-pmic: add more PMIC SUBTYPE IDs 2025-07-16 22:58:03 -05:00
rockchip PM / devfreq: rockchip-dfi: add support for LPDDR5 2025-09-09 23:37:39 +09:00
sa1100 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sifive soc: sifive: ccache: Rename SiFive L2 cache to Composable cache. 2022-10-13 11:06:51 -07:00
spacemit clk: spacemit: k3: extract common header 2026-01-09 10:46:25 +08:00
starfive clk: starfive: Avoid casting iomem pointers 2023-04-13 15:45:46 -07:00
tegra firmware: tegra: Changes for v7.1-rc1 2026-04-02 23:13:02 +02:00