aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-06-19 13:12:00 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-06-19 13:12:00 +0000
commit52461e5c623728517ee994f57b174aaace6f2f8d (patch)
tree503a7045e417c826218c3989ca09108e54880477
parente3154f973cd30a3eabded601011702093bc8c1da (diff)
downloadupstream-52461e5c623728517ee994f57b174aaace6f2f8d.tar.gz
upstream-52461e5c623728517ee994f57b174aaace6f2f8d.tar.bz2
upstream-52461e5c623728517ee994f57b174aaace6f2f8d.zip
[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
-rw-r--r--target/linux/generic-2.6/files-2.6.30/drivers/leds/ledtrig-netdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/generic-2.6/files-2.6.30/drivers/leds/ledtrig-netdev.c b/target/linux/generic-2.6/files-2.6.30/drivers/leds/ledtrig-netdev.c
index fac3571bdd..4193e4eda3 100644
--- a/target/linux/generic-2.6/files-2.6.30/drivers/leds/ledtrig-netdev.c
+++ b/target/linux/generic-2.6/files-2.6.30/drivers/leds/ledtrig-netdev.c
@@ -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);