]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/macvlan.c
tg3: Add 5761S support
[linux-2.6-omap-h63xx.git] / drivers / net / macvlan.c
index efbc15567dd326b61887958f29f2c30f712f0304..1d2de0b77a2c5e0afbdc68ae825c161ae65ac066 100644 (file)
@@ -276,6 +276,7 @@ static int macvlan_change_mtu(struct net_device *dev, int new_mtu)
  * separate class since they always nest.
  */
 static struct lock_class_key macvlan_netdev_xmit_lock_key;
+static struct lock_class_key macvlan_netdev_addr_lock_key;
 
 #define MACVLAN_FEATURES \
        (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \
@@ -295,6 +296,8 @@ static void macvlan_set_lockdep_class_one(struct net_device *dev,
 
 static void macvlan_set_lockdep_class(struct net_device *dev)
 {
+       lockdep_set_class(&dev->addr_list_lock,
+                         &macvlan_netdev_addr_lock_key);
        netdev_for_each_tx_queue(dev, macvlan_set_lockdep_class_one, NULL);
 }
 
@@ -330,10 +333,34 @@ static u32 macvlan_ethtool_get_rx_csum(struct net_device *dev)
        return lowerdev->ethtool_ops->get_rx_csum(lowerdev);
 }
 
+static int macvlan_ethtool_get_settings(struct net_device *dev,
+                                       struct ethtool_cmd *cmd)
+{
+       const struct macvlan_dev *vlan = netdev_priv(dev);
+       struct net_device *lowerdev = vlan->lowerdev;
+
+       if (!lowerdev->ethtool_ops->get_settings)
+               return -EOPNOTSUPP;
+
+       return lowerdev->ethtool_ops->get_settings(lowerdev, cmd);
+}
+
+static u32 macvlan_ethtool_get_flags(struct net_device *dev)
+{
+       const struct macvlan_dev *vlan = netdev_priv(dev);
+       struct net_device *lowerdev = vlan->lowerdev;
+
+       if (!lowerdev->ethtool_ops->get_flags)
+               return 0;
+       return lowerdev->ethtool_ops->get_flags(lowerdev);
+}
+
 static const struct ethtool_ops macvlan_ethtool_ops = {
        .get_link               = ethtool_op_get_link,
+       .get_settings           = macvlan_ethtool_get_settings,
        .get_rx_csum            = macvlan_ethtool_get_rx_csum,
        .get_drvinfo            = macvlan_ethtool_get_drvinfo,
+       .get_flags              = macvlan_ethtool_get_flags,
 };
 
 static void macvlan_setup(struct net_device *dev)