Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64607
b: refs/heads/master
c: b4a488d
h: refs/heads/master
i:
  64605: 8667d2f
  64603: 10aca6a
  64599: ccee278
  64591: 54fb139
  64575: e74a23d
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Aug 31, 2007
1 parent 4f36b48 commit f781d15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: df1c0b8468b34628ed12b103804a4576cd9af8bb
refs/heads/master: b4a488d1824a2cc3514f9ee1298d805bd5edc893
16 changes: 8 additions & 8 deletions trunk/net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
*/
static int port_cost(struct net_device *dev)
{
if (dev->ethtool_ops->get_settings) {
struct ethtool_cmd ecmd = { ETHTOOL_GSET };
int err = dev->ethtool_ops->get_settings(dev, &ecmd);
if (!err) {
if (dev->ethtool_ops && dev->ethtool_ops->get_settings) {
struct ethtool_cmd ecmd = { .cmd = ETHTOOL_GSET, };

if (!dev->ethtool_ops->get_settings(dev, &ecmd)) {
switch(ecmd.speed) {
case SPEED_100:
return 19;
case SPEED_1000:
return 4;
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 f781d15

Please sign in to comment.