Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
unifi_sme.h
Go to the documentation of this file.
1 /*
2  * ***************************************************************************
3  * FILE: unifi_sme.h
4  *
5  * PURPOSE: SME related definitions.
6  *
7  * Copyright (C) 2007-2011 by Cambridge Silicon Radio Ltd.
8  *
9  * Refer to LICENSE.txt included with this source code for details on
10  * the license terms.
11  *
12  * ***************************************************************************
13  */
14 #ifndef __LINUX_UNIFI_SME_H__
15 #define __LINUX_UNIFI_SME_H__ 1
16 
17 #include <linux/kernel.h>
18 
19 #ifdef CSR_SME_USERSPACE
20 #include "sme_userspace.h"
21 #endif
22 
23 #include "csr_wifi_sme_lib.h"
24 
26 
27 typedef struct unifi_port_cfg
28 {
29  /* TRUE if this port entry is allocated */
34 
35 #define UNIFI_MAX_CONNECTIONS 8
36 #define UNIFI_MAX_RETRY_LIMIT 5
37 #define UF_DATA_PORT_NOT_OVERIDE 0
38 #define UF_DATA_PORT_OVERIDE 1
39 
40 typedef struct unifi_port_config
41 {
46 
47 
54 };
55 
56 /* Structure to hold a UDI logged signal */
57 typedef struct {
58 
59  /* The current status of the request */
61 
62  /* The status the SME has passed to us */
64 
65  /* SME's reply to a get request */
77 
78 
79  /* SME's reply to a scan request */
82 
83 } sme_reply_t;
84 
85 
86 typedef struct {
90  u8 oui[3];
93 
94 
96  unsigned char *address,
97  int queue,
98  u16 interfaceTag);
100  unsigned char *address,
101  int queue,
102  u16 interfaceTag);
103 
104 
105 
106 /* Callback for event logging to SME clients */
107 void sme_log_event(ul_client_t *client, const u8 *signal, int signal_len,
108  const bulk_data_param_t *bulkdata, int dir);
109 
110 /* The workqueue task to the set the multicast addresses list */
112 
113 /* The workqueue task to execute the TA module */
114 void uf_ta_wq(struct work_struct *work);
115 
116 
117 /*
118  * SME blocking helper functions
119  */
120 #ifdef UNIFI_DEBUG
121 # define sme_complete_request(priv, status) uf_sme_complete_request(priv, status, __func__)
122 #else
123 # define sme_complete_request(priv, status) uf_sme_complete_request(priv, status, NULL)
124 #endif
125 
126 void uf_sme_complete_request(unifi_priv_t *priv, CsrResult reply_status, const char *func);
127 void uf_sme_cancel_request(unifi_priv_t *priv, CsrResult reply_status);
128 
129 
130 /*
131  * Blocking functions using the SME SYS API.
132  */
135 
136 
137 /*
138  * Traffic Analysis workqueue jobs
139  */
140 void uf_ta_ind_wq(struct work_struct *work);
141 void uf_ta_sample_ind_wq(struct work_struct *work);
142 
143 /*
144  * SME config workqueue job
145  */
146 void uf_sme_config_wq(struct work_struct *work);
147 
148 /*
149  * To send M4 read to send IND
150  */
151 void uf_send_m4_ready_wq(struct work_struct *work);
152 
153 #if (defined(CSR_WIFI_SECURITY_WAPI_ENABLE) && defined(CSR_WIFI_SECURITY_WAPI_SW_ENCRYPTION))
154 /*
155  * To send data pkt to Sme for encryption
156  */
157 void uf_send_pkt_to_encrypt(struct work_struct *work);
158 #endif
159 
170 
171 #ifdef CSR_SUPPORT_WEXT
172 /*
173  * Blocking functions using the SME MGT API.
174  */
176 int sme_mgt_wifi_off(unifi_priv_t *priv);
177 /*int sme_mgt_set_value_async(unifi_priv_t *priv, unifi_AppValue *app_value);
178 int sme_mgt_get_value_async(unifi_priv_t *priv, unifi_AppValue *app_value);
179 int sme_mgt_get_value(unifi_priv_t *priv, unifi_AppValue *app_value);
180 int sme_mgt_set_value(unifi_priv_t *priv, unifi_AppValue *app_value);
181 */
182 int sme_mgt_coex_config_set(unifi_priv_t *priv, CsrWifiSmeCoexConfig *coexConfig);
183 int sme_mgt_coex_config_get(unifi_priv_t *priv, CsrWifiSmeCoexConfig *coexConfig);
184 int sme_mgt_mib_config_set(unifi_priv_t *priv, CsrWifiSmeMibConfig *mibConfig);
185 int sme_mgt_mib_config_get(unifi_priv_t *priv, CsrWifiSmeMibConfig *mibConfig);
186 
187 int sme_mgt_connection_info_set(unifi_priv_t *priv, CsrWifiSmeConnectionInfo *connectionInfo);
188 int sme_mgt_connection_info_get(unifi_priv_t *priv, CsrWifiSmeConnectionInfo *connectionInfo);
189 int sme_mgt_connection_config_set(unifi_priv_t *priv, CsrWifiSmeConnectionConfig *connectionConfig);
190 int sme_mgt_connection_config_get(unifi_priv_t *priv, CsrWifiSmeConnectionConfig *connectionConfig);
191 int sme_mgt_connection_stats_get(unifi_priv_t *priv, CsrWifiSmeConnectionStats *connectionStats);
192 
193 int sme_mgt_versions_get(unifi_priv_t *priv, CsrWifiSmeVersions *versions);
194 
195 
196 int sme_mgt_scan_full(unifi_priv_t *priv, CsrWifiSsid *specific_ssid,
197  int num_channels, unsigned char *channel_list);
198 int sme_mgt_scan_results_get_async(unifi_priv_t *priv,
199  struct iw_request_info *info,
200  char *scan_results,
201  long scan_results_len);
202 int sme_mgt_disconnect(unifi_priv_t *priv);
203 int sme_mgt_connect(unifi_priv_t *priv);
204 int sme_mgt_key(unifi_priv_t *priv, CsrWifiSmeKey *sme_key,
206 int sme_mgt_pmkid(unifi_priv_t *priv, CsrWifiSmeListAction action,
208 int sme_mgt_mib_get(unifi_priv_t *priv,
209  unsigned char *varbind, int *length);
210 int sme_mgt_mib_set(unifi_priv_t *priv,
211  unsigned char *varbind, int length);
212 #ifdef CSR_SUPPORT_WEXT_AP
213 int sme_ap_start(unifi_priv_t *priv,u16 interface_tag,CsrWifiSmeApConfig_t *ap_config);
214 int sme_ap_stop(unifi_priv_t *priv,u16 interface_tag);
215 int sme_ap_config(unifi_priv_t *priv,CsrWifiSmeApMacConfig *ap_mac_config, CsrWifiNmeApConfig *group_security_config);
216 int uf_configure_supported_rates(u8 * supportedRates, u8 phySupportedBitmap);
217 #endif
219  struct iw_request_info *info,
220  char *current_ev, char *end_buf,
222  int scan_index);
223 
224 #endif /* CSR_SUPPORT_WEXT */
225 
226 int unifi_cfg_power(unifi_priv_t *priv, unsigned char *arg);
227 int unifi_cfg_power_save(unifi_priv_t *priv, unsigned char *arg);
228 int unifi_cfg_power_supply(unifi_priv_t *priv, unsigned char *arg);
229 int unifi_cfg_packet_filters(unifi_priv_t *priv, unsigned char *arg);
230 int unifi_cfg_wmm_qos_info(unifi_priv_t *priv, unsigned char *arg);
231 int unifi_cfg_wmm_addts(unifi_priv_t *priv, unsigned char *arg);
232 int unifi_cfg_wmm_delts(unifi_priv_t *priv, unsigned char *arg);
233 int unifi_cfg_get_info(unifi_priv_t *priv, unsigned char *arg);
234 int unifi_cfg_strict_draft_n(unifi_priv_t *priv, unsigned char *arg);
235 int unifi_cfg_enable_okc(unifi_priv_t *priv, unsigned char *arg);
236 #ifdef CSR_SUPPORT_WEXT_AP
237 int unifi_cfg_set_ap_config(unifi_priv_t * priv,unsigned char* arg);
238 #endif
239 
240 
241 
243 
244 
245 #endif /* __LINUX_UNIFI_SME_H__ */