From: Patrick McHardy <kaber@trash.net>
To: Florian Fainelli <florian.fainelli@telecomint.eu>
Cc: netdev@vger.kernel.org, rpurdie@rpsys.net
Subject: Re: [PATCH] Add a network activity LED trigger
Date: Wed, 18 Jul 2007 15:33:57 +0200 [thread overview]
Message-ID: <469E16C5.4000102@trash.net> (raw)
In-Reply-To: <200707181527.38895.florian.fainelli@telecomint.eu>
Florian Fainelli wrote:
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 87d2046..fdc5a8a 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -128,5 +128,12 @@ config LEDS_TRIGGER_HEARTBEAT
> load average.
> If unsure, say Y.
>
> +config LEDS_TRIGGER_NETWORK_ACT
> + tristate "LED Network Activity Trigger"
Module isn't possible, you call the led trigger from net/core/dev.c.
> diff --git a/net/core/dev.c b/net/core/dev.c
> index ee051bb..a3a4115 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -117,6 +117,7 @@
> #include <linux/err.h>
> #include <linux/ctype.h>
> #include <linux/if_arp.h>
> +#include <linux/leds.h>
>
> /*
> * The list of packet types we will receive (as opposed to discard)
> @@ -1523,6 +1524,7 @@ gso:
> * stops preemption for RCU.
> */
> rcu_read_lock_bh();
> + ledtrig_network_activity();
Besides missing a declaration and not linking without the network
LED config option, its pretty ridiculous to call this for every
packet just to make a led blink.
next prev parent reply other threads:[~2007-07-18 13:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 13:27 [PATCH] Add a network activity LED trigger Florian Fainelli
2007-07-18 13:33 ` Patrick McHardy [this message]
2007-07-18 13:44 ` Florian Fainelli
2007-07-18 13:54 ` Patrick McHardy
2007-07-18 14:10 ` Richard Purdie
2007-07-18 14:14 ` Patrick McHardy
2007-07-18 22:22 ` David Miller
2007-07-18 13:41 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=469E16C5.4000102@trash.net \
--to=kaber@trash.net \
--cc=florian.fainelli@telecomint.eu \
--cc=netdev@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.