summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch
diff options
context:
space:
mode:
authorAlexandros C. Couloumbis <alex@ozo.com>2010-08-29 18:33:06 +0000
committerAlexandros C. Couloumbis <alex@ozo.com>2010-08-29 18:33:06 +0000
commit67fd8d1fdce6e7ea4b95fcec83178069a9a65a42 (patch)
tree6a3c680995d9d3a321749e3085b117ea9fc26eff /target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch
parentcf445bb48fbbddab07947e35e979bb9592e24b5a (diff)
downloadmtk-20170518-67fd8d1fdce6e7ea4b95fcec83178069a9a65a42.zip
mtk-20170518-67fd8d1fdce6e7ea4b95fcec83178069a9a65a42.tar.gz
mtk-20170518-67fd8d1fdce6e7ea4b95fcec83178069a9a65a42.tar.bz2
linux/generic: update 2.6.36 kernel patches
SVN-Revision: 22834
Diffstat (limited to 'target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch')
-rw-r--r--target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch b/target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch
index 16e5756..57f071b 100644
--- a/target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch
+++ b/target/linux/generic/patches-2.6.36/402-ledtrig_netdev.patch
@@ -19,3 +19,23 @@
obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) += ledtrig-default-on.o
obj-$(CONFIG_LEDS_TRIGGER_MORSE) += ledtrig-morse.o
+obj-$(CONFIG_LEDS_TRIGGER_NETDEV) += ledtrig-netdev.o
+
+--- a/drivers/leds/ledtrig-netdev.c
++++ b/drivers/leds/ledtrig-netdev.c
+@@ -309,6 +309,7 @@ static void netdev_trig_timer(unsigned l
+ struct led_netdev_data *trigger_data = (struct led_netdev_data *)arg;
+ const struct net_device_stats *dev_stats;
+ unsigned new_activity;
++ struct rtnl_link_stats64 temp;
+
+ write_lock(&trigger_data->lock);
+
+@@ -318,7 +319,7 @@ static void netdev_trig_timer(unsigned l
+ goto no_restart;
+ }
+
+- dev_stats = dev_get_stats(trigger_data->net_dev);
++ dev_stats = dev_get_stats(trigger_data->net_dev, &temp);
+ new_activity =
+ ((trigger_data->mode & MODE_TX) ? dev_stats->tx_packets : 0) +
+ ((trigger_data->mode & MODE_RX) ? dev_stats->rx_packets : 0);