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>
44 extern const char driver_version
[];
51 #define MWIFIEX_DRIVER_MODE_STA BIT(0)
52 #define MWIFIEX_DRIVER_MODE_UAP BIT(1)
53 #define MWIFIEX_DRIVER_MODE_P2P BIT(2)
54 #define MWIFIEX_DRIVER_MODE_BITMASK (BIT(0) | BIT(1) | BIT(2))
56 #define MWIFIEX_MAX_AP 64
58 #define MWIFIEX_DEFAULT_WATCHDOG_TIMEOUT (5 * HZ)
60 #define MWIFIEX_TIMER_10S 10000
61 #define MWIFIEX_TIMER_1S 1000
63 #define MAX_TX_PENDING 100
64 #define LOW_TX_PENDING 80
66 #define HIGH_RX_PENDING 50
67 #define LOW_RX_PENDING 20
69 #define MWIFIEX_UPLD_SIZE (2312)
71 #define MAX_EVENT_SIZE 2048
73 #define ARP_FILTER_MAX_BUF_SIZE 68
75 #define MWIFIEX_KEY_BUFFER_SIZE 16
76 #define MWIFIEX_DEFAULT_LISTEN_INTERVAL 10
77 #define MWIFIEX_MAX_REGION_CODE 7
79 #define DEFAULT_BCN_AVG_FACTOR 8
80 #define DEFAULT_DATA_AVG_FACTOR 8
82 #define FIRST_VALID_CHANNEL 0xff
83 #define DEFAULT_AD_HOC_CHANNEL 6
84 #define DEFAULT_AD_HOC_CHANNEL_A 36
86 #define DEFAULT_BCN_MISS_TIMEOUT 5
88 #define MAX_SCAN_BEACON_BUFFER 8000
90 #define SCAN_BEACON_ENTRY_PAD 6
92 #define MWIFIEX_PASSIVE_SCAN_CHAN_TIME 110
93 #define MWIFIEX_ACTIVE_SCAN_CHAN_TIME 30
94 #define MWIFIEX_SPECIFIC_SCAN_CHAN_TIME 30
95 #define MWIFIEX_DEF_SCAN_CHAN_GAP_TIME 50
97 #define SCAN_RSSI(RSSI) (0x100 - ((u8)(RSSI)))
99 #define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S)
101 #define RSN_GTK_OUI_OFFSET 2
103 #define MWIFIEX_OUI_NOT_PRESENT 0
104 #define MWIFIEX_OUI_PRESENT 1
106 #define PKT_TYPE_MGMT 0xE5
109 * Do not check for data_received for USB, as data_received
110 * is handled in mwifiex_usb_recv for USB
112 #define IS_CARD_RX_RCVD(adapter) (adapter->cmd_resp_received || \
113 adapter->event_received || \
114 adapter->data_received)
116 #define MWIFIEX_TYPE_CMD 1
117 #define MWIFIEX_TYPE_DATA 0
118 #define MWIFIEX_TYPE_EVENT 3
120 #define MAX_BITMAP_RATES_SIZE 18
122 #define MAX_CHANNEL_BAND_BG 14
123 #define MAX_CHANNEL_BAND_A 165
125 #define MAX_FREQUENCY_BAND_BG 2484
127 #define MWIFIEX_EVENT_HEADER_LEN 4
128 #define MWIFIEX_UAP_EVENT_EXTRA_HEADER 2
130 #define MWIFIEX_TYPE_LEN 4
131 #define MWIFIEX_USB_TYPE_CMD 0xF00DFACE
132 #define MWIFIEX_USB_TYPE_DATA 0xBEADC0DE
133 #define MWIFIEX_USB_TYPE_EVENT 0xBEEFFACE
135 /* Threshold for tx_timeout_cnt before we trigger a card reset */
136 #define TX_TIMEOUT_THRESHOLD 6
139 u32 num_cmd_host_to_card_failure
;
140 u32 num_cmd_sleep_cfm_host_to_card_failure
;
141 u32 num_tx_host_to_card_failure
;
142 u32 num_event_deauth
;
143 u32 num_event_disassoc
;
144 u32 num_event_link_lost
;
146 u32 num_cmd_assoc_success
;
147 u32 num_cmd_assoc_failure
;
151 u16 last_cmd_id
[DBG_CMD_NUM
];
152 u16 last_cmd_act
[DBG_CMD_NUM
];
154 u16 last_cmd_resp_id
[DBG_CMD_NUM
];
155 u16 last_cmd_resp_index
;
156 u16 last_event
[DBG_CMD_NUM
];
157 u16 last_event_index
;
160 enum MWIFIEX_HARDWARE_STATUS
{
161 MWIFIEX_HW_STATUS_READY
,
162 MWIFIEX_HW_STATUS_INITIALIZING
,
163 MWIFIEX_HW_STATUS_FW_READY
,
164 MWIFIEX_HW_STATUS_INIT_DONE
,
165 MWIFIEX_HW_STATUS_RESET
,
166 MWIFIEX_HW_STATUS_CLOSING
,
167 MWIFIEX_HW_STATUS_NOT_READY
170 enum MWIFIEX_802_11_POWER_MODE
{
171 MWIFIEX_802_11_POWER_MODE_CAM
,
172 MWIFIEX_802_11_POWER_MODE_PSP
175 struct mwifiex_tx_param
{
179 enum MWIFIEX_PS_STATE
{
186 enum mwifiex_iface_type
{
192 struct mwifiex_add_ba_param
{
200 struct mwifiex_tx_aggr
{
206 struct mwifiex_ra_list_tbl
{
207 struct list_head list
;
208 struct sk_buff_head skb_head
;
218 struct mwifiex_tid_tbl
{
219 struct list_head ra_list
;
222 #define WMM_HIGHEST_PRIORITY 7
223 #define HIGH_PRIO_TID 7
224 #define LOW_PRIO_TID 0
226 struct mwifiex_wmm_desc
{
227 struct mwifiex_tid_tbl tid_tbl_ptr
[MAX_NUM_TID
];
228 u32 packets_out
[MAX_NUM_TID
];
229 /* spin lock to protect ra_list */
230 spinlock_t ra_list_spinlock
;
231 struct mwifiex_wmm_ac_status ac_status
[IEEE80211_NUM_ACS
];
232 enum mwifiex_wmm_ac_e ac_down_graded_vals
[IEEE80211_NUM_ACS
];
233 u32 drv_pkt_delay_max
;
234 u8 queue_priority
[IEEE80211_NUM_ACS
];
235 u32 user_pri_pkt_tx_ctrl
[WMM_HIGHEST_PRIORITY
+ 1]; /* UP: 0 to 7 */
236 /* Number of transmit packets queued */
237 atomic_t tx_pkts_queued
;
238 /* Tracks highest priority with a packet queued */
239 atomic_t highest_queued_prio
;
242 struct mwifiex_802_11_security
{
248 u32 authentication_mode
;
253 struct ieee_types_header
{
258 struct ieee_types_vendor_specific
{
259 struct ieee_types_vendor_header vend_hdr
;
260 u8 data
[IEEE_MAX_IE_SIZE
- sizeof(struct ieee_types_vendor_header
)];
263 struct ieee_types_generic
{
264 struct ieee_types_header ieee_hdr
;
265 u8 data
[IEEE_MAX_IE_SIZE
- sizeof(struct ieee_types_header
)];
268 struct ieee_types_bss_co_2040
{
269 struct ieee_types_header ieee_hdr
;
273 struct ieee_types_extcap
{
274 struct ieee_types_header ieee_hdr
;
278 struct ieee_types_vht_cap
{
279 struct ieee_types_header ieee_hdr
;
280 struct ieee80211_vht_cap vhtcap
;
283 struct ieee_types_vht_oper
{
284 struct ieee_types_header ieee_hdr
;
285 struct ieee80211_vht_operation vhtoper
;
288 struct ieee_types_aid
{
289 struct ieee_types_header ieee_hdr
;
293 struct mwifiex_bssdescriptor
{
294 u8 mac_address
[ETH_ALEN
];
295 struct cfg80211_ssid ssid
;
303 u8 supported_rates
[MWIFIEX_SUPPORTED_RATES
];
304 u8 data_rates
[MWIFIEX_SUPPORTED_RATES
];
306 * BAND_B(0x01): 'b' band
307 * BAND_G(0x02): 'g' band
308 * BAND_A(0X04): 'a' band
313 union ieee_types_phy_param_set phy_param_set
;
314 union ieee_types_ss_param_set ss_param_set
;
316 struct ieee_types_wmm_parameter wmm_ie
;
318 struct ieee80211_ht_cap
*bcn_ht_cap
;
320 struct ieee80211_ht_operation
*bcn_ht_oper
;
323 u16 bss_co_2040_offset
;
326 struct ieee80211_vht_cap
*bcn_vht_cap
;
328 struct ieee80211_vht_operation
*bcn_vht_oper
;
330 struct ieee_types_oper_mode_ntf
*oper_mode
;
331 u16 oper_mode_offset
;
333 struct ieee_types_vendor_specific
*bcn_wpa_ie
;
335 struct ieee_types_generic
*bcn_rsn_ie
;
337 struct ieee_types_generic
*bcn_wapi_ie
;
343 u8 chan_sw_ie_present
;
346 struct mwifiex_current_bss_params
{
347 struct mwifiex_bssdescriptor bss_descriptor
;
349 u8 wmm_uapsd_enabled
;
352 u8 data_rates
[MWIFIEX_SUPPORTED_RATES
];
355 struct mwifiex_sleep_params
{
364 struct mwifiex_sleep_period
{
369 struct mwifiex_wep_key
{
373 u8 key_material
[MWIFIEX_KEY_BUFFER_SIZE
];
376 #define MAX_REGION_CHANNEL_NUM 2
378 struct mwifiex_chan_freq_power
{
390 #define MWIFIEX_MAX_TRIPLET_802_11D 83
392 struct mwifiex_802_11d_domain_reg
{
393 u8 country_code
[IEEE80211_COUNTRY_STRING_LEN
];
395 struct ieee80211_country_ie_triplet
396 triplet
[MWIFIEX_MAX_TRIPLET_802_11D
];
399 struct mwifiex_vendor_spec_cfg_ie
{
402 u8 ie
[MWIFIEX_MAX_VSIE_LEN
];
409 struct mwifiex_roc_cfg
{
411 struct ieee80211_channel chan
;
414 #define MWIFIEX_FW_DUMP_IDX 0xff
415 #define FW_DUMP_MAX_NAME_LEN 8
416 #define FW_DUMP_HOST_READY 0xEE
417 #define FW_DUMP_DONE 0xFF
418 #define FW_DUMP_READ_DONE 0xFE
420 struct memory_type_mapping
{
421 u8 mem_name
[FW_DUMP_MAX_NAME_LEN
];
428 RDWR_STATUS_SUCCESS
= 0,
429 RDWR_STATUS_FAILURE
= 1,
433 enum mwifiex_iface_work_flags
{
434 MWIFIEX_IFACE_WORK_FW_DUMP
,
435 MWIFIEX_IFACE_WORK_CARD_RESET
,
438 struct mwifiex_adapter
;
439 struct mwifiex_private
;
441 struct mwifiex_private
{
442 struct mwifiex_adapter
*adapter
;
449 u8 curr_addr
[ETH_ALEN
];
452 /* track consecutive timeout */
454 struct net_device
*netdev
;
455 struct net_device_stats stats
;
460 u8 max_tx_power_level
;
461 u8 min_tx_power_level
;
467 u16 bitmap_rates
[MAX_BITMAP_RATES_SIZE
];
469 u8 is_data_rate_auto
;
480 struct mwifiex_bssdescriptor
*attempted_bss_desc
;
481 struct cfg80211_ssid prev_ssid
;
482 u8 prev_bssid
[ETH_ALEN
];
483 struct mwifiex_current_bss_params curr_bss_params
;
489 u8 adhoc_is_link_sensed
;
491 struct mwifiex_802_11_security sec_info
;
492 struct mwifiex_wep_key wep_key
[NUM_WEP_KEYS
];
493 u16 wep_key_curr_index
;
497 struct host_cmd_ds_802_11_key_material aes_key
;
498 struct host_cmd_ds_802_11_key_material_v2 aes_key_v2
;
506 struct mwifiex_wmm_desc wmm
;
507 atomic_t wmm_tx_pending
[IEEE80211_NUM_ACS
];
508 struct list_head sta_list
;
509 /* spin lock for associated station/TDLS peers list */
510 spinlock_t sta_list_spinlock
;
511 struct list_head auto_tdls_list
;
512 /* spin lock for auto TDLS peer list */
513 spinlock_t auto_tdls_lock
;
514 struct list_head tx_ba_stream_tbl_ptr
;
515 /* spin lock for tx_ba_stream_tbl_ptr queue */
516 spinlock_t tx_ba_stream_tbl_lock
;
517 struct mwifiex_tx_aggr aggr_prio_tbl
[MAX_NUM_TID
];
518 struct mwifiex_add_ba_param add_ba_param
;
519 u16 rx_seq
[MAX_NUM_TID
];
520 u8 tos_to_tid_inv
[MAX_NUM_TID
];
521 struct list_head rx_reorder_tbl_ptr
;
522 /* spin lock for rx_reorder_tbl_ptr queue */
523 spinlock_t rx_reorder_tbl_lock
;
524 /* spin lock for Rx packets */
525 spinlock_t rx_pkt_lock
;
527 #define MWIFIEX_ASSOC_RSP_BUF_SIZE 500
528 u8 assoc_rsp_buf
[MWIFIEX_ASSOC_RSP_BUF_SIZE
];
531 #define MWIFIEX_GENIE_BUF_SIZE 256
532 u8 gen_ie_buf
[MWIFIEX_GENIE_BUF_SIZE
];
535 struct mwifiex_vendor_spec_cfg_ie vs_ie
[MWIFIEX_MAX_VSIE_NUM
];
537 #define MWIFIEX_ASSOC_TLV_BUF_SIZE 256
538 u8 assoc_tlv_buf
[MWIFIEX_ASSOC_TLV_BUF_SIZE
];
539 u8 assoc_tlv_buf_len
;
543 /* spin lock for beacon buffer */
544 spinlock_t curr_bcn_buf_lock
;
545 struct wireless_dev
*wdev
;
546 struct mwifiex_chan_freq_power cfp
;
547 char version_str
[128];
548 #ifdef CONFIG_DEBUG_FS
549 struct dentry
*dfs_dev_dir
;
552 u16 current_key_index
;
553 struct semaphore async_sem
;
554 struct cfg80211_scan_request
*scan_request
;
560 u8 subsc_evt_rssi_state
;
561 struct mwifiex_ds_misc_subsc_evt async_subsc_evt_storage
;
562 struct mwifiex_ie mgmt_ie
[MAX_MGMT_IE_INDEX
];
570 struct mwifiex_roc_cfg roc_cfg
;
573 unsigned long csa_expire_time
;
576 struct station_parameters
*sta_params
;
577 struct sk_buff_head tdls_txq
;
579 struct timer_list auto_tdls_timer
;
580 bool auto_tdls_timer_active
;
583 enum mwifiex_ba_status
{
589 struct mwifiex_tx_ba_stream_tbl
{
590 struct list_head list
;
593 enum mwifiex_ba_status ba_status
;
597 struct mwifiex_rx_reorder_tbl
;
599 struct reorder_tmr_cnxt
{
600 struct timer_list timer
;
601 struct mwifiex_rx_reorder_tbl
*ptr
;
602 struct mwifiex_private
*priv
;
605 struct mwifiex_rx_reorder_tbl
{
606 struct list_head list
;
612 void **rx_reorder_ptr
;
613 struct reorder_tmr_cnxt timer_context
;
618 struct mwifiex_bss_prio_node
{
619 struct list_head list
;
620 struct mwifiex_private
*priv
;
623 struct mwifiex_bss_prio_tbl
{
624 struct list_head bss_prio_head
;
625 /* spin lock for bss priority */
626 spinlock_t bss_prio_lock
;
627 struct mwifiex_bss_prio_node
*bss_prio_cur
;
630 struct cmd_ctrl_node
{
631 struct list_head list
;
632 struct mwifiex_private
*priv
;
635 struct sk_buff
*cmd_skb
;
636 struct sk_buff
*resp_skb
;
644 struct mwifiex_bss_priv
{
649 struct mwifiex_tdls_capab
{
656 struct ieee80211_ht_cap ht_capb
;
657 struct ieee80211_ht_operation ht_oper
;
658 struct ieee_types_extcap extcap
;
659 struct ieee_types_generic rsn_ie
;
660 struct ieee80211_vht_cap vhtcap
;
661 struct ieee80211_vht_operation vhtoper
;
664 /* This is AP/TDLS specific structure which stores information
665 * about associated/peer STA
667 struct mwifiex_sta_node
{
668 struct list_head list
;
669 u8 mac_addr
[ETH_ALEN
];
673 u8 ampdu_sta
[MAX_NUM_TID
];
674 u16 rx_seq
[MAX_NUM_TID
];
677 struct mwifiex_tdls_capab tdls_cap
;
680 struct mwifiex_auto_tdls_peer
{
681 struct list_head list
;
682 u8 mac_addr
[ETH_ALEN
];
691 struct mwifiex_if_ops
{
692 int (*init_if
) (struct mwifiex_adapter
*);
693 void (*cleanup_if
) (struct mwifiex_adapter
*);
694 int (*check_fw_status
) (struct mwifiex_adapter
*, u32
);
695 int (*prog_fw
) (struct mwifiex_adapter
*, struct mwifiex_fw_image
*);
696 int (*register_dev
) (struct mwifiex_adapter
*);
697 void (*unregister_dev
) (struct mwifiex_adapter
*);
698 int (*enable_int
) (struct mwifiex_adapter
*);
699 void (*disable_int
) (struct mwifiex_adapter
*);
700 int (*process_int_status
) (struct mwifiex_adapter
*);
701 int (*host_to_card
) (struct mwifiex_adapter
*, u8
, struct sk_buff
*,
702 struct mwifiex_tx_param
*);
703 int (*wakeup
) (struct mwifiex_adapter
*);
704 int (*wakeup_complete
) (struct mwifiex_adapter
*);
706 /* Interface specific functions */
707 void (*update_mp_end_port
) (struct mwifiex_adapter
*, u16
);
708 void (*cleanup_mpa_buf
) (struct mwifiex_adapter
*);
709 int (*cmdrsp_complete
) (struct mwifiex_adapter
*, struct sk_buff
*);
710 int (*event_complete
) (struct mwifiex_adapter
*, struct sk_buff
*);
711 int (*init_fw_port
) (struct mwifiex_adapter
*);
712 int (*dnld_fw
) (struct mwifiex_adapter
*, struct mwifiex_fw_image
*);
713 void (*card_reset
) (struct mwifiex_adapter
*);
714 void (*fw_dump
)(struct mwifiex_adapter
*);
715 int (*clean_pcie_ring
) (struct mwifiex_adapter
*adapter
);
716 void (*iface_work
)(struct work_struct
*work
);
717 void (*submit_rem_rx_urbs
)(struct mwifiex_adapter
*adapter
);
720 struct mwifiex_adapter
{
722 struct mwifiex_private
*priv
[MWIFIEX_MAX_BSS_NUM
];
724 const struct firmware
*firmware
;
729 bool surprise_removed
;
730 u32 fw_release_number
;
731 u16 init_wait_q_woken
;
732 wait_queue_head_t init_wait_q
;
734 struct mwifiex_if_ops if_ops
;
737 atomic_t cmd_pending
;
738 struct workqueue_struct
*workqueue
;
739 struct work_struct main_work
;
740 struct workqueue_struct
*rx_workqueue
;
741 struct work_struct rx_work
;
742 bool rx_work_enabled
;
744 bool delay_main_work
;
746 struct mwifiex_bss_prio_tbl bss_prio_tbl
[MWIFIEX_MAX_BSS_NUM
];
747 /* spin lock for init/shutdown */
748 spinlock_t mwifiex_lock
;
749 /* spin lock for main process */
750 spinlock_t main_proc_lock
;
751 u32 mwifiex_processing
;
753 u16 curr_tx_buf_size
;
755 enum MWIFIEX_HARDWARE_STATUS hw_status
;
756 u16 number_of_antenna
;
758 /* spin lock for interrupt handling */
762 struct sk_buff
*event_skb
;
763 u8 upld_buf
[MWIFIEX_UPLD_SIZE
];
766 u8 cmd_resp_received
;
770 struct cmd_ctrl_node
*cmd_pool
;
771 struct cmd_ctrl_node
*curr_cmd
;
772 /* spin lock for command */
773 spinlock_t mwifiex_cmd_lock
;
776 struct timer_list cmd_timer
;
777 struct list_head cmd_free_q
;
778 /* spin lock for cmd_free_q */
779 spinlock_t cmd_free_q_lock
;
780 struct list_head cmd_pending_q
;
781 /* spin lock for cmd_pending_q */
782 spinlock_t cmd_pending_q_lock
;
783 struct list_head scan_pending_q
;
784 /* spin lock for scan_pending_q */
785 spinlock_t scan_pending_q_lock
;
786 /* spin lock for RX processing routine */
787 spinlock_t rx_proc_lock
;
790 struct mwifiex_802_11d_domain_reg domain_reg
;
793 u16 specific_scan_time
;
794 u16 active_scan_time
;
795 u16 passive_scan_time
;
796 u16 scan_chan_gap_time
;
800 struct mwifiex_chan_scan_param_set
*scan_channels
;
802 struct mwifiex_sleep_params sleep_params
;
803 struct mwifiex_sleep_period sleep_period
;
808 u16 local_listen_interval
;
809 u16 null_pkt_interval
;
810 struct sk_buff
*sleep_cfm
;
811 u16 bcn_miss_time_out
;
812 u16 adhoc_awake_period
;
816 u16 enhanced_ps_mode
;
817 u8 pm_wakeup_card_req
;
820 u32 pm_wakeup_fw_try
;
822 struct mwifiex_hs_config_param hs_cfg
;
824 u16 hs_activate_wait_q_woken
;
825 wait_queue_head_t hs_activate_wait_q
;
828 u8 event_body
[MAX_EVENT_SIZE
];
829 u32 hw_dot_11n_dev_cap
;
830 u8 hw_dev_mcs_support
;
831 u8 user_dev_mcs_support
;
832 u8 adhoc_11n_enabled
;
834 struct mwifiex_dbg dbg
;
835 u8 arp_filter
[ARP_FILTER_MAX_BUF_SIZE
];
837 struct mwifiex_wait_queue cmd_wait_q
;
838 u8 scan_wait_q_woken
;
839 spinlock_t queue_lock
; /* lock for tx queues */
840 u8 country_code
[IEEE80211_COUNTRY_STRING_LEN
];
841 u16 max_mgmt_ie_index
;
842 const struct firmware
*cal_data
;
843 struct device_node
*dt_node
;
846 u32 is_hw_11ac_capable
;
847 u32 hw_dot_11ac_dev_cap
;
848 u32 hw_dot_11ac_mcs_support
;
849 u32 usr_dot_11ac_dev_cap_bg
;
850 u32 usr_dot_11ac_dev_cap_a
;
851 u32 usr_dot_11ac_mcs_support
;
853 atomic_t pending_bridged_pkts
;
854 struct semaphore
*card_sem
;
857 u8 key_api_major_ver
, key_api_minor_ver
;
858 struct work_struct iface_work
;
859 unsigned long iface_work_flags
;
860 struct memory_type_mapping
*mem_type_mapping_tbl
;
863 bool scan_chan_gap_enabled
;
864 struct sk_buff_head rx_data_q
;
865 struct mwifiex_chan_stats
*chan_stats
;
866 u32 num_in_chan_stats
;
871 int mwifiex_init_lock_list(struct mwifiex_adapter
*adapter
);
873 void mwifiex_set_trans_start(struct net_device
*dev
);
875 void mwifiex_stop_net_dev_queue(struct net_device
*netdev
,
876 struct mwifiex_adapter
*adapter
);
878 void mwifiex_wake_up_net_dev_queue(struct net_device
*netdev
,
879 struct mwifiex_adapter
*adapter
);
881 int mwifiex_init_priv(struct mwifiex_private
*priv
);
882 void mwifiex_free_priv(struct mwifiex_private
*priv
);
884 int mwifiex_init_fw(struct mwifiex_adapter
*adapter
);
886 int mwifiex_init_fw_complete(struct mwifiex_adapter
*adapter
);
888 int mwifiex_shutdown_drv(struct mwifiex_adapter
*adapter
);
890 int mwifiex_shutdown_fw_complete(struct mwifiex_adapter
*adapter
);
892 int mwifiex_dnld_fw(struct mwifiex_adapter
*, struct mwifiex_fw_image
*);
894 int mwifiex_recv_packet(struct mwifiex_private
*priv
, struct sk_buff
*skb
);
896 int mwifiex_process_mgmt_packet(struct mwifiex_private
*priv
,
897 struct sk_buff
*skb
);
899 int mwifiex_process_event(struct mwifiex_adapter
*adapter
);
901 int mwifiex_complete_cmd(struct mwifiex_adapter
*adapter
,
902 struct cmd_ctrl_node
*cmd_node
);
904 int mwifiex_send_cmd(struct mwifiex_private
*priv
, u16 cmd_no
,
905 u16 cmd_action
, u32 cmd_oid
, void *data_buf
, bool sync
);
907 void mwifiex_cmd_timeout_func(unsigned long function_context
);
909 int mwifiex_get_debug_info(struct mwifiex_private
*,
910 struct mwifiex_debug_info
*);
912 int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter
*adapter
);
913 int mwifiex_free_cmd_buffer(struct mwifiex_adapter
*adapter
);
914 void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter
*adapter
);
915 void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter
*adapter
);
917 void mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter
*adapter
,
918 struct cmd_ctrl_node
*cmd_node
);
919 void mwifiex_recycle_cmd_node(struct mwifiex_adapter
*adapter
,
920 struct cmd_ctrl_node
*cmd_node
);
922 void mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter
*adapter
,
923 struct cmd_ctrl_node
*cmd_node
,
926 int mwifiex_exec_next_cmd(struct mwifiex_adapter
*adapter
);
927 int mwifiex_process_cmdresp(struct mwifiex_adapter
*adapter
);
928 int mwifiex_handle_rx_packet(struct mwifiex_adapter
*adapter
,
929 struct sk_buff
*skb
);
930 int mwifiex_process_tx(struct mwifiex_private
*priv
, struct sk_buff
*skb
,
931 struct mwifiex_tx_param
*tx_param
);
932 int mwifiex_send_null_packet(struct mwifiex_private
*priv
, u8 flags
);
933 int mwifiex_write_data_complete(struct mwifiex_adapter
*adapter
,
934 struct sk_buff
*skb
, int aggr
, int status
);
935 void mwifiex_clean_txrx(struct mwifiex_private
*priv
);
936 u8
mwifiex_check_last_packet_indication(struct mwifiex_private
*priv
);
937 void mwifiex_check_ps_cond(struct mwifiex_adapter
*adapter
);
938 void mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter
*, u8
*,
940 int mwifiex_cmd_enh_power_mode(struct mwifiex_private
*priv
,
941 struct host_cmd_ds_command
*cmd
,
942 u16 cmd_action
, uint16_t ps_bitmap
,
943 struct mwifiex_ds_auto_ds
*auto_ds
);
944 int mwifiex_ret_enh_power_mode(struct mwifiex_private
*priv
,
945 struct host_cmd_ds_command
*resp
,
946 struct mwifiex_ds_pm_cfg
*pm_cfg
);
947 void mwifiex_process_hs_config(struct mwifiex_adapter
*adapter
);
948 void mwifiex_hs_activated_event(struct mwifiex_private
*priv
,
950 int mwifiex_set_hs_params(struct mwifiex_private
*priv
, u16 action
,
951 int cmd_type
, struct mwifiex_ds_hs_cfg
*hs_cfg
);
952 int mwifiex_ret_802_11_hs_cfg(struct mwifiex_private
*priv
,
953 struct host_cmd_ds_command
*resp
);
954 int mwifiex_process_rx_packet(struct mwifiex_private
*priv
,
955 struct sk_buff
*skb
);
956 int mwifiex_sta_prepare_cmd(struct mwifiex_private
*, uint16_t cmd_no
,
957 u16 cmd_action
, u32 cmd_oid
,
958 void *data_buf
, void *cmd_buf
);
959 int mwifiex_uap_prepare_cmd(struct mwifiex_private
*priv
, uint16_t cmd_no
,
960 u16 cmd_action
, u32 cmd_oid
,
961 void *data_buf
, void *cmd_buf
);
962 int mwifiex_process_sta_cmdresp(struct mwifiex_private
*, u16 cmdresp_no
,
963 struct host_cmd_ds_command
*resp
);
964 int mwifiex_process_sta_rx_packet(struct mwifiex_private
*,
965 struct sk_buff
*skb
);
966 int mwifiex_process_uap_rx_packet(struct mwifiex_private
*priv
,
967 struct sk_buff
*skb
);
968 int mwifiex_handle_uap_rx_forward(struct mwifiex_private
*priv
,
969 struct sk_buff
*skb
);
970 int mwifiex_process_sta_event(struct mwifiex_private
*);
971 int mwifiex_process_uap_event(struct mwifiex_private
*);
972 void mwifiex_delete_all_station_list(struct mwifiex_private
*priv
);
973 void *mwifiex_process_sta_txpd(struct mwifiex_private
*, struct sk_buff
*skb
);
974 void *mwifiex_process_uap_txpd(struct mwifiex_private
*, struct sk_buff
*skb
);
975 int mwifiex_sta_init_cmd(struct mwifiex_private
*, u8 first_sta
);
976 int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command
*cmd
,
977 struct mwifiex_scan_cmd_config
*scan_cfg
);
978 void mwifiex_queue_scan_cmd(struct mwifiex_private
*priv
,
979 struct cmd_ctrl_node
*cmd_node
);
980 int mwifiex_ret_802_11_scan(struct mwifiex_private
*priv
,
981 struct host_cmd_ds_command
*resp
);
982 s32
mwifiex_ssid_cmp(struct cfg80211_ssid
*ssid1
, struct cfg80211_ssid
*ssid2
);
983 int mwifiex_associate(struct mwifiex_private
*priv
,
984 struct mwifiex_bssdescriptor
*bss_desc
);
985 int mwifiex_cmd_802_11_associate(struct mwifiex_private
*priv
,
986 struct host_cmd_ds_command
*cmd
,
987 struct mwifiex_bssdescriptor
*bss_desc
);
988 int mwifiex_ret_802_11_associate(struct mwifiex_private
*priv
,
989 struct host_cmd_ds_command
*resp
);
990 void mwifiex_reset_connect_state(struct mwifiex_private
*priv
, u16 reason
);
991 u8
mwifiex_band_to_radio_type(u8 band
);
992 int mwifiex_deauthenticate(struct mwifiex_private
*priv
, u8
*mac
);
993 void mwifiex_deauthenticate_all(struct mwifiex_adapter
*adapter
);
994 int mwifiex_adhoc_start(struct mwifiex_private
*priv
,
995 struct cfg80211_ssid
*adhoc_ssid
);
996 int mwifiex_adhoc_join(struct mwifiex_private
*priv
,
997 struct mwifiex_bssdescriptor
*bss_desc
);
998 int mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private
*priv
,
999 struct host_cmd_ds_command
*cmd
,
1000 struct cfg80211_ssid
*req_ssid
);
1001 int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private
*priv
,
1002 struct host_cmd_ds_command
*cmd
,
1003 struct mwifiex_bssdescriptor
*bss_desc
);
1004 int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private
*priv
,
1005 struct host_cmd_ds_command
*resp
);
1006 int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command
*cmd
);
1007 struct mwifiex_chan_freq_power
*mwifiex_get_cfp(struct mwifiex_private
*priv
,
1008 u8 band
, u16 channel
, u32 freq
);
1009 u32
mwifiex_index_to_data_rate(struct mwifiex_private
*priv
,
1010 u8 index
, u8 ht_info
);
1011 u32
mwifiex_index_to_acs_data_rate(struct mwifiex_private
*priv
,
1012 u8 index
, u8 ht_info
);
1013 u32
mwifiex_find_freq_from_band_chan(u8
, u8
);
1014 int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private
*priv
, u16 vsie_mask
,
1016 u32
mwifiex_get_active_data_rates(struct mwifiex_private
*priv
,
1018 u32
mwifiex_get_supported_rates(struct mwifiex_private
*priv
, u8
*rates
);
1019 u32
mwifiex_get_rates_from_cfg80211(struct mwifiex_private
*priv
,
1020 u8
*rates
, u8 radio_type
);
1021 u8
mwifiex_is_rate_auto(struct mwifiex_private
*priv
);
1022 extern u16 region_code_index
[MWIFIEX_MAX_REGION_CODE
];
1023 void mwifiex_save_curr_bcn(struct mwifiex_private
*priv
);
1024 void mwifiex_free_curr_bcn(struct mwifiex_private
*priv
);
1025 int mwifiex_cmd_get_hw_spec(struct mwifiex_private
*priv
,
1026 struct host_cmd_ds_command
*cmd
);
1027 int mwifiex_ret_get_hw_spec(struct mwifiex_private
*priv
,
1028 struct host_cmd_ds_command
*resp
);
1029 int is_command_pending(struct mwifiex_adapter
*adapter
);
1030 void mwifiex_init_priv_params(struct mwifiex_private
*priv
,
1031 struct net_device
*dev
);
1032 int mwifiex_set_secure_params(struct mwifiex_private
*priv
,
1033 struct mwifiex_uap_bss_param
*bss_config
,
1034 struct cfg80211_ap_settings
*params
);
1035 void mwifiex_set_ht_params(struct mwifiex_private
*priv
,
1036 struct mwifiex_uap_bss_param
*bss_cfg
,
1037 struct cfg80211_ap_settings
*params
);
1038 void mwifiex_set_vht_params(struct mwifiex_private
*priv
,
1039 struct mwifiex_uap_bss_param
*bss_cfg
,
1040 struct cfg80211_ap_settings
*params
);
1041 void mwifiex_set_uap_rates(struct mwifiex_uap_bss_param
*bss_cfg
,
1042 struct cfg80211_ap_settings
*params
);
1043 void mwifiex_set_vht_width(struct mwifiex_private
*priv
,
1044 enum nl80211_chan_width width
,
1045 bool ap_11ac_disable
);
1047 mwifiex_set_wmm_params(struct mwifiex_private
*priv
,
1048 struct mwifiex_uap_bss_param
*bss_cfg
,
1049 struct cfg80211_ap_settings
*params
);
1050 void mwifiex_set_ba_params(struct mwifiex_private
*priv
);
1051 void mwifiex_set_11ac_ba_params(struct mwifiex_private
*priv
);
1052 int mwifiex_cmd_802_11_scan_ext(struct mwifiex_private
*priv
,
1053 struct host_cmd_ds_command
*cmd
,
1055 int mwifiex_ret_802_11_scan_ext(struct mwifiex_private
*priv
,
1056 struct host_cmd_ds_command
*resp
);
1057 int mwifiex_handle_event_ext_scan_report(struct mwifiex_private
*priv
,
1061 * This function checks if the queuing is RA based or not.
1064 mwifiex_queuing_ra_based(struct mwifiex_private
*priv
)
1067 * Currently we assume if we are in Infra, then DA=RA. This might not be
1068 * true in the future
1070 if ((priv
->bss_mode
== NL80211_IFTYPE_STATION
) &&
1071 (GET_BSS_ROLE(priv
) == MWIFIEX_BSS_ROLE_STA
))
1078 * This function copies rates.
1081 mwifiex_copy_rates(u8
*dest
, u32 pos
, u8
*src
, int len
)
1085 for (i
= 0; i
< len
&& src
[i
]; i
++, pos
++) {
1086 if (pos
>= MWIFIEX_SUPPORTED_RATES
)
1095 * This function returns the correct private structure pointer based
1096 * upon the BSS type and BSS number.
1098 static inline struct mwifiex_private
*
1099 mwifiex_get_priv_by_id(struct mwifiex_adapter
*adapter
,
1100 u8 bss_num
, u8 bss_type
)
1104 for (i
= 0; i
< adapter
->priv_num
; i
++) {
1105 if (adapter
->priv
[i
]) {
1106 if ((adapter
->priv
[i
]->bss_num
== bss_num
) &&
1107 (adapter
->priv
[i
]->bss_type
== bss_type
))
1111 return ((i
< adapter
->priv_num
) ? adapter
->priv
[i
] : NULL
);
1115 * This function returns the first available private structure pointer
1116 * based upon the BSS role.
1118 static inline struct mwifiex_private
*
1119 mwifiex_get_priv(struct mwifiex_adapter
*adapter
,
1120 enum mwifiex_bss_role bss_role
)
1124 for (i
= 0; i
< adapter
->priv_num
; i
++) {
1125 if (adapter
->priv
[i
]) {
1126 if (bss_role
== MWIFIEX_BSS_ROLE_ANY
||
1127 GET_BSS_ROLE(adapter
->priv
[i
]) == bss_role
)
1132 return ((i
< adapter
->priv_num
) ? adapter
->priv
[i
] : NULL
);
1136 * This function returns the driver private structure of a network device.
1138 static inline struct mwifiex_private
*
1139 mwifiex_netdev_get_priv(struct net_device
*dev
)
1141 return (struct mwifiex_private
*) (*(unsigned long *) netdev_priv(dev
));
1145 * This function checks if a skb holds a management frame.
1147 static inline bool mwifiex_is_skb_mgmt_frame(struct sk_buff
*skb
)
1149 return (le32_to_cpu(*(__le32
*)skb
->data
) == PKT_TYPE_MGMT
);
1152 /* This function retrieves channel closed for operation by Channel
1153 * Switch Announcement.
1156 mwifiex_11h_get_csa_closed_channel(struct mwifiex_private
*priv
)
1158 if (!priv
->csa_chan
)
1161 /* Clear csa channel, if DFS channel move time has passed */
1162 if (time_after(jiffies
, priv
->csa_expire_time
)) {
1164 priv
->csa_expire_time
= 0;
1167 return priv
->csa_chan
;
1170 static inline u8
mwifiex_is_any_intf_active(struct mwifiex_private
*priv
)
1172 struct mwifiex_private
*priv_num
;
1175 for (i
= 0; i
< priv
->adapter
->priv_num
; i
++) {
1176 priv_num
= priv
->adapter
->priv
[i
];
1178 if ((GET_BSS_ROLE(priv_num
) == MWIFIEX_BSS_ROLE_UAP
&&
1179 priv_num
->bss_started
) ||
1180 (GET_BSS_ROLE(priv_num
) == MWIFIEX_BSS_ROLE_STA
&&
1181 priv_num
->media_connected
))
1189 int mwifiex_init_shutdown_fw(struct mwifiex_private
*priv
,
1190 u32 func_init_shutdown
);
1191 int mwifiex_add_card(void *, struct semaphore
*, struct mwifiex_if_ops
*, u8
);
1192 int mwifiex_remove_card(struct mwifiex_adapter
*, struct semaphore
*);
1194 void mwifiex_get_version(struct mwifiex_adapter
*adapter
, char *version
,
1196 int mwifiex_request_set_multicast_list(struct mwifiex_private
*priv
,
1197 struct mwifiex_multicast_list
*mcast_list
);
1198 int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list
*mlist
,
1199 struct net_device
*dev
);
1200 int mwifiex_wait_queue_complete(struct mwifiex_adapter
*adapter
,
1201 struct cmd_ctrl_node
*cmd_queued
);
1202 int mwifiex_bss_start(struct mwifiex_private
*priv
, struct cfg80211_bss
*bss
,
1203 struct cfg80211_ssid
*req_ssid
);
1204 int mwifiex_cancel_hs(struct mwifiex_private
*priv
, int cmd_type
);
1205 int mwifiex_enable_hs(struct mwifiex_adapter
*adapter
);
1206 int mwifiex_disable_auto_ds(struct mwifiex_private
*priv
);
1207 int mwifiex_drv_get_data_rate(struct mwifiex_private
*priv
, u32
*rate
);
1208 int mwifiex_request_scan(struct mwifiex_private
*priv
,
1209 struct cfg80211_ssid
*req_ssid
);
1210 int mwifiex_scan_networks(struct mwifiex_private
*priv
,
1211 const struct mwifiex_user_scan_cfg
*user_scan_in
);
1212 int mwifiex_set_radio(struct mwifiex_private
*priv
, u8 option
);
1214 int mwifiex_set_encode(struct mwifiex_private
*priv
, struct key_params
*kp
,
1215 const u8
*key
, int key_len
, u8 key_index
,
1216 const u8
*mac_addr
, int disable
);
1218 int mwifiex_set_gen_ie(struct mwifiex_private
*priv
, const u8
*ie
, int ie_len
);
1220 int mwifiex_get_ver_ext(struct mwifiex_private
*priv
);
1222 int mwifiex_remain_on_chan_cfg(struct mwifiex_private
*priv
, u16 action
,
1223 struct ieee80211_channel
*chan
,
1224 unsigned int duration
);
1226 int mwifiex_set_bss_role(struct mwifiex_private
*priv
, u8 bss_role
);
1228 int mwifiex_get_stats_info(struct mwifiex_private
*priv
,
1229 struct mwifiex_ds_get_stats
*log
);
1231 int mwifiex_reg_write(struct mwifiex_private
*priv
, u32 reg_type
,
1232 u32 reg_offset
, u32 reg_value
);
1234 int mwifiex_reg_read(struct mwifiex_private
*priv
, u32 reg_type
,
1235 u32 reg_offset
, u32
*value
);
1237 int mwifiex_eeprom_read(struct mwifiex_private
*priv
, u16 offset
, u16 bytes
,
1240 int mwifiex_set_11n_httx_cfg(struct mwifiex_private
*priv
, int data
);
1242 int mwifiex_get_11n_httx_cfg(struct mwifiex_private
*priv
, int *data
);
1244 int mwifiex_set_tx_rate_cfg(struct mwifiex_private
*priv
, int tx_rate_index
);
1246 int mwifiex_get_tx_rate_cfg(struct mwifiex_private
*priv
, int *tx_rate_index
);
1248 int mwifiex_drv_set_power(struct mwifiex_private
*priv
, u32
*ps_mode
);
1250 int mwifiex_drv_get_driver_version(struct mwifiex_adapter
*adapter
,
1251 char *version
, int max_len
);
1253 int mwifiex_set_tx_power(struct mwifiex_private
*priv
,
1254 struct mwifiex_power_cfg
*power_cfg
);
1256 int mwifiex_main_process(struct mwifiex_adapter
*);
1258 int mwifiex_queue_tx_pkt(struct mwifiex_private
*priv
, struct sk_buff
*skb
);
1260 int mwifiex_get_bss_info(struct mwifiex_private
*,
1261 struct mwifiex_bss_info
*);
1262 int mwifiex_fill_new_bss_desc(struct mwifiex_private
*priv
,
1263 struct cfg80211_bss
*bss
,
1264 struct mwifiex_bssdescriptor
*bss_desc
);
1265 int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter
*adapter
,
1266 struct mwifiex_bssdescriptor
*bss_entry
);
1267 int mwifiex_check_network_compatibility(struct mwifiex_private
*priv
,
1268 struct mwifiex_bssdescriptor
*bss_desc
);
1270 u8
mwifiex_chan_type_to_sec_chan_offset(enum nl80211_channel_type chan_type
);
1272 struct wireless_dev
*mwifiex_add_virtual_intf(struct wiphy
*wiphy
,
1274 enum nl80211_iftype type
,
1276 struct vif_params
*params
);
1277 int mwifiex_del_virtual_intf(struct wiphy
*wiphy
, struct wireless_dev
*wdev
);
1279 void mwifiex_set_sys_config_invalid_data(struct mwifiex_uap_bss_param
*config
);
1281 int mwifiex_add_wowlan_magic_pkt_filter(struct mwifiex_adapter
*adapter
);
1283 int mwifiex_set_mgmt_ies(struct mwifiex_private
*priv
,
1284 struct cfg80211_beacon_data
*data
);
1285 int mwifiex_del_mgmt_ies(struct mwifiex_private
*priv
);
1286 u8
*mwifiex_11d_code_2_region(u8 code
);
1287 void mwifiex_uap_del_sta_data(struct mwifiex_private
*priv
,
1288 struct mwifiex_sta_node
*node
);
1290 void mwifiex_11h_process_join(struct mwifiex_private
*priv
, u8
**buffer
,
1291 struct mwifiex_bssdescriptor
*bss_desc
);
1292 int mwifiex_11h_handle_event_chanswann(struct mwifiex_private
*priv
);
1293 int mwifiex_dnld_dt_cfgdata(struct mwifiex_private
*priv
,
1294 struct device_node
*node
, const char *prefix
);
1295 void mwifiex_dnld_txpwr_table(struct mwifiex_private
*priv
);
1297 extern const struct ethtool_ops mwifiex_ethtool_ops
;
1299 void mwifiex_del_all_sta_list(struct mwifiex_private
*priv
);
1300 void mwifiex_del_sta_entry(struct mwifiex_private
*priv
, const u8
*mac
);
1302 mwifiex_set_sta_ht_cap(struct mwifiex_private
*priv
, const u8
*ies
,
1303 int ies_len
, struct mwifiex_sta_node
*node
);
1304 struct mwifiex_sta_node
*
1305 mwifiex_add_sta_entry(struct mwifiex_private
*priv
, const u8
*mac
);
1306 struct mwifiex_sta_node
*
1307 mwifiex_get_sta_entry(struct mwifiex_private
*priv
, const u8
*mac
);
1308 int mwifiex_send_tdls_data_frame(struct mwifiex_private
*priv
, const u8
*peer
,
1309 u8 action_code
, u8 dialog_token
,
1310 u16 status_code
, const u8
*extra_ies
,
1311 size_t extra_ies_len
);
1312 int mwifiex_send_tdls_action_frame(struct mwifiex_private
*priv
, const u8
*peer
,
1313 u8 action_code
, u8 dialog_token
,
1314 u16 status_code
, const u8
*extra_ies
,
1315 size_t extra_ies_len
);
1316 void mwifiex_process_tdls_action_frame(struct mwifiex_private
*priv
,
1318 int mwifiex_tdls_oper(struct mwifiex_private
*priv
, const u8
*peer
, u8 action
);
1319 int mwifiex_get_tdls_link_status(struct mwifiex_private
*priv
, const u8
*mac
);
1320 void mwifiex_disable_all_tdls_links(struct mwifiex_private
*priv
);
1321 bool mwifiex_is_bss_in_11ac_mode(struct mwifiex_private
*priv
);
1322 u8
mwifiex_get_center_freq_index(struct mwifiex_private
*priv
, u8 band
,
1323 u32 pri_chan
, u8 chan_bw
);
1324 int mwifiex_init_channel_scan_gap(struct mwifiex_adapter
*adapter
);
1326 int mwifiex_tdls_check_tx(struct mwifiex_private
*priv
, struct sk_buff
*skb
);
1327 void mwifiex_flush_auto_tdls_list(struct mwifiex_private
*priv
);
1328 void mwifiex_auto_tdls_update_peer_status(struct mwifiex_private
*priv
,
1329 const u8
*mac
, u8 link_status
);
1330 void mwifiex_auto_tdls_update_peer_signal(struct mwifiex_private
*priv
,
1331 u8
*mac
, s8 snr
, s8 nflr
);
1332 void mwifiex_check_auto_tdls(unsigned long context
);
1333 void mwifiex_add_auto_tdls_peer(struct mwifiex_private
*priv
, const u8
*mac
);
1334 void mwifiex_setup_auto_tdls_timer(struct mwifiex_private
*priv
);
1335 void mwifiex_clean_auto_tdls(struct mwifiex_private
*priv
);
1337 #ifdef CONFIG_DEBUG_FS
1338 void mwifiex_debugfs_init(void);
1339 void mwifiex_debugfs_remove(void);
1341 void mwifiex_dev_debugfs_init(struct mwifiex_private
*priv
);
1342 void mwifiex_dev_debugfs_remove(struct mwifiex_private
*priv
);
1344 #endif /* !_MWIFIEX_MAIN_H_ */