blob: e8ce188935fcb9e22c0e59a11e0a2aabf418d335 [file] [log] [blame]
Mohamed Abbasab53d8a2008-03-25 16:33:36 -07001/******************************************************************************
2 *
3 * Copyright(c) 2003 - 2008 Intel Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
20 *
21 * Contact Information:
Winkler, Tomas759ef892008-12-09 11:28:58 -080022 * Intel Linux Wireless <ilw@linux.intel.com>
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070023 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
27
28#include <linux/kernel.h>
29#include <linux/module.h>
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070030#include <linux/init.h>
31#include <linux/pci.h>
32#include <linux/dma-mapping.h>
33#include <linux/delay.h>
34#include <linux/skbuff.h>
35#include <linux/netdevice.h>
36#include <linux/wireless.h>
37#include <net/mac80211.h>
38#include <linux/etherdevice.h>
39#include <asm/unaligned.h>
40
Tomas Winkler3e0d4cb2008-04-24 11:55:38 -070041#include "iwl-dev.h"
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070042#include "iwl-core.h"
Tomas Winklerfee12472008-04-03 16:05:21 -070043#include "iwl-io.h"
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070044#include "iwl-helpers.h"
45
Tomas Winkler0eee6122008-07-11 11:53:36 +080046#ifdef CONFIG_IWLWIFI_DEBUG
47static const char *led_type_str[] = {
48 __stringify(IWL_LED_TRG_TX),
49 __stringify(IWL_LED_TRG_RX),
50 __stringify(IWL_LED_TRG_ASSOC),
51 __stringify(IWL_LED_TRG_RADIO),
52 NULL
53};
54#endif /* CONFIG_IWLWIFI_DEBUG */
55
56
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070057static const struct {
58 u16 tpt;
59 u8 on_time;
Tomas Winkler0eee6122008-07-11 11:53:36 +080060 u8 off_time;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070061} blink_tbl[] =
62{
63 {300, 25, 25},
64 {200, 40, 40},
65 {100, 55, 55},
66 {70, 65, 65},
67 {50, 75, 75},
68 {20, 85, 85},
69 {15, 95, 95 },
70 {10, 110, 110},
71 {5, 130, 130},
Tomas Winklerec1a7462008-07-11 11:53:37 +080072 {0, 167, 167},
73/* SOLID_ON */
74 {-1, IWL_LED_SOLID, 0}
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070075};
76
Tomas Winklerec1a7462008-07-11 11:53:37 +080077#define IWL_1MB_RATE (128 * 1024)
78#define IWL_LED_THRESHOLD (16)
79#define IWL_MAX_BLINK_TBL (ARRAY_SIZE(blink_tbl) - 1) /* exclude SOLID_ON */
80#define IWL_SOLID_BLINK_IDX (ARRAY_SIZE(blink_tbl) - 1)
81
82/* [0-256] -> [0..8] FIXME: we need [0..10] */
83static inline int iwl_brightness_to_idx(enum led_brightness brightness)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070084{
Tomas Winklerec1a7462008-07-11 11:53:37 +080085 return fls(0x000000FF & (u32)brightness);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070086}
87
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070088/* Send led command */
Tomas Winklerec1a7462008-07-11 11:53:37 +080089static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070090{
91 struct iwl_host_cmd cmd = {
92 .id = REPLY_LEDS_CMD,
Tomas Winklerec1a7462008-07-11 11:53:37 +080093 .len = sizeof(struct iwl_led_cmd),
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070094 .data = led_cmd,
95 .meta.flags = CMD_ASYNC,
Tomas Winklerec1a7462008-07-11 11:53:37 +080096 .meta.u.callback = NULL,
Mohamed Abbasab53d8a2008-03-25 16:33:36 -070097 };
98 u32 reg;
99
Tomas Winkler3395f6e2008-03-25 16:33:37 -0700100 reg = iwl_read32(priv, CSR_LED_REG);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700101 if (reg != (reg & CSR_LED_BSM_CTRL_MSK))
Tomas Winkler3395f6e2008-03-25 16:33:37 -0700102 iwl_write32(priv, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700103
104 return iwl_send_cmd(priv, &cmd);
105}
106
Tomas Winklerec1a7462008-07-11 11:53:37 +0800107/* Set led pattern command */
Abhijeet Kolekar3eb20112008-07-11 11:53:42 +0800108static int iwl4965_led_pattern(struct iwl_priv *priv, int led_id,
109 unsigned int idx)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700110{
Tomas Winklerec1a7462008-07-11 11:53:37 +0800111 struct iwl_led_cmd led_cmd = {
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700112 .id = led_id,
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700113 .interval = IWL_DEF_LED_INTRVL
114 };
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700115
Tomas Winklerec1a7462008-07-11 11:53:37 +0800116 BUG_ON(idx > IWL_MAX_BLINK_TBL);
117
118 led_cmd.on = blink_tbl[idx].on_time;
119 led_cmd.off = blink_tbl[idx].off_time;
120
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700121 return iwl_send_led_cmd(priv, &led_cmd);
122}
123
124/* Set led register off */
125static int iwl4965_led_on_reg(struct iwl_priv *priv, int led_id)
126{
127 IWL_DEBUG_LED("led on %d\n", led_id);
Tomas Winkler3395f6e2008-03-25 16:33:37 -0700128 iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700129 return 0;
130}
131
132#if 0
Tomas Winklerec1a7462008-07-11 11:53:37 +0800133/* Set led on command */
134static int iwl4965_led_on(struct iwl_priv *priv, int led_id)
135{
136 struct iwl_led_cmd led_cmd = {
137 .id = led_id,
138 .on = IWL_LED_SOLID,
139 .off = 0,
140 .interval = IWL_DEF_LED_INTRVL
141 };
142 return iwl_send_led_cmd(priv, &led_cmd);
143}
144
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700145/* Set led off command */
146int iwl4965_led_off(struct iwl_priv *priv, int led_id)
147{
Tomas Winklerec1a7462008-07-11 11:53:37 +0800148 struct iwl_led_cmd led_cmd = {
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700149 .id = led_id,
150 .on = 0,
151 .off = 0,
152 .interval = IWL_DEF_LED_INTRVL
153 };
154 IWL_DEBUG_LED("led off %d\n", led_id);
155 return iwl_send_led_cmd(priv, &led_cmd);
156}
157#endif
158
159
160/* Set led register off */
161static int iwl4965_led_off_reg(struct iwl_priv *priv, int led_id)
162{
Esti Kummerc785d1d2008-07-18 13:53:07 +0800163 IWL_DEBUG_LED("LED Reg off\n");
Tomas Winkler3395f6e2008-03-25 16:33:37 -0700164 iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_OFF);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700165 return 0;
166}
167
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700168/*
Esti Kummerc785d1d2008-07-18 13:53:07 +0800169 * Set led register in case of disassociation according to rfkill state
170 */
171static int iwl_led_associate(struct iwl_priv *priv, int led_id)
172{
173 IWL_DEBUG_LED("Associated\n");
174 priv->allow_blinking = 1;
175 return iwl4965_led_on_reg(priv, led_id);
176}
177static int iwl_led_disassociate(struct iwl_priv *priv, int led_id)
178{
179 priv->allow_blinking = 0;
180 if (iwl_is_rfkill(priv))
181 iwl4965_led_off_reg(priv, led_id);
182 else
183 iwl4965_led_on_reg(priv, led_id);
184
185 return 0;
186}
187
188/*
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700189 * brightness call back function for Tx/Rx LED
190 */
Tomas Winklerec1a7462008-07-11 11:53:37 +0800191static int iwl_led_associated(struct iwl_priv *priv, int led_id)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700192{
193 if (test_bit(STATUS_EXIT_PENDING, &priv->status) ||
194 !test_bit(STATUS_READY, &priv->status))
195 return 0;
196
197
198 /* start counting Tx/Rx bytes */
199 if (!priv->last_blink_time && priv->allow_blinking)
200 priv->last_blink_time = jiffies;
201 return 0;
202}
203
204/*
205 * brightness call back for association and radio
206 */
Tomas Winkler0eee6122008-07-11 11:53:36 +0800207static void iwl_led_brightness_set(struct led_classdev *led_cdev,
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700208 enum led_brightness brightness)
209{
Tomas Winkler0eee6122008-07-11 11:53:36 +0800210 struct iwl_led *led = container_of(led_cdev, struct iwl_led, led_dev);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700211 struct iwl_priv *priv = led->priv;
212
213 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
214 return;
215
Tomas Winkler0eee6122008-07-11 11:53:36 +0800216
217 IWL_DEBUG_LED("Led type = %s brightness = %d\n",
218 led_type_str[led->type], brightness);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700219 switch (brightness) {
220 case LED_FULL:
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700221 if (led->led_on)
222 led->led_on(priv, IWL_LED_LINK);
223 break;
224 case LED_OFF:
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700225 if (led->led_off)
226 led->led_off(priv, IWL_LED_LINK);
227 break;
228 default:
Tomas Winklerec1a7462008-07-11 11:53:37 +0800229 if (led->led_pattern) {
230 int idx = iwl_brightness_to_idx(brightness);
231 led->led_pattern(priv, IWL_LED_LINK, idx);
232 }
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700233 break;
234 }
235}
236
237
238
239/*
240 * Register led class with the system
241 */
Tomas Winkler0eee6122008-07-11 11:53:36 +0800242static int iwl_leds_register_led(struct iwl_priv *priv, struct iwl_led *led,
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700243 enum led_type type, u8 set_led,
Sven Wegener5cbbb372008-08-01 21:57:16 +0200244 char *trigger)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700245{
246 struct device *device = wiphy_dev(priv->hw->wiphy);
247 int ret;
248
Sven Wegener5cbbb372008-08-01 21:57:16 +0200249 led->led_dev.name = led->name;
Tomas Winkler0eee6122008-07-11 11:53:36 +0800250 led->led_dev.brightness_set = iwl_led_brightness_set;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700251 led->led_dev.default_trigger = trigger;
252
Tomas Winklera571ea4e2008-03-28 16:21:11 -0700253 led->priv = priv;
254 led->type = type;
255
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700256 ret = led_classdev_register(device, &led->led_dev);
257 if (ret) {
258 IWL_ERROR("Error: failed to register led handler.\n");
259 return ret;
260 }
261
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700262 led->registered = 1;
263
264 if (set_led && led->led_on)
265 led->led_on(priv, IWL_LED_LINK);
Tomas Winklera571ea4e2008-03-28 16:21:11 -0700266
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700267 return 0;
268}
269
270
271/*
272 * calculate blink rate according to last 2 sec Tx/Rx activities
273 */
Tomas Winklerec1a7462008-07-11 11:53:37 +0800274static int iwl_get_blink_rate(struct iwl_priv *priv)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700275{
276 int i;
Tomas Winkler0eee6122008-07-11 11:53:36 +0800277 u64 current_tpt = priv->tx_stats[2].bytes;
278 /* FIXME: + priv->rx_stats[2].bytes; */
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700279 s64 tpt = current_tpt - priv->led_tpt;
280
Tomas Winklera96a27f2008-10-23 23:48:56 -0700281 if (tpt < 0) /* wraparound */
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700282 tpt = -tpt;
283
Andrew Morton03121102008-07-22 23:50:04 -0700284 IWL_DEBUG_LED("tpt %lld current_tpt %llu\n",
285 (long long)tpt,
286 (unsigned long long)current_tpt);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700287 priv->led_tpt = current_tpt;
288
Tomas Winklerec1a7462008-07-11 11:53:37 +0800289 if (!priv->allow_blinking)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700290 i = IWL_MAX_BLINK_TBL;
Tomas Winklerec1a7462008-07-11 11:53:37 +0800291 else
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700292 for (i = 0; i < IWL_MAX_BLINK_TBL; i++)
293 if (tpt > (blink_tbl[i].tpt * IWL_1MB_RATE))
294 break;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700295
Tomas Winklerec1a7462008-07-11 11:53:37 +0800296 IWL_DEBUG_LED("LED BLINK IDX=%d", i);
297 return i;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700298}
299
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700300/*
301 * this function called from handler. Since setting Led command can
302 * happen very frequent we postpone led command to be called from
303 * REPLY handler so we know ucode is up
304 */
305void iwl_leds_background(struct iwl_priv *priv)
306{
Tomas Winklerec1a7462008-07-11 11:53:37 +0800307 u8 blink_idx;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700308
309 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
310 priv->last_blink_time = 0;
311 return;
312 }
Esti Kummerc785d1d2008-07-18 13:53:07 +0800313 if (iwl_is_rfkill(priv)) {
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700314 priv->last_blink_time = 0;
315 return;
316 }
317
318 if (!priv->allow_blinking) {
319 priv->last_blink_time = 0;
Tomas Winklerec1a7462008-07-11 11:53:37 +0800320 if (priv->last_blink_rate != IWL_SOLID_BLINK_IDX) {
321 priv->last_blink_rate = IWL_SOLID_BLINK_IDX;
322 iwl4965_led_pattern(priv, IWL_LED_LINK,
323 IWL_SOLID_BLINK_IDX);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700324 }
325 return;
326 }
327 if (!priv->last_blink_time ||
328 !time_after(jiffies, priv->last_blink_time +
329 msecs_to_jiffies(1000)))
330 return;
331
Tomas Winklerec1a7462008-07-11 11:53:37 +0800332 blink_idx = iwl_get_blink_rate(priv);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700333
334 /* call only if blink rate change */
Tomas Winklerec1a7462008-07-11 11:53:37 +0800335 if (blink_idx != priv->last_blink_rate)
336 iwl4965_led_pattern(priv, IWL_LED_LINK, blink_idx);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700337
Tomas Winkler0eee6122008-07-11 11:53:36 +0800338 priv->last_blink_time = jiffies;
Tomas Winklerec1a7462008-07-11 11:53:37 +0800339 priv->last_blink_rate = blink_idx;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700340}
341EXPORT_SYMBOL(iwl_leds_background);
342
343/* Register all led handler */
344int iwl_leds_register(struct iwl_priv *priv)
345{
346 char *trigger;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700347 int ret;
348
349 priv->last_blink_rate = 0;
350 priv->led_tpt = 0;
351 priv->last_blink_time = 0;
352 priv->allow_blinking = 0;
353
354 trigger = ieee80211_get_radio_led_name(priv->hw);
Sven Wegener5cbbb372008-08-01 21:57:16 +0200355 snprintf(priv->led[IWL_LED_TRG_RADIO].name,
356 sizeof(priv->led[IWL_LED_TRG_RADIO].name), "iwl-%s:radio",
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700357 wiphy_name(priv->hw->wiphy));
358
359 priv->led[IWL_LED_TRG_RADIO].led_on = iwl4965_led_on_reg;
360 priv->led[IWL_LED_TRG_RADIO].led_off = iwl4965_led_off_reg;
361 priv->led[IWL_LED_TRG_RADIO].led_pattern = NULL;
362
Tomas Winkler0eee6122008-07-11 11:53:36 +0800363 ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_RADIO],
Sven Wegener5cbbb372008-08-01 21:57:16 +0200364 IWL_LED_TRG_RADIO, 1, trigger);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700365 if (ret)
366 goto exit_fail;
367
368 trigger = ieee80211_get_assoc_led_name(priv->hw);
Sven Wegener5cbbb372008-08-01 21:57:16 +0200369 snprintf(priv->led[IWL_LED_TRG_ASSOC].name,
370 sizeof(priv->led[IWL_LED_TRG_ASSOC].name), "iwl-%s:assoc",
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700371 wiphy_name(priv->hw->wiphy));
372
Tomas Winkler0eee6122008-07-11 11:53:36 +0800373 ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_ASSOC],
Sven Wegener5cbbb372008-08-01 21:57:16 +0200374 IWL_LED_TRG_ASSOC, 0, trigger);
Tomas Winkler0eee6122008-07-11 11:53:36 +0800375
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700376 /* for assoc always turn led on */
Esti Kummerc785d1d2008-07-18 13:53:07 +0800377 priv->led[IWL_LED_TRG_ASSOC].led_on = iwl_led_associate;
378 priv->led[IWL_LED_TRG_ASSOC].led_off = iwl_led_disassociate;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700379 priv->led[IWL_LED_TRG_ASSOC].led_pattern = NULL;
380
381 if (ret)
382 goto exit_fail;
383
384 trigger = ieee80211_get_rx_led_name(priv->hw);
Sven Wegener5cbbb372008-08-01 21:57:16 +0200385 snprintf(priv->led[IWL_LED_TRG_RX].name,
386 sizeof(priv->led[IWL_LED_TRG_RX].name), "iwl-%s:RX",
387 wiphy_name(priv->hw->wiphy));
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700388
Tomas Winkler0eee6122008-07-11 11:53:36 +0800389 ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_RX],
Sven Wegener5cbbb372008-08-01 21:57:16 +0200390 IWL_LED_TRG_RX, 0, trigger);
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700391
Tomas Winklerec1a7462008-07-11 11:53:37 +0800392 priv->led[IWL_LED_TRG_RX].led_on = iwl_led_associated;
393 priv->led[IWL_LED_TRG_RX].led_off = iwl_led_associated;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700394 priv->led[IWL_LED_TRG_RX].led_pattern = iwl4965_led_pattern;
395
396 if (ret)
397 goto exit_fail;
398
399 trigger = ieee80211_get_tx_led_name(priv->hw);
Sven Wegener5cbbb372008-08-01 21:57:16 +0200400 snprintf(priv->led[IWL_LED_TRG_TX].name,
401 sizeof(priv->led[IWL_LED_TRG_TX].name), "iwl-%s:TX",
402 wiphy_name(priv->hw->wiphy));
403
Tomas Winkler0eee6122008-07-11 11:53:36 +0800404 ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_TX],
Sven Wegener5cbbb372008-08-01 21:57:16 +0200405 IWL_LED_TRG_TX, 0, trigger);
Tomas Winkler0eee6122008-07-11 11:53:36 +0800406
Tomas Winklerec1a7462008-07-11 11:53:37 +0800407 priv->led[IWL_LED_TRG_TX].led_on = iwl_led_associated;
408 priv->led[IWL_LED_TRG_TX].led_off = iwl_led_associated;
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700409 priv->led[IWL_LED_TRG_TX].led_pattern = iwl4965_led_pattern;
410
411 if (ret)
412 goto exit_fail;
413
414 return 0;
415
416exit_fail:
417 iwl_leds_unregister(priv);
418 return ret;
419}
420EXPORT_SYMBOL(iwl_leds_register);
421
422/* unregister led class */
Tomas Winkler0eee6122008-07-11 11:53:36 +0800423static void iwl_leds_unregister_led(struct iwl_led *led, u8 set_led)
Mohamed Abbasab53d8a2008-03-25 16:33:36 -0700424{
425 if (!led->registered)
426 return;
427
428 led_classdev_unregister(&led->led_dev);
429
430 if (set_led)
431 led->led_dev.brightness_set(&led->led_dev, LED_OFF);
432 led->registered = 0;
433}
434
435/* Unregister all led handlers */
436void iwl_leds_unregister(struct iwl_priv *priv)
437{
438 iwl_leds_unregister_led(&priv->led[IWL_LED_TRG_ASSOC], 0);
439 iwl_leds_unregister_led(&priv->led[IWL_LED_TRG_RX], 0);
440 iwl_leds_unregister_led(&priv->led[IWL_LED_TRG_TX], 0);
441 iwl_leds_unregister_led(&priv->led[IWL_LED_TRG_RADIO], 1);
442}
443EXPORT_SYMBOL(iwl_leds_unregister);
444