From 462a088c474832b19ff2730de1e6bea66d399c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 15 Oct 2022 23:01:29 +0200 Subject: Add Turris kernel (includes patches from OpenWrt) --- ...a-support-use-of-phylink_generic_validate.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/patches-linux-5.15/781-v5.17-4-net-dsa-support-use-of-phylink_generic_validate.patch (limited to 'pkgs/patches-linux-5.15/781-v5.17-4-net-dsa-support-use-of-phylink_generic_validate.patch') diff --git a/pkgs/patches-linux-5.15/781-v5.17-4-net-dsa-support-use-of-phylink_generic_validate.patch b/pkgs/patches-linux-5.15/781-v5.17-4-net-dsa-support-use-of-phylink_generic_validate.patch new file mode 100644 index 0000000..6720e55 --- /dev/null +++ b/pkgs/patches-linux-5.15/781-v5.17-4-net-dsa-support-use-of-phylink_generic_validate.patch @@ -0,0 +1,46 @@ +From 3943c373f8848128218a8cceba63511ffcc09a9d Mon Sep 17 00:00:00 2001 +From: "Russell King (Oracle)" +Date: Tue, 30 Nov 2021 13:10:06 +0000 +Subject: [PATCH 4/6] net: dsa: support use of phylink_generic_validate() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Support the use of phylink_generic_validate() when there is no +phylink_validate method given in the DSA switch operations and +mac_capabilities have been set in the phylink_config structure by the +DSA switch driver. + +This gives DSA switch drivers the option to use this if they provide +the supported_interfaces and mac_capabilities, while still giving them +an option to override the default implementation if necessary. + +Reviewed-by: Vladimir Oltean +Signed-off-by: Russell King (Oracle) +Reviewed-by: Marek BehĂșn +Reviewed-by: Andrew Lunn +Signed-off-by: Jakub Kicinski +--- + net/dsa/port.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/net/dsa/port.c b/net/dsa/port.c +index eed1b5397dc7..371d25606546 100644 +--- a/net/dsa/port.c ++++ b/net/dsa/port.c +@@ -985,8 +985,11 @@ static void dsa_port_phylink_validate(struct phylink_config *config, + struct dsa_port *dp = container_of(config, struct dsa_port, pl_config); + struct dsa_switch *ds = dp->ds; + +- if (!ds->ops->phylink_validate) ++ if (!ds->ops->phylink_validate) { ++ if (config->mac_capabilities) ++ phylink_generic_validate(config, supported, state); + return; ++ } + + ds->ops->phylink_validate(ds, dp->index, supported, state); + } +-- +2.35.1 + -- cgit v1.2.3