summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/qca/qca8k.h
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-07-27 13:35:18 +0200
committerJakub Kicinski <kuba@kernel.org>2022-07-29 07:24:39 +0200
commitb3a302b171f73425b41de8d3357fae3fa7057322 (patch)
tree1305825812caaa3853425d108407124998ececb8 /drivers/net/dsa/qca/qca8k.h
parentnet: dsa: qca8k: move bridge functions to common code (diff)
downloadlinux-b3a302b171f73425b41de8d3357fae3fa7057322.tar.xz
linux-b3a302b171f73425b41de8d3357fae3fa7057322.zip
net: dsa: qca8k: move set age/MTU/port enable/disable functions to common code
The same set age, MTU and port enable/disable function are used by driver based on qca8k family switch. Move them to common code to make them accessible also by other drivers. While at it also drop unnecessary qca8k_priv cast for void pointers. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/dsa/qca/qca8k.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/dsa/qca/qca8k.h b/drivers/net/dsa/qca/qca8k.h
index edb2b23a02b9..e7d4df253b8c 100644
--- a/drivers/net/dsa/qca/qca8k.h
+++ b/drivers/net/dsa/qca/qca8k.h
@@ -463,4 +463,16 @@ int qca8k_port_bridge_join(struct dsa_switch *ds, int port,
void qca8k_port_bridge_leave(struct dsa_switch *ds, int port,
struct dsa_bridge bridge);
+/* Common port enable/disable function */
+int qca8k_port_enable(struct dsa_switch *ds, int port,
+ struct phy_device *phy);
+void qca8k_port_disable(struct dsa_switch *ds, int port);
+
+/* Common MTU function */
+int qca8k_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu);
+int qca8k_port_max_mtu(struct dsa_switch *ds, int port);
+
+/* Common fast age function */
+int qca8k_set_ageing_time(struct dsa_switch *ds, unsigned int msecs);
+
#endif /* __QCA8K_H */