2 * Marvell Wireless LAN device driver: major data structures and prototypes
4 * Copyright (C) 2011-2014, Marvell International Ltd.
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.
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.
20 #ifndef _MWIFIEX_MAIN_H_
21 #define _MWIFIEX_MAIN_H_
23 #include <linux/kernel.h>
24 #include <linux/module.h>
25 #include <linux/sched.h>
26 #include <linux/semaphore.h>
28 #include <linux/skbuff.h>
29 #include <linux/if_arp.h>
30 #include <linux/etherdevice.h>
32 #include <net/lib80211.h>
33 #include <linux/vmalloc.h>
34 #include <linux/firmware.h>
35 #include <linux/ctype.h>
37 #include <linux/idr.h>
47 extern const char driver_version[];
54 #define MWIFIEX_DRIVER_MODE_STA BIT(0)
55 #define MWIFIEX_DRIVER_MODE_UAP BIT(1)
56 #define MWIFIEX_DRIVER_MODE_P2P BIT(2)
57 #define MWIFIEX_DRIVER_MODE_BITMASK (BIT(0) | BIT(1) | BIT(2))
59 #define MWIFIEX_MAX_AP 64
61 #define MWIFIEX_DEFAULT_WATCHDOG_TIMEOUT (5 * HZ)
63 #define MWIFIEX_TIMER_10S 10000
64 #define MWIFIEX_TIMER_1S 1000
66 #define MAX_TX_PENDING 100
67 #define LOW_TX_PENDING 80
69 #define HIGH_RX_PENDING 50
70 #define LOW_RX_PENDING 20
72 #define MWIFIEX_UPLD_SIZE (2312)
74 #define MAX_EVENT_SIZE 2048
76 #define ARP_FILTER_MAX_BUF_SIZE 68
78 #define MWIFIEX_KEY_BUFFER_SIZE 16
79 #define MWIFIEX_DEFAULT_LISTEN_INTERVAL 10
80 #define MWIFIEX_MAX_REGION_CODE 7
82 #define DEFAULT_BCN_AVG_FACTOR 8
83 #define DEFAULT_DATA_AVG_FACTOR 8
85 #define FIRST_VALID_CHANNEL 0xff
86 #define DEFAULT_AD_HOC_CHANNEL 6
87 #define DEFAULT_AD_HOC_CHANNEL_A 36
89 #define DEFAULT_BCN_MISS_TIMEOUT 5
91 #define MAX_SCAN_BEACON_BUFFER 8000
93 #define SCAN_BEACON_ENTRY_PAD 6
95 #define MWIFIEX_PASSIVE_SCAN_CHAN_TIME 110
96 #define MWIFIEX_ACTIVE_SCAN_CHAN_TIME 30
97 #define MWIFIEX_SPECIFIC_SCAN_CHAN_TIME 30
98 #define MWIFIEX_DEF_SCAN_CHAN_GAP_TIME 50
100 #define SCAN_RSSI(RSSI) (0x100 - ((u8)(RSSI)))
102 #define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S)
104 #define RSN_GTK_OUI_OFFSET 2
106 #define MWIFIEX_OUI_NOT_PRESENT 0
107 #define MWIFIEX_OUI_PRESENT 1
109 #define PKT_TYPE_MGMT 0xE5
112 * Do not check for data_received for USB, as data_received
113 * is handled in mwifiex_usb_recv for USB
115 #define IS_CARD_RX_RCVD(adapter) (adapter->cmd_resp_received || \
116 adapter->event_received || \
117 adapter->data_received)
119 #define MWIFIEX_TYPE_CMD 1
120 #define MWIFIEX_TYPE_DATA 0
121 #define MWIFIEX_TYPE_EVENT 3
123 #define MAX_BITMAP_RATES_SIZE 18
125 #define MAX_CHANNEL_BAND_BG 14
126 #define MAX_CHANNEL_BAND_A 165
128 #define MAX_FREQUENCY_BAND_BG 2484
130 #define MWIFIEX_EVENT_HEADER_LEN 4
131 #define MWIFIEX_UAP_EVENT_EXTRA_HEADER 2
133 #define MWIFIEX_TYPE_LEN 4
134 #define MWIFIEX_USB_TYPE_CMD 0xF00DFACE
135 #define MWIFIEX_USB_TYPE_DATA 0xBEADC0DE
136 #define MWIFIEX_USB_TYPE_EVENT 0xBEEFFACE
138 /* Threshold for tx_timeout_cnt before we trigger a card reset */
139 #define TX_TIMEOUT_THRESHOLD 6
141 #define MWIFIEX_DRV_INFO_SIZE_MAX 0x40000
144 u32 num_cmd_host_to_card_failure;
145 u32 num_cmd_sleep_cfm_host_to_card_failure;
146 u32 num_tx_host_to_card_failure;
147 u32 num_event_deauth;
148 u32 num_event_disassoc;
149 u32 num_event_link_lost;
151 u32 num_cmd_assoc_success;
152 u32 num_cmd_assoc_failure;
156 u16 last_cmd_id[DBG_CMD_NUM];
157 u16 last_cmd_act[DBG_CMD_NUM];
159 u16 last_cmd_resp_id[DBG_CMD_NUM];
160 u16 last_cmd_resp_index;
161 u16 last_event[DBG_CMD_NUM];
162 u16 last_event_index;
165 enum MWIFIEX_HARDWARE_STATUS {
166 MWIFIEX_HW_STATUS_READY,
167 MWIFIEX_HW_STATUS_INITIALIZING,
168 MWIFIEX_HW_STATUS_INIT_DONE,
169 MWIFIEX_HW_STATUS_RESET,
170 MWIFIEX_HW_STATUS_CLOSING,
171 MWIFIEX_HW_STATUS_NOT_READY
174 enum MWIFIEX_802_11_POWER_MODE {
175 MWIFIEX_802_11_POWER_MODE_CAM,
176 MWIFIEX_802_11_POWER_MODE_PSP
179 struct mwifiex_tx_param {
183 enum MWIFIEX_PS_STATE {
190 enum mwifiex_iface_type {
196 struct mwifiex_add_ba_param {
204 struct mwifiex_tx_aggr {
210 struct mwifiex_ra_list_tbl {
211 struct list_head list;
212 struct sk_buff_head skb_head;
222 struct mwifiex_tid_tbl {
223 struct list_head ra_list;
226 #define WMM_HIGHEST_PRIORITY 7
227 #define HIGH_PRIO_TID 7
228 #define LOW_PRIO_TID 0
230 struct mwifiex_wmm_desc {
231 struct mwifiex_tid_tbl tid_tbl_ptr[MAX_NUM_TID];
232 u32 packets_out[MAX_NUM_TID];
233 /* spin lock to protect ra_list */
234 spinlock_t ra_list_spinlock;
235 struct mwifiex_wmm_ac_status ac_status[IEEE80211_NUM_ACS];
236 enum mwifiex_wmm_ac_e ac_down_graded_vals[IEEE80211_NUM_ACS];
237 u32 drv_pkt_delay_max;
238 u8 queue_priority[IEEE80211_NUM_ACS];
239 u32 user_pri_pkt_tx_ctrl[WMM_HIGHEST_PRIORITY + 1]; /* UP: 0 to 7 */
240 /* Number of transmit packets queued */
241 atomic_t tx_pkts_queued;
242 /* Tracks highest priority with a packet queued */
243 atomic_t highest_queued_prio;
246 struct mwifiex_802_11_security {
252 u32 authentication_mode;
257 struct ieee_types_header {
262 struct ieee_types_vendor_specific {
263 struct ieee_types_vendor_header vend_hdr;
264 u8 data[IEEE_MAX_IE_SIZE - sizeof(struct ieee_types_vendor_header)];
267 struct ieee_types_generic {
268 struct ieee_types_header ieee_hdr;
269 u8 data[IEEE_MAX_IE_SIZE - sizeof(struct ieee_types_header)];
272 struct ieee_types_bss_co_2040 {
273 struct ieee_types_header ieee_hdr;
277 struct ieee_types_extcap {
278 struct ieee_types_header ieee_hdr;
282 struct ieee_types_vht_cap {
283 struct ieee_types_header ieee_hdr;
284 struct ieee80211_vht_cap vhtcap;
287 struct ieee_types_vht_oper {
288 struct ieee_types_header ieee_hdr;
289 struct ieee80211_vht_operation vhtoper;
292 struct ieee_types_aid {
293 struct ieee_types_header ieee_hdr;
297 struct mwifiex_bssdescriptor {
298 u8 mac_address[ETH_ALEN];
299 struct cfg80211_ssid ssid;
307 u8 supported_rates[MWIFIEX_SUPPORTED_RATES];
308 u8 data_rates[MWIFIEX_SUPPORTED_RATES];
310 * BAND_B(0x01): 'b' band
311 * BAND_G(0x02): 'g' band
312 * BAND_A(0X04): 'a' band
317 union ieee_types_phy_param_set phy_param_set;
318 union ieee_types_ss_param_set ss_param_set;
320 struct ieee_types_wmm_parameter wmm_ie;
322 struct ieee80211_ht_cap *bcn_ht_cap;
324 struct ieee80211_ht_operation *bcn_ht_oper;
327 u16 bss_co_2040_offset;
330 struct ieee80211_vht_cap *bcn_vht_cap;
332 struct ieee80211_vht_operation *bcn_vht_oper;
334 struct ieee_types_oper_mode_ntf *oper_mode;
335 u16 oper_mode_offset;
337 struct ieee_types_vendor_specific *bcn_wpa_ie;
339 struct ieee_types_generic *bcn_rsn_ie;
341 struct ieee_types_generic *bcn_wapi_ie;
347 u8 chan_sw_ie_present;
350 struct mwifiex_current_bss_params {
351 struct mwifiex_bssdescriptor bss_descriptor;
353 u8 wmm_uapsd_enabled;
356 u8 data_rates[MWIFIEX_SUPPORTED_RATES];
359 struct mwifiex_sleep_params {
368 struct mwifiex_sleep_period {
373 struct mwifiex_wep_key {
377 u8 key_material[MWIFIEX_KEY_BUFFER_SIZE];
380 #define MAX_REGION_CHANNEL_NUM 2
382 struct mwifiex_chan_freq_power {
394 #define MWIFIEX_MAX_TRIPLET_802_11D 83
396 struct mwifiex_802_11d_domain_reg {
397 u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
399 struct ieee80211_country_ie_triplet
400 triplet[MWIFIEX_MAX_TRIPLET_802_11D];
403 struct mwifiex_vendor_spec_cfg_ie {
406 u8 ie[MWIFIEX_MAX_VSIE_LEN];
413 struct mwifiex_roc_cfg {
415 struct ieee80211_channel chan;
418 #define MWIFIEX_FW_DUMP_IDX 0xff
419 #define MWIFIEX_DRV_INFO_IDX 20
420 #define FW_DUMP_MAX_NAME_LEN 8
421 #define FW_DUMP_HOST_READY 0xEE
422 #define FW_DUMP_DONE 0xFF
423 #define FW_DUMP_READ_DONE 0xFE
425 struct memory_type_mapping {
426 u8 mem_name[FW_DUMP_MAX_NAME_LEN];
433 RDWR_STATUS_SUCCESS = 0,
434 RDWR_STATUS_FAILURE = 1,
438 enum mwifiex_iface_work_flags {
439 MWIFIEX_IFACE_WORK_FW_DUMP,
440 MWIFIEX_IFACE_WORK_CARD_RESET,
443 struct mwifiex_adapter;
444 struct mwifiex_private;
446 struct mwifiex_private {
447 struct mwifiex_adapter *adapter;
454 u8 curr_addr[ETH_ALEN];
457 /* track consecutive timeout */
459 struct net_device *netdev;
460 struct net_device_stats stats;
465 u8 max_tx_power_level;
466 u8 min_tx_power_level;
472 u16 bitmap_rates[MAX_BITMAP_RATES_SIZE];
474 u8 is_data_rate_auto;
485 struct mwifiex_bssdescriptor *attempted_bss_desc;
486 struct cfg80211_ssid prev_ssid;
487 u8 prev_bssid[ETH_ALEN];
488 struct mwifiex_current_bss_params curr_bss_params;
494 u8 adhoc_is_link_sensed;
496 struct mwifiex_802_11_security sec_info;
497 struct mwifiex_wep_key wep_key[NUM_WEP_KEYS];
498 u16 wep_key_curr_index;
502 struct host_cmd_ds_802_11_key_material aes_key;
503 struct host_cmd_ds_802_11_key_material_v2 aes_key_v2;
511 struct mwifiex_wmm_desc wmm;
512 atomic_t wmm_tx_pending[IEEE80211_NUM_ACS];
513 struct list_head sta_list;
514 /* spin lock for associated station/TDLS peers list */
515 spinlock_t sta_list_spinlock;
516 struct list_head auto_tdls_list;
517 /* spin lock for auto TDLS peer list */
518 spinlock_t auto_tdls_lock;
519 struct list_head tx_ba_stream_tbl_ptr;
520 /* spin lock for tx_ba_stream_tbl_ptr queue */
521 spinlock_t tx_ba_stream_tbl_lock;
522 struct mwifiex_tx_aggr aggr_prio_tbl[MAX_NUM_TID];
523 struct mwifiex_add_ba_param add_ba_param;
524 u16 rx_seq[MAX_NUM_TID];
525 u8 tos_to_tid_inv[MAX_NUM_TID];
526 struct list_head rx_reorder_tbl_ptr;
527 /* spin lock for rx_reorder_tbl_ptr queue */
528 spinlock_t rx_reorder_tbl_lock;
529 /* spin lock for Rx packets */
530 spinlock_t rx_pkt_lock;
532 #define MWIFIEX_ASSOC_RSP_BUF_SIZE 500
533 u8 assoc_rsp_buf[MWIFIEX_ASSOC_RSP_BUF_SIZE];
536 #define MWIFIEX_GENIE_BUF_SIZE 256
537 u8 gen_ie_buf[MWIFIEX_GENIE_BUF_SIZE];
540 struct mwifiex_vendor_spec_cfg_ie vs_ie[MWIFIEX_MAX_VSIE_NUM];
542 #define MWIFIEX_ASSOC_TLV_BUF_SIZE 256
543 u8 assoc_tlv_buf[MWIFIEX_ASSOC_TLV_BUF_SIZE];
544 u8 assoc_tlv_buf_len;
548 /* spin lock for beacon buffer */
549 spinlock_t curr_bcn_buf_lock;
550 struct wireless_dev wdev;
551 struct mwifiex_chan_freq_power cfp;
552 char version_str[128];
553 #ifdef CONFIG_DEBUG_FS
554 struct dentry *dfs_dev_dir;
556 u16 current_key_index;
557 struct semaphore async_sem;
558 struct cfg80211_scan_request *scan_request;
564 u8 subsc_evt_rssi_state;
565 struct mwifiex_ds_misc_subsc_evt async_subsc_evt_storage;
566 struct mwifiex_ie mgmt_ie[MAX_MGMT_IE_INDEX];
574 struct mwifiex_roc_cfg roc_cfg;
577 unsigned long csa_expire_time;
580 struct mwifiex_uap_bss_param bss_cfg;
581 struct station_parameters *sta_params;
582 struct sk_buff_head tdls_txq;
584 struct timer_list auto_tdls_timer;
585 bool auto_tdls_timer_active;
586 struct idr ack_status_frames;
587 /* spin lock for ack status */
588 spinlock_t ack_status_lock;
589 /** rx histogram data */
590 struct mwifiex_histogram_data *hist_data;
591 struct cfg80211_chan_def dfs_chandef;
592 struct workqueue_struct *dfs_cac_workqueue;
593 struct delayed_work dfs_cac_work;
596 enum mwifiex_ba_status {
602 struct mwifiex_tx_ba_stream_tbl {
603 struct list_head list;
606 enum mwifiex_ba_status ba_status;
610 struct mwifiex_rx_reorder_tbl;
612 struct reorder_tmr_cnxt {
613 struct timer_list timer;
614 struct mwifiex_rx_reorder_tbl *ptr;
615 struct mwifiex_private *priv;
619 struct mwifiex_rx_reorder_tbl {
620 struct list_head list;
626 void **rx_reorder_ptr;
627 struct reorder_tmr_cnxt timer_context;
632 struct mwifiex_bss_prio_node {
633 struct list_head list;
634 struct mwifiex_private *priv;
637 struct mwifiex_bss_prio_tbl {
638 struct list_head bss_prio_head;
639 /* spin lock for bss priority */
640 spinlock_t bss_prio_lock;
641 struct mwifiex_bss_prio_node *bss_prio_cur;
644 struct cmd_ctrl_node {
645 struct list_head list;
646 struct mwifiex_private *priv;
649 struct sk_buff *cmd_skb;
650 struct sk_buff *resp_skb;
658 struct mwifiex_bss_priv {
663 struct mwifiex_tdls_capab {
670 struct ieee80211_ht_cap ht_capb;
671 struct ieee80211_ht_operation ht_oper;
672 struct ieee_types_extcap extcap;
673 struct ieee_types_generic rsn_ie;
674 struct ieee80211_vht_cap vhtcap;
675 struct ieee80211_vht_operation vhtoper;
678 /* This is AP/TDLS specific structure which stores information
679 * about associated/peer STA
681 struct mwifiex_sta_node {
682 struct list_head list;
683 u8 mac_addr[ETH_ALEN];
687 u8 ampdu_sta[MAX_NUM_TID];
688 u16 rx_seq[MAX_NUM_TID];
691 struct mwifiex_tdls_capab tdls_cap;
694 struct mwifiex_auto_tdls_peer {
695 struct list_head list;
696 u8 mac_addr[ETH_ALEN];
705 struct mwifiex_if_ops {
706 int (*init_if) (struct mwifiex_adapter *);
707 void (*cleanup_if) (struct mwifiex_adapter *);
708 int (*check_fw_status) (struct mwifiex_adapter *, u32);
709 int (*prog_fw) (struct mwifiex_adapter *, struct mwifiex_fw_image *);
710 int (*register_dev) (struct mwifiex_adapter *);
711 void (*unregister_dev) (struct mwifiex_adapter *);
712 int (*enable_int) (struct mwifiex_adapter *);
713 void (*disable_int) (struct mwifiex_adapter *);
714 int (*process_int_status) (struct mwifiex_adapter *);
715 int (*host_to_card) (struct mwifiex_adapter *, u8, struct sk_buff *,
716 struct mwifiex_tx_param *);
717 int (*wakeup) (struct mwifiex_adapter *);
718 int (*wakeup_complete) (struct mwifiex_adapter *);
720 /* Interface specific functions */
721 void (*update_mp_end_port) (struct mwifiex_adapter *, u16);
722 void (*cleanup_mpa_buf) (struct mwifiex_adapter *);
723 int (*cmdrsp_complete) (struct mwifiex_adapter *, struct sk_buff *);
724 int (*event_complete) (struct mwifiex_adapter *, struct sk_buff *);
725 int (*init_fw_port) (struct mwifiex_adapter *);
726 int (*dnld_fw) (struct mwifiex_adapter *, struct mwifiex_fw_image *);
727 void (*card_reset) (struct mwifiex_adapter *);
728 void (*fw_dump)(struct mwifiex_adapter *);
729 int (*reg_dump)(struct mwifiex_adapter *, char *);
730 int (*clean_pcie_ring) (struct mwifiex_adapter *adapter);
731 void (*iface_work)(struct work_struct *work);
732 void (*submit_rem_rx_urbs)(struct mwifiex_adapter *adapter);
735 struct mwifiex_adapter {
737 struct mwifiex_iface_comb iface_limit;
738 struct mwifiex_iface_comb curr_iface_comb;
739 struct mwifiex_private *priv[MWIFIEX_MAX_BSS_NUM];
741 const struct firmware *firmware;
746 u8 perm_addr[ETH_ALEN];
747 bool surprise_removed;
748 u32 fw_release_number;
749 u16 init_wait_q_woken;
750 wait_queue_head_t init_wait_q;
752 struct mwifiex_if_ops if_ops;
755 atomic_t cmd_pending;
756 struct workqueue_struct *workqueue;
757 struct work_struct main_work;
758 struct workqueue_struct *rx_workqueue;
759 struct work_struct rx_work;
760 struct workqueue_struct *dfs_workqueue;
761 struct work_struct dfs_work;
762 bool rx_work_enabled;
764 bool delay_main_work;
766 struct mwifiex_bss_prio_tbl bss_prio_tbl[MWIFIEX_MAX_BSS_NUM];
767 /* spin lock for init/shutdown */
768 spinlock_t mwifiex_lock;
769 /* spin lock for main process */
770 spinlock_t main_proc_lock;
771 u32 mwifiex_processing;
773 u16 curr_tx_buf_size;
775 enum MWIFIEX_HARDWARE_STATUS hw_status;
776 u16 number_of_antenna;
778 /* spin lock for interrupt handling */
782 struct sk_buff *event_skb;
783 u8 upld_buf[MWIFIEX_UPLD_SIZE];
786 u8 cmd_resp_received;
790 struct cmd_ctrl_node *cmd_pool;
791 struct cmd_ctrl_node *curr_cmd;
792 /* spin lock for command */
793 spinlock_t mwifiex_cmd_lock;
796 struct timer_list cmd_timer;
797 struct list_head cmd_free_q;
798 /* spin lock for cmd_free_q */
799 spinlock_t cmd_free_q_lock;
800 struct list_head cmd_pending_q;
801 /* spin lock for cmd_pending_q */
802 spinlock_t cmd_pending_q_lock;
803 struct list_head scan_pending_q;
804 /* spin lock for scan_pending_q */
805 spinlock_t scan_pending_q_lock;
806 /* spin lock for RX processing routine */
807 spinlock_t rx_proc_lock;
810 struct mwifiex_802_11d_domain_reg domain_reg;
813 u16 specific_scan_time;
814 u16 active_scan_time;
815 u16 passive_scan_time;
816 u16 scan_chan_gap_time;
820 struct mwifiex_chan_scan_param_set *scan_channels;
822 struct mwifiex_sleep_params sleep_params;
823 struct mwifiex_sleep_period sleep_period;
828 u16 local_listen_interval;
829 u16 null_pkt_interval;
830 struct sk_buff *sleep_cfm;
831 u16 bcn_miss_time_out;
832 u16 adhoc_awake_period;
836 u16 enhanced_ps_mode;
837 u8 pm_wakeup_card_req;
840 u32 pm_wakeup_fw_try;
841 struct timer_list wakeup_timer;
843 struct mwifiex_hs_config_param hs_cfg;
845 u16 hs_activate_wait_q_woken;
846 wait_queue_head_t hs_activate_wait_q;
849 u8 event_body[MAX_EVENT_SIZE];
850 u32 hw_dot_11n_dev_cap;
851 u8 hw_dev_mcs_support;
852 u8 user_dev_mcs_support;
853 u8 adhoc_11n_enabled;
855 struct mwifiex_dbg dbg;
856 u8 arp_filter[ARP_FILTER_MAX_BUF_SIZE];
858 struct mwifiex_wait_queue cmd_wait_q;
859 u8 scan_wait_q_woken;
860 spinlock_t queue_lock; /* lock for tx queues */
861 u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
862 u16 max_mgmt_ie_index;
863 const struct firmware *cal_data;
864 struct device_node *dt_node;
867 u32 is_hw_11ac_capable;
868 u32 hw_dot_11ac_dev_cap;
869 u32 hw_dot_11ac_mcs_support;
870 u32 usr_dot_11ac_dev_cap_bg;
871 u32 usr_dot_11ac_dev_cap_a;
872 u32 usr_dot_11ac_mcs_support;
874 atomic_t pending_bridged_pkts;
875 struct semaphore *card_sem;
878 u8 key_api_major_ver, key_api_minor_ver;
879 struct work_struct iface_work;
880 unsigned long iface_work_flags;
881 struct memory_type_mapping *mem_type_mapping_tbl;
886 bool scan_chan_gap_enabled;
887 struct sk_buff_head rx_data_q;
888 struct mwifiex_chan_stats *chan_stats;
889 u32 num_in_chan_stats;
894 int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
896 void mwifiex_set_trans_start(struct net_device *dev);
898 void mwifiex_stop_net_dev_queue(struct net_device *netdev,
899 struct mwifiex_adapter *adapter);
901 void mwifiex_wake_up_net_dev_queue(struct net_device *netdev,
902 struct mwifiex_adapter *adapter);
904 int mwifiex_init_priv(struct mwifiex_private *priv);
905 void mwifiex_free_priv(struct mwifiex_private *priv);
907 int mwifiex_init_fw(struct mwifiex_adapter *adapter);
909 int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter);
911 int mwifiex_shutdown_drv(struct mwifiex_adapter *adapter);
913 int mwifiex_shutdown_fw_complete(struct mwifiex_adapter *adapter);
915 int mwifiex_dnld_fw(struct mwifiex_adapter *, struct mwifiex_fw_image *);
917 int mwifiex_recv_packet(struct mwifiex_private *priv, struct sk_buff *skb);
919 int mwifiex_process_mgmt_packet(struct mwifiex_private *priv,
920 struct sk_buff *skb);
922 int mwifiex_process_event(struct mwifiex_adapter *adapter);
924 int mwifiex_complete_cmd(struct mwifiex_adapter *adapter,
925 struct cmd_ctrl_node *cmd_node);
927 int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
928 u16 cmd_action, u32 cmd_oid, void *data_buf, bool sync);
930 void mwifiex_cmd_timeout_func(unsigned long function_context);
932 int mwifiex_get_debug_info(struct mwifiex_private *,
933 struct mwifiex_debug_info *);
935 int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter);
936 int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter);
937 void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter);
938 void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter);
940 void mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter *adapter,
941 struct cmd_ctrl_node *cmd_node);
942 void mwifiex_recycle_cmd_node(struct mwifiex_adapter *adapter,
943 struct cmd_ctrl_node *cmd_node);
945 void mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter,
946 struct cmd_ctrl_node *cmd_node,
949 int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter);
950 int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter);
951 int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter,
952 struct sk_buff *skb);
953 int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
954 struct mwifiex_tx_param *tx_param);
955 int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags);
956 int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
957 struct sk_buff *skb, int aggr, int status);
958 void mwifiex_clean_txrx(struct mwifiex_private *priv);
959 u8 mwifiex_check_last_packet_indication(struct mwifiex_private *priv);
960 void mwifiex_check_ps_cond(struct mwifiex_adapter *adapter);
961 void mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *, u8 *,
963 int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv,
964 struct host_cmd_ds_command *cmd,
965 u16 cmd_action, uint16_t ps_bitmap,
966 struct mwifiex_ds_auto_ds *auto_ds);
967 int mwifiex_ret_enh_power_mode(struct mwifiex_private *priv,
968 struct host_cmd_ds_command *resp,
969 struct mwifiex_ds_pm_cfg *pm_cfg);
970 void mwifiex_process_hs_config(struct mwifiex_adapter *adapter);
971 void mwifiex_hs_activated_event(struct mwifiex_private *priv,
973 int mwifiex_set_hs_params(struct mwifiex_private *priv, u16 action,
974 int cmd_type, struct mwifiex_ds_hs_cfg *hs_cfg);
975 int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private *priv,
976 struct host_cmd_ds_command *resp);
977 int mwifiex_process_rx_packet(struct mwifiex_private *priv,
978 struct sk_buff *skb);
979 int mwifiex_sta_prepare_cmd(struct mwifiex_private *, uint16_t cmd_no,
980 u16 cmd_action, u32 cmd_oid,
981 void *data_buf, void *cmd_buf);
982 int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
983 u16 cmd_action, u32 cmd_oid,
984 void *data_buf, void *cmd_buf);
985 int mwifiex_process_sta_cmdresp(struct mwifiex_private *, u16 cmdresp_no,
986 struct host_cmd_ds_command *resp);
987 int mwifiex_process_sta_rx_packet(struct mwifiex_private *,
988 struct sk_buff *skb);
989 int mwifiex_process_uap_rx_packet(struct mwifiex_private *priv,
990 struct sk_buff *skb);
991 int mwifiex_handle_uap_rx_forward(struct mwifiex_private *priv,
992 struct sk_buff *skb);
993 int mwifiex_process_sta_event(struct mwifiex_private *);
994 int mwifiex_process_uap_event(struct mwifiex_private *);
995 void mwifiex_delete_all_station_list(struct mwifiex_private *priv);
996 void mwifiex_wmm_del_peer_ra_list(struct mwifiex_private *priv,
998 void *mwifiex_process_sta_txpd(struct mwifiex_private *, struct sk_buff *skb);
999 void *mwifiex_process_uap_txpd(struct mwifiex_private *, struct sk_buff *skb);
1000 int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta, bool init);
1001 int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd,
1002 struct mwifiex_scan_cmd_config *scan_cfg);
1003 void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
1004 struct cmd_ctrl_node *cmd_node);
1005 int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
1006 struct host_cmd_ds_command *resp);
1007 s32 mwifiex_ssid_cmp(struct cfg80211_ssid *ssid1, struct cfg80211_ssid *ssid2);
1008 int mwifiex_associate(struct mwifiex_private *priv,
1009 struct mwifiex_bssdescriptor *bss_desc);
1010 int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
1011 struct host_cmd_ds_command *cmd,
1012 struct mwifiex_bssdescriptor *bss_desc);
1013 int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
1014 struct host_cmd_ds_command *resp);
1015 void mwifiex_reset_connect_state(struct mwifiex_private *priv, u16 reason);
1016 u8 mwifiex_band_to_radio_type(u8 band);
1017 int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac);
1018 void mwifiex_deauthenticate_all(struct mwifiex_adapter *adapter);
1019 int mwifiex_adhoc_start(struct mwifiex_private *priv,
1020 struct cfg80211_ssid *adhoc_ssid);
1021 int mwifiex_adhoc_join(struct mwifiex_private *priv,
1022 struct mwifiex_bssdescriptor *bss_desc);
1023 int mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
1024 struct host_cmd_ds_command *cmd,
1025 struct cfg80211_ssid *req_ssid);
1026 int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
1027 struct host_cmd_ds_command *cmd,
1028 struct mwifiex_bssdescriptor *bss_desc);
1029 int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv,
1030 struct host_cmd_ds_command *resp);
1031 int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd);
1032 struct mwifiex_chan_freq_power *mwifiex_get_cfp(struct mwifiex_private *priv,
1033 u8 band, u16 channel, u32 freq);
1034 u32 mwifiex_index_to_data_rate(struct mwifiex_private *priv,
1035 u8 index, u8 ht_info);
1036 u32 mwifiex_index_to_acs_data_rate(struct mwifiex_private *priv,
1037 u8 index, u8 ht_info);
1038 u32 mwifiex_find_freq_from_band_chan(u8, u8);
1039 int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask,
1041 u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv,
1043 u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates);
1044 u32 mwifiex_get_rates_from_cfg80211(struct mwifiex_private *priv,
1045 u8 *rates, u8 radio_type);
1046 u8 mwifiex_is_rate_auto(struct mwifiex_private *priv);
1047 extern u16 region_code_index[MWIFIEX_MAX_REGION_CODE];
1048 void mwifiex_save_curr_bcn(struct mwifiex_private *priv);
1049 void mwifiex_free_curr_bcn(struct mwifiex_private *priv);
1050 int mwifiex_cmd_get_hw_spec(struct mwifiex_private *priv,
1051 struct host_cmd_ds_command *cmd);
1052 int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
1053 struct host_cmd_ds_command *resp);
1054 int is_command_pending(struct mwifiex_adapter *adapter);
1055 void mwifiex_init_priv_params(struct mwifiex_private *priv,
1056 struct net_device *dev);
1057 int mwifiex_set_secure_params(struct mwifiex_private *priv,
1058 struct mwifiex_uap_bss_param *bss_config,
1059 struct cfg80211_ap_settings *params);
1060 void mwifiex_set_ht_params(struct mwifiex_private *priv,
1061 struct mwifiex_uap_bss_param *bss_cfg,
1062 struct cfg80211_ap_settings *params);
1063 void mwifiex_set_vht_params(struct mwifiex_private *priv,
1064 struct mwifiex_uap_bss_param *bss_cfg,
1065 struct cfg80211_ap_settings *params);
1066 void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg,
1067 struct cfg80211_ap_settings *params);
1068 void mwifiex_set_vht_width(struct mwifiex_private *priv,
1069 enum nl80211_chan_width width,
1070 bool ap_11ac_disable);
1072 mwifiex_set_wmm_params(struct mwifiex_private *priv,
1073 struct mwifiex_uap_bss_param *bss_cfg,
1074 struct cfg80211_ap_settings *params);
1075 void mwifiex_set_ba_params(struct mwifiex_private *priv);
1076 void mwifiex_set_11ac_ba_params(struct mwifiex_private *priv);
1077 int mwifiex_cmd_802_11_scan_ext(struct mwifiex_private *priv,
1078 struct host_cmd_ds_command *cmd,
1080 int mwifiex_ret_802_11_scan_ext(struct mwifiex_private *priv,
1081 struct host_cmd_ds_command *resp);
1082 int mwifiex_handle_event_ext_scan_report(struct mwifiex_private *priv,
1086 * This function checks if the queuing is RA based or not.
1089 mwifiex_queuing_ra_based(struct mwifiex_private *priv)
1092 * Currently we assume if we are in Infra, then DA=RA. This might not be
1093 * true in the future
1095 if ((priv->bss_mode == NL80211_IFTYPE_STATION) &&
1096 (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA))
1103 * This function copies rates.
1106 mwifiex_copy_rates(u8 *dest, u32 pos, u8 *src, int len)
1110 for (i = 0; i < len && src[i]; i++, pos++) {
1111 if (pos >= MWIFIEX_SUPPORTED_RATES)
1120 * This function returns the correct private structure pointer based
1121 * upon the BSS type and BSS number.
1123 static inline struct mwifiex_private *
1124 mwifiex_get_priv_by_id(struct mwifiex_adapter *adapter,
1125 u8 bss_num, u8 bss_type)
1129 for (i = 0; i < adapter->priv_num; i++) {
1130 if (adapter->priv[i]) {
1131 if ((adapter->priv[i]->bss_num == bss_num) &&
1132 (adapter->priv[i]->bss_type == bss_type))
1136 return ((i < adapter->priv_num) ? adapter->priv[i] : NULL);
1140 * This function returns the first available private structure pointer
1141 * based upon the BSS role.
1143 static inline struct mwifiex_private *
1144 mwifiex_get_priv(struct mwifiex_adapter *adapter,
1145 enum mwifiex_bss_role bss_role)
1149 for (i = 0; i < adapter->priv_num; i++) {
1150 if (adapter->priv[i]) {
1151 if (bss_role == MWIFIEX_BSS_ROLE_ANY ||
1152 GET_BSS_ROLE(adapter->priv[i]) == bss_role)
1157 return ((i < adapter->priv_num) ? adapter->priv[i] : NULL);
1161 * This function returns the first available unused private structure pointer.
1163 static inline struct mwifiex_private *
1164 mwifiex_get_unused_priv(struct mwifiex_adapter *adapter)
1168 for (i = 0; i < adapter->priv_num; i++) {
1169 if (adapter->priv[i]) {
1170 if (adapter->priv[i]->bss_mode ==
1171 NL80211_IFTYPE_UNSPECIFIED)
1176 return ((i < adapter->priv_num) ? adapter->priv[i] : NULL);
1180 * This function returns the driver private structure of a network device.
1182 static inline struct mwifiex_private *
1183 mwifiex_netdev_get_priv(struct net_device *dev)
1185 return (struct mwifiex_private *) (*(unsigned long *) netdev_priv(dev));
1189 * This function checks if a skb holds a management frame.
1191 static inline bool mwifiex_is_skb_mgmt_frame(struct sk_buff *skb)
1193 return (le32_to_cpu(*(__le32 *)skb->data) == PKT_TYPE_MGMT);
1196 /* This function retrieves channel closed for operation by Channel
1197 * Switch Announcement.
1200 mwifiex_11h_get_csa_closed_channel(struct mwifiex_private *priv)
1202 if (!priv->csa_chan)
1205 /* Clear csa channel, if DFS channel move time has passed */
1206 if (time_after(jiffies, priv->csa_expire_time)) {
1208 priv->csa_expire_time = 0;
1211 return priv->csa_chan;
1214 static inline u8 mwifiex_is_any_intf_active(struct mwifiex_private *priv)
1216 struct mwifiex_private *priv_num;
1219 for (i = 0; i < priv->adapter->priv_num; i++) {
1220 priv_num = priv->adapter->priv[i];
1222 if ((GET_BSS_ROLE(priv_num) == MWIFIEX_BSS_ROLE_UAP &&
1223 priv_num->bss_started) ||
1224 (GET_BSS_ROLE(priv_num) == MWIFIEX_BSS_ROLE_STA &&
1225 priv_num->media_connected))
1233 int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
1234 u32 func_init_shutdown);
1235 int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *, u8);
1236 int mwifiex_remove_card(struct mwifiex_adapter *, struct semaphore *);
1238 void mwifiex_get_version(struct mwifiex_adapter *adapter, char *version,
1240 int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
1241 struct mwifiex_multicast_list *mcast_list);
1242 int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
1243 struct net_device *dev);
1244 int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter,
1245 struct cmd_ctrl_node *cmd_queued);
1246 int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
1247 struct cfg80211_ssid *req_ssid);
1248 int mwifiex_cancel_hs(struct mwifiex_private *priv, int cmd_type);
1249 int mwifiex_enable_hs(struct mwifiex_adapter *adapter);
1250 int mwifiex_disable_auto_ds(struct mwifiex_private *priv);
1251 int mwifiex_drv_get_data_rate(struct mwifiex_private *priv, u32 *rate);
1252 int mwifiex_request_scan(struct mwifiex_private *priv,
1253 struct cfg80211_ssid *req_ssid);
1254 int mwifiex_scan_networks(struct mwifiex_private *priv,
1255 const struct mwifiex_user_scan_cfg *user_scan_in);
1256 int mwifiex_set_radio(struct mwifiex_private *priv, u8 option);
1258 int mwifiex_set_encode(struct mwifiex_private *priv, struct key_params *kp,
1259 const u8 *key, int key_len, u8 key_index,
1260 const u8 *mac_addr, int disable);
1262 int mwifiex_set_gen_ie(struct mwifiex_private *priv, const u8 *ie, int ie_len);
1264 int mwifiex_get_ver_ext(struct mwifiex_private *priv);
1266 int mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv, u16 action,
1267 struct ieee80211_channel *chan,
1268 unsigned int duration);
1270 int mwifiex_get_stats_info(struct mwifiex_private *priv,
1271 struct mwifiex_ds_get_stats *log);
1273 int mwifiex_reg_write(struct mwifiex_private *priv, u32 reg_type,
1274 u32 reg_offset, u32 reg_value);
1276 int mwifiex_reg_read(struct mwifiex_private *priv, u32 reg_type,
1277 u32 reg_offset, u32 *value);
1279 int mwifiex_eeprom_read(struct mwifiex_private *priv, u16 offset, u16 bytes,
1282 int mwifiex_set_11n_httx_cfg(struct mwifiex_private *priv, int data);
1284 int mwifiex_get_11n_httx_cfg(struct mwifiex_private *priv, int *data);
1286 int mwifiex_set_tx_rate_cfg(struct mwifiex_private *priv, int tx_rate_index);
1288 int mwifiex_get_tx_rate_cfg(struct mwifiex_private *priv, int *tx_rate_index);
1290 int mwifiex_drv_set_power(struct mwifiex_private *priv, u32 *ps_mode);
1292 int mwifiex_drv_get_driver_version(struct mwifiex_adapter *adapter,
1293 char *version, int max_len);
1295 int mwifiex_set_tx_power(struct mwifiex_private *priv,
1296 struct mwifiex_power_cfg *power_cfg);
1298 int mwifiex_main_process(struct mwifiex_adapter *);
1300 int mwifiex_queue_tx_pkt(struct mwifiex_private *priv, struct sk_buff *skb);
1302 int mwifiex_get_bss_info(struct mwifiex_private *,
1303 struct mwifiex_bss_info *);
1304 int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
1305 struct cfg80211_bss *bss,
1306 struct mwifiex_bssdescriptor *bss_desc);
1307 int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
1308 struct mwifiex_bssdescriptor *bss_entry);
1309 int mwifiex_check_network_compatibility(struct mwifiex_private *priv,
1310 struct mwifiex_bssdescriptor *bss_desc);
1312 u8 mwifiex_chan_type_to_sec_chan_offset(enum nl80211_channel_type chan_type);
1314 struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
1316 enum nl80211_iftype type,
1318 struct vif_params *params);
1319 int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev);
1321 void mwifiex_set_sys_config_invalid_data(struct mwifiex_uap_bss_param *config);
1323 int mwifiex_add_wowlan_magic_pkt_filter(struct mwifiex_adapter *adapter);
1325 int mwifiex_set_mgmt_ies(struct mwifiex_private *priv,
1326 struct cfg80211_beacon_data *data);
1327 int mwifiex_del_mgmt_ies(struct mwifiex_private *priv);
1328 u8 *mwifiex_11d_code_2_region(u8 code);
1329 void mwifiex_uap_set_channel(struct mwifiex_uap_bss_param *bss_cfg,
1330 struct cfg80211_chan_def chandef);
1331 int mwifiex_config_start_uap(struct mwifiex_private *priv,
1332 struct mwifiex_uap_bss_param *bss_cfg);
1333 void mwifiex_uap_del_sta_data(struct mwifiex_private *priv,
1334 struct mwifiex_sta_node *node);
1336 void mwifiex_11h_process_join(struct mwifiex_private *priv, u8 **buffer,
1337 struct mwifiex_bssdescriptor *bss_desc);
1338 int mwifiex_11h_handle_event_chanswann(struct mwifiex_private *priv);
1339 int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
1340 struct device_node *node, const char *prefix);
1341 void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv);
1343 extern const struct ethtool_ops mwifiex_ethtool_ops;
1345 void mwifiex_del_all_sta_list(struct mwifiex_private *priv);
1346 void mwifiex_del_sta_entry(struct mwifiex_private *priv, const u8 *mac);
1348 mwifiex_set_sta_ht_cap(struct mwifiex_private *priv, const u8 *ies,
1349 int ies_len, struct mwifiex_sta_node *node);
1350 struct mwifiex_sta_node *
1351 mwifiex_add_sta_entry(struct mwifiex_private *priv, const u8 *mac);
1352 struct mwifiex_sta_node *
1353 mwifiex_get_sta_entry(struct mwifiex_private *priv, const u8 *mac);
1354 int mwifiex_send_tdls_data_frame(struct mwifiex_private *priv, const u8 *peer,
1355 u8 action_code, u8 dialog_token,
1356 u16 status_code, const u8 *extra_ies,
1357 size_t extra_ies_len);
1358 int mwifiex_send_tdls_action_frame(struct mwifiex_private *priv, const u8 *peer,
1359 u8 action_code, u8 dialog_token,
1360 u16 status_code, const u8 *extra_ies,
1361 size_t extra_ies_len);
1362 void mwifiex_process_tdls_action_frame(struct mwifiex_private *priv,
1364 int mwifiex_tdls_oper(struct mwifiex_private *priv, const u8 *peer, u8 action);
1365 int mwifiex_get_tdls_link_status(struct mwifiex_private *priv, const u8 *mac);
1366 int mwifiex_get_tdls_list(struct mwifiex_private *priv,
1367 struct tdls_peer_info *buf);
1368 void mwifiex_disable_all_tdls_links(struct mwifiex_private *priv);
1369 bool mwifiex_is_bss_in_11ac_mode(struct mwifiex_private *priv);
1370 u8 mwifiex_get_center_freq_index(struct mwifiex_private *priv, u8 band,
1371 u32 pri_chan, u8 chan_bw);
1372 int mwifiex_init_channel_scan_gap(struct mwifiex_adapter *adapter);
1374 int mwifiex_tdls_check_tx(struct mwifiex_private *priv, struct sk_buff *skb);
1375 void mwifiex_flush_auto_tdls_list(struct mwifiex_private *priv);
1376 void mwifiex_auto_tdls_update_peer_status(struct mwifiex_private *priv,
1377 const u8 *mac, u8 link_status);
1378 void mwifiex_auto_tdls_update_peer_signal(struct mwifiex_private *priv,
1379 u8 *mac, s8 snr, s8 nflr);
1380 void mwifiex_check_auto_tdls(unsigned long context);
1381 void mwifiex_add_auto_tdls_peer(struct mwifiex_private *priv, const u8 *mac);
1382 void mwifiex_setup_auto_tdls_timer(struct mwifiex_private *priv);
1383 void mwifiex_clean_auto_tdls(struct mwifiex_private *priv);
1384 int mwifiex_cmd_issue_chan_report_request(struct mwifiex_private *priv,
1385 struct host_cmd_ds_command *cmd,
1388 void mwifiex_parse_tx_status_event(struct mwifiex_private *priv,
1392 mwifiex_clone_skb_for_tx_status(struct mwifiex_private *priv,
1393 struct sk_buff *skb, u8 flag, u64 *cookie);
1394 void mwifiex_dfs_cac_work_queue(struct work_struct *work);
1395 void mwifiex_abort_cac(struct mwifiex_private *priv);
1397 void mwifiex_hist_data_set(struct mwifiex_private *priv, u8 rx_rate, s8 snr,
1399 void mwifiex_hist_data_reset(struct mwifiex_private *priv);
1400 void mwifiex_hist_data_add(struct mwifiex_private *priv,
1401 u8 rx_rate, s8 snr, s8 nflr);
1402 u8 mwifiex_adjust_data_rate(struct mwifiex_private *priv,
1403 u8 rx_rate, u8 ht_info);
1405 void mwifiex_dump_drv_info(struct mwifiex_adapter *adapter);
1407 #ifdef CONFIG_DEBUG_FS
1408 void mwifiex_debugfs_init(void);
1409 void mwifiex_debugfs_remove(void);
1411 void mwifiex_dev_debugfs_init(struct mwifiex_private *priv);
1412 void mwifiex_dev_debugfs_remove(struct mwifiex_private *priv);
1414 #endif /* !_MWIFIEX_MAIN_H_ */