* [PATCH v3] ath9k_htc: Add a module parameter to disable blink
@ 2015-01-24 9:18 Hong Xu
2015-01-24 9:26 ` Kalle Valo
2015-01-24 9:28 ` Hong Xu
0 siblings, 2 replies; 3+ messages in thread
From: Hong Xu @ 2015-01-24 9:18 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, 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.
Signed-off-by: Hong Xu <hong@topbug.net>
---
drivers/net/wireless/ath/ath9k/htc.h | 3 +++
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 4 ++++
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 4 ++++
3 files changed, 11 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 9dde265..300d367 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -44,6 +44,9 @@
extern struct ieee80211_ops ath9k_htc_ops;
extern int htc_modparam_nohwcrypt;
+#ifdef CONFIG_MAC80211_LEDS
+extern int ath9k_htc_led_blink;
+#endif
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..2aabcbd 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 (!ath9k_htc_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..fd22940 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -39,6 +39,10 @@ module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
#ifdef CONFIG_MAC80211_LEDS
+int ath9k_htc_led_blink = 1;
+module_param_named(blink, ath9k_htc_led_blink, int, 0444);
+MODULE_PARM_DESC(blink, "Enable LED blink on activity");
+
static const struct ieee80211_tpt_blink ath9k_htc_tpt_blink[] = {
{ .throughput = 0 * 1024, .blink_time = 334 },
{ .throughput = 1 * 1024, .blink_time = 260 },
--
2.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] ath9k_htc: Add a module parameter to disable blink
2015-01-24 9:18 [PATCH v3] ath9k_htc: Add a module parameter to disable blink Hong Xu
@ 2015-01-24 9:26 ` Kalle Valo
2015-01-24 9:28 ` Hong Xu
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2015-01-24 9:26 UTC (permalink / raw)
To: Hong Xu; +Cc: linux-wireless
Hong Xu <hong@topbug.net> writes:
> 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.
>
> Signed-off-by: Hong Xu <hong@topbug.net>
> ---
> drivers/net/wireless/ath/ath9k/htc.h | 3 +++
> drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 4 ++++
> drivers/net/wireless/ath/ath9k/htc_drv_init.c | 4 ++++
> 3 files changed, 11 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
> index 9dde265..300d367 100644
> --- a/drivers/net/wireless/ath/ath9k/htc.h
> +++ b/drivers/net/wireless/ath/ath9k/htc.h
> @@ -44,6 +44,9 @@
>
> extern struct ieee80211_ops ath9k_htc_ops;
> extern int htc_modparam_nohwcrypt;
> +#ifdef CONFIG_MAC80211_LEDS
> +extern int ath9k_htc_led_blink;
> +#endif
Did you check that this applies to wireless-drivers-next? Didn't I
already apply this patch?
If your patch is already applied, you need to send a new patch to fix
the compilation error.
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] ath9k_htc: Add a module parameter to disable blink
2015-01-24 9:18 [PATCH v3] ath9k_htc: Add a module parameter to disable blink Hong Xu
2015-01-24 9:26 ` Kalle Valo
@ 2015-01-24 9:28 ` Hong Xu
1 sibling, 0 replies; 3+ messages in thread
From: Hong Xu @ 2015-01-24 9:28 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo
Hong Xu <hong@topbug.net> writes:
> 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.
Just noticed v2 is applied. Please ignore this patch. I will send a fix
patch later.
Hong
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-24 9:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-24 9:18 [PATCH v3] ath9k_htc: Add a module parameter to disable blink Hong Xu
2015-01-24 9:26 ` Kalle Valo
2015-01-24 9:28 ` Hong Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).