aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ath6kl/include/a_drv_api.h
diff options
context:
space:
mode:
authorVipin Mehta <vmehta@atheros.com>2010-09-01 15:06:33 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-02 14:43:26 -0400
commit30295c8936f3a426985e99bebb17d72bd7847910 (patch)
tree28ff0c23bfa931b73a35e7b11df1bf104260c6fa /drivers/staging/ath6kl/include/a_drv_api.h
parent9b9913d80b2896ecd9e0a1a8f167ccad66fac79c (diff)
staging: add ath6kl driver for AR6003 chip
AR6003 is a single stream, SDIO based 802.11 chipset from Atheros optimized for mobile and embedded devices. ath6kl is a cfg80211 driver for AR6003 and supports both the station and AP mode of operation. Station mode supports 802.11 a/b/g/n with HT20 on 2.4/5GHz and HT40 only on 5GHz. Some of the other features include WPA/WPA2, WPS, WMM, WMM-PS, and BT coexistence. AP mode can be operated only in b/g mode with support for a subset of features mentioned above. The driver supports cfg80211 but comes with its own set of wext ioctls which have historically supported some of our customers with features like BT 3.0 and AP mode of operation. For further details, please refer to: http://wireless.kernel.org/en/users/Drivers/ath6kl The driver requires firmware that runs on the chip's network processor. The majority of it is stored in ROM. The binaries that are downloaded and executed from RAM are as follows: 1) Patch against the code in ROM for bug fixes and feature enhancements. 2) Code to copy the data from the OTP region of the memory into RAM. 3) Calibration file carrying board specific data. The above files need to be present in the directory '/lib/firmware/ath6k/AR6003/hw2.0/' for the driver to initialize the chip upon enumeration. The files can be downloaded from the link specified at the following location: http://wireless.kernel.org/en/users/Drivers/ath6kl#Download This driver is only provided in the interim while we work on the mac80211 replacement, ath6k. Once the mac80211 driver achieves feature parity with the ath6kl driver, the ath6kl will be deprecated and removed from staging. Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ath6kl/include/a_drv_api.h')
-rw-r--r--drivers/staging/ath6kl/include/a_drv_api.h232
1 files changed, 232 insertions, 0 deletions
diff --git a/drivers/staging/ath6kl/include/a_drv_api.h b/drivers/staging/ath6kl/include/a_drv_api.h
new file mode 100644
index 00000000000..7d077c62ad7
--- /dev/null
+++ b/drivers/staging/ath6kl/include/a_drv_api.h
@@ -0,0 +1,232 @@
1//------------------------------------------------------------------------------
2// <copyright file="a_drv_api.h" company="Atheros">
3// Copyright (c) 2004-2010 Atheros Corporation. All rights reserved.
4//
5//
6// Permission to use, copy, modify, and/or distribute this software for any
7// purpose with or without fee is hereby granted, provided that the above
8// copyright notice and this permission notice appear in all copies.
9//
10// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17//
18//
19//------------------------------------------------------------------------------
20//==============================================================================
21// Author(s): ="Atheros"
22//==============================================================================
23#ifndef _A_DRV_API_H_
24#define _A_DRV_API_H_
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/****************************************************************************/
31/****************************************************************************/
32/** **/
33/** WMI related hooks **/
34/** **/
35/****************************************************************************/
36/****************************************************************************/
37
38#include <ar6000_api.h>
39
40#define A_WMI_CHANNELLIST_RX(devt, numChan, chanList) \
41 ar6000_channelList_rx((devt), (numChan), (chanList))
42
43#define A_WMI_SET_NUMDATAENDPTS(devt, num) \
44 ar6000_set_numdataendpts((devt), (num))
45
46#define A_WMI_CONTROL_TX(devt, osbuf, streamID) \
47 ar6000_control_tx((devt), (osbuf), (streamID))
48
49#define A_WMI_TARGETSTATS_EVENT(devt, pStats, len) \
50 ar6000_targetStats_event((devt), (pStats), (len))
51
52#define A_WMI_SCANCOMPLETE_EVENT(devt, status) \
53 ar6000_scanComplete_event((devt), (status))
54
55#ifdef CONFIG_HOST_DSET_SUPPORT
56
57#define A_WMI_DSET_DATA_REQ(devt, access_cookie, offset, length, targ_buf, targ_reply_fn, targ_reply_arg) \
58 ar6000_dset_data_req((devt), (access_cookie), (offset), (length), (targ_buf), (targ_reply_fn), (targ_reply_arg))
59
60#define A_WMI_DSET_CLOSE(devt, access_cookie) \
61 ar6000_dset_close((devt), (access_cookie))
62
63#endif
64
65#define A_WMI_DSET_OPEN_REQ(devt, id, targ_handle, targ_reply_fn, targ_reply_arg) \
66 ar6000_dset_open_req((devt), (id), (targ_handle), (targ_reply_fn), (targ_reply_arg))
67
68#define A_WMI_CONNECT_EVENT(devt, channel, bssid, listenInterval, beaconInterval, networkType, beaconIeLen, assocReqLen, assocRespLen, assocInfo) \
69 ar6000_connect_event((devt), (channel), (bssid), (listenInterval), (beaconInterval), (networkType), (beaconIeLen), (assocReqLen), (assocRespLen), (assocInfo))
70
71#define A_WMI_PSPOLL_EVENT(devt, aid)\
72 ar6000_pspoll_event((devt),(aid))
73
74#define A_WMI_DTIMEXPIRY_EVENT(devt)\
75 ar6000_dtimexpiry_event((devt))
76
77#ifdef WAPI_ENABLE
78#define A_WMI_WAPI_REKEY_EVENT(devt, type, mac)\
79 ap_wapi_rekey_event((devt),(type),(mac))
80#endif
81
82#define A_WMI_REGDOMAIN_EVENT(devt, regCode) \
83 ar6000_regDomain_event((devt), (regCode))
84
85#define A_WMI_NEIGHBORREPORT_EVENT(devt, numAps, info) \
86 ar6000_neighborReport_event((devt), (numAps), (info))
87
88#define A_WMI_DISCONNECT_EVENT(devt, reason, bssid, assocRespLen, assocInfo, protocolReasonStatus) \
89 ar6000_disconnect_event((devt), (reason), (bssid), (assocRespLen), (assocInfo), (protocolReasonStatus))
90
91#define A_WMI_TKIP_MICERR_EVENT(devt, keyid, ismcast) \
92 ar6000_tkip_micerr_event((devt), (keyid), (ismcast))
93
94#define A_WMI_BITRATE_RX(devt, rateKbps) \
95 ar6000_bitrate_rx((devt), (rateKbps))
96
97#define A_WMI_TXPWR_RX(devt, txPwr) \
98 ar6000_txPwr_rx((devt), (txPwr))
99
100#define A_WMI_READY_EVENT(devt, datap, phyCap, sw_ver, abi_ver) \
101 ar6000_ready_event((devt), (datap), (phyCap), (sw_ver), (abi_ver))
102
103#define A_WMI_DBGLOG_INIT_DONE(ar) \
104 ar6000_dbglog_init_done(ar);
105
106#define A_WMI_RSSI_THRESHOLD_EVENT(devt, newThreshold, rssi) \
107 ar6000_rssiThreshold_event((devt), (newThreshold), (rssi))
108
109#define A_WMI_REPORT_ERROR_EVENT(devt, errorVal) \
110 ar6000_reportError_event((devt), (errorVal))
111
112#define A_WMI_ROAM_TABLE_EVENT(devt, pTbl) \
113 ar6000_roam_tbl_event((devt), (pTbl))
114
115#define A_WMI_ROAM_DATA_EVENT(devt, p) \
116 ar6000_roam_data_event((devt), (p))
117
118#define A_WMI_WOW_LIST_EVENT(devt, num_filters, wow_filters) \
119 ar6000_wow_list_event((devt), (num_filters), (wow_filters))
120
121#define A_WMI_CAC_EVENT(devt, ac, cac_indication, statusCode, tspecSuggestion) \
122 ar6000_cac_event((devt), (ac), (cac_indication), (statusCode), (tspecSuggestion))
123
124#define A_WMI_CHANNEL_CHANGE_EVENT(devt, oldChannel, newChannel) \
125 ar6000_channel_change_event((devt), (oldChannel), (newChannel))
126
127#define A_WMI_PMKID_LIST_EVENT(devt, num_pmkid, pmkid_list, bssid_list) \
128 ar6000_pmkid_list_event((devt), (num_pmkid), (pmkid_list), (bssid_list))
129
130#define A_WMI_PEER_EVENT(devt, eventCode, bssid) \
131 ar6000_peer_event ((devt), (eventCode), (bssid))
132
133#ifdef CONFIG_HOST_GPIO_SUPPORT
134
135#define A_WMI_GPIO_INTR_RX(intr_mask, input_values) \
136 ar6000_gpio_intr_rx((intr_mask), (input_values))
137
138#define A_WMI_GPIO_DATA_RX(reg_id, value) \
139 ar6000_gpio_data_rx((reg_id), (value))
140
141#define A_WMI_GPIO_ACK_RX() \
142 ar6000_gpio_ack_rx()
143
144#endif
145
146#ifdef SEND_EVENT_TO_APP
147
148#define A_WMI_SEND_EVENT_TO_APP(ar, eventId, datap, len) \
149 ar6000_send_event_to_app((ar), (eventId), (datap), (len))
150
151#define A_WMI_SEND_GENERIC_EVENT_TO_APP(ar, eventId, datap, len) \
152 ar6000_send_generic_event_to_app((ar), (eventId), (datap), (len))
153
154#else
155
156#define A_WMI_SEND_EVENT_TO_APP(ar, eventId, datap, len)
157#define A_WMI_SEND_GENERIC_EVENT_TO_APP(ar, eventId, datap, len)
158
159#endif
160
161#ifdef CONFIG_HOST_TCMD_SUPPORT
162#define A_WMI_TCMD_RX_REPORT_EVENT(devt, results, len) \
163 ar6000_tcmd_rx_report_event((devt), (results), (len))
164#endif
165
166#define A_WMI_HBCHALLENGERESP_EVENT(devt, cookie, source) \
167 ar6000_hbChallengeResp_event((devt), (cookie), (source))
168
169#define A_WMI_TX_RETRY_ERR_EVENT(devt) \
170 ar6000_tx_retry_err_event((devt))
171
172#define A_WMI_SNR_THRESHOLD_EVENT_RX(devt, newThreshold, snr) \
173 ar6000_snrThresholdEvent_rx((devt), (newThreshold), (snr))
174
175#define A_WMI_LQ_THRESHOLD_EVENT_RX(devt, range, lqVal) \
176 ar6000_lqThresholdEvent_rx((devt), (range), (lqVal))
177
178#define A_WMI_RATEMASK_RX(devt, ratemask) \
179 ar6000_ratemask_rx((devt), (ratemask))
180
181#define A_WMI_KEEPALIVE_RX(devt, configured) \
182 ar6000_keepalive_rx((devt), (configured))
183
184#define A_WMI_BSSINFO_EVENT_RX(ar, datp, len) \
185 ar6000_bssInfo_event_rx((ar), (datap), (len))
186
187#define A_WMI_DBGLOG_EVENT(ar, dropped, buffer, length) \
188 ar6000_dbglog_event((ar), (dropped), (buffer), (length));
189
190#define A_WMI_STREAM_TX_ACTIVE(devt,trafficClass) \
191 ar6000_indicate_tx_activity((devt),(trafficClass), TRUE)
192
193#define A_WMI_STREAM_TX_INACTIVE(devt,trafficClass) \
194 ar6000_indicate_tx_activity((devt),(trafficClass), FALSE)
195#define A_WMI_Ac2EndpointID(devht, ac)\
196 ar6000_ac2_endpoint_id((devht), (ac))
197
198#define A_WMI_AGGR_RECV_ADDBA_REQ_EVT(devt, cmd)\
199 ar6000_aggr_rcv_addba_req_evt((devt), (cmd))
200#define A_WMI_AGGR_RECV_ADDBA_RESP_EVT(devt, cmd)\
201 ar6000_aggr_rcv_addba_resp_evt((devt), (cmd))
202#define A_WMI_AGGR_RECV_DELBA_REQ_EVT(devt, cmd)\
203 ar6000_aggr_rcv_delba_req_evt((devt), (cmd))
204#define A_WMI_HCI_EVENT_EVT(devt, cmd)\
205 ar6000_hci_event_rcv_evt((devt), (cmd))
206
207#define A_WMI_Endpoint2Ac(devt, ep) \
208 ar6000_endpoint_id2_ac((devt), (ep))
209
210#define A_WMI_BTCOEX_CONFIG_EVENT(devt, evt, len)\
211 ar6000_btcoex_config_event((devt), (evt), (len))
212
213#define A_WMI_BTCOEX_STATS_EVENT(devt, datap, len)\
214 ar6000_btcoex_stats_event((devt), (datap), (len))
215
216/****************************************************************************/
217/****************************************************************************/
218/** **/
219/** HTC related hooks **/
220/** **/
221/****************************************************************************/
222/****************************************************************************/
223
224#if defined(CONFIG_TARGET_PROFILE_SUPPORT)
225#define A_WMI_PROF_COUNT_RX(addr, count) prof_count_rx((addr), (count))
226#endif /* CONFIG_TARGET_PROFILE_SUPPORT */
227
228#ifdef __cplusplus
229}
230#endif
231
232#endif