ethtool: Replace ethtool_ops::{get,set}_rxfh_indir() with {get,set}_rxfh()
[linux-2.6-block.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_ethtool.c
index b6de05e3149b5604d818d5496cbbc23ab7bf64e8..af138f8aa361fee36665b31c5e1a1016081d1063 100644 (file)
@@ -3316,7 +3316,7 @@ static u32 bnx2x_get_rxfh_indir_size(struct net_device *dev)
        return T_ETH_INDIRECTION_TABLE_SIZE;
 }
 
-static int bnx2x_get_rxfh_indir(struct net_device *dev, u32 *indir)
+static int bnx2x_get_rxfh(struct net_device *dev, u32 *indir, u8 *key)
 {
        struct bnx2x *bp = netdev_priv(dev);
        u8 ind_table[T_ETH_INDIRECTION_TABLE_SIZE] = {0};
@@ -3340,14 +3340,15 @@ static int bnx2x_get_rxfh_indir(struct net_device *dev, u32 *indir)
        return 0;
 }
 
-static int bnx2x_set_rxfh_indir(struct net_device *dev, const u32 *indir)
+static int bnx2x_set_rxfh(struct net_device *dev, const u32 *indir,
+                         const u8 *key)
 {
        struct bnx2x *bp = netdev_priv(dev);
        size_t i;
 
        for (i = 0; i < T_ETH_INDIRECTION_TABLE_SIZE; i++) {
                /*
-                * The same as in bnx2x_get_rxfh_indir: we can't use a memcpy()
+                * The same as in bnx2x_get_rxfh: we can't use a memcpy()
                 * as an internal storage of an indirection table is a u8 array
                 * while indir->ring_index points to an array of u32.
                 *
@@ -3471,8 +3472,8 @@ static const struct ethtool_ops bnx2x_ethtool_ops = {
        .get_rxnfc              = bnx2x_get_rxnfc,
        .set_rxnfc              = bnx2x_set_rxnfc,
        .get_rxfh_indir_size    = bnx2x_get_rxfh_indir_size,
-       .get_rxfh_indir         = bnx2x_get_rxfh_indir,
-       .set_rxfh_indir         = bnx2x_set_rxfh_indir,
+       .get_rxfh               = bnx2x_get_rxfh,
+       .set_rxfh               = bnx2x_set_rxfh,
        .get_channels           = bnx2x_get_channels,
        .set_channels           = bnx2x_set_channels,
        .get_module_info        = bnx2x_get_module_info,
@@ -3498,16 +3499,14 @@ static const struct ethtool_ops bnx2x_vf_ethtool_ops = {
        .get_rxnfc              = bnx2x_get_rxnfc,
        .set_rxnfc              = bnx2x_set_rxnfc,
        .get_rxfh_indir_size    = bnx2x_get_rxfh_indir_size,
-       .get_rxfh_indir         = bnx2x_get_rxfh_indir,
-       .set_rxfh_indir         = bnx2x_set_rxfh_indir,
+       .get_rxfh               = bnx2x_get_rxfh,
+       .set_rxfh               = bnx2x_set_rxfh,
        .get_channels           = bnx2x_get_channels,
        .set_channels           = bnx2x_set_channels,
 };
 
 void bnx2x_set_ethtool_ops(struct bnx2x *bp, struct net_device *netdev)
 {
-       if (IS_PF(bp))
-               SET_ETHTOOL_OPS(netdev, &bnx2x_ethtool_ops);
-       else /* vf */
-               SET_ETHTOOL_OPS(netdev, &bnx2x_vf_ethtool_ops);
+       netdev->ethtool_ops = (IS_PF(bp)) ?
+               &bnx2x_ethtool_ops : &bnx2x_vf_ethtool_ops;
 }