diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-08-29 10:59:15 -0400 |
---|---|---|
committer | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 06:41:01 -0500 |
commit | fc19cbde0c38c24f2d473f9095fbd5772883ec59 (patch) | |
tree | 6ec9e44dfcc5dd3dc288847d913b067cde9a0b4b /drivers | |
parent | 61fe55f61fb48b691251e0f75505674db77f5d29 (diff) |
iwlegacy: merge iwl-4965-led.c into 4965.c
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-mac.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965-led.c | 73 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965-led.h | 33 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965.h | 2 |
6 files changed, 33 insertions, 109 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index df86431d3bae..4a8ad8df828d 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -58,7 +58,6 @@ | |||
58 | #include "iwl-sta.h" | 58 | #include "iwl-sta.h" |
59 | #include "iwl-4965-calib.h" | 59 | #include "iwl-4965-calib.h" |
60 | #include "iwl-4965.h" | 60 | #include "iwl-4965.h" |
61 | #include "iwl-4965-led.h" | ||
62 | 61 | ||
63 | 62 | ||
64 | /****************************************************************************** | 63 | /****************************************************************************** |
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c index bdfb3a616fdc..8f68b94fd74b 100644 --- a/drivers/net/wireless/iwlegacy/4965.c +++ b/drivers/net/wireless/iwlegacy/4965.c | |||
@@ -44,10 +44,39 @@ | |||
44 | #include "iwl-helpers.h" | 44 | #include "iwl-helpers.h" |
45 | #include "iwl-4965-calib.h" | 45 | #include "iwl-4965-calib.h" |
46 | #include "iwl-sta.h" | 46 | #include "iwl-sta.h" |
47 | #include "iwl-4965-led.h" | ||
48 | #include "iwl-4965.h" | 47 | #include "iwl-4965.h" |
49 | #include "iwl-4965-debugfs.h" | 48 | #include "iwl-4965-debugfs.h" |
50 | 49 | ||
50 | /* Send led command */ | ||
51 | static int | ||
52 | il4965_send_led_cmd(struct il_priv *il, struct il_led_cmd *led_cmd) | ||
53 | { | ||
54 | struct il_host_cmd cmd = { | ||
55 | .id = REPLY_LEDS_CMD, | ||
56 | .len = sizeof(struct il_led_cmd), | ||
57 | .data = led_cmd, | ||
58 | .flags = CMD_ASYNC, | ||
59 | .callback = NULL, | ||
60 | }; | ||
61 | u32 reg; | ||
62 | |||
63 | reg = _il_rd(il, CSR_LED_REG); | ||
64 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) | ||
65 | _il_wr(il, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK); | ||
66 | |||
67 | return il_send_cmd(il, &cmd); | ||
68 | } | ||
69 | |||
70 | /* Set led register off */ | ||
71 | void il4965_led_enable(struct il_priv *il) | ||
72 | { | ||
73 | _il_wr(il, CSR_LED_REG, CSR_LED_REG_TRUN_ON); | ||
74 | } | ||
75 | |||
76 | const struct il_led_ops il4965_led_ops = { | ||
77 | .cmd = il4965_send_led_cmd, | ||
78 | }; | ||
79 | |||
51 | static int il4965_send_tx_power(struct il_priv *il); | 80 | static int il4965_send_tx_power(struct il_priv *il); |
52 | static int il4965_hw_get_temperature(struct il_priv *il); | 81 | static int il4965_hw_get_temperature(struct il_priv *il); |
53 | 82 | ||
diff --git a/drivers/net/wireless/iwlegacy/Makefile b/drivers/net/wireless/iwlegacy/Makefile index cd8ac73d45bf..b909352484a6 100644 --- a/drivers/net/wireless/iwlegacy/Makefile +++ b/drivers/net/wireless/iwlegacy/Makefile | |||
@@ -8,7 +8,7 @@ iwl-legacy-objs += $(iwl-legacy-m) | |||
8 | 8 | ||
9 | # 4965 | 9 | # 4965 |
10 | obj-$(CONFIG_IWL4965) += iwl4965.o | 10 | obj-$(CONFIG_IWL4965) += iwl4965.o |
11 | iwl4965-objs := 4965.o 4965-mac.o iwl-4965-rs.o iwl-4965-led.o | 11 | iwl4965-objs := 4965.o 4965-mac.o iwl-4965-rs.o |
12 | iwl4965-objs += iwl-4965-ucode.o iwl-4965-tx.o | 12 | iwl4965-objs += iwl-4965-ucode.o iwl-4965-tx.o |
13 | iwl4965-objs += iwl-4965-lib.o iwl-4965-rx.o iwl-4965-calib.o | 13 | iwl4965-objs += iwl-4965-lib.o iwl-4965-rx.o iwl-4965-calib.o |
14 | iwl4965-objs += iwl-4965-sta.o iwl-4965-eeprom.o | 14 | iwl4965-objs += iwl-4965-sta.o iwl-4965-eeprom.o |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-led.c b/drivers/net/wireless/iwlegacy/iwl-4965-led.c deleted file mode 100644 index 48541577202a..000000000000 --- a/drivers/net/wireless/iwlegacy/iwl-4965-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 <net/mac80211.h> | ||
36 | #include <linux/etherdevice.h> | ||
37 | #include <asm/unaligned.h> | ||
38 | |||
39 | #include "iwl-commands.h" | ||
40 | #include "iwl-dev.h" | ||
41 | #include "iwl-core.h" | ||
42 | #include "iwl-io.h" | ||
43 | #include "iwl-4965-led.h" | ||
44 | |||
45 | /* Send led command */ | ||
46 | static int | ||
47 | il4965_send_led_cmd(struct il_priv *il, struct il_led_cmd *led_cmd) | ||
48 | { | ||
49 | struct il_host_cmd cmd = { | ||
50 | .id = REPLY_LEDS_CMD, | ||
51 | .len = sizeof(struct il_led_cmd), | ||
52 | .data = led_cmd, | ||
53 | .flags = CMD_ASYNC, | ||
54 | .callback = NULL, | ||
55 | }; | ||
56 | u32 reg; | ||
57 | |||
58 | reg = _il_rd(il, CSR_LED_REG); | ||
59 | if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) | ||
60 | _il_wr(il, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK); | ||
61 | |||
62 | return il_send_cmd(il, &cmd); | ||
63 | } | ||
64 | |||
65 | /* Set led register off */ | ||
66 | void il4965_led_enable(struct il_priv *il) | ||
67 | { | ||
68 | _il_wr(il, CSR_LED_REG, CSR_LED_REG_TRUN_ON); | ||
69 | } | ||
70 | |||
71 | const struct il_led_ops il4965_led_ops = { | ||
72 | .cmd = il4965_send_led_cmd, | ||
73 | }; | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-led.h b/drivers/net/wireless/iwlegacy/iwl-4965-led.h deleted file mode 100644 index e804fe16caef..000000000000 --- a/drivers/net/wireless/iwlegacy/iwl-4965-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 __il_4965_led_h__ | ||
28 | #define __il_4965_led_h__ | ||
29 | |||
30 | extern const struct il_led_ops il4965_led_ops; | ||
31 | void il4965_led_enable(struct il_priv *il); | ||
32 | |||
33 | #endif /* __il_4965_led_h__ */ | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.h b/drivers/net/wireless/iwlegacy/iwl-4965.h index 8076bbe28cff..c0bb45b012d2 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.h +++ b/drivers/net/wireless/iwlegacy/iwl-4965.h | |||
@@ -279,4 +279,6 @@ int il4965_mac_sta_add(struct ieee80211_hw *hw, | |||
279 | void il4965_mac_channel_switch(struct ieee80211_hw *hw, | 279 | void il4965_mac_channel_switch(struct ieee80211_hw *hw, |
280 | struct ieee80211_channel_switch *ch_switch); | 280 | struct ieee80211_channel_switch *ch_switch); |
281 | 281 | ||
282 | void il4965_led_enable(struct il_priv *il); | ||
283 | |||
282 | #endif /* __il_4965_h__ */ | 284 | #endif /* __il_4965_h__ */ |