net: dsa: microchip: ksz9477: Add Wake on Magic Packet support
[linux-2.6-block.git] / drivers / net / dsa / microchip / ksz_common.h
index 8842efca08719759b4207b90a45f90cb0c2511ec..06996813f9a8efd16a916e7389116a1e9070ce66 100644 (file)
@@ -163,6 +163,7 @@ struct ksz_device {
        phy_interface_t compat_interface;
        bool synclko_125;
        bool synclko_disable;
+       bool wakeup_source;
 
        struct vlan_table *vlan_cache;
 
@@ -373,6 +374,10 @@ struct ksz_dev_ops {
                                    int duplex, bool tx_pause, bool rx_pause);
        void (*setup_rgmii_delay)(struct ksz_device *dev, int port);
        int (*tc_cbs_set_cinc)(struct ksz_device *dev, int port, u32 val);
+       void (*get_wol)(struct ksz_device *dev, int port,
+                       struct ethtool_wolinfo *wol);
+       int (*set_wol)(struct ksz_device *dev, int port,
+                      struct ethtool_wolinfo *wol);
        void (*config_cpu_port)(struct dsa_switch *ds);
        int (*enable_stp_addr)(struct ksz_device *dev);
        int (*reset)(struct ksz_device *dev);
@@ -385,12 +390,16 @@ int ksz_switch_register(struct ksz_device *dev);
 void ksz_switch_remove(struct ksz_device *dev);
 
 void ksz_init_mib_timer(struct ksz_device *dev);
+bool ksz_is_port_mac_global_usable(struct dsa_switch *ds, int port);
 void ksz_r_mib_stats64(struct ksz_device *dev, int port);
 void ksz88xx_r_mib_stats64(struct ksz_device *dev, int port);
 void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state);
 bool ksz_get_gbit(struct ksz_device *dev, int port);
 phy_interface_t ksz_get_xmii(struct ksz_device *dev, int port, bool gbit);
 extern const struct ksz_chip_data ksz_switch_chips[];
+int ksz_switch_macaddr_get(struct dsa_switch *ds, int port,
+                          struct netlink_ext_ack *extack);
+void ksz_switch_macaddr_put(struct dsa_switch *ds);
 
 /* Common register access functions */
 static inline struct regmap *ksz_regmap_8(struct ksz_device *dev)