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: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
849bcaff80
commit
a7db9ad1d4
|
@ -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,
|
||||||
{
|
{
|
||||||
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) {
|
||||||
|
|
Loading…
Reference in New Issue