Commit a7db9ad1 authored by Jitendra Kalsaria's avatar Jitendra Kalsaria Committed by David S. Miller

qlge: Added missing case statement to ethtool get_strings.

Missing case was causing ethtool self test to print garbage
value in extra info section.
Signed-off-by: default avatarJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 849bcaff
...@@ -248,6 +248,9 @@ static char ql_stats_str_arr[][ETH_GSTRING_LEN] = { ...@@ -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) static void ql_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
{ {
switch (stringset) { switch (stringset) {
case ETH_SS_TEST:
memcpy(buf, *ql_gstrings_test, QLGE_TEST_LEN * ETH_GSTRING_LEN);
break;
case ETH_SS_STATS: case ETH_SS_STATS:
memcpy(buf, ql_stats_str_arr, sizeof(ql_stats_str_arr)); memcpy(buf, ql_stats_str_arr, sizeof(ql_stats_str_arr));
break; break;
...@@ -531,6 +534,8 @@ static void ql_self_test(struct net_device *ndev, ...@@ -531,6 +534,8 @@ static void ql_self_test(struct net_device *ndev,
{ {
struct ql_adapter *qdev = netdev_priv(ndev); struct ql_adapter *qdev = netdev_priv(ndev);
memset(data, 0, sizeof(u64) * QLGE_TEST_LEN);
if (netif_running(ndev)) { if (netif_running(ndev)) {
set_bit(QL_SELFTEST, &qdev->flags); set_bit(QL_SELFTEST, &qdev->flags);
if (eth_test->flags == ETH_TEST_FL_OFFLINE) { if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment