Historical ath9k-devel archives
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH] ath9k_htc: Add a module parameter to disable blink
@ 2015-01-11  7:09 Hong Xu
  2015-01-11  9:01 ` Oleksij Rempel
  0 siblings, 1 reply; 3+ messages in thread
From: Hong Xu @ 2015-01-11  7:09 UTC (permalink / raw)
  To: ath9k-devel

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 },
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [ath9k-devel] [PATCH] ath9k_htc: Add a module parameter to disable blink
@ 2015-01-11  6:30 Hong Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Hong Xu @ 2015-01-11  6:30 UTC (permalink / raw)
  To: ath9k-devel


Hi all,

The attached patch adds a module parameter to disable blink for ath9k_htc. Much of it imitates how
ath9k makes its blink parameter.

Best,
Hong

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ath9k_htc-Add-a-module-parameter-to-disable-blink.patch
Type: text/x-diff
Size: 2177 bytes
Desc: not available
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20150110/83056654/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20150110/83056654/attachment.pgp 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-11  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2015-01-11  6:30 Hong Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox