omap24xx: Add 2.6.36 support
[openwrt.git] / target / linux / generic / patches-2.6.36 / 402-ledtrig_netdev.patch
1 --- a/drivers/leds/Kconfig
2 +++ b/drivers/leds/Kconfig
3 @@ -375,4 +375,11 @@ config LEDS_TRIGGER_MORSE
4 tristate "LED Morse Trigger"
5 depends on LEDS_TRIGGERS
6
7 +config LEDS_TRIGGER_NETDEV
8 + tristate "LED Netdev Trigger"
9 + depends on NET && LEDS_TRIGGERS
10 + help
11 + This allows LEDs to be controlled by network device activity.
12 + If unsure, say Y.
13 +
14 endif # NEW_LEDS
15 --- a/drivers/leds/Makefile
16 +++ b/drivers/leds/Makefile
17 @@ -49,3 +49,4 @@ obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT) +=
18 obj-$(CONFIG_LEDS_TRIGGER_GPIO) += ledtrig-gpio.o
19 obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) += ledtrig-default-on.o
20 obj-$(CONFIG_LEDS_TRIGGER_MORSE) += ledtrig-morse.o
21 +obj-$(CONFIG_LEDS_TRIGGER_NETDEV) += ledtrig-netdev.o
22
23 --- a/drivers/leds/ledtrig-netdev.c
24 +++ b/drivers/leds/ledtrig-netdev.c
25 @@ -309,6 +309,7 @@ static void netdev_trig_timer(unsigned l
26 struct led_netdev_data *trigger_data = (struct led_netdev_data *)arg;
27 const struct net_device_stats *dev_stats;
28 unsigned new_activity;
29 + struct rtnl_link_stats64 temp;
30
31 write_lock(&trigger_data->lock);
32
33 @@ -318,7 +319,7 @@ static void netdev_trig_timer(unsigned l
34 goto no_restart;
35 }
36
37 - dev_stats = dev_get_stats(trigger_data->net_dev);
38 + dev_stats = dev_get_stats(trigger_data->net_dev, &temp);
39 new_activity =
40 ((trigger_data->mode & MODE_TX) ? dev_stats->tx_packets : 0) +
41 ((trigger_data->mode & MODE_RX) ? dev_stats->rx_packets : 0);
This page took 0.043373 seconds and 5 git commands to generate.