From: Oleksij Rempel <linux@rempel-privat.de>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH] ath9k_htc: Add a module parameter to disable blink
Date: Sun, 11 Jan 2015 10:01:46 +0100 [thread overview]
Message-ID: <54B23BFA.7090002@rempel-privat.de> (raw)
In-Reply-To: <1420960175-28546-1-git-send-email-hong@topbug.net>
Am 11.01.2015 um 08:09 schrieb Hong Xu:
> Add an option "blink" to enable or disable the LED blink. The default
> value is set to 1 so that existing users would not experience any
> unexpected changes.
> ---
> drivers/net/wireless/ath/ath9k/htc.h | 1 +
> drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 4 ++++
> drivers/net/wireless/ath/ath9k/htc_drv_init.c | 4 ++++
> 3 files changed, 9 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
> index 9dde265..5697097 100644
> --- a/drivers/net/wireless/ath/ath9k/htc.h
> +++ b/drivers/net/wireless/ath/ath9k/htc.h
> @@ -44,6 +44,7 @@
>
> extern struct ieee80211_ops ath9k_htc_ops;
> extern int htc_modparam_nohwcrypt;
> +extern int led_blink;
>
> enum htc_phymode {
> HTC_MODE_11NA = 0,
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
> index 50f74a2..998b558 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
> @@ -279,6 +279,10 @@ void ath9k_init_leds(struct ath9k_htc_priv *priv)
> else
> priv->ah->led_pin = ATH_LED_PIN_DEF;
>
> + if (!led_blink)
> + priv->led_cdev.default_trigger =
> + ieee80211_get_radio_led_name(priv->hw);
> +
> ath9k_configure_leds(priv);
>
> snprintf(priv->led_name, sizeof(priv->led_name),
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> index e8fa944..c762d84 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> @@ -38,6 +38,10 @@ static int ath9k_ps_enable;
> module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
> MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
>
> +int led_blink = 1;
> +module_param_named(blink, led_blink, int, 0444);
> +MODULE_PARM_DESC(blink, "Enable LED blink on activity");
> +
> #ifdef CONFIG_MAC80211_LEDS
> static const struct ieee80211_tpt_blink ath9k_htc_tpt_blink[] = {
> { .throughput = 0 * 1024, .blink_time = 334 },
>
Nice, thank you!
Acked-by: Oleksij Rempel <linux@rempel-privat.de>
Tested-by: Oleksij Rempel <linux@rempel-privat.de>
Please resend this patch to Kalle Valo.
--
Regards,
Oleksij
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20150111/bfc5dca7/attachment.pgp
next prev parent reply other threads:[~2015-01-11 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-11 7:09 [ath9k-devel] [PATCH] ath9k_htc: Add a module parameter to disable blink Hong Xu
2015-01-11 9:01 ` Oleksij Rempel [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-11 6:30 Hong Xu
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=54B23BFA.7090002@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=ath9k-devel@lists.ath9k.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox