[kernel] explicitely enable bootmem on 2.6.35 - required by crashlog (#7695)
[openwrt.git] / target / linux / s3c24xx / files-2.6.30 / drivers / ar6000 / include / wmi_api.h
1 #ifndef _WMI_API_H_
2 #define _WMI_API_H_
3 /*
4 * Copyright (c) 2004-2006 Atheros Communications Inc.
5 * All rights reserved.
6 *
7 * This file contains the definitions for the Wireless Module Interface (WMI).
8 *
9 * $Id: //depot/sw/releases/olca2.0-GPL/host/include/wmi_api.h#2 $
10 *
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation;
15 *
16 * Software distributed under the License is distributed on an "AS
17 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
18 * implied. See the License for the specific language governing
19 * rights and limitations under the License.
20 *
21 *
22 *
23 */
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /*
30 * IP QoS Field definitions according to 802.1p
31 */
32 #define BEST_EFFORT_PRI 0
33 #define BACKGROUND_PRI 1
34 #define EXCELLENT_EFFORT_PRI 3
35 #define CONTROLLED_LOAD_PRI 4
36 #define VIDEO_PRI 5
37 #define VOICE_PRI 6
38 #define NETWORK_CONTROL_PRI 7
39 #define MAX_NUM_PRI 8
40
41 #define UNDEFINED_PRI (0xff)
42
43 /* simple mapping of IP TOS field to a WMI priority stream
44 * this mapping was taken from the original linux driver implementation
45 * The operation maps the following
46 *
47 * */
48 #define IP_TOS_TO_WMI_PRI(tos) \
49 ((WMI_PRI_STREAM_ID)(((tos) >> 1) & 0x03))
50
51 #define WMI_IMPLICIT_PSTREAM_INACTIVITY_INT 5000 /* 5 seconds */
52
53
54 struct wmi_t;
55
56 void *wmi_init(void *devt);
57
58 void wmi_qos_state_init(struct wmi_t *wmip);
59 void wmi_shutdown(struct wmi_t *wmip);
60 A_UINT16 wmi_get_mapped_qos_queue(struct wmi_t *, A_UINT8);
61 A_STATUS wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf);
62 A_STATUS wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType);
63 A_STATUS wmi_dot3_2_dix(struct wmi_t *wmip, void *osbuf);
64 A_STATUS wmi_data_hdr_remove(struct wmi_t *wmip, void *osbuf);
65 A_STATUS wmi_syncpoint(struct wmi_t *wmip);
66 A_STATUS wmi_syncpoint_reset(struct wmi_t *wmip);
67 WMI_PRI_STREAM_ID wmi_get_stream_id(struct wmi_t *wmip, A_UINT8 trafficClass);
68 A_UINT8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, A_UINT8 dir, A_UINT8 up);
69
70 A_STATUS wmi_control_rx(struct wmi_t *wmip, void *osbuf);
71 void wmi_iterate_nodes(struct wmi_t *wmip, wlan_node_iter_func *f, void *arg);
72 void wmi_free_allnodes(struct wmi_t *wmip);
73 bss_t *wmi_find_node(struct wmi_t *wmip, const A_UINT8 *macaddr);
74
75
76 typedef enum {
77 NO_SYNC_WMIFLAG = 0,
78 SYNC_BEFORE_WMIFLAG, /* transmit all queued data before cmd */
79 SYNC_AFTER_WMIFLAG, /* any new data waits until cmd execs */
80 SYNC_BOTH_WMIFLAG,
81 END_WMIFLAG /* end marker */
82 } WMI_SYNC_FLAG;
83
84 A_STATUS wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
85 WMI_SYNC_FLAG flag);
86 A_STATUS wmi_connect_cmd(struct wmi_t *wmip,
87 NETWORK_TYPE netType,
88 DOT11_AUTH_MODE dot11AuthMode,
89 AUTH_MODE authMode,
90 CRYPTO_TYPE pairwiseCrypto,
91 A_UINT8 pairwiseCryptoLen,
92 CRYPTO_TYPE groupCrypto,
93 A_UINT8 groupCryptoLen,
94 int ssidLength,
95 A_UCHAR *ssid,
96 A_UINT8 *bssid,
97 A_UINT16 channel,
98 A_UINT32 ctrl_flags);
99 A_STATUS wmi_reconnect_cmd(struct wmi_t *wmip,
100 A_UINT8 *bssid,
101 A_UINT16 channel);
102 A_STATUS wmi_disconnect_cmd(struct wmi_t *wmip);
103 A_STATUS wmi_getrev_cmd(struct wmi_t *wmip);
104 A_STATUS wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
105 A_BOOL forceFgScan, A_BOOL isLegacy,
106 A_UINT32 homeDwellTime, A_UINT32 forceScanInterval);
107 A_STATUS wmi_scanparams_cmd(struct wmi_t *wmip, A_UINT16 fg_start_sec,
108 A_UINT16 fg_end_sec, A_UINT16 bg_sec,
109 A_UINT16 minact_chdw_msec,
110 A_UINT16 maxact_chdw_msec, A_UINT16 pas_chdw_msec,
111 A_UINT8 shScanRatio, A_UINT8 scanCtrlFlags,
112 A_UINT32 max_dfsch_act_time);
113 A_STATUS wmi_bssfilter_cmd(struct wmi_t *wmip, A_UINT8 filter, A_UINT32 ieMask);
114 A_STATUS wmi_probedSsid_cmd(struct wmi_t *wmip, A_UINT8 index, A_UINT8 flag,
115 A_UINT8 ssidLength, A_UCHAR *ssid);
116 A_STATUS wmi_listeninterval_cmd(struct wmi_t *wmip, A_UINT16 listenInterval, A_UINT16 listenBeacons);
117 A_STATUS wmi_bmisstime_cmd(struct wmi_t *wmip, A_UINT16 bmisstime, A_UINT16 bmissbeacons);
118 A_STATUS wmi_associnfo_cmd(struct wmi_t *wmip, A_UINT8 ieType,
119 A_UINT8 ieLen, A_UINT8 *ieInfo);
120 A_STATUS wmi_powermode_cmd(struct wmi_t *wmip, A_UINT8 powerMode);
121 A_STATUS wmi_ibsspmcaps_cmd(struct wmi_t *wmip, A_UINT8 pmEnable, A_UINT8 ttl,
122 A_UINT16 atim_windows, A_UINT16 timeout_value);
123 A_STATUS wmi_pmparams_cmd(struct wmi_t *wmip, A_UINT16 idlePeriod,
124 A_UINT16 psPollNum, A_UINT16 dtimPolicy);
125 A_STATUS wmi_disctimeout_cmd(struct wmi_t *wmip, A_UINT8 timeout);
126 A_STATUS wmi_sync_cmd(struct wmi_t *wmip, A_UINT8 syncNumber);
127 A_STATUS wmi_create_pstream_cmd(struct wmi_t *wmip, WMI_CREATE_PSTREAM_CMD *pstream);
128 A_STATUS wmi_delete_pstream_cmd(struct wmi_t *wmip, A_UINT8 trafficClass, A_UINT8 streamID);
129 A_STATUS wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 rate);
130 A_STATUS wmi_get_bitrate_cmd(struct wmi_t *wmip);
131 A_INT8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate);
132 A_STATUS wmi_get_regDomain_cmd(struct wmi_t *wmip);
133 A_STATUS wmi_get_channelList_cmd(struct wmi_t *wmip);
134 A_STATUS wmi_set_channelParams_cmd(struct wmi_t *wmip, A_UINT8 scanParam,
135 WMI_PHY_MODE mode, A_INT8 numChan,
136 A_UINT16 *channelList);
137
138 A_STATUS wmi_set_snr_threshold_params(struct wmi_t *wmip,
139 WMI_SNR_THRESHOLD_PARAMS_CMD *snrCmd);
140 A_STATUS wmi_set_rssi_threshold_params(struct wmi_t *wmip,
141 WMI_RSSI_THRESHOLD_PARAMS_CMD *rssiCmd);
142 A_STATUS wmi_clr_rssi_snr(struct wmi_t *wmip);
143 A_STATUS wmi_set_lq_threshold_params(struct wmi_t *wmip,
144 WMI_LQ_THRESHOLD_PARAMS_CMD *lqCmd);
145 A_STATUS wmi_set_rts_cmd(struct wmi_t *wmip, A_UINT16 threshold);
146 A_STATUS wmi_set_lpreamble_cmd(struct wmi_t *wmip, A_UINT8 status);
147
148 A_STATUS wmi_set_error_report_bitmask(struct wmi_t *wmip, A_UINT32 bitmask);
149
150 A_STATUS wmi_get_challenge_resp_cmd(struct wmi_t *wmip, A_UINT32 cookie,
151 A_UINT32 source);
152 A_STATUS wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask,
153 A_UINT16 tsr, A_BOOL rep, A_UINT16 size,
154 A_UINT32 valid);
155 A_STATUS wmi_get_stats_cmd(struct wmi_t *wmip);
156 A_STATUS wmi_addKey_cmd(struct wmi_t *wmip, A_UINT8 keyIndex,
157 CRYPTO_TYPE keyType, A_UINT8 keyUsage,
158 A_UINT8 keyLength,A_UINT8 *keyRSC,
159 A_UINT8 *keyMaterial, A_UINT8 key_op_ctrl,
160 WMI_SYNC_FLAG sync_flag);
161 A_STATUS wmi_add_krk_cmd(struct wmi_t *wmip, A_UINT8 *krk);
162 A_STATUS wmi_delete_krk_cmd(struct wmi_t *wmip);
163 A_STATUS wmi_deleteKey_cmd(struct wmi_t *wmip, A_UINT8 keyIndex);
164 A_STATUS wmi_set_akmp_params_cmd(struct wmi_t *wmip,
165 WMI_SET_AKMP_PARAMS_CMD *akmpParams);
166 A_STATUS wmi_get_pmkid_list_cmd(struct wmi_t *wmip);
167 A_STATUS wmi_set_pmkid_list_cmd(struct wmi_t *wmip,
168 WMI_SET_PMKID_LIST_CMD *pmkInfo);
169 A_STATUS wmi_set_txPwr_cmd(struct wmi_t *wmip, A_UINT8 dbM);
170 A_STATUS wmi_get_txPwr_cmd(struct wmi_t *wmip);
171 A_STATUS wmi_switch_radio(struct wmi_t *wmip, A_UINT8 on);
172 A_STATUS wmi_addBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex, A_UINT8 *bssid);
173 A_STATUS wmi_deleteBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex);
174 A_STATUS wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, A_BOOL en);
175 A_STATUS wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId,
176 A_BOOL set);
177 A_STATUS wmi_set_access_params_cmd(struct wmi_t *wmip, A_UINT16 txop,
178 A_UINT8 eCWmin, A_UINT8 eCWmax,
179 A_UINT8 aifsn);
180 A_STATUS wmi_set_retry_limits_cmd(struct wmi_t *wmip, A_UINT8 frameType,
181 A_UINT8 trafficClass, A_UINT8 maxRetries,
182 A_UINT8 enableNotify);
183
184 void wmi_get_current_bssid(struct wmi_t *wmip, A_UINT8 *bssid);
185
186 A_STATUS wmi_get_roam_tbl_cmd(struct wmi_t *wmip);
187 A_STATUS wmi_get_roam_data_cmd(struct wmi_t *wmip, A_UINT8 roamDataType);
188 A_STATUS wmi_set_roam_ctrl_cmd(struct wmi_t *wmip, WMI_SET_ROAM_CTRL_CMD *p,
189 A_UINT8 size);
190 A_STATUS wmi_set_powersave_timers_cmd(struct wmi_t *wmip,
191 WMI_POWERSAVE_TIMERS_POLICY_CMD *pCmd,
192 A_UINT8 size);
193
194 A_STATUS wmi_set_opt_mode_cmd(struct wmi_t *wmip, A_UINT8 optMode);
195 A_STATUS wmi_opt_tx_frame_cmd(struct wmi_t *wmip,
196 A_UINT8 frmType,
197 A_UINT8 *dstMacAddr,
198 A_UINT8 *bssid,
199 A_UINT16 optIEDataLen,
200 A_UINT8 *optIEData);
201
202 A_STATUS wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, A_UINT16 intvl);
203 A_STATUS wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, A_UINT16 voicePktSize);
204 A_STATUS wmi_set_max_sp_len_cmd(struct wmi_t *wmip, A_UINT8 maxSpLen);
205 A_UINT8 convert_userPriority_to_trafficClass(A_UINT8 userPriority);
206 A_UINT8 wmi_get_power_mode_cmd(struct wmi_t *wmip);
207 A_STATUS wmi_verify_tspec_params(WMI_CREATE_PSTREAM_CMD *pCmd, A_BOOL tspecCompliance);
208
209 #ifdef CONFIG_HOST_TCMD_SUPPORT
210 A_STATUS wmi_test_cmd(struct wmi_t *wmip, A_UINT8 *buf, A_UINT32 len);
211 #endif
212
213 A_STATUS wmi_set_bt_status_cmd(struct wmi_t *wmip, A_UINT8 streamType, A_UINT8 status);
214 A_STATUS wmi_set_bt_params_cmd(struct wmi_t *wmip, WMI_SET_BT_PARAMS_CMD* cmd);
215
216
217 /*
218 * This function is used to configure the fix rates mask to the target.
219 */
220 A_STATUS wmi_set_fixrates_cmd(struct wmi_t *wmip, A_INT16 fixRatesMask);
221 A_STATUS wmi_get_ratemask_cmd(struct wmi_t *wmip);
222
223 A_STATUS wmi_set_authmode_cmd(struct wmi_t *wmip, A_UINT8 mode);
224
225 A_STATUS wmi_set_reassocmode_cmd(struct wmi_t *wmip, A_UINT8 mode);
226
227 A_STATUS wmi_set_wmm_cmd(struct wmi_t *wmip, WMI_WMM_STATUS status);
228 A_STATUS wmi_set_wmm_txop(struct wmi_t *wmip, WMI_TXOP_CFG txEnable);
229
230 A_STATUS wmi_get_keepalive_configured(struct wmi_t *wmip);
231 A_UINT8 wmi_get_keepalive_cmd(struct wmi_t *wmip);
232 A_STATUS wmi_set_keepalive_cmd(struct wmi_t *wmip, A_UINT8 keepaliveInterval);
233
234 A_STATUS wmi_set_appie_cmd(struct wmi_t *wmip, A_UINT8 mgmtFrmType,
235 A_UINT8 ieLen,A_UINT8 *ieInfo);
236
237 A_STATUS wmi_set_halparam_cmd(struct wmi_t *wmip, A_UINT8 *cmd, A_UINT16 dataLen);
238 A_INT32 wmi_get_rate(A_INT8 rateindex);
239
240 /*Wake on Wireless WMI commands*/
241 A_STATUS wmi_set_host_sleep_mode_cmd(struct wmi_t *wmip, WMI_SET_HOST_SLEEP_MODE_CMD *cmd);
242 A_STATUS wmi_set_wow_mode_cmd(struct wmi_t *wmip, WMI_SET_WOW_MODE_CMD *cmd);
243 A_STATUS wmi_get_wow_list_cmd(struct wmi_t *wmip, WMI_GET_WOW_LIST_CMD *cmd);
244 A_STATUS wmi_add_wow_pattern_cmd(struct wmi_t *wmip,
245 WMI_ADD_WOW_PATTERN_CMD *cmd, A_UINT8* pattern, A_UINT8* mask, A_UINT8 pattern_size);
246 A_STATUS wmi_del_wow_pattern_cmd(struct wmi_t *wmip,
247 WMI_DEL_WOW_PATTERN_CMD *cmd);
248 A_STATUS wmi_set_wsc_status_cmd(struct wmi_t *wmip, A_UINT32 status);
249
250 bss_t *
251 wmi_find_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid,
252 A_UINT32 ssidLength, A_BOOL bIsWPA2);
253
254 void
255 wmi_node_return (struct wmi_t *wmip, bss_t *bss);
256 #ifdef __cplusplus
257 }
258 #endif
259
260 #endif /* _WMI_API_H_ */
This page took 0.066675 seconds and 5 git commands to generate.