summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlegacy/4965.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-08-29 18:59:15 +0400
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 15:41:01 +0400
commitfc19cbde0c38c24f2d473f9095fbd5772883ec59 (patch)
tree6ec9e44dfcc5dd3dc288847d913b067cde9a0b4b /drivers/net/wireless/iwlegacy/4965.c
parent61fe55f61fb48b691251e0f75505674db77f5d29 (diff)
downloadlinux-fc19cbde0c38c24f2d473f9095fbd5772883ec59.tar.xz
iwlegacy: merge iwl-4965-led.c into 4965.c
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/4965.c')
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c31
1 files changed, 30 insertions, 1 deletions
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 @@
#include "iwl-helpers.h"
#include "iwl-4965-calib.h"
#include "iwl-sta.h"
-#include "iwl-4965-led.h"
#include "iwl-4965.h"
#include "iwl-4965-debugfs.h"
+/* Send led command */
+static int
+il4965_send_led_cmd(struct il_priv *il, struct il_led_cmd *led_cmd)
+{
+ struct il_host_cmd cmd = {
+ .id = REPLY_LEDS_CMD,
+ .len = sizeof(struct il_led_cmd),
+ .data = led_cmd,
+ .flags = CMD_ASYNC,
+ .callback = NULL,
+ };
+ u32 reg;
+
+ reg = _il_rd(il, CSR_LED_REG);
+ if (reg != (reg & CSR_LED_BSM_CTRL_MSK))
+ _il_wr(il, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK);
+
+ return il_send_cmd(il, &cmd);
+}
+
+/* Set led register off */
+void il4965_led_enable(struct il_priv *il)
+{
+ _il_wr(il, CSR_LED_REG, CSR_LED_REG_TRUN_ON);
+}
+
+const struct il_led_ops il4965_led_ops = {
+ .cmd = il4965_send_led_cmd,
+};
+
static int il4965_send_tx_power(struct il_priv *il);
static int il4965_hw_get_temperature(struct il_priv *il);