Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170563
b: refs/heads/master
c: 02f5dac
h: refs/heads/master
i:
  170561: dd7e215
  170559: bba7384
v: v3
  • Loading branch information
Wey-Yi Guy authored and John W. Linville committed Oct 7, 2009
1 parent 0a3502d commit 8a6dda9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5953a62e7df064a5d7ba7e790d590f27c65ddf4c
refs/heads/master: 02f5dac08364d01a8b2c8e298b529b97f356b3f5
9 changes: 8 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-led.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
#include "iwl-core.h"
#include "iwl-io.h"

/* default: IWL_LED_BLINK(0) using blinking index table */
static int led_mode;
module_param(led_mode, int, S_IRUGO);
MODULE_PARM_DESC(led_mode, "led mode: 0=blinking, 1=On(RF On)/Off(RF Off), "
"(default 0)\n");

#ifdef CONFIG_IWLWIFI_DEBUG
static const char *led_type_str[] = {
__stringify(IWL_LED_TRG_TX),
Expand Down Expand Up @@ -199,7 +205,8 @@ static int iwl_led_off_reg(struct iwl_priv *priv, int led_id)
static int iwl_led_associate(struct iwl_priv *priv, int led_id)
{
IWL_DEBUG_LED(priv, "Associated\n");
priv->allow_blinking = 1;
if (led_mode == IWL_LED_BLINK)
priv->allow_blinking = 1;
return iwl_led_on_reg(priv, led_id);
}
static int iwl_led_disassociate(struct iwl_priv *priv, int led_id)
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-led.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ enum led_type {
IWL_LED_TRG_RADIO,
IWL_LED_TRG_MAX,
};

/*
* LED mode
* IWL_LED_BLINK: adjust led blink rate based on blink table
* IWL_LED_RF_STATE: turn LED on/off based on RF state
* LED ON = RF ON
* LED OFF = RF OFF
*/
enum iwl_led_mode {
IWL_LED_BLINK,
IWL_LED_RF_STATE,
};
#endif

#ifdef CONFIG_IWLWIFI_LEDS
Expand Down

0 comments on commit 8a6dda9

Please sign in to comment.