net: dsa: Add teardown callback for drivers
[platform/kernel/linux-rpi.git] / include / net / dsa.h
index 6852948..82a2baa 100644 (file)
@@ -1,11 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * include/net/dsa.h - Driver for Distributed Switch Architecture switch chips
  * Copyright (c) 2008-2009 Marvell Semiconductor
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
  */
 
 #ifndef __LINUX_NET_DSA_H
@@ -22,6 +18,7 @@
 #include <linux/net_tstamp.h>
 #include <linux/phy.h>
 #include <linux/platform_data/dsa.h>
+#include <linux/phylink.h>
 #include <net/devlink.h>
 #include <net/switchdev.h>
 
@@ -193,6 +190,7 @@ struct dsa_port {
        struct net_device       *bridge_dev;
        struct devlink_port     devlink_port;
        struct phylink          *pl;
+       struct phylink_config   pl_config;
 
        struct work_struct      xmit_work;
        struct sk_buff_head     xmit_queue;
@@ -359,6 +357,7 @@ struct dsa_switch_ops {
                                                  int port);
 
        int     (*setup)(struct dsa_switch *ds);
+       void    (*teardown)(struct dsa_switch *ds);
        u32     (*get_phy_flags)(struct dsa_switch *ds, int port);
 
        /*