28 #include <linux/kernel.h>
29 #include <linux/module.h>
33 #include <linux/netdevice.h>
36 #include <asm/unaligned.h>
57 { .throughput = 0, .blink_time = 334 },
58 { .throughput = 1 * 1024 - 1, .blink_time = 260 },
59 { .throughput = 5 * 1024 - 1, .blink_time = 220 },
60 { .throughput = 10 * 1024 - 1, .blink_time = 190 },
61 { .throughput = 20 * 1024 - 1, .blink_time = 170 },
62 { .throughput = 50 * 1024 - 1, .blink_time = 150 },
63 { .throughput = 70 * 1024 - 1, .blink_time = 130 },
64 { .throughput = 100 * 1024 - 1, .blink_time = 110 },
65 { .throughput = 200 * 1024 - 1, .blink_time = 80 },
66 { .throughput = 300 * 1024 - 1, .blink_time = 50 },
90 IWL_ERR(priv,
"undefined blink compensation: "
91 "use pre-defined blinking time\n");
95 return (
u8)((time * compensation) >> 6);
103 .
data = { led_cmd, },
111 reg & CSR_LED_BSM_CTRL_MSK);
139 priv->
cfg->base_params->led_compensation);
140 led_cmd.
on = iwl_blink_compensation(priv, on,
141 priv->
cfg->base_params->led_compensation);
142 led_cmd.
off = iwl_blink_compensation(priv, off,
143 priv->
cfg->base_params->led_compensation);
145 ret = iwl_send_led_cmd(priv, &led_cmd);
153 static void iwl_led_brightness_set(
struct led_classdev *led_cdev,
157 unsigned long on = 0;
165 static int iwl_led_blink_set(
struct led_classdev *led_cdev,
166 unsigned long *delay_on,
167 unsigned long *delay_off)
184 mode = priv->
cfg->led_mode;
187 wiphy_name(priv->
hw->wiphy));
188 priv->
led.brightness_set = iwl_led_brightness_set;
189 priv->
led.blink_set = iwl_led_blink_set;
190 priv->
led.max_brightness = 1;
197 priv->
led.default_trigger =
198 ieee80211_create_tpt_led_trigger(priv->
hw,
203 priv->
led.default_trigger =
204 ieee80211_get_radio_led_name(priv->
hw);