1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 20:53:22 +02:00

[kernel] ensure ledtrig-netdev will compile even if CONFIG_COMPAT_NET_DEV_OPS is unset

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16516 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2009-06-19 13:12:00 +00:00
parent 1f55184aee
commit 76e776b4ad

View File

@ -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);
goto no_restart;
}
#ifdef CONFIG_COMPAT_NET_DEV_OPS
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 =
((trigger_data->mode & MODE_TX) ? dev_stats->tx_packets : 0) +
((trigger_data->mode & MODE_RX) ? dev_stats->rx_packets : 0);