Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265741
b: refs/heads/master
c: fa3df92
h: refs/heads/master
i:
  265739: e70a471
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Sep 15, 2011
1 parent be56f36 commit 9b3e77f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8aaebc6b2a9c36dd9705adcb8f10d14b3d33f75
refs/heads/master: fa3df928e0878350ab0ddd1453bb85b056c726da
26 changes: 12 additions & 14 deletions trunk/net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,18 @@
*/
static int port_cost(struct net_device *dev)
{
if (dev->ethtool_ops && dev->ethtool_ops->get_settings) {
struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET, };

if (!dev_ethtool_get_settings(dev, &ecmd)) {
switch (ethtool_cmd_speed(&ecmd)) {
case SPEED_10000:
return 2;
case SPEED_1000:
return 4;
case SPEED_100:
return 19;
case SPEED_10:
return 100;
}
struct ethtool_cmd ecmd;

if (!dev_ethtool_get_settings(dev, &ecmd)) {
switch (ethtool_cmd_speed(&ecmd)) {
case SPEED_10000:
return 2;
case SPEED_1000:
return 4;
case SPEED_100:
return 19;
case SPEED_10:
return 100;
}
}

Expand Down

0 comments on commit 9b3e77f

Please sign in to comment.