net/core: Add event for a change in slave state
[deliverable/linux.git] / net / core / dev.c
index 1d564d68e31a5f361fc233ae90a3a19e82915664..ede0b161b115c10cda6c2e65d307d3c91cc44d5d 100644 (file)
@@ -5355,6 +5355,26 @@ void netdev_upper_dev_unlink(struct net_device *dev,
 }
 EXPORT_SYMBOL(netdev_upper_dev_unlink);
 
+/**
+ * netdev_bonding_info_change - Dispatch event about slave change
+ * @dev: device
+ * @netdev_bonding_info: info to dispatch
+ *
+ * Send NETDEV_BONDING_INFO to netdev notifiers with info.
+ * The caller must hold the RTNL lock.
+ */
+void netdev_bonding_info_change(struct net_device *dev,
+                               struct netdev_bonding_info *bonding_info)
+{
+       struct netdev_notifier_bonding_info     info;
+
+       memcpy(&info.bonding_info, bonding_info,
+              sizeof(struct netdev_bonding_info));
+       call_netdevice_notifiers_info(NETDEV_BONDING_INFO, dev,
+                                     &info.info);
+}
+EXPORT_SYMBOL(netdev_bonding_info_change);
+
 void netdev_adjacent_add_links(struct net_device *dev)
 {
        struct netdev_adjacent *iter;
This page took 0.02902 seconds and 5 git commands to generate.