diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 38fc794c1655..b6de05e3149b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
@@ -2969,8 +2969,9 @@ static void bnx2x_self_test(struct net_device *dev, | |||
2969 | #define IS_PORT_STAT(i) \ | 2969 | #define IS_PORT_STAT(i) \ |
2970 | ((bnx2x_stats_arr[i].flags & STATS_FLAGS_BOTH) == STATS_FLAGS_PORT) | 2970 | ((bnx2x_stats_arr[i].flags & STATS_FLAGS_BOTH) == STATS_FLAGS_PORT) |
2971 | #define IS_FUNC_STAT(i) (bnx2x_stats_arr[i].flags & STATS_FLAGS_FUNC) | 2971 | #define IS_FUNC_STAT(i) (bnx2x_stats_arr[i].flags & STATS_FLAGS_FUNC) |
2972 | #define IS_MF_MODE_STAT(bp) \ | 2972 | #define HIDE_PORT_STAT(bp) \ |
2973 | (IS_MF(bp) && !(bp->msg_enable & BNX2X_MSG_STATS)) | 2973 | ((IS_MF(bp) && !(bp->msg_enable & BNX2X_MSG_STATS)) || \ |
2974 | IS_VF(bp)) | ||
2974 | 2975 | ||
2975 | /* ethtool statistics are displayed for all regular ethernet queues and the | 2976 | /* ethtool statistics are displayed for all regular ethernet queues and the |
2976 | * fcoe L2 queue if not disabled | 2977 | * fcoe L2 queue if not disabled |
@@ -2992,7 +2993,7 @@ static int bnx2x_get_sset_count(struct net_device *dev, int stringset) | |||
2992 | BNX2X_NUM_Q_STATS; | 2993 | BNX2X_NUM_Q_STATS; |
2993 | } else | 2994 | } else |
2994 | num_strings = 0; | 2995 | num_strings = 0; |
2995 | if (IS_MF_MODE_STAT(bp)) { | 2996 | if (HIDE_PORT_STAT(bp)) { |
2996 | for (i = 0; i < BNX2X_NUM_STATS; i++) | 2997 | for (i = 0; i < BNX2X_NUM_STATS; i++) |
2997 | if (IS_FUNC_STAT(i)) | 2998 | if (IS_FUNC_STAT(i)) |
2998 | num_strings++; | 2999 | num_strings++; |
@@ -3047,7 +3048,7 @@ static void bnx2x_get_strings(struct net_device *dev, u32 stringset, u8 *buf) | |||
3047 | } | 3048 | } |
3048 | 3049 | ||
3049 | for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) { | 3050 | for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) { |
3050 | if (IS_MF_MODE_STAT(bp) && IS_PORT_STAT(i)) | 3051 | if (HIDE_PORT_STAT(bp) && IS_PORT_STAT(i)) |
3051 | continue; | 3052 | continue; |
3052 | strcpy(buf + (k + j)*ETH_GSTRING_LEN, | 3053 | strcpy(buf + (k + j)*ETH_GSTRING_LEN, |
3053 | bnx2x_stats_arr[i].string); | 3054 | bnx2x_stats_arr[i].string); |
@@ -3105,7 +3106,7 @@ static void bnx2x_get_ethtool_stats(struct net_device *dev, | |||
3105 | 3106 | ||
3106 | hw_stats = (u32 *)&bp->eth_stats; | 3107 | hw_stats = (u32 *)&bp->eth_stats; |
3107 | for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) { | 3108 | for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) { |
3108 | if (IS_MF_MODE_STAT(bp) && IS_PORT_STAT(i)) | 3109 | if (HIDE_PORT_STAT(bp) && IS_PORT_STAT(i)) |
3109 | continue; | 3110 | continue; |
3110 | if (bnx2x_stats_arr[i].size == 0) { | 3111 | if (bnx2x_stats_arr[i].size == 0) { |
3111 | /* skip this counter */ | 3112 | /* skip this counter */ |