ensure ledtrig-netdev will compile even if CONFIG_COMPAT_NET_DEV_OPS is unset
SVN-Revision: 16516
This commit is contained in:
parent
88fd55fb5c
commit
d41b9133c7
1 changed files with 4 additions and 1 deletions
|
@ -317,8 +317,11 @@ static void netdev_trig_timer(unsigned long arg)
|
||||||
led_set_brightness(trigger_data->led_cdev, ((trigger_data->mode & MODE_LINK) != 0 && trigger_data->link_up) ? LED_FULL : LED_OFF);
|
led_set_brightness(trigger_data->led_cdev, ((trigger_data->mode & MODE_LINK) != 0 && trigger_data->link_up) ? LED_FULL : LED_OFF);
|
||||||
goto no_restart;
|
goto no_restart;
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_COMPAT_NET_DEV_OPS
|
||||||
dev_stats = trigger_data->net_dev->get_stats(trigger_data->net_dev);
|
dev_stats = trigger_data->net_dev->get_stats(trigger_data->net_dev);
|
||||||
|
#else
|
||||||
|
dev_stats = trigger_data->net_dev->netdev_ops->ndo_get_stats(trigger_data->net_dev);
|
||||||
|
#endif
|
||||||
new_activity =
|
new_activity =
|
||||||
((trigger_data->mode & MODE_TX) ? dev_stats->tx_packets : 0) +
|
((trigger_data->mode & MODE_TX) ? dev_stats->tx_packets : 0) +
|
||||||
((trigger_data->mode & MODE_RX) ? dev_stats->rx_packets : 0);
|
((trigger_data->mode & MODE_RX) ? dev_stats->rx_packets : 0);
|
||||||
|
|
Loading…
Reference in a new issue