diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-05 11:30:43 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-18 11:47:43 -0400 |
commit | e79b1ca75bb48111e8d93fc576f50e24671f5f9d (patch) | |
tree | 41f07ec5de343a4bd65c38e508fcc9fd1229b428 /drivers/net/wireless | |
parent | 6fc3ba999994b675c4e6af77ac4e1a6bfd8e6128 (diff) |
iwlagn: use direct call for led functions
After driver split, no need to call led functions through callback
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-led.c | 73 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-led.h | 33 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-led.h | 1 |
11 files changed, 27 insertions, 125 deletions
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index 3652931753e0..bb6a737de61f 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # AGN | 1 | # AGN |
2 | obj-$(CONFIG_IWLAGN) += iwlagn.o | 2 | obj-$(CONFIG_IWLAGN) += iwlagn.o |
3 | iwlagn-objs := iwl-agn.o iwl-agn-rs.o iwl-agn-led.o | 3 | iwlagn-objs := iwl-agn.o iwl-agn-rs.o |
4 | iwlagn-objs += iwl-agn-ucode.o iwl-agn-tx.o | 4 | iwlagn-objs += iwl-agn-ucode.o iwl-agn-tx.o |
5 | iwlagn-objs += iwl-agn-lib.o iwl-agn-calib.o iwl-io.o | 5 | iwlagn-objs += iwl-agn-lib.o iwl-agn-calib.o iwl-io.o |
6 | iwlagn-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-eeprom.o | 6 | iwlagn-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-eeprom.o |
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index d1d7852f0ee4..809117d74196 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include "iwl-agn.h" | 45 | #include "iwl-agn.h" |
46 | #include "iwl-helpers.h" | 46 | #include "iwl-helpers.h" |
47 | #include "iwl-agn-hw.h" | 47 | #include "iwl-agn-hw.h" |
48 | #include "iwl-agn-led.h" | ||
49 | #include "iwl-agn-debugfs.h" | 48 | #include "iwl-agn-debugfs.h" |
50 | 49 | ||
51 | /* Highest firmware API version supported */ | 50 | /* Highest firmware API version supported */ |
@@ -226,7 +225,6 @@ static const struct iwl_ops iwl1000_ops = { | |||
226 | .lib = &iwl1000_lib, | 225 | .lib = &iwl1000_lib, |
227 | .hcmd = &iwlagn_hcmd, | 226 | .hcmd = &iwlagn_hcmd, |
228 | .utils = &iwlagn_hcmd_utils, | 227 | .utils = &iwlagn_hcmd_utils, |
229 | .led = &iwlagn_led_ops, | ||
230 | .ieee80211_ops = &iwlagn_hw_ops, | 228 | .ieee80211_ops = &iwlagn_hw_ops, |
231 | }; | 229 | }; |
232 | 230 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index a31314fdb053..0a330d16ce7e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include "iwl-helpers.h" | 46 | #include "iwl-helpers.h" |
47 | #include "iwl-agn-hw.h" | 47 | #include "iwl-agn-hw.h" |
48 | #include "iwl-6000-hw.h" | 48 | #include "iwl-6000-hw.h" |
49 | #include "iwl-agn-led.h" | ||
50 | #include "iwl-agn-debugfs.h" | 49 | #include "iwl-agn-debugfs.h" |
51 | 50 | ||
52 | /* Highest firmware API version supported */ | 51 | /* Highest firmware API version supported */ |
@@ -310,7 +309,6 @@ static const struct iwl_ops iwl2000_ops = { | |||
310 | .lib = &iwl2000_lib, | 309 | .lib = &iwl2000_lib, |
311 | .hcmd = &iwlagn_hcmd, | 310 | .hcmd = &iwlagn_hcmd, |
312 | .utils = &iwlagn_hcmd_utils, | 311 | .utils = &iwlagn_hcmd_utils, |
313 | .led = &iwlagn_led_ops, | ||
314 | .ieee80211_ops = &iwlagn_hw_ops, | 312 | .ieee80211_ops = &iwlagn_hw_ops, |
315 | }; | 313 | }; |
316 | 314 | ||
@@ -318,7 +316,6 @@ static const struct iwl_ops iwl2030_ops = { | |||
318 | .lib = &iwl2000_lib, | 316 | .lib = &iwl2000_lib, |
319 | .hcmd = &iwlagn_bt_hcmd, | 317 | .hcmd = &iwlagn_bt_hcmd, |
320 | .utils = &iwlagn_hcmd_utils, | 318 | .utils = &iwlagn_hcmd_utils, |
321 | .led = &iwlagn_led_ops, | ||
322 | .ieee80211_ops = &iwlagn_hw_ops, | 319 | .ieee80211_ops = &iwlagn_hw_ops, |
323 | }; | 320 | }; |
324 | 321 | ||
@@ -326,7 +323,6 @@ static const struct iwl_ops iwl200_ops = { | |||
326 | .lib = &iwl2000_lib, | 323 | .lib = &iwl2000_lib, |
327 | .hcmd = &iwlagn_hcmd, | 324 | .hcmd = &iwlagn_hcmd, |
328 | .utils = &iwlagn_hcmd_utils, | 325 | .utils = &iwlagn_hcmd_utils, |
329 | .led = &iwlagn_led_ops, | ||
330 | .ieee80211_ops = &iwlagn_hw_ops, | 326 | .ieee80211_ops = &iwlagn_hw_ops, |
331 | }; | 327 | }; |
332 | 328 | ||
@@ -334,7 +330,6 @@ static const struct iwl_ops iwl230_ops = { | |||
334 | .lib = &iwl2000_lib, | 330 | .lib = &iwl2000_lib, |
335 | .hcmd = &iwlagn_bt_hcmd, | 331 | .hcmd = &iwlagn_bt_hcmd, |
336 | .utils = &iwlagn_hcmd_utils, | 332 | .utils = &iwlagn_hcmd_utils, |
337 | .led = &iwlagn_led_ops, | ||
338 | .ieee80211_ops = &iwlagn_hw_ops, | 333 | .ieee80211_ops = &iwlagn_hw_ops, |
339 | }; | 334 | }; |
340 | 335 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 7c286662d26a..79dd45c3aefc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include "iwl-sta.h" | 45 | #include "iwl-sta.h" |
46 | #include "iwl-helpers.h" | 46 | #include "iwl-helpers.h" |
47 | #include "iwl-agn.h" | 47 | #include "iwl-agn.h" |
48 | #include "iwl-agn-led.h" | ||
49 | #include "iwl-agn-hw.h" | 48 | #include "iwl-agn-hw.h" |
50 | #include "iwl-5000-hw.h" | 49 | #include "iwl-5000-hw.h" |
51 | #include "iwl-agn-debugfs.h" | 50 | #include "iwl-agn-debugfs.h" |
@@ -447,7 +446,6 @@ static const struct iwl_ops iwl5000_ops = { | |||
447 | .lib = &iwl5000_lib, | 446 | .lib = &iwl5000_lib, |
448 | .hcmd = &iwlagn_hcmd, | 447 | .hcmd = &iwlagn_hcmd, |
449 | .utils = &iwlagn_hcmd_utils, | 448 | .utils = &iwlagn_hcmd_utils, |
450 | .led = &iwlagn_led_ops, | ||
451 | .ieee80211_ops = &iwlagn_hw_ops, | 449 | .ieee80211_ops = &iwlagn_hw_ops, |
452 | }; | 450 | }; |
453 | 451 | ||
@@ -455,7 +453,6 @@ static const struct iwl_ops iwl5150_ops = { | |||
455 | .lib = &iwl5150_lib, | 453 | .lib = &iwl5150_lib, |
456 | .hcmd = &iwlagn_hcmd, | 454 | .hcmd = &iwlagn_hcmd, |
457 | .utils = &iwlagn_hcmd_utils, | 455 | .utils = &iwlagn_hcmd_utils, |
458 | .led = &iwlagn_led_ops, | ||
459 | .ieee80211_ops = &iwlagn_hw_ops, | 456 | .ieee80211_ops = &iwlagn_hw_ops, |
460 | }; | 457 | }; |
461 | 458 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 064981345c84..a35338e20b10 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include "iwl-helpers.h" | 46 | #include "iwl-helpers.h" |
47 | #include "iwl-agn-hw.h" | 47 | #include "iwl-agn-hw.h" |
48 | #include "iwl-6000-hw.h" | 48 | #include "iwl-6000-hw.h" |
49 | #include "iwl-agn-led.h" | ||
50 | #include "iwl-agn-debugfs.h" | 49 | #include "iwl-agn-debugfs.h" |
51 | 50 | ||
52 | /* Highest firmware API version supported */ | 51 | /* Highest firmware API version supported */ |
@@ -397,7 +396,6 @@ static const struct iwl_ops iwl6000_ops = { | |||
397 | .lib = &iwl6000_lib, | 396 | .lib = &iwl6000_lib, |
398 | .hcmd = &iwlagn_hcmd, | 397 | .hcmd = &iwlagn_hcmd, |
399 | .utils = &iwlagn_hcmd_utils, | 398 | .utils = &iwlagn_hcmd_utils, |
400 | .led = &iwlagn_led_ops, | ||
401 | .ieee80211_ops = &iwlagn_hw_ops, | 399 | .ieee80211_ops = &iwlagn_hw_ops, |
402 | }; | 400 | }; |
403 | 401 | ||
@@ -405,7 +403,6 @@ static const struct iwl_ops iwl6050_ops = { | |||
405 | .lib = &iwl6000_lib, | 403 | .lib = &iwl6000_lib, |
406 | .hcmd = &iwlagn_hcmd, | 404 | .hcmd = &iwlagn_hcmd, |
407 | .utils = &iwlagn_hcmd_utils, | 405 | .utils = &iwlagn_hcmd_utils, |
408 | .led = &iwlagn_led_ops, | ||
409 | .nic = &iwl6050_nic_ops, | 406 | .nic = &iwl6050_nic_ops, |
410 | .ieee80211_ops = &iwlagn_hw_ops, | 407 | .ieee80211_ops = &iwlagn_hw_ops, |
411 | }; | 408 | }; |
@@ -414,7 +411,6 @@ static const struct iwl_ops iwl6150_ops = { | |||
414 | .lib = &iwl6000_lib, | 411 | .lib = &iwl6000_lib, |
415 | .hcmd = &iwlagn_hcmd, | 412 | .hcmd = &iwlagn_hcmd, |
416 | .utils = &iwlagn_hcmd_utils, | 413 | .utils = &iwlagn_hcmd_utils, |
417 | .led = &iwlagn_led_ops, | ||
418 | .nic = &iwl6150_nic_ops, | 414 | .nic = &iwl6150_nic_ops, |
419 | .ieee80211_ops = &iwlagn_hw_ops, | 415 | .ieee80211_ops = &iwlagn_hw_ops, |
420 | }; | 416 | }; |
@@ -423,7 +419,6 @@ static const struct iwl_ops iwl6030_ops = { | |||
423 | .lib = &iwl6030_lib, | 419 | .lib = &iwl6030_lib, |
424 | .hcmd = &iwlagn_bt_hcmd, | 420 | .hcmd = &iwlagn_bt_hcmd, |
425 | .utils = &iwlagn_hcmd_utils, | 421 | .utils = &iwlagn_hcmd_utils, |
426 | .led = &iwlagn_led_ops, | ||
427 | .ieee80211_ops = &iwlagn_hw_ops, | 422 | .ieee80211_ops = &iwlagn_hw_ops, |
428 | }; | 423 | }; |
429 | 424 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-led.c b/drivers/net/wireless/iwlwifi/iwl-agn-led.c deleted file mode 100644 index 4bb877e600c7..000000000000 --- a/drivers/net/wireless/iwlwifi/iwl-agn-led.c +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2003 - 2011 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: | ||
22 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
24 | * | ||
25 | *****************************************************************************/ | ||
26 | |||
27 | #include <linux/kernel.h> | ||
28 | #include <linux/module.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/pci.h> | ||
31 | #include <linux/dma-mapping.h> | ||
32 | #include <linux/delay.h> | ||
33 | #include <linux/skbuff.h> | ||
34 | #include <linux/netdevice.h> | ||
35 | #include <linux/wireless.h> | ||
36 | #include <net/mac80211.h> | ||
37 | #include <linux/etherdevice.h> | ||
38 | #include <asm/unaligned.h> | ||
39 | |||
40 | #include "iwl-commands.h" | ||
41 | #include "iwl-dev.h" | ||
42 | #include "iwl-core.h" | ||
43 | #include "iwl-io.h" | ||
44 | #include "iwl-agn-led.h" | ||
45 | |||
46 | /* Send led command */ | ||
47 | static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd) | ||
48 | { | ||
49 | struct iwl_host_cmd cmd = { | ||
50 | .id = REPLY_LEDS_CMD, | ||
51 | .len = sizeof(struct iwl_led_cmd), | ||
52 | .data = led_cmd, | ||
53 | .flags = CMD_ASYNC, | ||
54 | .callback = NULL, | ||
55 | }; | ||
56 | u32 reg; | ||
57 | |||
58 | reg = iwl_read32(priv, CSR_LED_REG); | ||
59 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) | ||
60 | iwl_write32(priv, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK); | ||
61 | |||
62 | return iwl_send_cmd(priv, &cmd); | ||
63 | } | ||
64 | |||
65 | /* Set led register off */ | ||
66 | void iwlagn_led_enable(struct iwl_priv *priv) | ||
67 | { | ||
68 | iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON); | ||
69 | } | ||
70 | |||
71 | const struct iwl_led_ops iwlagn_led_ops = { | ||
72 | .cmd = iwl_send_led_cmd, | ||
73 | }; | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-led.h b/drivers/net/wireless/iwlwifi/iwl-agn-led.h deleted file mode 100644 index c0b7611b72c3..000000000000 --- a/drivers/net/wireless/iwlwifi/iwl-agn-led.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2003 - 2011 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: | ||
22 | * Intel Linux Wireless <ilw@linux.intel.com> | ||
23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
24 | * | ||
25 | *****************************************************************************/ | ||
26 | |||
27 | #ifndef __iwl_agn_led_h__ | ||
28 | #define __iwl_agn_led_h__ | ||
29 | |||
30 | extern const struct iwl_led_ops iwlagn_led_ops; | ||
31 | void iwlagn_led_enable(struct iwl_priv *priv); | ||
32 | |||
33 | #endif /* __iwl_agn_led_h__ */ | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 47a4cda9eb72..b4f7510f51ec 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include "iwl-sta.h" | 59 | #include "iwl-sta.h" |
60 | #include "iwl-agn-calib.h" | 60 | #include "iwl-agn-calib.h" |
61 | #include "iwl-agn.h" | 61 | #include "iwl-agn.h" |
62 | #include "iwl-agn-led.h" | ||
63 | 62 | ||
64 | 63 | ||
65 | /****************************************************************************** | 64 | /****************************************************************************** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 6988335328e8..240abdf4347c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -217,7 +217,6 @@ struct iwl_ops { | |||
217 | const struct iwl_lib_ops *lib; | 217 | const struct iwl_lib_ops *lib; |
218 | const struct iwl_hcmd_ops *hcmd; | 218 | const struct iwl_hcmd_ops *hcmd; |
219 | const struct iwl_hcmd_utils_ops *utils; | 219 | const struct iwl_hcmd_utils_ops *utils; |
220 | const struct iwl_led_ops *led; | ||
221 | const struct iwl_nic_ops *nic; | 220 | const struct iwl_nic_ops *nic; |
222 | const struct iwl_legacy_ops *legacy; | 221 | const struct iwl_legacy_ops *legacy; |
223 | const struct ieee80211_ops *ieee80211_ops; | 222 | const struct ieee80211_ops *ieee80211_ops; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index 0d90004e8b1b..d798c2a152d3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -61,6 +61,12 @@ static const struct ieee80211_tpt_blink iwl_blink[] = { | |||
61 | { .throughput = 300 * 1024 - 1, .blink_time = 50 }, | 61 | { .throughput = 300 * 1024 - 1, .blink_time = 50 }, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /* Set led register off */ | ||
65 | void iwlagn_led_enable(struct iwl_priv *priv) | ||
66 | { | ||
67 | iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON); | ||
68 | } | ||
69 | |||
64 | /* | 70 | /* |
65 | * Adjust led blink rate to compensate on a MAC Clock difference on every HW | 71 | * Adjust led blink rate to compensate on a MAC Clock difference on every HW |
66 | * Led blink rate analysis showed an average deviation of 20% on 5000 series | 72 | * Led blink rate analysis showed an average deviation of 20% on 5000 series |
@@ -84,6 +90,24 @@ static inline u8 iwl_blink_compensation(struct iwl_priv *priv, | |||
84 | return (u8)((time * compensation) >> 6); | 90 | return (u8)((time * compensation) >> 6); |
85 | } | 91 | } |
86 | 92 | ||
93 | static int iwl_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd) | ||
94 | { | ||
95 | struct iwl_host_cmd cmd = { | ||
96 | .id = REPLY_LEDS_CMD, | ||
97 | .len = sizeof(struct iwl_led_cmd), | ||
98 | .data = led_cmd, | ||
99 | .flags = CMD_ASYNC, | ||
100 | .callback = NULL, | ||
101 | }; | ||
102 | u32 reg; | ||
103 | |||
104 | reg = iwl_read32(priv, CSR_LED_REG); | ||
105 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) | ||
106 | iwl_write32(priv, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK); | ||
107 | |||
108 | return iwl_send_cmd(priv, &cmd); | ||
109 | } | ||
110 | |||
87 | /* Set led pattern command */ | 111 | /* Set led pattern command */ |
88 | static int iwl_led_cmd(struct iwl_priv *priv, | 112 | static int iwl_led_cmd(struct iwl_priv *priv, |
89 | unsigned long on, | 113 | unsigned long on, |
@@ -108,7 +132,7 @@ static int iwl_led_cmd(struct iwl_priv *priv, | |||
108 | led_cmd.off = iwl_blink_compensation(priv, off, | 132 | led_cmd.off = iwl_blink_compensation(priv, off, |
109 | priv->cfg->base_params->led_compensation); | 133 | priv->cfg->base_params->led_compensation); |
110 | 134 | ||
111 | ret = priv->cfg->ops->led->cmd(priv, &led_cmd); | 135 | ret = iwl_send_led_cmd(priv, &led_cmd); |
112 | if (!ret) { | 136 | if (!ret) { |
113 | priv->blink_on = on; | 137 | priv->blink_on = on; |
114 | priv->blink_off = off; | 138 | priv->blink_off = off; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.h b/drivers/net/wireless/iwlwifi/iwl-led.h index 05b8e8f7dd4a..1c93dfef6933 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.h +++ b/drivers/net/wireless/iwlwifi/iwl-led.h | |||
@@ -50,6 +50,7 @@ enum iwl_led_mode { | |||
50 | IWL_LED_BLINK, | 50 | IWL_LED_BLINK, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | void iwlagn_led_enable(struct iwl_priv *priv); | ||
53 | void iwl_leds_init(struct iwl_priv *priv); | 54 | void iwl_leds_init(struct iwl_priv *priv); |
54 | void iwl_leds_exit(struct iwl_priv *priv); | 55 | void iwl_leds_exit(struct iwl_priv *priv); |
55 | 56 | ||