Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-block.git] / drivers / net / ethernet / mellanox / mlx4 / en_netdev.c
index f191a16125893e5b742c5d99ea7bd814dba433a5..96d95cb36c527632b2f5effdfae9b21162b1c799 100644 (file)
@@ -69,6 +69,15 @@ int mlx4_en_setup_tc(struct net_device *dev, u8 up)
        return 0;
 }
 
+static int __mlx4_en_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
+                             struct tc_to_netdev *tc)
+{
+       if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
+               return -EINVAL;
+
+       return mlx4_en_setup_tc(dev, tc->tc);
+}
+
 #ifdef CONFIG_RFS_ACCEL
 
 struct mlx4_en_filter {
@@ -2462,7 +2471,7 @@ static const struct net_device_ops mlx4_netdev_ops = {
 #endif
        .ndo_set_features       = mlx4_en_set_features,
        .ndo_fix_features       = mlx4_en_fix_features,
-       .ndo_setup_tc           = mlx4_en_setup_tc,
+       .ndo_setup_tc           = __mlx4_en_setup_tc,
 #ifdef CONFIG_RFS_ACCEL
        .ndo_rx_flow_steer      = mlx4_en_filter_rfs,
 #endif
@@ -2500,7 +2509,7 @@ static const struct net_device_ops mlx4_netdev_ops_master = {
 #endif
        .ndo_set_features       = mlx4_en_set_features,
        .ndo_fix_features       = mlx4_en_fix_features,
-       .ndo_setup_tc           = mlx4_en_setup_tc,
+       .ndo_setup_tc           = __mlx4_en_setup_tc,
 #ifdef CONFIG_RFS_ACCEL
        .ndo_rx_flow_steer      = mlx4_en_filter_rfs,
 #endif