This is useful for switchdev drivers who are offloading MST states into hardware. As an example, a driver may wish to flush the FDB for a port when it transitions from forwarding to blocking - which means that the previous state must be discoverable.
Showing the changes to include (1 of 2 files). Show all
Unified · Split
| @@ -121,6 +121,7 @@ int br_vlan_get_info_rcu(const struct net_device *dev, u16 vid, · 120 unmodified lines | |||
| 121 | struct bridge_vlan_info *p_vinfo); | 121 | struct bridge_vlan_info *p_vinfo); |
| 122 | bool br_mst_enabled(const struct net_device *dev); | 122 | bool br_mst_enabled(const struct net_device *dev); |
| 123 | int br_mst_get_info(const struct net_device *dev, u16 msti, unsigned long *vids); | 123 | int br_mst_get_info(const struct net_device *dev, u16 msti, unsigned long *vids); |
| 124 | int br_mst_get_state(const struct net_device *dev, u16 msti, u8 *state); | ||
| 124 | #else | 125 | #else |
| 125 | static inline bool br_vlan_enabled(const struct net_device *dev) | 126 | static inline bool br_vlan_enabled(const struct net_device *dev) |
| 126 | { | 127 | { |
| @@ -164,6 +165,11 @@ static inline int br_mst_get_info(const struct net_device *dev, u16 msti, · 37 unmodified lines | |||
| 164 | { | 165 | { |
| 165 | return -EINVAL; | 166 | return -EINVAL; |
| 166 | } | 167 | } |
| 168 | static inline int br_mst_get_state(const struct net_device *dev, u16 msti, | ||
| 169 | u8 *state) | ||
| 170 | { | ||
| 171 | return -EINVAL; | ||
| 172 | } | ||
| 167 | #endif | 173 | #endif |
| 168 | 174 | ||
| 169 | #if IS_ENABLED(CONFIG_BRIDGE) | 175 | #if IS_ENABLED(CONFIG_BRIDGE) |