mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
net: bridge: use __ethtool_get_ksettings
Signed-off-by: David Decotigny <decot@googlers.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
577097981d
commit
702b26a24d
1 changed files with 3 additions and 3 deletions
|
@ -36,10 +36,10 @@
|
||||||
*/
|
*/
|
||||||
static int port_cost(struct net_device *dev)
|
static int port_cost(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct ethtool_cmd ecmd;
|
struct ethtool_link_ksettings ecmd;
|
||||||
|
|
||||||
if (!__ethtool_get_settings(dev, &ecmd)) {
|
if (!__ethtool_get_link_ksettings(dev, &ecmd)) {
|
||||||
switch (ethtool_cmd_speed(&ecmd)) {
|
switch (ecmd.base.speed) {
|
||||||
case SPEED_10000:
|
case SPEED_10000:
|
||||||
return 2;
|
return 2;
|
||||||
case SPEED_1000:
|
case SPEED_1000:
|
||||||
|
|
Loading…
Add table
Reference in a new issue