Skip to content

Commit

Permalink
qlge: Added missing case statement to ethtool get_strings.
Browse files Browse the repository at this point in the history
Missing case was causing ethtool self test to print garbage
value in extra info section.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jitendra Kalsaria authored and David S. Miller committed Jul 11, 2012
1 parent 849bcaf commit a7db9ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ static char ql_stats_str_arr[][ETH_GSTRING_LEN] = {
static void ql_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
{
switch (stringset) {
case ETH_SS_TEST:
memcpy(buf, *ql_gstrings_test, QLGE_TEST_LEN * ETH_GSTRING_LEN);
break;
case ETH_SS_STATS:
memcpy(buf, ql_stats_str_arr, sizeof(ql_stats_str_arr));
break;
Expand Down Expand Up @@ -531,6 +534,8 @@ static void ql_self_test(struct net_device *ndev,
{
struct ql_adapter *qdev = netdev_priv(ndev);

memset(data, 0, sizeof(u64) * QLGE_TEST_LEN);

if (netif_running(ndev)) {
set_bit(QL_SELFTEST, &qdev->flags);
if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
Expand Down

0 comments on commit a7db9ad

Please sign in to comment.