main.h 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. /*
  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. #ifndef _MWIFIEX_MAIN_H_
  20. #define _MWIFIEX_MAIN_H_
  21. #include <linux/kernel.h>
  22. #include <linux/module.h>
  23. #include <linux/sched.h>
  24. #include <linux/semaphore.h>
  25. #include <linux/ip.h>
  26. #include <linux/skbuff.h>
  27. #include <linux/if_arp.h>
  28. #include <linux/etherdevice.h>
  29. #include <net/sock.h>
  30. #include <net/lib80211.h>
  31. #include <linux/firmware.h>
  32. #include <linux/ctype.h>
  33. #include "decl.h"
  34. #include "ioctl.h"
  35. #include "util.h"
  36. #include "fw.h"
  37. extern const char driver_version[];
  38. extern struct mwifiex_adapter *g_adapter;
  39. enum {
  40. MWIFIEX_NO_WAIT,
  41. MWIFIEX_IOCTL_WAIT,
  42. MWIFIEX_CMD_WAIT,
  43. MWIFIEX_PROC_WAIT,
  44. MWIFIEX_WSTATS_WAIT
  45. };
  46. #define DRV_MODE_STA 0x1
  47. #define DRV_MODE_UAP 0x2
  48. #define DRV_MODE_UAP_STA 0x3
  49. #define SD8787_W0 0x30
  50. #define SD8787_W1 0x31
  51. #define SD8787_A0 0x40
  52. #define SD8787_A1 0x41
  53. #define DEFAULT_FW_NAME "mrvl/sd8787_uapsta.bin"
  54. #define SD8787_W1_FW_NAME "mrvl/sd8787_uapsta_w1.bin"
  55. #define SD8787_AX_FW_NAME "mrvl/sd8787_uapsta.bin"
  56. struct mwifiex_drv_mode {
  57. u16 drv_mode;
  58. u16 intf_num;
  59. struct mwifiex_bss_attr *bss_attr;
  60. };
  61. #define MWIFIEX_DEFAULT_WATCHDOG_TIMEOUT (5 * HZ)
  62. #define MWIFIEX_TIMER_10S 10000
  63. #define MWIFIEX_TIMER_1S 1000
  64. #define NL_MAX_PAYLOAD 1024
  65. #define NL_MULTICAST_GROUP 1
  66. #define MAX_TX_PENDING 60
  67. #define HEADER_ALIGNMENT 8
  68. #define MWIFIEX_UPLD_SIZE (2312)
  69. #define MAX_EVENT_SIZE 1024
  70. #define ARP_FILTER_MAX_BUF_SIZE 68
  71. #define MWIFIEX_KEY_BUFFER_SIZE 16
  72. #define MWIFIEX_DEFAULT_LISTEN_INTERVAL 10
  73. #define MWIFIEX_MAX_REGION_CODE 7
  74. #define DEFAULT_BCN_AVG_FACTOR 8
  75. #define DEFAULT_DATA_AVG_FACTOR 8
  76. #define FIRST_VALID_CHANNEL 0xff
  77. #define DEFAULT_AD_HOC_CHANNEL 6
  78. #define DEFAULT_AD_HOC_CHANNEL_A 36
  79. #define DEFAULT_BCN_MISS_TIMEOUT 5
  80. #define MAX_SCAN_BEACON_BUFFER 8000
  81. #define SCAN_BEACON_ENTRY_PAD 6
  82. #define MWIFIEX_PASSIVE_SCAN_CHAN_TIME 200
  83. #define MWIFIEX_ACTIVE_SCAN_CHAN_TIME 200
  84. #define MWIFIEX_SPECIFIC_SCAN_CHAN_TIME 110
  85. #define SCAN_RSSI(RSSI) (0x100 - ((u8)(RSSI)))
  86. #define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S)
  87. #define RSN_GTK_OUI_OFFSET 2
  88. #define MWIFIEX_OUI_NOT_PRESENT 0
  89. #define MWIFIEX_OUI_PRESENT 1
  90. #define IS_CARD_RX_RCVD(adapter) (adapter->cmd_resp_received || \
  91. adapter->event_received || \
  92. adapter->data_received)
  93. #define MWIFIEX_TYPE_CMD 1
  94. #define MWIFIEX_TYPE_DATA 0
  95. #define MWIFIEX_TYPE_EVENT 3
  96. #define DBG_CMD_NUM 5
  97. #define MAX_BITMAP_RATES_SIZE 10
  98. #define MAX_CHANNEL_BAND_BG 14
  99. #define MAX_FREQUENCY_BAND_BG 2484
  100. struct mwifiex_dbg {
  101. u32 num_cmd_host_to_card_failure;
  102. u32 num_cmd_sleep_cfm_host_to_card_failure;
  103. u32 num_tx_host_to_card_failure;
  104. u32 num_event_deauth;
  105. u32 num_event_disassoc;
  106. u32 num_event_link_lost;
  107. u32 num_cmd_deauth;
  108. u32 num_cmd_assoc_success;
  109. u32 num_cmd_assoc_failure;
  110. u32 num_tx_timeout;
  111. u32 num_cmd_timeout;
  112. u16 timeout_cmd_id;
  113. u16 timeout_cmd_act;
  114. u16 last_cmd_id[DBG_CMD_NUM];
  115. u16 last_cmd_act[DBG_CMD_NUM];
  116. u16 last_cmd_index;
  117. u16 last_cmd_resp_id[DBG_CMD_NUM];
  118. u16 last_cmd_resp_index;
  119. u16 last_event[DBG_CMD_NUM];
  120. u16 last_event_index;
  121. };
  122. enum MWIFIEX_HARDWARE_STATUS {
  123. MWIFIEX_HW_STATUS_READY,
  124. MWIFIEX_HW_STATUS_INITIALIZING,
  125. MWIFIEX_HW_STATUS_FW_READY,
  126. MWIFIEX_HW_STATUS_INIT_DONE,
  127. MWIFIEX_HW_STATUS_RESET,
  128. MWIFIEX_HW_STATUS_CLOSING,
  129. MWIFIEX_HW_STATUS_NOT_READY
  130. };
  131. enum MWIFIEX_802_11_POWER_MODE {
  132. MWIFIEX_802_11_POWER_MODE_CAM,
  133. MWIFIEX_802_11_POWER_MODE_PSP
  134. };
  135. struct mwifiex_tx_param {
  136. u32 next_pkt_len;
  137. };
  138. enum MWIFIEX_PS_STATE {
  139. PS_STATE_AWAKE,
  140. PS_STATE_PRE_SLEEP,
  141. PS_STATE_SLEEP_CFM,
  142. PS_STATE_SLEEP
  143. };
  144. struct mwifiex_add_ba_param {
  145. u32 tx_win_size;
  146. u32 rx_win_size;
  147. u32 timeout;
  148. };
  149. struct mwifiex_tx_aggr {
  150. u8 ampdu_user;
  151. u8 ampdu_ap;
  152. u8 amsdu;
  153. };
  154. struct mwifiex_ra_list_tbl {
  155. struct list_head list;
  156. struct sk_buff_head skb_head;
  157. u8 ra[ETH_ALEN];
  158. u32 total_pkts_size;
  159. u32 is_11n_enabled;
  160. };
  161. struct mwifiex_tid_tbl {
  162. struct list_head ra_list;
  163. /* spin lock for tid table */
  164. spinlock_t tid_tbl_lock;
  165. struct mwifiex_ra_list_tbl *ra_list_curr;
  166. };
  167. #define WMM_HIGHEST_PRIORITY 7
  168. #define HIGH_PRIO_TID 7
  169. #define LOW_PRIO_TID 0
  170. struct mwifiex_wmm_desc {
  171. struct mwifiex_tid_tbl tid_tbl_ptr[MAX_NUM_TID];
  172. u32 packets_out[MAX_NUM_TID];
  173. /* spin lock to protect ra_list */
  174. spinlock_t ra_list_spinlock;
  175. struct mwifiex_wmm_ac_status ac_status[IEEE80211_MAX_QUEUES];
  176. enum mwifiex_wmm_ac_e ac_down_graded_vals[IEEE80211_MAX_QUEUES];
  177. u32 drv_pkt_delay_max;
  178. u8 queue_priority[IEEE80211_MAX_QUEUES];
  179. u32 user_pri_pkt_tx_ctrl[WMM_HIGHEST_PRIORITY + 1]; /* UP: 0 to 7 */
  180. };
  181. struct mwifiex_802_11_security {
  182. u8 wpa_enabled;
  183. u8 wpa2_enabled;
  184. u8 wapi_enabled;
  185. u8 wapi_key_on;
  186. enum MWIFIEX_802_11_WEP_STATUS wep_status;
  187. u32 authentication_mode;
  188. u32 encryption_mode;
  189. };
  190. struct ieee_types_header {
  191. u8 element_id;
  192. u8 len;
  193. } __packed;
  194. struct ieee_obss_scan_param {
  195. u16 obss_scan_passive_dwell;
  196. u16 obss_scan_active_dwell;
  197. u16 bss_chan_width_trigger_scan_int;
  198. u16 obss_scan_passive_total;
  199. u16 obss_scan_active_total;
  200. u16 bss_width_chan_trans_delay;
  201. u16 obss_scan_active_threshold;
  202. } __packed;
  203. struct ieee_types_obss_scan_param {
  204. struct ieee_types_header ieee_hdr;
  205. struct ieee_obss_scan_param obss_scan;
  206. } __packed;
  207. #define MWIFIEX_SUPPORTED_RATES 14
  208. #define MWIFIEX_SUPPORTED_RATES_EXT 32
  209. #define IEEE_MAX_IE_SIZE 256
  210. struct ieee_types_vendor_specific {
  211. struct ieee_types_vendor_header vend_hdr;
  212. u8 data[IEEE_MAX_IE_SIZE - sizeof(struct ieee_types_vendor_header)];
  213. } __packed;
  214. struct ieee_types_generic {
  215. struct ieee_types_header ieee_hdr;
  216. u8 data[IEEE_MAX_IE_SIZE - sizeof(struct ieee_types_header)];
  217. } __packed;
  218. struct mwifiex_bssdescriptor {
  219. u8 mac_address[ETH_ALEN];
  220. struct mwifiex_802_11_ssid ssid;
  221. u32 privacy;
  222. s32 rssi;
  223. u32 channel;
  224. u32 freq;
  225. u16 beacon_period;
  226. u8 erp_flags;
  227. u32 bss_mode;
  228. u8 supported_rates[MWIFIEX_SUPPORTED_RATES];
  229. u8 data_rates[MWIFIEX_SUPPORTED_RATES];
  230. /* Network band.
  231. * BAND_B(0x01): 'b' band
  232. * BAND_G(0x02): 'g' band
  233. * BAND_A(0X04): 'a' band
  234. */
  235. u16 bss_band;
  236. long long network_tsf;
  237. u8 time_stamp[8];
  238. union ieee_types_phy_param_set phy_param_set;
  239. union ieee_types_ss_param_set ss_param_set;
  240. u16 cap_info_bitmap;
  241. struct ieee_types_wmm_parameter wmm_ie;
  242. u8 disable_11n;
  243. struct ieee80211_ht_cap *bcn_ht_cap;
  244. u16 ht_cap_offset;
  245. struct ieee80211_ht_info *bcn_ht_info;
  246. u16 ht_info_offset;
  247. u8 *bcn_bss_co_2040;
  248. u16 bss_co_2040_offset;
  249. u8 *bcn_ext_cap;
  250. u16 ext_cap_offset;
  251. struct ieee_types_obss_scan_param *bcn_obss_scan;
  252. u16 overlap_bss_offset;
  253. struct ieee_types_vendor_specific *bcn_wpa_ie;
  254. u16 wpa_offset;
  255. struct ieee_types_generic *bcn_rsn_ie;
  256. u16 rsn_offset;
  257. struct ieee_types_generic *bcn_wapi_ie;
  258. u16 wapi_offset;
  259. u8 *beacon_buf;
  260. u32 beacon_buf_size;
  261. u32 beacon_buf_size_max;
  262. };
  263. struct mwifiex_current_bss_params {
  264. struct mwifiex_bssdescriptor bss_descriptor;
  265. u8 wmm_enabled;
  266. u8 wmm_uapsd_enabled;
  267. u8 band;
  268. u32 num_of_rates;
  269. u8 data_rates[MWIFIEX_SUPPORTED_RATES];
  270. };
  271. struct mwifiex_sleep_params {
  272. u16 sp_error;
  273. u16 sp_offset;
  274. u16 sp_stable_time;
  275. u8 sp_cal_control;
  276. u8 sp_ext_sleep_clk;
  277. u16 sp_reserved;
  278. };
  279. struct mwifiex_sleep_period {
  280. u16 period;
  281. u16 reserved;
  282. };
  283. struct mwifiex_wep_key {
  284. u32 length;
  285. u32 key_index;
  286. u32 key_length;
  287. u8 key_material[MWIFIEX_KEY_BUFFER_SIZE];
  288. };
  289. #define MAX_REGION_CHANNEL_NUM 2
  290. struct mwifiex_chan_freq_power {
  291. u16 channel;
  292. u32 freq;
  293. u16 max_tx_power;
  294. u8 unsupported;
  295. };
  296. enum state_11d_t {
  297. DISABLE_11D = 0,
  298. ENABLE_11D = 1,
  299. };
  300. #define MWIFIEX_MAX_TRIPLET_802_11D 83
  301. struct mwifiex_802_11d_domain_reg {
  302. u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
  303. u8 no_of_triplet;
  304. struct ieee80211_country_ie_triplet
  305. triplet[MWIFIEX_MAX_TRIPLET_802_11D];
  306. };
  307. struct mwifiex_vendor_spec_cfg_ie {
  308. u16 mask;
  309. u16 flag;
  310. u8 ie[MWIFIEX_MAX_VSIE_LEN];
  311. };
  312. struct wps {
  313. u8 session_enable;
  314. };
  315. struct mwifiex_adapter;
  316. struct mwifiex_private;
  317. struct mwifiex_private {
  318. struct mwifiex_adapter *adapter;
  319. u8 bss_index;
  320. u8 bss_type;
  321. u8 bss_role;
  322. u8 bss_priority;
  323. u8 bss_num;
  324. u8 frame_type;
  325. u8 curr_addr[ETH_ALEN];
  326. u8 media_connected;
  327. u32 num_tx_timeout;
  328. struct net_device *netdev;
  329. struct net_device_stats stats;
  330. u16 curr_pkt_filter;
  331. u32 bss_mode;
  332. u32 pkt_tx_ctrl;
  333. u16 tx_power_level;
  334. u8 max_tx_power_level;
  335. u8 min_tx_power_level;
  336. u8 tx_rate;
  337. u8 tx_htinfo;
  338. u8 rxpd_htinfo;
  339. u8 rxpd_rate;
  340. u16 rate_bitmap;
  341. u16 bitmap_rates[MAX_BITMAP_RATES_SIZE];
  342. u32 data_rate;
  343. u8 is_data_rate_auto;
  344. u16 bcn_avg_factor;
  345. u16 data_avg_factor;
  346. s16 data_rssi_last;
  347. s16 data_nf_last;
  348. s16 data_rssi_avg;
  349. s16 data_nf_avg;
  350. s16 bcn_rssi_last;
  351. s16 bcn_nf_last;
  352. s16 bcn_rssi_avg;
  353. s16 bcn_nf_avg;
  354. struct mwifiex_bssdescriptor *attempted_bss_desc;
  355. struct mwifiex_802_11_ssid prev_ssid;
  356. u8 prev_bssid[ETH_ALEN];
  357. struct mwifiex_current_bss_params curr_bss_params;
  358. u16 beacon_period;
  359. u16 listen_interval;
  360. u16 atim_window;
  361. u8 adhoc_channel;
  362. u8 adhoc_is_link_sensed;
  363. u8 adhoc_state;
  364. struct mwifiex_802_11_security sec_info;
  365. struct mwifiex_wep_key wep_key[NUM_WEP_KEYS];
  366. u16 wep_key_curr_index;
  367. u8 wpa_ie[256];
  368. u8 wpa_ie_len;
  369. u8 wpa_is_gtk_set;
  370. struct host_cmd_ds_802_11_key_material aes_key;
  371. u8 wapi_ie[256];
  372. u8 wapi_ie_len;
  373. u8 wmm_required;
  374. u8 wmm_enabled;
  375. u8 wmm_qosinfo;
  376. struct mwifiex_wmm_desc wmm;
  377. struct list_head tx_ba_stream_tbl_ptr;
  378. /* spin lock for tx_ba_stream_tbl_ptr queue */
  379. spinlock_t tx_ba_stream_tbl_lock;
  380. struct mwifiex_tx_aggr aggr_prio_tbl[MAX_NUM_TID];
  381. struct mwifiex_add_ba_param add_ba_param;
  382. u16 rx_seq[MAX_NUM_TID];
  383. struct list_head rx_reorder_tbl_ptr;
  384. /* spin lock for rx_reorder_tbl_ptr queue */
  385. spinlock_t rx_reorder_tbl_lock;
  386. /* spin lock for Rx packets */
  387. spinlock_t rx_pkt_lock;
  388. #define MWIFIEX_ASSOC_RSP_BUF_SIZE 500
  389. u8 assoc_rsp_buf[MWIFIEX_ASSOC_RSP_BUF_SIZE];
  390. u32 assoc_rsp_size;
  391. #define MWIFIEX_GENIE_BUF_SIZE 256
  392. u8 gen_ie_buf[MWIFIEX_GENIE_BUF_SIZE];
  393. u8 gen_ie_buf_len;
  394. struct mwifiex_vendor_spec_cfg_ie vs_ie[MWIFIEX_MAX_VSIE_NUM];
  395. #define MWIFIEX_ASSOC_TLV_BUF_SIZE 256
  396. u8 assoc_tlv_buf[MWIFIEX_ASSOC_TLV_BUF_SIZE];
  397. u8 assoc_tlv_buf_len;
  398. u8 *curr_bcn_buf;
  399. u32 curr_bcn_size;
  400. /* spin lock for beacon buffer */
  401. spinlock_t curr_bcn_buf_lock;
  402. u16 ioctl_wait_q_woken;
  403. wait_queue_head_t ioctl_wait_q;
  404. u16 cmd_wait_q_woken;
  405. wait_queue_head_t cmd_wait_q;
  406. struct wireless_dev *wdev;
  407. struct mwifiex_chan_freq_power cfp;
  408. char version_str[128];
  409. #ifdef CONFIG_DEBUG_FS
  410. struct dentry *dfs_dev_dir;
  411. #endif
  412. u8 nick_name[16];
  413. struct iw_statistics w_stats;
  414. u16 w_stats_wait_q_woken;
  415. wait_queue_head_t w_stats_wait_q;
  416. u16 current_key_index;
  417. struct semaphore async_sem;
  418. u8 scan_pending_on_block;
  419. u8 report_scan_result;
  420. struct cfg80211_scan_request *scan_request;
  421. int scan_result_status;
  422. bool assoc_request;
  423. u16 assoc_result;
  424. bool ibss_join_request;
  425. u16 ibss_join_result;
  426. bool disconnect;
  427. u8 cfg_bssid[6];
  428. struct workqueue_struct *workqueue;
  429. struct work_struct cfg_workqueue;
  430. u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
  431. struct wps wps;
  432. u8 scan_block;
  433. };
  434. enum mwifiex_ba_status {
  435. BA_STREAM_NOT_SETUP = 0,
  436. BA_STREAM_SETUP_INPROGRESS,
  437. BA_STREAM_SETUP_COMPLETE
  438. };
  439. struct mwifiex_tx_ba_stream_tbl {
  440. struct list_head list;
  441. int tid;
  442. u8 ra[ETH_ALEN];
  443. enum mwifiex_ba_status ba_status;
  444. };
  445. struct mwifiex_rx_reorder_tbl;
  446. struct reorder_tmr_cnxt {
  447. struct timer_list timer;
  448. struct mwifiex_rx_reorder_tbl *ptr;
  449. struct mwifiex_private *priv;
  450. };
  451. struct mwifiex_rx_reorder_tbl {
  452. struct list_head list;
  453. int tid;
  454. u8 ta[ETH_ALEN];
  455. int start_win;
  456. int win_size;
  457. void **rx_reorder_ptr;
  458. struct reorder_tmr_cnxt timer_context;
  459. };
  460. struct mwifiex_bss_prio_node {
  461. struct list_head list;
  462. struct mwifiex_private *priv;
  463. };
  464. struct mwifiex_bss_prio_tbl {
  465. struct list_head bss_prio_head;
  466. /* spin lock for bss priority */
  467. spinlock_t bss_prio_lock;
  468. struct mwifiex_bss_prio_node *bss_prio_cur;
  469. };
  470. struct cmd_ctrl_node {
  471. struct list_head list;
  472. struct mwifiex_private *priv;
  473. u32 cmd_oid;
  474. u32 cmd_flag;
  475. struct sk_buff *cmd_skb;
  476. struct sk_buff *resp_skb;
  477. void *data_buf;
  478. void *wq_buf;
  479. struct sk_buff *skb;
  480. };
  481. struct mwifiex_if_ops {
  482. int (*init_if) (struct mwifiex_adapter *);
  483. void (*cleanup_if) (struct mwifiex_adapter *);
  484. int (*check_fw_status) (struct mwifiex_adapter *, u32, int *);
  485. int (*prog_fw) (struct mwifiex_adapter *, struct mwifiex_fw_image *);
  486. int (*register_dev) (struct mwifiex_adapter *);
  487. void (*unregister_dev) (struct mwifiex_adapter *);
  488. int (*enable_int) (struct mwifiex_adapter *);
  489. int (*process_int_status) (struct mwifiex_adapter *);
  490. int (*host_to_card) (struct mwifiex_adapter *, u8,
  491. u8 *payload, u32 pkt_len,
  492. struct mwifiex_tx_param *);
  493. int (*wakeup) (struct mwifiex_adapter *);
  494. int (*wakeup_complete) (struct mwifiex_adapter *);
  495. void (*update_mp_end_port) (struct mwifiex_adapter *, u16);
  496. void (*cleanup_mpa_buf) (struct mwifiex_adapter *);
  497. };
  498. struct mwifiex_adapter {
  499. struct mwifiex_private *priv[MWIFIEX_MAX_BSS_NUM];
  500. u8 priv_num;
  501. struct mwifiex_drv_mode *drv_mode;
  502. const struct firmware *firmware;
  503. struct device *dev;
  504. bool surprise_removed;
  505. u32 fw_release_number;
  506. u32 revision_id;
  507. u16 init_wait_q_woken;
  508. wait_queue_head_t init_wait_q;
  509. void *card;
  510. struct mwifiex_if_ops if_ops;
  511. atomic_t rx_pending;
  512. atomic_t tx_pending;
  513. atomic_t ioctl_pending;
  514. struct workqueue_struct *workqueue;
  515. struct work_struct main_work;
  516. struct mwifiex_bss_prio_tbl bss_prio_tbl[MWIFIEX_MAX_BSS_NUM];
  517. /* spin lock for init/shutdown */
  518. spinlock_t mwifiex_lock;
  519. /* spin lock for main process */
  520. spinlock_t main_proc_lock;
  521. u32 mwifiex_processing;
  522. u16 max_tx_buf_size;
  523. u16 tx_buf_size;
  524. u16 curr_tx_buf_size;
  525. u32 ioport;
  526. enum MWIFIEX_HARDWARE_STATUS hw_status;
  527. u16 radio_on;
  528. u16 number_of_antenna;
  529. u32 fw_cap_info;
  530. /* spin lock for interrupt handling */
  531. spinlock_t int_lock;
  532. u8 int_status;
  533. u32 event_cause;
  534. struct sk_buff *event_skb;
  535. u8 upld_buf[MWIFIEX_UPLD_SIZE];
  536. u8 data_sent;
  537. u8 cmd_sent;
  538. u8 cmd_resp_received;
  539. u8 event_received;
  540. u8 data_received;
  541. u16 seq_num;
  542. struct cmd_ctrl_node *cmd_pool;
  543. struct cmd_ctrl_node *curr_cmd;
  544. /* spin lock for command */
  545. spinlock_t mwifiex_cmd_lock;
  546. u32 num_cmd_timeout;
  547. u16 last_init_cmd;
  548. struct timer_list cmd_timer;
  549. struct list_head cmd_free_q;
  550. /* spin lock for cmd_free_q */
  551. spinlock_t cmd_free_q_lock;
  552. struct list_head cmd_pending_q;
  553. /* spin lock for cmd_pending_q */
  554. spinlock_t cmd_pending_q_lock;
  555. struct list_head scan_pending_q;
  556. /* spin lock for scan_pending_q */
  557. spinlock_t scan_pending_q_lock;
  558. u32 scan_processing;
  559. u16 region_code;
  560. struct mwifiex_802_11d_domain_reg domain_reg;
  561. struct mwifiex_bssdescriptor *scan_table;
  562. u32 num_in_scan_table;
  563. u16 scan_probes;
  564. u32 scan_mode;
  565. u16 specific_scan_time;
  566. u16 active_scan_time;
  567. u16 passive_scan_time;
  568. u8 bcn_buf[MAX_SCAN_BEACON_BUFFER];
  569. u8 *bcn_buf_end;
  570. u8 fw_bands;
  571. u8 adhoc_start_band;
  572. u8 config_bands;
  573. struct mwifiex_chan_scan_param_set *scan_channels;
  574. u8 tx_lock_flag;
  575. struct mwifiex_sleep_params sleep_params;
  576. struct mwifiex_sleep_period sleep_period;
  577. u16 ps_mode;
  578. u32 ps_state;
  579. u8 need_to_wakeup;
  580. u16 multiple_dtim;
  581. u16 local_listen_interval;
  582. u16 null_pkt_interval;
  583. struct sk_buff *sleep_cfm;
  584. u16 bcn_miss_time_out;
  585. u16 adhoc_awake_period;
  586. u8 is_deep_sleep;
  587. u8 delay_null_pkt;
  588. u16 delay_to_ps;
  589. u16 enhanced_ps_mode;
  590. u8 pm_wakeup_card_req;
  591. u16 gen_null_pkt;
  592. u16 pps_uapsd_mode;
  593. u32 pm_wakeup_fw_try;
  594. u8 is_hs_configured;
  595. struct mwifiex_hs_config_param hs_cfg;
  596. u8 hs_activated;
  597. u16 hs_activate_wait_q_woken;
  598. wait_queue_head_t hs_activate_wait_q;
  599. bool is_suspended;
  600. u8 event_body[MAX_EVENT_SIZE];
  601. u32 hw_dot_11n_dev_cap;
  602. u8 hw_dev_mcs_support;
  603. u8 adhoc_11n_enabled;
  604. u8 chan_offset;
  605. struct mwifiex_dbg dbg;
  606. u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE];
  607. u32 arp_filter_size;
  608. };
  609. int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
  610. void mwifiex_free_lock_list(struct mwifiex_adapter *adapter);
  611. int mwifiex_init_fw(struct mwifiex_adapter *adapter);
  612. int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter);
  613. int mwifiex_shutdown_drv(struct mwifiex_adapter *adapter);
  614. int mwifiex_shutdown_fw_complete(struct mwifiex_adapter *adapter);
  615. int mwifiex_dnld_fw(struct mwifiex_adapter *, struct mwifiex_fw_image *);
  616. int mwifiex_recv_complete(struct mwifiex_adapter *,
  617. struct sk_buff *skb,
  618. int status);
  619. int mwifiex_recv_packet(struct mwifiex_adapter *, struct sk_buff *skb);
  620. int mwifiex_process_event(struct mwifiex_adapter *adapter);
  621. int mwifiex_ioctl_complete(struct mwifiex_adapter *adapter,
  622. struct mwifiex_wait_queue *ioctl_wq,
  623. int status);
  624. int mwifiex_prepare_cmd(struct mwifiex_private *priv,
  625. uint16_t cmd_no,
  626. u16 cmd_action,
  627. u32 cmd_oid,
  628. void *wait_queue, void *data_buf);
  629. void mwifiex_cmd_timeout_func(unsigned long function_context);
  630. int mwifiex_misc_ioctl_init_shutdown(struct mwifiex_adapter *adapter,
  631. struct mwifiex_wait_queue *wait_queue,
  632. u32 func_init_shutdown);
  633. int mwifiex_get_debug_info(struct mwifiex_private *,
  634. struct mwifiex_debug_info *);
  635. int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter);
  636. int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter);
  637. void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter);
  638. void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter,
  639. struct mwifiex_wait_queue *ioctl_wq);
  640. void mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter *adapter,
  641. struct cmd_ctrl_node *cmd_node);
  642. void mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter,
  643. struct cmd_ctrl_node *cmd_node,
  644. u32 addtail);
  645. int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter);
  646. int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter);
  647. int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter,
  648. struct sk_buff *skb);
  649. int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
  650. struct mwifiex_tx_param *tx_param);
  651. int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags);
  652. int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
  653. struct sk_buff *skb, int status);
  654. int mwifiex_recv_packet_complete(struct mwifiex_adapter *,
  655. struct sk_buff *skb, int status);
  656. void mwifiex_clean_txrx(struct mwifiex_private *priv);
  657. u8 mwifiex_check_last_packet_indication(struct mwifiex_private *priv);
  658. void mwifiex_check_ps_cond(struct mwifiex_adapter *adapter);
  659. void mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *, u8 *,
  660. u32);
  661. int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv,
  662. struct host_cmd_ds_command *cmd,
  663. u16 cmd_action, uint16_t ps_bitmap,
  664. void *data_buf);
  665. int mwifiex_ret_enh_power_mode(struct mwifiex_private *priv,
  666. struct host_cmd_ds_command *resp,
  667. void *data_buf);
  668. void mwifiex_process_hs_config(struct mwifiex_adapter *adapter);
  669. void mwifiex_hs_activated_event(struct mwifiex_private *priv,
  670. u8 activated);
  671. int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv,
  672. struct host_cmd_ds_command *resp);
  673. int mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
  674. struct sk_buff *skb);
  675. int mwifiex_sta_prepare_cmd(struct mwifiex_private *, uint16_t cmd_no,
  676. u16 cmd_action, u32 cmd_oid,
  677. void *data_buf, void *cmd_buf);
  678. int mwifiex_process_sta_cmdresp(struct mwifiex_private *, u16 cmdresp_no,
  679. void *cmd_buf, void *ioctl);
  680. int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *,
  681. struct sk_buff *skb);
  682. int mwifiex_process_sta_event(struct mwifiex_private *);
  683. void *mwifiex_process_sta_txpd(struct mwifiex_private *, struct sk_buff *skb);
  684. int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta);
  685. int mwifiex_scan_networks(struct mwifiex_private *priv, void *wait_queue,
  686. u16 action,
  687. const struct mwifiex_user_scan_cfg
  688. *user_scan_in, struct mwifiex_scan_resp *);
  689. int mwifiex_cmd_802_11_scan(struct mwifiex_private *priv,
  690. struct host_cmd_ds_command *cmd,
  691. void *data_buf);
  692. void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
  693. struct cmd_ctrl_node *cmd_node);
  694. int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
  695. struct host_cmd_ds_command *resp,
  696. void *wait_queue);
  697. s32 mwifiex_find_ssid_in_list(struct mwifiex_private *priv,
  698. struct mwifiex_802_11_ssid *ssid, u8 *bssid,
  699. u32 mode);
  700. s32 mwifiex_find_bssid_in_list(struct mwifiex_private *priv, u8 *bssid,
  701. u32 mode);
  702. int mwifiex_find_best_network(struct mwifiex_private *priv,
  703. struct mwifiex_ssid_bssid *req_ssid_bssid);
  704. s32 mwifiex_ssid_cmp(struct mwifiex_802_11_ssid *ssid1,
  705. struct mwifiex_802_11_ssid *ssid2);
  706. int mwifiex_associate(struct mwifiex_private *priv, void *wait_queue,
  707. struct mwifiex_bssdescriptor *bss_desc);
  708. int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
  709. struct host_cmd_ds_command
  710. *cmd, void *data_buf);
  711. int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
  712. struct host_cmd_ds_command *resp,
  713. void *wait_queue);
  714. void mwifiex_reset_connect_state(struct mwifiex_private *priv);
  715. void mwifiex_2040_coex_event(struct mwifiex_private *priv);
  716. u8 mwifiex_band_to_radio_type(u8 band);
  717. int mwifiex_deauthenticate(struct mwifiex_private *priv,
  718. struct mwifiex_wait_queue *wait_queue,
  719. u8 *mac);
  720. int mwifiex_adhoc_start(struct mwifiex_private *priv, void *wait_queue,
  721. struct mwifiex_802_11_ssid *adhoc_ssid);
  722. int mwifiex_adhoc_join(struct mwifiex_private *priv, void *wait_queue,
  723. struct mwifiex_bssdescriptor *bss_desc);
  724. int mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
  725. struct host_cmd_ds_command *cmd,
  726. void *data_buf);
  727. int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
  728. struct host_cmd_ds_command *cmd,
  729. void *data_buf);
  730. int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv,
  731. struct host_cmd_ds_command *resp,
  732. void *wait_queue);
  733. int mwifiex_cmd_802_11_bg_scan_query(struct mwifiex_private *priv,
  734. struct host_cmd_ds_command *cmd,
  735. void *data_buf);
  736. struct mwifiex_chan_freq_power *
  737. mwifiex_get_cfp_by_band_and_channel_from_cfg80211(
  738. struct mwifiex_private *priv,
  739. u8 band, u16 channel);
  740. struct mwifiex_chan_freq_power *mwifiex_get_cfp_by_band_and_freq_from_cfg80211(
  741. struct mwifiex_private *priv,
  742. u8 band, u32 freq);
  743. u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
  744. u8 ht_info);
  745. u32 mwifiex_find_freq_from_band_chan(u8, u8);
  746. int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask,
  747. u8 **buffer);
  748. u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
  749. u8 ht_info);
  750. u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv,
  751. u8 *rates);
  752. u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates);
  753. u8 mwifiex_data_rate_to_index(struct mwifiex_adapter *adapter, u32 rate);
  754. u8 mwifiex_is_rate_auto(struct mwifiex_private *priv);
  755. int mwifiex_get_rate_index(struct mwifiex_adapter *adapter,
  756. u16 *rateBitmap, int size);
  757. extern u16 region_code_index[MWIFIEX_MAX_REGION_CODE];
  758. void mwifiex_save_curr_bcn(struct mwifiex_private *priv);
  759. void mwifiex_free_curr_bcn(struct mwifiex_private *priv);
  760. int mwifiex_cmd_get_hw_spec(struct mwifiex_private *priv,
  761. struct host_cmd_ds_command *cmd);
  762. int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
  763. struct host_cmd_ds_command *resp);
  764. int is_command_pending(struct mwifiex_adapter *adapter);
  765. /*
  766. * This function checks if the queuing is RA based or not.
  767. */
  768. static inline u8
  769. mwifiex_queuing_ra_based(struct mwifiex_private *priv)
  770. {
  771. /*
  772. * Currently we assume if we are in Infra, then DA=RA. This might not be
  773. * true in the future
  774. */
  775. if ((priv->bss_mode == NL80211_IFTYPE_STATION) &&
  776. (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA))
  777. return false;
  778. return true;
  779. }
  780. /*
  781. * This function copies rates.
  782. */
  783. static inline u32
  784. mwifiex_copy_rates(u8 *dest, u32 pos, u8 *src, int len)
  785. {
  786. int i;
  787. for (i = 0; i < len && src[i]; i++, pos++) {
  788. if (pos >= MWIFIEX_SUPPORTED_RATES)
  789. break;
  790. dest[pos] = src[i];
  791. }
  792. return pos;
  793. }
  794. /*
  795. * This function returns the correct private structure pointer based
  796. * upon the BSS type and BSS number.
  797. */
  798. static inline struct mwifiex_private *
  799. mwifiex_get_priv_by_id(struct mwifiex_adapter *adapter,
  800. u32 bss_num, u32 bss_type)
  801. {
  802. int i;
  803. for (i = 0; i < adapter->priv_num; i++) {
  804. if (adapter->priv[i]) {
  805. if ((adapter->priv[i]->bss_num == bss_num)
  806. && (adapter->priv[i]->bss_type == bss_type))
  807. break;
  808. }
  809. }
  810. return ((i < adapter->priv_num) ? adapter->priv[i] : NULL);
  811. }
  812. /*
  813. * This function returns the first available private structure pointer
  814. * based upon the BSS role.
  815. */
  816. static inline struct mwifiex_private *
  817. mwifiex_get_priv(struct mwifiex_adapter *adapter,
  818. enum mwifiex_bss_role bss_role)
  819. {
  820. int i;
  821. for (i = 0; i < adapter->priv_num; i++) {
  822. if (adapter->priv[i]) {
  823. if (bss_role == MWIFIEX_BSS_ROLE_ANY ||
  824. GET_BSS_ROLE(adapter->priv[i]) == bss_role)
  825. break;
  826. }
  827. }
  828. return ((i < adapter->priv_num) ? adapter->priv[i] : NULL);
  829. }
  830. /*
  831. * This function returns the driver private structure of a network device.
  832. */
  833. static inline struct mwifiex_private *
  834. mwifiex_netdev_get_priv(struct net_device *dev)
  835. {
  836. return (struct mwifiex_private *) (*(unsigned long *) netdev_priv(dev));
  837. }
  838. struct mwifiex_wait_queue *mwifiex_alloc_fill_wait_queue(
  839. struct mwifiex_private *,
  840. u8 wait_option);
  841. struct mwifiex_private *mwifiex_bss_index_to_priv(struct mwifiex_adapter
  842. *adapter, u8 bss_index);
  843. int mwifiex_shutdown_fw(struct mwifiex_private *, u8);
  844. int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *);
  845. int mwifiex_remove_card(struct mwifiex_adapter *, struct semaphore *);
  846. void mwifiex_get_version(struct mwifiex_adapter *adapter, char *version,
  847. int maxlen);
  848. int mwifiex_request_set_mac_address(struct mwifiex_private *priv);
  849. void mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
  850. struct net_device *dev);
  851. int mwifiex_request_ioctl(struct mwifiex_private *priv,
  852. struct mwifiex_wait_queue *req,
  853. int, u8 wait_option);
  854. int mwifiex_disconnect(struct mwifiex_private *, u8, u8 *);
  855. int mwifiex_bss_start(struct mwifiex_private *priv,
  856. u8 wait_option,
  857. struct mwifiex_ssid_bssid *ssid_bssid);
  858. int mwifiex_set_hs_params(struct mwifiex_private *priv,
  859. u16 action, u8 wait_option,
  860. struct mwifiex_ds_hs_cfg *hscfg);
  861. int mwifiex_cancel_hs(struct mwifiex_private *priv, u8 wait_option);
  862. int mwifiex_enable_hs(struct mwifiex_adapter *adapter);
  863. void mwifiex_process_ioctl_resp(struct mwifiex_private *priv,
  864. struct mwifiex_wait_queue *req);
  865. u32 mwifiex_get_mode(struct mwifiex_private *priv, u8 wait_option);
  866. int mwifiex_get_signal_info(struct mwifiex_private *priv,
  867. u8 wait_option,
  868. struct mwifiex_ds_get_signal *signal);
  869. int mwifiex_drv_get_data_rate(struct mwifiex_private *priv,
  870. struct mwifiex_rate_cfg *rate);
  871. int mwifiex_get_channel_list(struct mwifiex_private *priv,
  872. u8 wait_option,
  873. struct mwifiex_chan_list *chanlist);
  874. int mwifiex_get_scan_table(struct mwifiex_private *priv,
  875. u8 wait_option,
  876. struct mwifiex_scan_resp *scanresp);
  877. int mwifiex_enable_wep_key(struct mwifiex_private *priv, u8 wait_option);
  878. int mwifiex_find_best_bss(struct mwifiex_private *priv, u8 wait_option,
  879. struct mwifiex_ssid_bssid *ssid_bssid);
  880. int mwifiex_request_scan(struct mwifiex_private *priv,
  881. u8 wait_option,
  882. struct mwifiex_802_11_ssid *req_ssid);
  883. int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
  884. struct mwifiex_user_scan_cfg *scan_req);
  885. int mwifiex_change_adhoc_chan(struct mwifiex_private *priv, int channel);
  886. int mwifiex_set_radio(struct mwifiex_private *priv, u8 option);
  887. int mwifiex_drv_change_adhoc_chan(struct mwifiex_private *priv, int channel);
  888. int mwifiex_set_encode(struct mwifiex_private *priv, const u8 *key,
  889. int key_len, u8 key_index, int disable);
  890. int mwifiex_set_gen_ie(struct mwifiex_private *priv, u8 *ie, int ie_len);
  891. int mwifiex_get_ver_ext(struct mwifiex_private *priv);
  892. int mwifiex_get_stats_info(struct mwifiex_private *priv,
  893. struct mwifiex_ds_get_stats *log);
  894. int mwifiex_reg_write(struct mwifiex_private *priv, u32 reg_type,
  895. u32 reg_offset, u32 reg_value);
  896. int mwifiex_reg_read(struct mwifiex_private *priv, u32 reg_type,
  897. u32 reg_offset, u32 *value);
  898. int mwifiex_eeprom_read(struct mwifiex_private *priv, u16 offset, u16 bytes,
  899. u8 *value);
  900. int mwifiex_set_11n_httx_cfg(struct mwifiex_private *priv, int data);
  901. int mwifiex_get_11n_httx_cfg(struct mwifiex_private *priv, int *data);
  902. int mwifiex_set_tx_rate_cfg(struct mwifiex_private *priv, int tx_rate_index);
  903. int mwifiex_get_tx_rate_cfg(struct mwifiex_private *priv, int *tx_rate_index);
  904. int mwifiex_drv_set_power(struct mwifiex_private *priv, bool power_on);
  905. int mwifiex_drv_get_driver_version(struct mwifiex_adapter *adapter,
  906. char *version, int max_len);
  907. int mwifiex_set_tx_power(struct mwifiex_private *priv, int type, int dbm);
  908. int mwifiex_main_process(struct mwifiex_adapter *);
  909. int mwifiex_bss_ioctl_channel(struct mwifiex_private *,
  910. u16 action,
  911. struct mwifiex_chan_freq_power *cfp);
  912. int mwifiex_bss_ioctl_find_bss(struct mwifiex_private *,
  913. struct mwifiex_wait_queue *,
  914. struct mwifiex_ssid_bssid *);
  915. int mwifiex_radio_ioctl_band_cfg(struct mwifiex_private *,
  916. u16 action,
  917. struct mwifiex_ds_band_cfg *);
  918. int mwifiex_snmp_mib_ioctl(struct mwifiex_private *,
  919. struct mwifiex_wait_queue *,
  920. u32 cmd_oid, u16 action, u32 *value);
  921. int mwifiex_get_bss_info(struct mwifiex_private *,
  922. struct mwifiex_bss_info *);
  923. #ifdef CONFIG_DEBUG_FS
  924. void mwifiex_debugfs_init(void);
  925. void mwifiex_debugfs_remove(void);
  926. void mwifiex_dev_debugfs_init(struct mwifiex_private *priv);
  927. void mwifiex_dev_debugfs_remove(struct mwifiex_private *priv);
  928. #endif
  929. #endif /* !_MWIFIEX_MAIN_H_ */