blob: c8583e0c4a96356d86a63e52daf0fa6b50448e5d [file] [log] [blame]
Vipin Mehta30295c82010-09-01 12:06:33 -07001//------------------------------------------------------------------------------
2// <copyright file="wmi_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// This file contains the definitions for the Wireless Module Interface (WMI).
22//
23// Author(s): ="Atheros"
24//==============================================================================
25#ifndef _WMI_API_H_
26#define _WMI_API_H_
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32 /* WMI converts a dix frame with an ethernet payload (up to 1500 bytes)
33 * to an 802.3 frame (adds SNAP header) and adds on a WMI data header */
34#define WMI_MAX_TX_DATA_FRAME_LENGTH (1500 + sizeof(WMI_DATA_HDR) + sizeof(ATH_MAC_HDR) + sizeof(ATH_LLC_SNAP_HDR))
35
36 /* A normal WMI data frame */
37#define WMI_MAX_NORMAL_RX_DATA_FRAME_LENGTH (1500 + sizeof(WMI_DATA_HDR) + sizeof(ATH_MAC_HDR) + sizeof(ATH_LLC_SNAP_HDR))
38
39 /* An AMSDU frame */ /* The MAX AMSDU length of AR6003 is 3839 */
40#define WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH (3840 + sizeof(WMI_DATA_HDR) + sizeof(ATH_MAC_HDR) + sizeof(ATH_LLC_SNAP_HDR))
41
42/*
43 * IP QoS Field definitions according to 802.1p
44 */
45#define BEST_EFFORT_PRI 0
46#define BACKGROUND_PRI 1
47#define EXCELLENT_EFFORT_PRI 3
48#define CONTROLLED_LOAD_PRI 4
49#define VIDEO_PRI 5
50#define VOICE_PRI 6
51#define NETWORK_CONTROL_PRI 7
52#define MAX_NUM_PRI 8
53
54#define UNDEFINED_PRI (0xff)
55
56#define WMI_IMPLICIT_PSTREAM_INACTIVITY_INT 5000 /* 5 seconds */
57
58#define A_ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
59
60typedef enum {
61 ATHEROS_COMPLIANCE = 0x1,
62}TSPEC_PARAM_COMPLIANCE;
63
64struct wmi_t;
65
66void *wmi_init(void *devt);
67
68void wmi_qos_state_init(struct wmi_t *wmip);
69void wmi_shutdown(struct wmi_t *wmip);
70HTC_ENDPOINT_ID wmi_get_control_ep(struct wmi_t * wmip);
71void wmi_set_control_ep(struct wmi_t * wmip, HTC_ENDPOINT_ID eid);
Joe Perches4853ac02011-02-02 14:05:50 -080072u16 wmi_get_mapped_qos_queue(struct wmi_t *, u8 );
Joe Perches1f4c34b2011-01-27 20:04:19 -080073int wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf);
Joe Perchesab3655d2011-02-02 14:05:49 -080074int wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, u8 msgType, bool bMoreData, WMI_DATA_HDR_DATA_TYPE data_type,u8 metaVersion, void *pTxMetaS);
Joe Perches1f4c34b2011-01-27 20:04:19 -080075int wmi_dot3_2_dix(void *osbuf);
Vipin Mehta30295c82010-09-01 12:06:33 -070076
Joe Perches1f4c34b2011-01-27 20:04:19 -080077int wmi_dot11_hdr_remove (struct wmi_t *wmip, void *osbuf);
78int wmi_dot11_hdr_add(struct wmi_t *wmip, void *osbuf, NETWORK_TYPE mode);
Vipin Mehta30295c82010-09-01 12:06:33 -070079
Joe Perches1f4c34b2011-01-27 20:04:19 -080080int wmi_data_hdr_remove(struct wmi_t *wmip, void *osbuf);
81int wmi_syncpoint(struct wmi_t *wmip);
82int wmi_syncpoint_reset(struct wmi_t *wmip);
Joe Perchese1ce2a32011-02-02 14:05:51 -080083u8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, u32 layer2Priority, bool wmmEnabled);
Vipin Mehta30295c82010-09-01 12:06:33 -070084
Joe Perchese1ce2a32011-02-02 14:05:51 -080085u8 wmi_determine_userPriority (u8 *pkt, u32 layer2Pri);
Vipin Mehta30295c82010-09-01 12:06:33 -070086
Joe Perches1f4c34b2011-01-27 20:04:19 -080087int wmi_control_rx(struct wmi_t *wmip, void *osbuf);
Vipin Mehta30295c82010-09-01 12:06:33 -070088void wmi_iterate_nodes(struct wmi_t *wmip, wlan_node_iter_func *f, void *arg);
89void wmi_free_allnodes(struct wmi_t *wmip);
Joe Perchesab3655d2011-02-02 14:05:49 -080090bss_t *wmi_find_node(struct wmi_t *wmip, const u8 *macaddr);
91void wmi_free_node(struct wmi_t *wmip, const u8 *macaddr);
Vipin Mehta30295c82010-09-01 12:06:33 -070092
93
94typedef enum {
95 NO_SYNC_WMIFLAG = 0,
96 SYNC_BEFORE_WMIFLAG, /* transmit all queued data before cmd */
97 SYNC_AFTER_WMIFLAG, /* any new data waits until cmd execs */
98 SYNC_BOTH_WMIFLAG,
99 END_WMIFLAG /* end marker */
100} WMI_SYNC_FLAG;
101
Joe Perches1f4c34b2011-01-27 20:04:19 -0800102int wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
Vipin Mehta30295c82010-09-01 12:06:33 -0700103 WMI_SYNC_FLAG flag);
104
Joe Perches1f4c34b2011-01-27 20:04:19 -0800105int wmi_connect_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700106 NETWORK_TYPE netType,
107 DOT11_AUTH_MODE dot11AuthMode,
108 AUTH_MODE authMode,
109 CRYPTO_TYPE pairwiseCrypto,
Joe Perchesab3655d2011-02-02 14:05:49 -0800110 u8 pairwiseCryptoLen,
Vipin Mehta30295c82010-09-01 12:06:33 -0700111 CRYPTO_TYPE groupCrypto,
Joe Perchesab3655d2011-02-02 14:05:49 -0800112 u8 groupCryptoLen,
Vipin Mehta30295c82010-09-01 12:06:33 -0700113 int ssidLength,
Luis R. Rodriguezd8cb3162011-03-10 18:55:31 -0800114 u8 *ssid,
Joe Perchesab3655d2011-02-02 14:05:49 -0800115 u8 *bssid,
Joe Perches4853ac02011-02-02 14:05:50 -0800116 u16 channel,
Joe Perchese1ce2a32011-02-02 14:05:51 -0800117 u32 ctrl_flags);
Vipin Mehta30295c82010-09-01 12:06:33 -0700118
Joe Perches1f4c34b2011-01-27 20:04:19 -0800119int wmi_reconnect_cmd(struct wmi_t *wmip,
Joe Perchesab3655d2011-02-02 14:05:49 -0800120 u8 *bssid,
Joe Perches4853ac02011-02-02 14:05:50 -0800121 u16 channel);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800122int wmi_disconnect_cmd(struct wmi_t *wmip);
123int wmi_getrev_cmd(struct wmi_t *wmip);
124int wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
Joe Perches1071a132011-02-02 14:05:47 -0800125 u32 forceFgScan, u32 isLegacy,
Joe Perchese1ce2a32011-02-02 14:05:51 -0800126 u32 homeDwellTime, u32 forceScanInterval,
Joe Perchesf2ab1272011-02-02 14:05:53 -0800127 s8 numChan, u16 *channelList);
Joe Perches4853ac02011-02-02 14:05:50 -0800128int wmi_scanparams_cmd(struct wmi_t *wmip, u16 fg_start_sec,
129 u16 fg_end_sec, u16 bg_sec,
130 u16 minact_chdw_msec,
131 u16 maxact_chdw_msec, u16 pas_chdw_msec,
Joe Perchesab3655d2011-02-02 14:05:49 -0800132 u8 shScanRatio, u8 scanCtrlFlags,
Joe Perchese1ce2a32011-02-02 14:05:51 -0800133 u32 max_dfsch_act_time,
Joe Perches4853ac02011-02-02 14:05:50 -0800134 u16 maxact_scan_per_ssid);
Joe Perchese1ce2a32011-02-02 14:05:51 -0800135int wmi_bssfilter_cmd(struct wmi_t *wmip, u8 filter, u32 ieMask);
Joe Perchesab3655d2011-02-02 14:05:49 -0800136int wmi_probedSsid_cmd(struct wmi_t *wmip, u8 index, u8 flag,
Luis R. Rodriguezd8cb3162011-03-10 18:55:31 -0800137 u8 ssidLength, u8 *ssid);
Joe Perches4853ac02011-02-02 14:05:50 -0800138int wmi_listeninterval_cmd(struct wmi_t *wmip, u16 listenInterval, u16 listenBeacons);
139int wmi_bmisstime_cmd(struct wmi_t *wmip, u16 bmisstime, u16 bmissbeacons);
Joe Perchesab3655d2011-02-02 14:05:49 -0800140int wmi_associnfo_cmd(struct wmi_t *wmip, u8 ieType,
141 u8 ieLen, u8 *ieInfo);
142int wmi_powermode_cmd(struct wmi_t *wmip, u8 powerMode);
143int wmi_ibsspmcaps_cmd(struct wmi_t *wmip, u8 pmEnable, u8 ttl,
Joe Perches4853ac02011-02-02 14:05:50 -0800144 u16 atim_windows, u16 timeout_value);
Joe Perchese1ce2a32011-02-02 14:05:51 -0800145int wmi_apps_cmd(struct wmi_t *wmip, u8 psType, u32 idle_time,
146 u32 ps_period, u8 sleep_period);
Joe Perches4853ac02011-02-02 14:05:50 -0800147int wmi_pmparams_cmd(struct wmi_t *wmip, u16 idlePeriod,
148 u16 psPollNum, u16 dtimPolicy,
149 u16 wakup_tx_policy, u16 num_tx_to_wakeup,
150 u16 ps_fail_event_policy);
Joe Perchesab3655d2011-02-02 14:05:49 -0800151int wmi_disctimeout_cmd(struct wmi_t *wmip, u8 timeout);
152int wmi_sync_cmd(struct wmi_t *wmip, u8 syncNumber);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800153int wmi_create_pstream_cmd(struct wmi_t *wmip, WMI_CREATE_PSTREAM_CMD *pstream);
Joe Perchesab3655d2011-02-02 14:05:49 -0800154int wmi_delete_pstream_cmd(struct wmi_t *wmip, u8 trafficClass, u8 streamID);
Joe Perches4853ac02011-02-02 14:05:50 -0800155int wmi_set_framerate_cmd(struct wmi_t *wmip, u8 bEnable, u8 type, u8 subType, u16 rateMask);
Joe Perchesf68057e2011-02-02 14:05:55 -0800156int wmi_set_bitrate_cmd(struct wmi_t *wmip, s32 dataRate, s32 mgmtRate, s32 ctlRate);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800157int wmi_get_bitrate_cmd(struct wmi_t *wmip);
Joe Perchesf68057e2011-02-02 14:05:55 -0800158s8 wmi_validate_bitrate(struct wmi_t *wmip, s32 rate, s8 *rate_idx);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800159int wmi_get_regDomain_cmd(struct wmi_t *wmip);
160int wmi_get_channelList_cmd(struct wmi_t *wmip);
Joe Perchesab3655d2011-02-02 14:05:49 -0800161int wmi_set_channelParams_cmd(struct wmi_t *wmip, u8 scanParam,
Joe Perchesf2ab1272011-02-02 14:05:53 -0800162 WMI_PHY_MODE mode, s8 numChan,
Joe Perches4853ac02011-02-02 14:05:50 -0800163 u16 *channelList);
Vipin Mehta30295c82010-09-01 12:06:33 -0700164
Joe Perches1f4c34b2011-01-27 20:04:19 -0800165int wmi_set_snr_threshold_params(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700166 WMI_SNR_THRESHOLD_PARAMS_CMD *snrCmd);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800167int wmi_set_rssi_threshold_params(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700168 WMI_RSSI_THRESHOLD_PARAMS_CMD *rssiCmd);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800169int wmi_clr_rssi_snr(struct wmi_t *wmip);
170int wmi_set_lq_threshold_params(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700171 WMI_LQ_THRESHOLD_PARAMS_CMD *lqCmd);
Joe Perches4853ac02011-02-02 14:05:50 -0800172int wmi_set_rts_cmd(struct wmi_t *wmip, u16 threshold);
Joe Perchesab3655d2011-02-02 14:05:49 -0800173int wmi_set_lpreamble_cmd(struct wmi_t *wmip, u8 status, u8 preamblePolicy);
Vipin Mehta30295c82010-09-01 12:06:33 -0700174
Joe Perchese1ce2a32011-02-02 14:05:51 -0800175int wmi_set_error_report_bitmask(struct wmi_t *wmip, u32 bitmask);
Vipin Mehta30295c82010-09-01 12:06:33 -0700176
Joe Perchese1ce2a32011-02-02 14:05:51 -0800177int wmi_get_challenge_resp_cmd(struct wmi_t *wmip, u32 cookie,
178 u32 source);
Vipin Mehta30295c82010-09-01 12:06:33 -0700179
Joe Perches4853ac02011-02-02 14:05:50 -0800180int wmi_config_debug_module_cmd(struct wmi_t *wmip, u16 mmask,
181 u16 tsr, bool rep, u16 size,
Joe Perchese1ce2a32011-02-02 14:05:51 -0800182 u32 valid);
Vipin Mehta30295c82010-09-01 12:06:33 -0700183
Joe Perches1f4c34b2011-01-27 20:04:19 -0800184int wmi_get_stats_cmd(struct wmi_t *wmip);
Vipin Mehta30295c82010-09-01 12:06:33 -0700185
Joe Perchesab3655d2011-02-02 14:05:49 -0800186int wmi_addKey_cmd(struct wmi_t *wmip, u8 keyIndex,
187 CRYPTO_TYPE keyType, u8 keyUsage,
188 u8 keyLength,u8 *keyRSC,
189 u8 *keyMaterial, u8 key_op_ctrl, u8 *mac,
Vipin Mehta30295c82010-09-01 12:06:33 -0700190 WMI_SYNC_FLAG sync_flag);
Joe Perchesab3655d2011-02-02 14:05:49 -0800191int wmi_add_krk_cmd(struct wmi_t *wmip, u8 *krk);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800192int wmi_delete_krk_cmd(struct wmi_t *wmip);
Joe Perchesab3655d2011-02-02 14:05:49 -0800193int wmi_deleteKey_cmd(struct wmi_t *wmip, u8 keyIndex);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800194int wmi_set_akmp_params_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700195 WMI_SET_AKMP_PARAMS_CMD *akmpParams);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800196int wmi_get_pmkid_list_cmd(struct wmi_t *wmip);
197int wmi_set_pmkid_list_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700198 WMI_SET_PMKID_LIST_CMD *pmkInfo);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800199int wmi_abort_scan_cmd(struct wmi_t *wmip);
Joe Perchesab3655d2011-02-02 14:05:49 -0800200int wmi_set_txPwr_cmd(struct wmi_t *wmip, u8 dbM);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800201int wmi_get_txPwr_cmd(struct wmi_t *wmip);
Joe Perchesab3655d2011-02-02 14:05:49 -0800202int wmi_addBadAp_cmd(struct wmi_t *wmip, u8 apIndex, u8 *bssid);
203int wmi_deleteBadAp_cmd(struct wmi_t *wmip, u8 apIndex);
Joe Perches1071a132011-02-02 14:05:47 -0800204int wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, bool en);
Joe Perchesab3655d2011-02-02 14:05:49 -0800205int wmi_setPmkid_cmd(struct wmi_t *wmip, u8 *bssid, u8 *pmkId,
Joe Perches1071a132011-02-02 14:05:47 -0800206 bool set);
Joe Perches4853ac02011-02-02 14:05:50 -0800207int wmi_set_access_params_cmd(struct wmi_t *wmip, u8 ac, u16 txop,
Joe Perchesab3655d2011-02-02 14:05:49 -0800208 u8 eCWmin, u8 eCWmax,
209 u8 aifsn);
210int wmi_set_retry_limits_cmd(struct wmi_t *wmip, u8 frameType,
211 u8 trafficClass, u8 maxRetries,
212 u8 enableNotify);
Vipin Mehta30295c82010-09-01 12:06:33 -0700213
Joe Perchesab3655d2011-02-02 14:05:49 -0800214void wmi_get_current_bssid(struct wmi_t *wmip, u8 *bssid);
Vipin Mehta30295c82010-09-01 12:06:33 -0700215
Joe Perches1f4c34b2011-01-27 20:04:19 -0800216int wmi_get_roam_tbl_cmd(struct wmi_t *wmip);
Joe Perchesab3655d2011-02-02 14:05:49 -0800217int wmi_get_roam_data_cmd(struct wmi_t *wmip, u8 roamDataType);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800218int wmi_set_roam_ctrl_cmd(struct wmi_t *wmip, WMI_SET_ROAM_CTRL_CMD *p,
Joe Perchesab3655d2011-02-02 14:05:49 -0800219 u8 size);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800220int wmi_set_powersave_timers_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700221 WMI_POWERSAVE_TIMERS_POLICY_CMD *pCmd,
Joe Perchesab3655d2011-02-02 14:05:49 -0800222 u8 size);
Vipin Mehta30295c82010-09-01 12:06:33 -0700223
Joe Perchesab3655d2011-02-02 14:05:49 -0800224int wmi_set_opt_mode_cmd(struct wmi_t *wmip, u8 optMode);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800225int wmi_opt_tx_frame_cmd(struct wmi_t *wmip,
Joe Perchesab3655d2011-02-02 14:05:49 -0800226 u8 frmType,
227 u8 *dstMacAddr,
228 u8 *bssid,
Joe Perches4853ac02011-02-02 14:05:50 -0800229 u16 optIEDataLen,
Joe Perchesab3655d2011-02-02 14:05:49 -0800230 u8 *optIEData);
Vipin Mehta30295c82010-09-01 12:06:33 -0700231
Joe Perches4853ac02011-02-02 14:05:50 -0800232int wmi_set_adhoc_bconIntvl_cmd(struct wmi_t *wmip, u16 intvl);
233int wmi_set_voice_pkt_size_cmd(struct wmi_t *wmip, u16 voicePktSize);
Joe Perchesab3655d2011-02-02 14:05:49 -0800234int wmi_set_max_sp_len_cmd(struct wmi_t *wmip, u8 maxSpLen);
235u8 convert_userPriority_to_trafficClass(u8 userPriority);
236u8 wmi_get_power_mode_cmd(struct wmi_t *wmip);
Joe Perches82056692011-01-27 20:04:32 -0800237int wmi_verify_tspec_params(WMI_CREATE_PSTREAM_CMD *pCmd, int tspecCompliance);
Vipin Mehta30295c82010-09-01 12:06:33 -0700238
239#ifdef CONFIG_HOST_TCMD_SUPPORT
Joe Perchese1ce2a32011-02-02 14:05:51 -0800240int wmi_test_cmd(struct wmi_t *wmip, u8 *buf, u32 len);
Vipin Mehta30295c82010-09-01 12:06:33 -0700241#endif
242
Joe Perchesab3655d2011-02-02 14:05:49 -0800243int wmi_set_bt_status_cmd(struct wmi_t *wmip, u8 streamType, u8 status);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800244int wmi_set_bt_params_cmd(struct wmi_t *wmip, WMI_SET_BT_PARAMS_CMD* cmd);
Vipin Mehta30295c82010-09-01 12:06:33 -0700245
Joe Perches1f4c34b2011-01-27 20:04:19 -0800246int wmi_set_btcoex_fe_ant_cmd(struct wmi_t *wmip, WMI_SET_BTCOEX_FE_ANT_CMD * cmd);
Vipin Mehta30295c82010-09-01 12:06:33 -0700247
Joe Perches1f4c34b2011-01-27 20:04:19 -0800248int wmi_set_btcoex_colocated_bt_dev_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700249 WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD * cmd);
250
Joe Perches1f4c34b2011-01-27 20:04:19 -0800251int wmi_set_btcoex_btinquiry_page_config_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700252 WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD *cmd);
253
Joe Perches1f4c34b2011-01-27 20:04:19 -0800254int wmi_set_btcoex_sco_config_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700255 WMI_SET_BTCOEX_SCO_CONFIG_CMD * cmd);
256
Joe Perches1f4c34b2011-01-27 20:04:19 -0800257int wmi_set_btcoex_a2dp_config_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700258 WMI_SET_BTCOEX_A2DP_CONFIG_CMD* cmd);
259
260
Joe Perches1f4c34b2011-01-27 20:04:19 -0800261int wmi_set_btcoex_aclcoex_config_cmd(struct wmi_t *wmip, WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD* cmd);
Vipin Mehta30295c82010-09-01 12:06:33 -0700262
Joe Perches1f4c34b2011-01-27 20:04:19 -0800263int wmi_set_btcoex_debug_cmd(struct wmi_t *wmip, WMI_SET_BTCOEX_DEBUG_CMD * cmd);
Vipin Mehta30295c82010-09-01 12:06:33 -0700264
Joe Perches1f4c34b2011-01-27 20:04:19 -0800265int wmi_set_btcoex_bt_operating_status_cmd(struct wmi_t * wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700266 WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD * cmd);
267
Joe Perches1f4c34b2011-01-27 20:04:19 -0800268int wmi_get_btcoex_config_cmd(struct wmi_t * wmip, WMI_GET_BTCOEX_CONFIG_CMD * cmd);
Vipin Mehta30295c82010-09-01 12:06:33 -0700269
Joe Perches1f4c34b2011-01-27 20:04:19 -0800270int wmi_get_btcoex_stats_cmd(struct wmi_t * wmip);
Vipin Mehta30295c82010-09-01 12:06:33 -0700271
Joe Perchese1ce2a32011-02-02 14:05:51 -0800272int wmi_SGI_cmd(struct wmi_t *wmip, u32 sgiMask, u8 sgiPERThreshold);
Vipin Mehta30295c82010-09-01 12:06:33 -0700273
274/*
275 * This function is used to configure the fix rates mask to the target.
276 */
Joe Perchese1ce2a32011-02-02 14:05:51 -0800277int wmi_set_fixrates_cmd(struct wmi_t *wmip, u32 fixRatesMask);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800278int wmi_get_ratemask_cmd(struct wmi_t *wmip);
Vipin Mehta30295c82010-09-01 12:06:33 -0700279
Joe Perchesab3655d2011-02-02 14:05:49 -0800280int wmi_set_authmode_cmd(struct wmi_t *wmip, u8 mode);
Vipin Mehta30295c82010-09-01 12:06:33 -0700281
Joe Perchesab3655d2011-02-02 14:05:49 -0800282int wmi_set_reassocmode_cmd(struct wmi_t *wmip, u8 mode);
Vipin Mehta30295c82010-09-01 12:06:33 -0700283
Joe Perchesab3655d2011-02-02 14:05:49 -0800284int wmi_set_qos_supp_cmd(struct wmi_t *wmip,u8 status);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800285int wmi_set_wmm_cmd(struct wmi_t *wmip, WMI_WMM_STATUS status);
286int wmi_set_wmm_txop(struct wmi_t *wmip, WMI_TXOP_CFG txEnable);
Luis R. Rodriguezd8cb3162011-03-10 18:55:31 -0800287int wmi_set_country(struct wmi_t *wmip, u8 *countryCode);
Vipin Mehta30295c82010-09-01 12:06:33 -0700288
Joe Perches1f4c34b2011-01-27 20:04:19 -0800289int wmi_get_keepalive_configured(struct wmi_t *wmip);
Joe Perchesab3655d2011-02-02 14:05:49 -0800290u8 wmi_get_keepalive_cmd(struct wmi_t *wmip);
291int wmi_set_keepalive_cmd(struct wmi_t *wmip, u8 keepaliveInterval);
Vipin Mehta30295c82010-09-01 12:06:33 -0700292
Joe Perchesab3655d2011-02-02 14:05:49 -0800293int wmi_set_appie_cmd(struct wmi_t *wmip, u8 mgmtFrmType,
294 u8 ieLen,u8 *ieInfo);
Vipin Mehta30295c82010-09-01 12:06:33 -0700295
Joe Perches4853ac02011-02-02 14:05:50 -0800296int wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, u16 dataLen);
Vipin Mehta30295c82010-09-01 12:06:33 -0700297
Joe Perchesf68057e2011-02-02 14:05:55 -0800298s32 wmi_get_rate(s8 rateindex);
Vipin Mehta30295c82010-09-01 12:06:33 -0700299
Joe Perches1f4c34b2011-01-27 20:04:19 -0800300int wmi_set_ip_cmd(struct wmi_t *wmip, WMI_SET_IP_CMD *cmd);
Vipin Mehta30295c82010-09-01 12:06:33 -0700301
302/*Wake on Wireless WMI commands*/
Joe Perches1f4c34b2011-01-27 20:04:19 -0800303int wmi_set_host_sleep_mode_cmd(struct wmi_t *wmip, WMI_SET_HOST_SLEEP_MODE_CMD *cmd);
304int wmi_set_wow_mode_cmd(struct wmi_t *wmip, WMI_SET_WOW_MODE_CMD *cmd);
305int wmi_get_wow_list_cmd(struct wmi_t *wmip, WMI_GET_WOW_LIST_CMD *cmd);
306int wmi_add_wow_pattern_cmd(struct wmi_t *wmip,
Joe Perchesab3655d2011-02-02 14:05:49 -0800307 WMI_ADD_WOW_PATTERN_CMD *cmd, u8 *pattern, u8 *mask, u8 pattern_size);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800308int wmi_del_wow_pattern_cmd(struct wmi_t *wmip,
Vipin Mehta30295c82010-09-01 12:06:33 -0700309 WMI_DEL_WOW_PATTERN_CMD *cmd);
Joe Perchese1ce2a32011-02-02 14:05:51 -0800310int wmi_set_wsc_status_cmd(struct wmi_t *wmip, u32 status);
Vipin Mehta30295c82010-09-01 12:06:33 -0700311
Joe Perches1f4c34b2011-01-27 20:04:19 -0800312int
Joe Perchese1ce2a32011-02-02 14:05:51 -0800313wmi_set_params_cmd(struct wmi_t *wmip, u32 opcode, u32 length, char *buffer);
Vipin Mehta30295c82010-09-01 12:06:33 -0700314
Joe Perches1f4c34b2011-01-27 20:04:19 -0800315int
Joe Perchesab3655d2011-02-02 14:05:49 -0800316wmi_set_mcast_filter_cmd(struct wmi_t *wmip, u8 dot1, u8 dot2, u8 dot3, u8 dot4);
Vipin Mehta30295c82010-09-01 12:06:33 -0700317
Joe Perches1f4c34b2011-01-27 20:04:19 -0800318int
Joe Perchesab3655d2011-02-02 14:05:49 -0800319wmi_del_mcast_filter_cmd(struct wmi_t *wmip, u8 dot1, u8 dot2, u8 dot3, u8 dot4);
Vipin Mehta30295c82010-09-01 12:06:33 -0700320
Joe Perches1f4c34b2011-01-27 20:04:19 -0800321int
Joe Perchesab3655d2011-02-02 14:05:49 -0800322wmi_mcast_filter_cmd(struct wmi_t *wmip, u8 enable);
Vipin Mehta30295c82010-09-01 12:06:33 -0700323
324bss_t *
Luis R. Rodriguezd8cb3162011-03-10 18:55:31 -0800325wmi_find_Ssidnode (struct wmi_t *wmip, u8 *pSsid,
Joe Perchese1ce2a32011-02-02 14:05:51 -0800326 u32 ssidLength, bool bIsWPA2, bool bMatchSSID);
Vipin Mehta30295c82010-09-01 12:06:33 -0700327
328
329void
330wmi_node_return (struct wmi_t *wmip, bss_t *bss);
331
332void
Joe Perchese1ce2a32011-02-02 14:05:51 -0800333wmi_set_nodeage(struct wmi_t *wmip, u32 nodeAge);
Vipin Mehta30295c82010-09-01 12:06:33 -0700334
335#if defined(CONFIG_TARGET_PROFILE_SUPPORT)
Joe Perchese1ce2a32011-02-02 14:05:51 -0800336int wmi_prof_cfg_cmd(struct wmi_t *wmip, u32 period, u32 nbins);
337int wmi_prof_addr_set_cmd(struct wmi_t *wmip, u32 addr);
Joe Perches1f4c34b2011-01-27 20:04:19 -0800338int wmi_prof_start_cmd(struct wmi_t *wmip);
339int wmi_prof_stop_cmd(struct wmi_t *wmip);
340int wmi_prof_count_get_cmd(struct wmi_t *wmip);
Vipin Mehta30295c82010-09-01 12:06:33 -0700341#endif /* CONFIG_TARGET_PROFILE_SUPPORT */
342#ifdef OS_ROAM_MANAGEMENT
343void wmi_scan_indication (struct wmi_t *wmip);
344#endif
345
Joe Perches1f4c34b2011-01-27 20:04:19 -0800346int
Vipin Mehta30295c82010-09-01 12:06:33 -0700347wmi_set_target_event_report_cmd(struct wmi_t *wmip, WMI_SET_TARGET_EVENT_REPORT_CMD* cmd);
348
Joe Perchesab3655d2011-02-02 14:05:49 -0800349bss_t *wmi_rm_current_bss (struct wmi_t *wmip, u8 *id);
350int wmi_add_current_bss (struct wmi_t *wmip, u8 *id, bss_t *bss);
Vipin Mehta30295c82010-09-01 12:06:33 -0700351
352
353/*
354 * AP mode
355 */
Joe Perches1f4c34b2011-01-27 20:04:19 -0800356int
Vipin Mehta30295c82010-09-01 12:06:33 -0700357wmi_ap_profile_commit(struct wmi_t *wmip, WMI_CONNECT_CMD *p);
358
Joe Perches1f4c34b2011-01-27 20:04:19 -0800359int
Joe Perchesab3655d2011-02-02 14:05:49 -0800360wmi_ap_set_hidden_ssid(struct wmi_t *wmip, u8 hidden_ssid);
Vipin Mehta30295c82010-09-01 12:06:33 -0700361
Joe Perches1f4c34b2011-01-27 20:04:19 -0800362int
Joe Perchesab3655d2011-02-02 14:05:49 -0800363wmi_ap_set_num_sta(struct wmi_t *wmip, u8 num_sta);
Vipin Mehta30295c82010-09-01 12:06:33 -0700364
Joe Perches1f4c34b2011-01-27 20:04:19 -0800365int
Joe Perchesab3655d2011-02-02 14:05:49 -0800366wmi_ap_set_acl_policy(struct wmi_t *wmip, u8 policy);
Vipin Mehta30295c82010-09-01 12:06:33 -0700367
Joe Perches1f4c34b2011-01-27 20:04:19 -0800368int
Vipin Mehta30295c82010-09-01 12:06:33 -0700369wmi_ap_acl_mac_list(struct wmi_t *wmip, WMI_AP_ACL_MAC_CMD *a);
370
Joe Perchesab3655d2011-02-02 14:05:49 -0800371u8 acl_add_del_mac(WMI_AP_ACL *a, WMI_AP_ACL_MAC_CMD *acl);
Vipin Mehta30295c82010-09-01 12:06:33 -0700372
Joe Perches1f4c34b2011-01-27 20:04:19 -0800373int
Joe Perches4853ac02011-02-02 14:05:50 -0800374wmi_ap_set_mlme(struct wmi_t *wmip, u8 cmd, u8 *mac, u16 reason);
Vipin Mehta30295c82010-09-01 12:06:33 -0700375
Joe Perches1f4c34b2011-01-27 20:04:19 -0800376int
Joe Perches4853ac02011-02-02 14:05:50 -0800377wmi_set_pvb_cmd(struct wmi_t *wmip, u16 aid, bool flag);
Vipin Mehta30295c82010-09-01 12:06:33 -0700378
Joe Perches1f4c34b2011-01-27 20:04:19 -0800379int
Joe Perchese1ce2a32011-02-02 14:05:51 -0800380wmi_ap_conn_inact_time(struct wmi_t *wmip, u32 period);
Vipin Mehta30295c82010-09-01 12:06:33 -0700381
Joe Perches1f4c34b2011-01-27 20:04:19 -0800382int
Joe Perchese1ce2a32011-02-02 14:05:51 -0800383wmi_ap_bgscan_time(struct wmi_t *wmip, u32 period, u32 dwell);
Vipin Mehta30295c82010-09-01 12:06:33 -0700384
Joe Perches1f4c34b2011-01-27 20:04:19 -0800385int
Joe Perchesab3655d2011-02-02 14:05:49 -0800386wmi_ap_set_dtim(struct wmi_t *wmip, u8 dtim);
Vipin Mehta30295c82010-09-01 12:06:33 -0700387
Joe Perches1f4c34b2011-01-27 20:04:19 -0800388int
Joe Perchesab3655d2011-02-02 14:05:49 -0800389wmi_ap_set_rateset(struct wmi_t *wmip, u8 rateset);
Vipin Mehta30295c82010-09-01 12:06:33 -0700390
Joe Perches1f4c34b2011-01-27 20:04:19 -0800391int
Vipin Mehta30295c82010-09-01 12:06:33 -0700392wmi_set_ht_cap_cmd(struct wmi_t *wmip, WMI_SET_HT_CAP_CMD *cmd);
393
Joe Perches1f4c34b2011-01-27 20:04:19 -0800394int
Joe Perchesab3655d2011-02-02 14:05:49 -0800395wmi_set_ht_op_cmd(struct wmi_t *wmip, u8 sta_chan_width);
Vipin Mehta30295c82010-09-01 12:06:33 -0700396
Joe Perches1f4c34b2011-01-27 20:04:19 -0800397int
Joe Perches4853ac02011-02-02 14:05:50 -0800398wmi_send_hci_cmd(struct wmi_t *wmip, u8 *buf, u16 sz);
Vipin Mehta30295c82010-09-01 12:06:33 -0700399
Joe Perches1f4c34b2011-01-27 20:04:19 -0800400int
Joe Perchese1ce2a32011-02-02 14:05:51 -0800401wmi_set_tx_select_rates_cmd(struct wmi_t *wmip, u32 *pMaskArray);
Vipin Mehta30295c82010-09-01 12:06:33 -0700402
Joe Perches1f4c34b2011-01-27 20:04:19 -0800403int
Joe Perchesab3655d2011-02-02 14:05:49 -0800404wmi_setup_aggr_cmd(struct wmi_t *wmip, u8 tid);
Vipin Mehta30295c82010-09-01 12:06:33 -0700405
Joe Perches1f4c34b2011-01-27 20:04:19 -0800406int
Joe Perchesab3655d2011-02-02 14:05:49 -0800407wmi_delete_aggr_cmd(struct wmi_t *wmip, u8 tid, bool uplink);
Vipin Mehta30295c82010-09-01 12:06:33 -0700408
Joe Perches1f4c34b2011-01-27 20:04:19 -0800409int
Joe Perches4853ac02011-02-02 14:05:50 -0800410wmi_allow_aggr_cmd(struct wmi_t *wmip, u16 tx_tidmask, u16 rx_tidmask);
Vipin Mehta30295c82010-09-01 12:06:33 -0700411
Joe Perches1f4c34b2011-01-27 20:04:19 -0800412int
Joe Perchesab3655d2011-02-02 14:05:49 -0800413wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, u8 rxMetaVersion, bool rxDot11Hdr, bool defragOnHost);
Vipin Mehta30295c82010-09-01 12:06:33 -0700414
Joe Perches1f4c34b2011-01-27 20:04:19 -0800415int
Joe Perches1071a132011-02-02 14:05:47 -0800416wmi_set_thin_mode_cmd(struct wmi_t *wmip, bool bThinMode);
Vipin Mehta30295c82010-09-01 12:06:33 -0700417
Joe Perches1f4c34b2011-01-27 20:04:19 -0800418int
Vipin Mehta30295c82010-09-01 12:06:33 -0700419wmi_set_wlan_conn_precedence_cmd(struct wmi_t *wmip, BT_WLAN_CONN_PRECEDENCE precedence);
420
Joe Perches1f4c34b2011-01-27 20:04:19 -0800421int
Joe Perchesab3655d2011-02-02 14:05:49 -0800422wmi_set_pmk_cmd(struct wmi_t *wmip, u8 *pmk);
Vipin Mehta30295c82010-09-01 12:06:33 -0700423
Vipin Mehta711a1bc2011-02-18 13:13:11 -0800424int
425wmi_set_excess_tx_retry_thres_cmd(struct wmi_t *wmip, WMI_SET_EXCESS_TX_RETRY_THRES_CMD *cmd);
426
Joe Perches4853ac02011-02-02 14:05:50 -0800427u16 wmi_ieee2freq (int chan);
Vipin Mehta30295c82010-09-01 12:06:33 -0700428
Joe Perchese1ce2a32011-02-02 14:05:51 -0800429u32 wmi_freq2ieee (u16 freq);
Vipin Mehta30295c82010-09-01 12:06:33 -0700430
431bss_t *
Luis R. Rodriguezd8cb3162011-03-10 18:55:31 -0800432wmi_find_matching_Ssidnode (struct wmi_t *wmip, u8 *pSsid,
Joe Perchese1ce2a32011-02-02 14:05:51 -0800433 u32 ssidLength,
434 u32 dot11AuthMode, u32 authMode,
435 u32 pairwiseCryptoType, u32 grpwiseCryptoTyp);
Vipin Mehta30295c82010-09-01 12:06:33 -0700436
437#ifdef __cplusplus
438}
439#endif
440
441#endif /* _WMI_API_H_ */