Commit 21d08d1c authored by Kohei Enju's avatar Kohei Enju Committed by Tony Nguyen
Browse files

igc: use EOPNOTSUPP instead of ENOTSUPP in igc_ethtool_get_sset_count()



igc_ethtool_get_sset_count() returns -ENOTSUPP when a given stringset is
not supported, causing userland programs to get "Unknown error 524".

Since EOPNOTSUPP should be used when error is propagated to userland,
return -EOPNOTSUPP instead of -ENOTSUPP.

Fixes: 36b9fea6 ("igc: Add support for statistics")
Signed-off-by: default avatarKohei Enju <enjuk@amazon.com>
Reviewed-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent bc73c588
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -810,7 +810,7 @@ static int igc_ethtool_get_sset_count(struct net_device *netdev, int sset)
	case ETH_SS_PRIV_FLAGS:
		return IGC_PRIV_FLAGS_STR_LEN;
	default:
		return -ENOTSUPP;
		return -EOPNOTSUPP;
	}
}