aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_event.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@nokia.com>2009-08-06 09:25:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:12:46 -0400
commitf5fc0f86b02afef1119b523623b4cde41475bc8c (patch)
tree793be075412781fef4fcd752032e9b3680eaf96f /drivers/net/wireless/wl12xx/wl1271_event.h
parentb935df01ed4f0848f29b1e39c4f95d87b0206dea (diff)
wl1271: add wl1271 driver files
This driver supports the wl1271 chipset from Texas Instruments based on the WiLink(tm) 6.0 mobile platform. Support for wl1273 should be relatively easy to add. This chipset is designed for embedded devices, with good powersaving capabilities. The wl1271 chipset is the successor of wl1251 and supports the 802.11b/g/n standards, but currently this driver supports only b/g. More information about this chipset can be found here: http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12762&contentId=29993 Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_event.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_event.h110
1 files changed, 110 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_event.h b/drivers/net/wireless/wl12xx/wl1271_event.h
new file mode 100644
index 000000000000..2cdce7c34bf0
--- /dev/null
+++ b/drivers/net/wireless/wl12xx/wl1271_event.h
@@ -0,0 +1,110 @@
1/*
2 * This file is part of wl1271
3 *
4 * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
5 * Copyright (C) 2008-2009 Nokia Corporation
6 *
7 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef __WL1271_EVENT_H__
26#define __WL1271_EVENT_H__
27
28/*
29 * Mbox events
30 *
31 * The event mechanism is based on a pair of event buffers (buffers A and
32 * B) at fixed locations in the target's memory. The host processes one
33 * buffer while the other buffer continues to collect events. If the host
34 * is not processing events, an interrupt is issued to signal that a buffer
35 * is ready. Once the host is done with processing events from one buffer,
36 * it signals the target (with an ACK interrupt) that the event buffer is
37 * free.
38 */
39
40enum {
41 MEASUREMENT_START_EVENT_ID = BIT(8),
42 MEASUREMENT_COMPLETE_EVENT_ID = BIT(9),
43 SCAN_COMPLETE_EVENT_ID = BIT(10),
44 SCHEDULED_SCAN_COMPLETE_EVENT_ID = BIT(11),
45 AP_DISCOVERY_COMPLETE_EVENT_ID = BIT(12),
46 PS_REPORT_EVENT_ID = BIT(13),
47 PSPOLL_DELIVERY_FAILURE_EVENT_ID = BIT(14),
48 DISCONNECT_EVENT_COMPLETE_ID = BIT(15),
49 JOIN_EVENT_COMPLETE_ID = BIT(16),
50 CHANNEL_SWITCH_COMPLETE_EVENT_ID = BIT(17),
51 BSS_LOSE_EVENT_ID = BIT(18),
52 REGAINED_BSS_EVENT_ID = BIT(19),
53 ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID = BIT(20),
54 SOFT_GEMINI_SENSE_EVENT_ID = BIT(22),
55 SOFT_GEMINI_PREDICTION_EVENT_ID = BIT(23),
56 SOFT_GEMINI_AVALANCHE_EVENT_ID = BIT(24),
57 PLT_RX_CALIBRATION_COMPLETE_EVENT_ID = BIT(25),
58 DBG_EVENT_ID = BIT(26),
59 HEALTH_CHECK_REPLY_EVENT_ID = BIT(27),
60 PERIODIC_SCAN_COMPLETE_EVENT_ID = BIT(28),
61 PERIODIC_SCAN_REPORT_EVENT_ID = BIT(29),
62 BA_SESSION_TEAR_DOWN_EVENT_ID = BIT(30),
63 EVENT_MBOX_ALL_EVENT_ID = 0x7fffffff,
64};
65
66struct event_debug_report {
67 u8 debug_event_id;
68 u8 num_params;
69 u16 pad;
70 u32 report_1;
71 u32 report_2;
72 u32 report_3;
73} __attribute__ ((packed));
74
75#define NUM_OF_RSSI_SNR_TRIGGERS 8
76
77struct event_mailbox {
78 u32 events_vector;
79 u32 events_mask;
80 u32 reserved_1;
81 u32 reserved_2;
82
83 u8 dbg_event_id;
84 u8 num_relevant_params;
85 u16 reserved_3;
86 u32 event_report_p1;
87 u32 event_report_p2;
88 u32 event_report_p3;
89
90 u8 number_of_scan_results;
91 u8 scan_tag;
92 u8 reserved_4[2];
93 u32 compl_scheduled_scan_status;
94
95 u16 scheduled_scan_attended_channels;
96 u8 soft_gemini_sense_info;
97 u8 soft_gemini_protective_info;
98 s8 rssi_snr_trigger_metric[NUM_OF_RSSI_SNR_TRIGGERS];
99 u8 channel_switch_status;
100 u8 scheduled_scan_status;
101 u8 ps_status;
102
103 u8 reserved_5[29];
104} __attribute__ ((packed));
105
106int wl1271_event_unmask(struct wl1271 *wl);
107void wl1271_event_mbox_config(struct wl1271 *wl);
108int wl1271_event_handle(struct wl1271 *wl, u8 mbox);
109
110#endif