blob: 1e801328a558266a5c74a7a4521ea4b8e234f8d0 [file] [log] [blame]
Bing Zhao5e6e3a92011-03-21 18:00:50 -07001/*
2 * Marvell Wireless LAN device driver: major data structures and prototypes
3 *
4 * Copyright (C) 2011, Marvell International Ltd.
5 *
6 * This software file (the "File") is distributed by Marvell International
7 * Ltd. under the terms of the GNU General Public License Version 2, June 1991
8 * (the "License"). You may use, redistribute and/or modify this File in
9 * accordance with the terms and conditions of the License, a copy of which
10 * is available by writing to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
12 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
13 *
14 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
17 * this warranty disclaimer.
18 */
19
20#ifndef _MWIFIEX_MAIN_H_
21#define _MWIFIEX_MAIN_H_
22
23#include <linux/kernel.h>
24#include <linux/module.h>
25#include <linux/sched.h>
26#include <linux/semaphore.h>
27#include <linux/ip.h>
28#include <linux/skbuff.h>
29#include <linux/if_arp.h>
30#include <linux/etherdevice.h>
31#include <net/sock.h>
32#include <net/lib80211.h>
33#include <linux/firmware.h>
34#include <linux/ctype.h>
35
36#include "decl.h"
37#include "ioctl.h"
38#include "util.h"
39#include "fw.h"
40
41extern const char driver_version[];
Bing Zhao5e6e3a92011-03-21 18:00:50 -070042
43enum {
Amitkumar Karwar600f5d92011-04-13 17:27:06 -070044 MWIFIEX_ASYNC_CMD,
45 MWIFIEX_SYNC_CMD
Bing Zhao5e6e3a92011-03-21 18:00:50 -070046};
47
48#define DRV_MODE_STA 0x1
Bing Zhao5e6e3a92011-03-21 18:00:50 -070049
Bing Zhao5e6e3a92011-03-21 18:00:50 -070050struct mwifiex_drv_mode {
51 u16 drv_mode;
52 u16 intf_num;
53 struct mwifiex_bss_attr *bss_attr;
54};
55
56
Bing Zhao67a50032011-07-13 18:38:34 -070057#define MWIFIEX_MAX_AP 64
58
Bing Zhao5e6e3a92011-03-21 18:00:50 -070059#define MWIFIEX_DEFAULT_WATCHDOG_TIMEOUT (5 * HZ)
60
61#define MWIFIEX_TIMER_10S 10000
62#define MWIFIEX_TIMER_1S 1000
63
Marc Yang62a5b7d2011-05-16 19:17:53 -070064#define MAX_TX_PENDING 100
65#define LOW_TX_PENDING 80
Bing Zhao5e6e3a92011-03-21 18:00:50 -070066
Bing Zhao5e6e3a92011-03-21 18:00:50 -070067#define MWIFIEX_UPLD_SIZE (2312)
68
69#define MAX_EVENT_SIZE 1024
70
71#define ARP_FILTER_MAX_BUF_SIZE 68
72
73#define MWIFIEX_KEY_BUFFER_SIZE 16
74#define MWIFIEX_DEFAULT_LISTEN_INTERVAL 10
75#define MWIFIEX_MAX_REGION_CODE 7
76
77#define DEFAULT_BCN_AVG_FACTOR 8
78#define DEFAULT_DATA_AVG_FACTOR 8
79
80#define FIRST_VALID_CHANNEL 0xff
81#define DEFAULT_AD_HOC_CHANNEL 6
82#define DEFAULT_AD_HOC_CHANNEL_A 36
83
84#define DEFAULT_BCN_MISS_TIMEOUT 5
85
86#define MAX_SCAN_BEACON_BUFFER 8000
87
88#define SCAN_BEACON_ENTRY_PAD 6
89
90#define MWIFIEX_PASSIVE_SCAN_CHAN_TIME 200
91#define MWIFIEX_ACTIVE_SCAN_CHAN_TIME 200
92#define MWIFIEX_SPECIFIC_SCAN_CHAN_TIME 110
93
94#define SCAN_RSSI(RSSI) (0x100 - ((u8)(RSSI)))
95
96#define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S)
97
98#define RSN_GTK_OUI_OFFSET 2
99
100#define MWIFIEX_OUI_NOT_PRESENT 0
101#define MWIFIEX_OUI_PRESENT 1
102
103#define IS_CARD_RX_RCVD(adapter) (adapter->cmd_resp_received || \
104 adapter->event_received || \
105 adapter->data_received)
106
107#define MWIFIEX_TYPE_CMD 1
108#define MWIFIEX_TYPE_DATA 0
109#define MWIFIEX_TYPE_EVENT 3
110
111#define DBG_CMD_NUM 5
112
113#define MAX_BITMAP_RATES_SIZE 10
114
115#define MAX_CHANNEL_BAND_BG 14
116
117#define MAX_FREQUENCY_BAND_BG 2484
118
119struct mwifiex_dbg {
120 u32 num_cmd_host_to_card_failure;
121 u32 num_cmd_sleep_cfm_host_to_card_failure;
122 u32 num_tx_host_to_card_failure;
123 u32 num_event_deauth;
124 u32 num_event_disassoc;
125 u32 num_event_link_lost;
126 u32 num_cmd_deauth;
127 u32 num_cmd_assoc_success;
128 u32 num_cmd_assoc_failure;
129 u32 num_tx_timeout;
130 u32 num_cmd_timeout;
131 u16 timeout_cmd_id;
132 u16 timeout_cmd_act;
133 u16 last_cmd_id[DBG_CMD_NUM];
134 u16 last_cmd_act[DBG_CMD_NUM];
135 u16 last_cmd_index;
136 u16 last_cmd_resp_id[DBG_CMD_NUM];
137 u16 last_cmd_resp_index;
138 u16 last_event[DBG_CMD_NUM];
139 u16 last_event_index;
140};
141
142enum MWIFIEX_HARDWARE_STATUS {
143 MWIFIEX_HW_STATUS_READY,
144 MWIFIEX_HW_STATUS_INITIALIZING,
145 MWIFIEX_HW_STATUS_FW_READY,
146 MWIFIEX_HW_STATUS_INIT_DONE,
147 MWIFIEX_HW_STATUS_RESET,
148 MWIFIEX_HW_STATUS_CLOSING,
149 MWIFIEX_HW_STATUS_NOT_READY
150};
151
152enum MWIFIEX_802_11_POWER_MODE {
153 MWIFIEX_802_11_POWER_MODE_CAM,
154 MWIFIEX_802_11_POWER_MODE_PSP
155};
156
157struct mwifiex_tx_param {
158 u32 next_pkt_len;
159};
160
161enum MWIFIEX_PS_STATE {
162 PS_STATE_AWAKE,
163 PS_STATE_PRE_SLEEP,
164 PS_STATE_SLEEP_CFM,
165 PS_STATE_SLEEP
166};
167
168struct mwifiex_add_ba_param {
169 u32 tx_win_size;
170 u32 rx_win_size;
171 u32 timeout;
172};
173
174struct mwifiex_tx_aggr {
175 u8 ampdu_user;
176 u8 ampdu_ap;
177 u8 amsdu;
178};
179
180struct mwifiex_ra_list_tbl {
181 struct list_head list;
182 struct sk_buff_head skb_head;
183 u8 ra[ETH_ALEN];
184 u32 total_pkts_size;
Yogesh Ashok Powarfcf21762011-06-06 14:49:32 +0530185 u32 total_pkts;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700186 u32 is_11n_enabled;
187};
188
189struct mwifiex_tid_tbl {
190 struct list_head ra_list;
191 /* spin lock for tid table */
192 spinlock_t tid_tbl_lock;
193 struct mwifiex_ra_list_tbl *ra_list_curr;
194};
195
196#define WMM_HIGHEST_PRIORITY 7
197#define HIGH_PRIO_TID 7
198#define LOW_PRIO_TID 0
Marc Yang17e8cec2011-05-16 19:17:52 -0700199#define NO_PKT_PRIO_TID (-1)
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700200
201struct mwifiex_wmm_desc {
202 struct mwifiex_tid_tbl tid_tbl_ptr[MAX_NUM_TID];
203 u32 packets_out[MAX_NUM_TID];
204 /* spin lock to protect ra_list */
205 spinlock_t ra_list_spinlock;
206 struct mwifiex_wmm_ac_status ac_status[IEEE80211_MAX_QUEUES];
207 enum mwifiex_wmm_ac_e ac_down_graded_vals[IEEE80211_MAX_QUEUES];
208 u32 drv_pkt_delay_max;
209 u8 queue_priority[IEEE80211_MAX_QUEUES];
210 u32 user_pri_pkt_tx_ctrl[WMM_HIGHEST_PRIORITY + 1]; /* UP: 0 to 7 */
Marc Yangf6992542011-05-16 19:17:49 -0700211 /* Number of transmit packets queued */
212 atomic_t tx_pkts_queued;
Marc Yang49729ff2011-05-16 19:17:50 -0700213 /* Tracks highest priority with a packet queued */
214 atomic_t highest_queued_prio;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700215};
216
217struct mwifiex_802_11_security {
218 u8 wpa_enabled;
219 u8 wpa2_enabled;
220 u8 wapi_enabled;
221 u8 wapi_key_on;
222 enum MWIFIEX_802_11_WEP_STATUS wep_status;
223 u32 authentication_mode;
224 u32 encryption_mode;
225};
226
227struct ieee_types_header {
228 u8 element_id;
229 u8 len;
230} __packed;
231
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700232#define MWIFIEX_SUPPORTED_RATES 14
233
234#define MWIFIEX_SUPPORTED_RATES_EXT 32
235
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700236struct ieee_types_vendor_specific {
237 struct ieee_types_vendor_header vend_hdr;
238 u8 data[IEEE_MAX_IE_SIZE - sizeof(struct ieee_types_vendor_header)];
239} __packed;
240
241struct ieee_types_generic {
242 struct ieee_types_header ieee_hdr;
243 u8 data[IEEE_MAX_IE_SIZE - sizeof(struct ieee_types_header)];
244} __packed;
245
246struct mwifiex_bssdescriptor {
247 u8 mac_address[ETH_ALEN];
248 struct mwifiex_802_11_ssid ssid;
249 u32 privacy;
250 s32 rssi;
251 u32 channel;
252 u32 freq;
253 u16 beacon_period;
254 u8 erp_flags;
255 u32 bss_mode;
256 u8 supported_rates[MWIFIEX_SUPPORTED_RATES];
257 u8 data_rates[MWIFIEX_SUPPORTED_RATES];
258 /* Network band.
259 * BAND_B(0x01): 'b' band
260 * BAND_G(0x02): 'g' band
261 * BAND_A(0X04): 'a' band
262 */
263 u16 bss_band;
Bing Zhao1a5b3062011-05-02 11:00:45 -0700264 u64 network_tsf;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700265 u8 time_stamp[8];
266 union ieee_types_phy_param_set phy_param_set;
267 union ieee_types_ss_param_set ss_param_set;
268 u16 cap_info_bitmap;
269 struct ieee_types_wmm_parameter wmm_ie;
270 u8 disable_11n;
271 struct ieee80211_ht_cap *bcn_ht_cap;
272 u16 ht_cap_offset;
273 struct ieee80211_ht_info *bcn_ht_info;
274 u16 ht_info_offset;
275 u8 *bcn_bss_co_2040;
276 u16 bss_co_2040_offset;
277 u8 *bcn_ext_cap;
278 u16 ext_cap_offset;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700279 struct ieee_types_vendor_specific *bcn_wpa_ie;
280 u16 wpa_offset;
281 struct ieee_types_generic *bcn_rsn_ie;
282 u16 rsn_offset;
283 struct ieee_types_generic *bcn_wapi_ie;
284 u16 wapi_offset;
285 u8 *beacon_buf;
286 u32 beacon_buf_size;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700287};
288
289struct mwifiex_current_bss_params {
290 struct mwifiex_bssdescriptor bss_descriptor;
291 u8 wmm_enabled;
292 u8 wmm_uapsd_enabled;
293 u8 band;
294 u32 num_of_rates;
295 u8 data_rates[MWIFIEX_SUPPORTED_RATES];
296};
297
298struct mwifiex_sleep_params {
299 u16 sp_error;
300 u16 sp_offset;
301 u16 sp_stable_time;
302 u8 sp_cal_control;
303 u8 sp_ext_sleep_clk;
304 u16 sp_reserved;
305};
306
307struct mwifiex_sleep_period {
308 u16 period;
309 u16 reserved;
310};
311
312struct mwifiex_wep_key {
313 u32 length;
314 u32 key_index;
315 u32 key_length;
316 u8 key_material[MWIFIEX_KEY_BUFFER_SIZE];
317};
318
319#define MAX_REGION_CHANNEL_NUM 2
320
321struct mwifiex_chan_freq_power {
322 u16 channel;
323 u32 freq;
324 u16 max_tx_power;
325 u8 unsupported;
326};
327
328enum state_11d_t {
329 DISABLE_11D = 0,
330 ENABLE_11D = 1,
331};
332
333#define MWIFIEX_MAX_TRIPLET_802_11D 83
334
335struct mwifiex_802_11d_domain_reg {
336 u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
337 u8 no_of_triplet;
338 struct ieee80211_country_ie_triplet
339 triplet[MWIFIEX_MAX_TRIPLET_802_11D];
340};
341
342struct mwifiex_vendor_spec_cfg_ie {
343 u16 mask;
344 u16 flag;
345 u8 ie[MWIFIEX_MAX_VSIE_LEN];
346};
347
348struct wps {
349 u8 session_enable;
350};
351
352struct mwifiex_adapter;
353struct mwifiex_private;
354
355struct mwifiex_private {
356 struct mwifiex_adapter *adapter;
357 u8 bss_index;
358 u8 bss_type;
359 u8 bss_role;
360 u8 bss_priority;
361 u8 bss_num;
362 u8 frame_type;
363 u8 curr_addr[ETH_ALEN];
364 u8 media_connected;
365 u32 num_tx_timeout;
366 struct net_device *netdev;
367 struct net_device_stats stats;
368 u16 curr_pkt_filter;
369 u32 bss_mode;
370 u32 pkt_tx_ctrl;
371 u16 tx_power_level;
372 u8 max_tx_power_level;
373 u8 min_tx_power_level;
374 u8 tx_rate;
375 u8 tx_htinfo;
376 u8 rxpd_htinfo;
377 u8 rxpd_rate;
378 u16 rate_bitmap;
379 u16 bitmap_rates[MAX_BITMAP_RATES_SIZE];
380 u32 data_rate;
381 u8 is_data_rate_auto;
382 u16 bcn_avg_factor;
383 u16 data_avg_factor;
384 s16 data_rssi_last;
385 s16 data_nf_last;
386 s16 data_rssi_avg;
387 s16 data_nf_avg;
388 s16 bcn_rssi_last;
389 s16 bcn_nf_last;
390 s16 bcn_rssi_avg;
391 s16 bcn_nf_avg;
392 struct mwifiex_bssdescriptor *attempted_bss_desc;
393 struct mwifiex_802_11_ssid prev_ssid;
394 u8 prev_bssid[ETH_ALEN];
395 struct mwifiex_current_bss_params curr_bss_params;
396 u16 beacon_period;
397 u16 listen_interval;
398 u16 atim_window;
399 u8 adhoc_channel;
400 u8 adhoc_is_link_sensed;
401 u8 adhoc_state;
402 struct mwifiex_802_11_security sec_info;
403 struct mwifiex_wep_key wep_key[NUM_WEP_KEYS];
404 u16 wep_key_curr_index;
405 u8 wpa_ie[256];
406 u8 wpa_ie_len;
407 u8 wpa_is_gtk_set;
408 struct host_cmd_ds_802_11_key_material aes_key;
409 u8 wapi_ie[256];
410 u8 wapi_ie_len;
411 u8 wmm_required;
412 u8 wmm_enabled;
413 u8 wmm_qosinfo;
414 struct mwifiex_wmm_desc wmm;
415 struct list_head tx_ba_stream_tbl_ptr;
416 /* spin lock for tx_ba_stream_tbl_ptr queue */
417 spinlock_t tx_ba_stream_tbl_lock;
418 struct mwifiex_tx_aggr aggr_prio_tbl[MAX_NUM_TID];
419 struct mwifiex_add_ba_param add_ba_param;
420 u16 rx_seq[MAX_NUM_TID];
421 struct list_head rx_reorder_tbl_ptr;
422 /* spin lock for rx_reorder_tbl_ptr queue */
423 spinlock_t rx_reorder_tbl_lock;
424 /* spin lock for Rx packets */
425 spinlock_t rx_pkt_lock;
426
427#define MWIFIEX_ASSOC_RSP_BUF_SIZE 500
428 u8 assoc_rsp_buf[MWIFIEX_ASSOC_RSP_BUF_SIZE];
429 u32 assoc_rsp_size;
430
431#define MWIFIEX_GENIE_BUF_SIZE 256
432 u8 gen_ie_buf[MWIFIEX_GENIE_BUF_SIZE];
433 u8 gen_ie_buf_len;
434
435 struct mwifiex_vendor_spec_cfg_ie vs_ie[MWIFIEX_MAX_VSIE_NUM];
436
437#define MWIFIEX_ASSOC_TLV_BUF_SIZE 256
438 u8 assoc_tlv_buf[MWIFIEX_ASSOC_TLV_BUF_SIZE];
439 u8 assoc_tlv_buf_len;
440
441 u8 *curr_bcn_buf;
442 u32 curr_bcn_size;
443 /* spin lock for beacon buffer */
444 spinlock_t curr_bcn_buf_lock;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700445 struct wireless_dev *wdev;
446 struct mwifiex_chan_freq_power cfp;
447 char version_str[128];
448#ifdef CONFIG_DEBUG_FS
449 struct dentry *dfs_dev_dir;
450#endif
451 u8 nick_name[16];
Bing Zhao67a50032011-07-13 18:38:34 -0700452 u8 qual_level, qual_noise;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700453 u16 current_key_index;
454 struct semaphore async_sem;
455 u8 scan_pending_on_block;
456 u8 report_scan_result;
457 struct cfg80211_scan_request *scan_request;
458 int scan_result_status;
Amitkumar Karwar57f16b52011-05-03 20:11:45 -0700459 int assoc_request;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700460 u16 assoc_result;
Amitkumar Karwar57f16b52011-05-03 20:11:45 -0700461 int ibss_join_request;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700462 u16 ibss_join_result;
463 bool disconnect;
464 u8 cfg_bssid[6];
465 struct workqueue_struct *workqueue;
466 struct work_struct cfg_workqueue;
467 u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
468 struct wps wps;
469 u8 scan_block;
470};
471
472enum mwifiex_ba_status {
473 BA_STREAM_NOT_SETUP = 0,
474 BA_STREAM_SETUP_INPROGRESS,
475 BA_STREAM_SETUP_COMPLETE
476};
477
478struct mwifiex_tx_ba_stream_tbl {
479 struct list_head list;
480 int tid;
481 u8 ra[ETH_ALEN];
482 enum mwifiex_ba_status ba_status;
483};
484
485struct mwifiex_rx_reorder_tbl;
486
487struct reorder_tmr_cnxt {
488 struct timer_list timer;
489 struct mwifiex_rx_reorder_tbl *ptr;
490 struct mwifiex_private *priv;
491};
492
493struct mwifiex_rx_reorder_tbl {
494 struct list_head list;
495 int tid;
496 u8 ta[ETH_ALEN];
497 int start_win;
498 int win_size;
499 void **rx_reorder_ptr;
500 struct reorder_tmr_cnxt timer_context;
501};
502
503struct mwifiex_bss_prio_node {
504 struct list_head list;
505 struct mwifiex_private *priv;
506};
507
508struct mwifiex_bss_prio_tbl {
509 struct list_head bss_prio_head;
510 /* spin lock for bss priority */
511 spinlock_t bss_prio_lock;
512 struct mwifiex_bss_prio_node *bss_prio_cur;
513};
514
515struct cmd_ctrl_node {
516 struct list_head list;
517 struct mwifiex_private *priv;
518 u32 cmd_oid;
519 u32 cmd_flag;
520 struct sk_buff *cmd_skb;
521 struct sk_buff *resp_skb;
522 void *data_buf;
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700523 u32 wait_q_enabled;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700524 struct sk_buff *skb;
525};
526
527struct mwifiex_if_ops {
528 int (*init_if) (struct mwifiex_adapter *);
529 void (*cleanup_if) (struct mwifiex_adapter *);
530 int (*check_fw_status) (struct mwifiex_adapter *, u32, int *);
531 int (*prog_fw) (struct mwifiex_adapter *, struct mwifiex_fw_image *);
532 int (*register_dev) (struct mwifiex_adapter *);
533 void (*unregister_dev) (struct mwifiex_adapter *);
534 int (*enable_int) (struct mwifiex_adapter *);
535 int (*process_int_status) (struct mwifiex_adapter *);
536 int (*host_to_card) (struct mwifiex_adapter *, u8,
537 u8 *payload, u32 pkt_len,
538 struct mwifiex_tx_param *);
539 int (*wakeup) (struct mwifiex_adapter *);
540 int (*wakeup_complete) (struct mwifiex_adapter *);
541
542 void (*update_mp_end_port) (struct mwifiex_adapter *, u16);
543 void (*cleanup_mpa_buf) (struct mwifiex_adapter *);
544};
545
546struct mwifiex_adapter {
547 struct mwifiex_private *priv[MWIFIEX_MAX_BSS_NUM];
548 u8 priv_num;
549 struct mwifiex_drv_mode *drv_mode;
550 const struct firmware *firmware;
Amitkumar Karwar4a7f5db2011-05-23 18:00:17 -0700551 char fw_name[32];
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700552 struct device *dev;
553 bool surprise_removed;
554 u32 fw_release_number;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700555 u16 init_wait_q_woken;
556 wait_queue_head_t init_wait_q;
557 void *card;
558 struct mwifiex_if_ops if_ops;
559 atomic_t rx_pending;
560 atomic_t tx_pending;
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700561 atomic_t cmd_pending;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700562 struct workqueue_struct *workqueue;
563 struct work_struct main_work;
564 struct mwifiex_bss_prio_tbl bss_prio_tbl[MWIFIEX_MAX_BSS_NUM];
565 /* spin lock for init/shutdown */
566 spinlock_t mwifiex_lock;
567 /* spin lock for main process */
568 spinlock_t main_proc_lock;
569 u32 mwifiex_processing;
570 u16 max_tx_buf_size;
571 u16 tx_buf_size;
572 u16 curr_tx_buf_size;
573 u32 ioport;
574 enum MWIFIEX_HARDWARE_STATUS hw_status;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700575 u16 number_of_antenna;
576 u32 fw_cap_info;
577 /* spin lock for interrupt handling */
578 spinlock_t int_lock;
579 u8 int_status;
580 u32 event_cause;
581 struct sk_buff *event_skb;
582 u8 upld_buf[MWIFIEX_UPLD_SIZE];
583 u8 data_sent;
584 u8 cmd_sent;
585 u8 cmd_resp_received;
586 u8 event_received;
587 u8 data_received;
588 u16 seq_num;
589 struct cmd_ctrl_node *cmd_pool;
590 struct cmd_ctrl_node *curr_cmd;
591 /* spin lock for command */
592 spinlock_t mwifiex_cmd_lock;
593 u32 num_cmd_timeout;
594 u16 last_init_cmd;
595 struct timer_list cmd_timer;
596 struct list_head cmd_free_q;
597 /* spin lock for cmd_free_q */
598 spinlock_t cmd_free_q_lock;
599 struct list_head cmd_pending_q;
600 /* spin lock for cmd_pending_q */
601 spinlock_t cmd_pending_q_lock;
602 struct list_head scan_pending_q;
603 /* spin lock for scan_pending_q */
604 spinlock_t scan_pending_q_lock;
605 u32 scan_processing;
606 u16 region_code;
607 struct mwifiex_802_11d_domain_reg domain_reg;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700608 u16 scan_probes;
609 u32 scan_mode;
610 u16 specific_scan_time;
611 u16 active_scan_time;
612 u16 passive_scan_time;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700613 u8 fw_bands;
614 u8 adhoc_start_band;
615 u8 config_bands;
616 struct mwifiex_chan_scan_param_set *scan_channels;
617 u8 tx_lock_flag;
618 struct mwifiex_sleep_params sleep_params;
619 struct mwifiex_sleep_period sleep_period;
620 u16 ps_mode;
621 u32 ps_state;
622 u8 need_to_wakeup;
623 u16 multiple_dtim;
624 u16 local_listen_interval;
625 u16 null_pkt_interval;
626 struct sk_buff *sleep_cfm;
627 u16 bcn_miss_time_out;
628 u16 adhoc_awake_period;
629 u8 is_deep_sleep;
630 u8 delay_null_pkt;
631 u16 delay_to_ps;
632 u16 enhanced_ps_mode;
633 u8 pm_wakeup_card_req;
634 u16 gen_null_pkt;
635 u16 pps_uapsd_mode;
636 u32 pm_wakeup_fw_try;
637 u8 is_hs_configured;
638 struct mwifiex_hs_config_param hs_cfg;
639 u8 hs_activated;
640 u16 hs_activate_wait_q_woken;
641 wait_queue_head_t hs_activate_wait_q;
642 bool is_suspended;
643 u8 event_body[MAX_EVENT_SIZE];
644 u32 hw_dot_11n_dev_cap;
645 u8 hw_dev_mcs_support;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700646 u8 adhoc_11n_enabled;
647 u8 chan_offset;
648 struct mwifiex_dbg dbg;
649 u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE];
650 u32 arp_filter_size;
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700651 u16 cmd_wait_q_required;
652 struct mwifiex_wait_queue cmd_wait_q;
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700653};
654
655int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
656void mwifiex_free_lock_list(struct mwifiex_adapter *adapter);
657
658int mwifiex_init_fw(struct mwifiex_adapter *adapter);
659
660int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter);
661
662int mwifiex_shutdown_drv(struct mwifiex_adapter *adapter);
663
664int mwifiex_shutdown_fw_complete(struct mwifiex_adapter *adapter);
665
666int mwifiex_dnld_fw(struct mwifiex_adapter *, struct mwifiex_fw_image *);
667
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700668int mwifiex_recv_packet(struct mwifiex_adapter *, struct sk_buff *skb);
669
670int mwifiex_process_event(struct mwifiex_adapter *adapter);
671
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700672int mwifiex_complete_cmd(struct mwifiex_adapter *adapter);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700673
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700674int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
675 u16 cmd_action, u32 cmd_oid, void *data_buf);
676
677int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no,
678 u16 cmd_action, u32 cmd_oid, void *data_buf);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700679
680void mwifiex_cmd_timeout_func(unsigned long function_context);
681
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700682int mwifiex_get_debug_info(struct mwifiex_private *,
683 struct mwifiex_debug_info *);
684
685int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter);
686int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter);
687void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700688void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700689
690void mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter *adapter,
691 struct cmd_ctrl_node *cmd_node);
692
693void mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter,
694 struct cmd_ctrl_node *cmd_node,
695 u32 addtail);
696
697int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter);
698int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter);
699int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter,
700 struct sk_buff *skb);
701int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
702 struct mwifiex_tx_param *tx_param);
703int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags);
704int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
705 struct sk_buff *skb, int status);
706int mwifiex_recv_packet_complete(struct mwifiex_adapter *,
707 struct sk_buff *skb, int status);
708void mwifiex_clean_txrx(struct mwifiex_private *priv);
709u8 mwifiex_check_last_packet_indication(struct mwifiex_private *priv);
710void mwifiex_check_ps_cond(struct mwifiex_adapter *adapter);
711void mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *, u8 *,
712 u32);
713int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv,
714 struct host_cmd_ds_command *cmd,
715 u16 cmd_action, uint16_t ps_bitmap,
Amitkumar Karwara5ffddb2011-06-20 15:21:48 -0700716 struct mwifiex_ds_auto_ds *auto_ds);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700717int mwifiex_ret_enh_power_mode(struct mwifiex_private *priv,
718 struct host_cmd_ds_command *resp,
Amitkumar Karwara5ffddb2011-06-20 15:21:48 -0700719 struct mwifiex_ds_pm_cfg *pm_cfg);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700720void mwifiex_process_hs_config(struct mwifiex_adapter *adapter);
721void mwifiex_hs_activated_event(struct mwifiex_private *priv,
722 u8 activated);
723int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv,
724 struct host_cmd_ds_command *resp);
725int mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
726 struct sk_buff *skb);
727int mwifiex_sta_prepare_cmd(struct mwifiex_private *, uint16_t cmd_no,
728 u16 cmd_action, u32 cmd_oid,
729 void *data_buf, void *cmd_buf);
730int mwifiex_process_sta_cmdresp(struct mwifiex_private *, u16 cmdresp_no,
Amitkumar Karwara5ffddb2011-06-20 15:21:48 -0700731 struct host_cmd_ds_command *resp);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700732int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *,
733 struct sk_buff *skb);
734int mwifiex_process_sta_event(struct mwifiex_private *);
735void *mwifiex_process_sta_txpd(struct mwifiex_private *, struct sk_buff *skb);
736int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700737int mwifiex_scan_networks(struct mwifiex_private *priv,
738 const struct mwifiex_user_scan_cfg *user_scan_in);
Amitkumar Karwar572e8f32011-04-13 17:27:08 -0700739int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd,
Amitkumar Karwara5ffddb2011-06-20 15:21:48 -0700740 struct mwifiex_scan_cmd_config *scan_cfg);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700741void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
742 struct cmd_ctrl_node *cmd_node);
743int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700744 struct host_cmd_ds_command *resp);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700745s32 mwifiex_ssid_cmp(struct mwifiex_802_11_ssid *ssid1,
746 struct mwifiex_802_11_ssid *ssid2);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700747int mwifiex_associate(struct mwifiex_private *priv,
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700748 struct mwifiex_bssdescriptor *bss_desc);
749int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
Amitkumar Karwara5ffddb2011-06-20 15:21:48 -0700750 struct host_cmd_ds_command *cmd,
751 struct mwifiex_bssdescriptor *bss_desc);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700752int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700753 struct host_cmd_ds_command *resp);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700754void mwifiex_reset_connect_state(struct mwifiex_private *priv);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700755u8 mwifiex_band_to_radio_type(u8 band);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700756int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac);
757int mwifiex_adhoc_start(struct mwifiex_private *priv,
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700758 struct mwifiex_802_11_ssid *adhoc_ssid);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700759int mwifiex_adhoc_join(struct mwifiex_private *priv,
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700760 struct mwifiex_bssdescriptor *bss_desc);
761int mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
762 struct host_cmd_ds_command *cmd,
Amitkumar Karwara5ffddb2011-06-20 15:21:48 -0700763 struct mwifiex_802_11_ssid *req_ssid);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700764int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
765 struct host_cmd_ds_command *cmd,
Amitkumar Karwara5ffddb2011-06-20 15:21:48 -0700766 struct mwifiex_bssdescriptor *bss_desc);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700767int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv,
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700768 struct host_cmd_ds_command *resp);
Amitkumar Karwar572e8f32011-04-13 17:27:08 -0700769int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700770struct mwifiex_chan_freq_power *
771 mwifiex_get_cfp_by_band_and_channel_from_cfg80211(
772 struct mwifiex_private *priv,
773 u8 band, u16 channel);
774struct mwifiex_chan_freq_power *mwifiex_get_cfp_by_band_and_freq_from_cfg80211(
775 struct mwifiex_private *priv,
776 u8 band, u32 freq);
Amitkumar Karwar572e8f32011-04-13 17:27:08 -0700777u32 mwifiex_index_to_data_rate(u8 index, u8 ht_info);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700778u32 mwifiex_find_freq_from_band_chan(u8, u8);
779int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask,
780 u8 **buffer);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700781u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv,
782 u8 *rates);
783u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates);
Amitkumar Karwar572e8f32011-04-13 17:27:08 -0700784u8 mwifiex_data_rate_to_index(u32 rate);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700785u8 mwifiex_is_rate_auto(struct mwifiex_private *priv);
Amitkumar Karwar572e8f32011-04-13 17:27:08 -0700786int mwifiex_get_rate_index(u16 *rateBitmap, int size);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700787extern u16 region_code_index[MWIFIEX_MAX_REGION_CODE];
788void mwifiex_save_curr_bcn(struct mwifiex_private *priv);
789void mwifiex_free_curr_bcn(struct mwifiex_private *priv);
790int mwifiex_cmd_get_hw_spec(struct mwifiex_private *priv,
791 struct host_cmd_ds_command *cmd);
792int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
793 struct host_cmd_ds_command *resp);
794int is_command_pending(struct mwifiex_adapter *adapter);
795
796/*
797 * This function checks if the queuing is RA based or not.
798 */
799static inline u8
800mwifiex_queuing_ra_based(struct mwifiex_private *priv)
801{
802 /*
803 * Currently we assume if we are in Infra, then DA=RA. This might not be
804 * true in the future
805 */
Bing Zhaoeecd8252011-03-28 17:55:41 -0700806 if ((priv->bss_mode == NL80211_IFTYPE_STATION) &&
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700807 (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA))
808 return false;
809
810 return true;
811}
812
813/*
814 * This function copies rates.
815 */
816static inline u32
817mwifiex_copy_rates(u8 *dest, u32 pos, u8 *src, int len)
818{
819 int i;
820
821 for (i = 0; i < len && src[i]; i++, pos++) {
822 if (pos >= MWIFIEX_SUPPORTED_RATES)
823 break;
824 dest[pos] = src[i];
825 }
826
827 return pos;
828}
829
830/*
831 * This function returns the correct private structure pointer based
832 * upon the BSS type and BSS number.
833 */
834static inline struct mwifiex_private *
835mwifiex_get_priv_by_id(struct mwifiex_adapter *adapter,
Amitkumar Karwar2be78592011-04-15 20:50:42 -0700836 u8 bss_num, u8 bss_type)
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700837{
838 int i;
839
840 for (i = 0; i < adapter->priv_num; i++) {
841 if (adapter->priv[i]) {
842 if ((adapter->priv[i]->bss_num == bss_num)
843 && (adapter->priv[i]->bss_type == bss_type))
844 break;
845 }
846 }
847 return ((i < adapter->priv_num) ? adapter->priv[i] : NULL);
848}
849
850/*
851 * This function returns the first available private structure pointer
852 * based upon the BSS role.
853 */
854static inline struct mwifiex_private *
855mwifiex_get_priv(struct mwifiex_adapter *adapter,
856 enum mwifiex_bss_role bss_role)
857{
858 int i;
859
860 for (i = 0; i < adapter->priv_num; i++) {
861 if (adapter->priv[i]) {
862 if (bss_role == MWIFIEX_BSS_ROLE_ANY ||
863 GET_BSS_ROLE(adapter->priv[i]) == bss_role)
864 break;
865 }
866 }
867
868 return ((i < adapter->priv_num) ? adapter->priv[i] : NULL);
869}
870
871/*
872 * This function returns the driver private structure of a network device.
873 */
874static inline struct mwifiex_private *
875mwifiex_netdev_get_priv(struct net_device *dev)
876{
877 return (struct mwifiex_private *) (*(unsigned long *) netdev_priv(dev));
878}
879
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700880struct mwifiex_private *mwifiex_bss_index_to_priv(struct mwifiex_adapter
881 *adapter, u8 bss_index);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700882int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
883 u32 func_init_shutdown);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700884int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *);
885int mwifiex_remove_card(struct mwifiex_adapter *, struct semaphore *);
886
887void mwifiex_get_version(struct mwifiex_adapter *adapter, char *version,
888 int maxlen);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700889int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
890 struct mwifiex_multicast_list *mcast_list);
891int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
892 struct net_device *dev);
893int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter);
Amitkumar Karwar7c6fa2a2011-08-10 18:53:57 -0700894int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
895 struct mwifiex_802_11_ssid *req_ssid);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700896int mwifiex_set_hs_params(struct mwifiex_private *priv,
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700897 u16 action, int cmd_type,
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700898 struct mwifiex_ds_hs_cfg *hscfg);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700899int mwifiex_cancel_hs(struct mwifiex_private *priv, int cmd_type);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700900int mwifiex_enable_hs(struct mwifiex_adapter *adapter);
Amitkumar Karwara0490932011-07-13 20:51:59 -0700901int mwifiex_disable_auto_ds(struct mwifiex_private *priv);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700902int mwifiex_get_signal_info(struct mwifiex_private *priv,
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700903 struct mwifiex_ds_get_signal *signal);
904int mwifiex_drv_get_data_rate(struct mwifiex_private *priv,
905 struct mwifiex_rate_cfg *rate);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700906int mwifiex_request_scan(struct mwifiex_private *priv,
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700907 struct mwifiex_802_11_ssid *req_ssid);
908int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
909 struct mwifiex_user_scan_cfg *scan_req);
910int mwifiex_change_adhoc_chan(struct mwifiex_private *priv, int channel);
911int mwifiex_set_radio(struct mwifiex_private *priv, u8 option);
912
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700913int mwifiex_drv_change_adhoc_chan(struct mwifiex_private *priv, int channel);
914
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700915int mwifiex_set_encode(struct mwifiex_private *priv, const u8 *key,
916 int key_len, u8 key_index, int disable);
917
918int mwifiex_set_gen_ie(struct mwifiex_private *priv, u8 *ie, int ie_len);
919
920int mwifiex_get_ver_ext(struct mwifiex_private *priv);
921
922int mwifiex_get_stats_info(struct mwifiex_private *priv,
923 struct mwifiex_ds_get_stats *log);
924
925int mwifiex_reg_write(struct mwifiex_private *priv, u32 reg_type,
926 u32 reg_offset, u32 reg_value);
927
928int mwifiex_reg_read(struct mwifiex_private *priv, u32 reg_type,
929 u32 reg_offset, u32 *value);
930
931int mwifiex_eeprom_read(struct mwifiex_private *priv, u16 offset, u16 bytes,
932 u8 *value);
933
934int mwifiex_set_11n_httx_cfg(struct mwifiex_private *priv, int data);
935
936int mwifiex_get_11n_httx_cfg(struct mwifiex_private *priv, int *data);
937
938int mwifiex_set_tx_rate_cfg(struct mwifiex_private *priv, int tx_rate_index);
939
940int mwifiex_get_tx_rate_cfg(struct mwifiex_private *priv, int *tx_rate_index);
941
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700942int mwifiex_drv_set_power(struct mwifiex_private *priv, u32 *ps_mode);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700943
944int mwifiex_drv_get_driver_version(struct mwifiex_adapter *adapter,
945 char *version, int max_len);
946
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700947int mwifiex_set_tx_power(struct mwifiex_private *priv,
948 struct mwifiex_power_cfg *power_cfg);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700949
950int mwifiex_main_process(struct mwifiex_adapter *);
951
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700952int mwifiex_bss_set_channel(struct mwifiex_private *,
953 struct mwifiex_chan_freq_power *cfp);
Amitkumar Karwar600f5d92011-04-13 17:27:06 -0700954int mwifiex_set_radio_band_cfg(struct mwifiex_private *,
955 struct mwifiex_ds_band_cfg *);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700956int mwifiex_get_bss_info(struct mwifiex_private *,
957 struct mwifiex_bss_info *);
Amitkumar Karwar7c6fa2a2011-08-10 18:53:57 -0700958int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
959 u8 *bssid, s32 rssi, u8 *ie_buf,
960 size_t ie_len, u16 beacon_period,
Amitkumar Karwar5116f3c2011-09-21 21:43:23 -0700961 u16 cap_info_bitmap, u8 band,
Amitkumar Karwar7c6fa2a2011-08-10 18:53:57 -0700962 struct mwifiex_bssdescriptor *bss_desc);
963int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
964 struct mwifiex_bssdescriptor *bss_entry,
965 u8 *ie_buf, u32 ie_len);
966int mwifiex_check_network_compatibility(struct mwifiex_private *priv,
967 struct mwifiex_bssdescriptor *bss_desc);
Bing Zhao5e6e3a92011-03-21 18:00:50 -0700968
969#ifdef CONFIG_DEBUG_FS
970void mwifiex_debugfs_init(void);
971void mwifiex_debugfs_remove(void);
972
973void mwifiex_dev_debugfs_init(struct mwifiex_private *priv);
974void mwifiex_dev_debugfs_remove(struct mwifiex_private *priv);
975#endif
976#endif /* !_MWIFIEX_MAIN_H_ */