From: Arend van Spriel <arend@broadcom.com>
To: Hong Xu <hong@topbug.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath9k_htc: Add a module parameter to disable blink
Date: Sun, 11 Jan 2015 10:40:20 +0100 [thread overview]
Message-ID: <54B24504.60105@broadcom.com> (raw)
In-Reply-To: <1420968029-1222-1-git-send-email-hong@topbug.net>
On 01/11/15 10:20, Hong Xu wrote:
> 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");
> +
Seems like this module parameter is only applicable if
CONFIG_MAC80211_LEDS is set.
Regards,
Arend
> #ifdef CONFIG_MAC80211_LEDS
> static const struct ieee80211_tpt_blink ath9k_htc_tpt_blink[] = {
> { .throughput = 0 * 1024, .blink_time = 334 },
next prev parent reply other threads:[~2015-01-11 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-11 9:20 [PATCH] ath9k_htc: Add a module parameter to disable blink Hong Xu
2015-01-11 9:40 ` Arend van Spriel [this message]
2015-01-11 9:50 ` Oleksij Rempel
2015-01-11 9:59 ` Hong Xu
2015-01-11 10:08 ` Oleksij Rempel
2015-01-12 6:54 ` Bob Copeland
2015-01-12 7:09 ` Hong Xu
2015-01-13 2:55 ` Julian Calaby
2015-01-13 5:21 ` Hong Xu
[not found] <1420967281-31175-1-git-send-email-hong@topbug.net>
2015-01-11 9:17 ` Kalle Valo
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=54B24504.60105@broadcom.com \
--to=arend@broadcom.com \
--cc=hong@topbug.net \
--cc=linux-wireless@vger.kernel.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