iwlwifi: update copyright year to 2010
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-3945-led.c
CommitLineData
ab53d8af
MA
1/******************************************************************************
2 *
1f447808 3 * Copyright(c) 2003 - 2010 Intel Corporation. All rights reserved.
ab53d8af
MA
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:
759ef89f 22 * Intel Linux Wireless <ilw@linux.intel.com>
ab53d8af
MA
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
ab53d8af
MA
27#include <linux/kernel.h>
28#include <linux/module.h>
ab53d8af
MA
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
600c0e11 40#include "iwl-commands.h"
ab53d8af 41#include "iwl-3945.h"
518099a8
SO
42#include "iwl-core.h"
43#include "iwl-dev.h"
e932a609 44#include "iwl-3945-led.h"
ab53d8af 45
ab53d8af
MA
46
47/* Send led command */
e932a609
JB
48static int iwl3945_send_led_cmd(struct iwl_priv *priv,
49 struct iwl_led_cmd *led_cmd)
ab53d8af 50{
c2d79b48 51 struct iwl_host_cmd cmd = {
ab53d8af 52 .id = REPLY_LEDS_CMD,
4c897253 53 .len = sizeof(struct iwl_led_cmd),
ab53d8af 54 .data = led_cmd,
c2acea8e 55 .flags = CMD_ASYNC,
e932a609 56 .callback = NULL,
ab53d8af
MA
57 };
58
518099a8 59 return iwl_send_cmd(priv, &cmd);
ab53d8af
MA
60}
61
ab53d8af 62/* Set led on command */
e932a609 63static int iwl3945_led_on(struct iwl_priv *priv)
ab53d8af 64{
4c897253 65 struct iwl_led_cmd led_cmd = {
e932a609 66 .id = IWL_LED_LINK,
9a9ad0cd
AK
67 .on = IWL_LED_SOLID,
68 .off = 0,
ab53d8af
MA
69 .interval = IWL_DEF_LED_INTRVL
70 };
e932a609 71 return iwl3945_send_led_cmd(priv, &led_cmd);
ab53d8af
MA
72}
73
ab53d8af 74/* Set led off command */
e932a609 75static int iwl3945_led_off(struct iwl_priv *priv)
ab53d8af 76{
4c897253 77 struct iwl_led_cmd led_cmd = {
e932a609 78 .id = IWL_LED_LINK,
ab53d8af
MA
79 .on = 0,
80 .off = 0,
81 .interval = IWL_DEF_LED_INTRVL
82 };
e932a609
JB
83 IWL_DEBUG_LED(priv, "led off\n");
84 return iwl3945_send_led_cmd(priv, &led_cmd);
ab53d8af 85}
ab53d8af 86
e932a609
JB
87const struct iwl_led_ops iwl3945_led_ops = {
88 .cmd = iwl3945_send_led_cmd,
89 .on = iwl3945_led_on,
90 .off = iwl3945_led_off,
91};
This page took 0.34974 seconds and 5 git commands to generate.