ath9k_htc: Add a module parameter to disable blink
PATCH v3 1/1 ath9k_htc: Add a module parameter to disable blink
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 | 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(+)
drivers/net/wireless/ath/ath9k/htc.h +3 -0
@@ -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 ,
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +4 -0
@@ -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),
drivers/net/wireless/ath/ath9k/htc_drv_init.c +4 -0
@@ -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 },
Signature · 1 line
2.2.2
Quoted 16 lines · 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 <[email protected]>--- 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(+)drivers/net/wireless/ath/ath9k/htc.h +0
-0
drivers/net/wireless/ath/ath9k/htc.h line 49
Quoted 6 lines
drivers/net/wireless/ath/ath9k/htc.h +3
-0@@ -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.
Signature · 1 line
Kalle Valo
Quoted 3 lines · 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.
Just noticed v2 is applied. Please ignore this patch. I will send a fix patch later.
Hong