linux/drivers/staging/rtl8192e/rtllib.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Merged with mainline rtllib.h in Aug 2004.  Original ieee802_11
 * remains copyright by the original authors
 *
 * Portions of the merged code are based on Host AP (software wireless
 * LAN access point) driver for Intersil Prism2/2.5/3.
 *
 * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
 * <[email protected]>
 * Copyright (c) 2002-2003, Jouni Malinen <[email protected]>
 *
 * Adaption to a generic IEEE 802.11 stack by James Ketrenos
 * <[email protected]>
 * Copyright (c) 2004, Intel Corporation
 *
 * Modified for Realtek's wi-fi cards by Andrea Merello
 * <[email protected]>
 */
#ifndef RTLLIB_H
#define RTLLIB_H
#include <linux/if_ether.h> /* ETH_ALEN */
#include <linux/kernel.h>   /* ARRAY_SIZE */
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/timer.h>
#include <linux/sched.h>
#include <linux/mutex.h>

#include <linux/delay.h>
#include <linux/wireless.h>

#include "rtl819x_HT.h"
#include "rtl819x_BA.h"
#include "rtl819x_TS.h"

#include <linux/netdevice.h>
#include <linux/if_arp.h> /* ARPHRD_ETHER */
#include <net/cfg80211.h>
#include <net/lib80211.h>

#define MAX_PRECMD_CNT
#define MAX_RFDEPENDCMD_CNT
#define MAX_POSTCMD_CNT

#ifndef WIRELESS_SPY
#define WIRELESS_SPY
#endif
#include <net/iw_handler.h>

#ifndef IW_MODE_MONITOR
#define IW_MODE_MONITOR
#endif

#ifndef IWEVCUSTOM
#define IWEVCUSTOM
#endif

#ifndef IW_CUSTOM_MAX
/* Max number of char in custom event - use multiple of them if needed */
#define IW_CUSTOM_MAX
#endif

#define container_of_dwork_rsl(x, y, z)

static inline void *netdev_priv_rsl(struct net_device *dev)
{}

#define KEY_TYPE_NA
#define KEY_TYPE_WEP40
#define KEY_TYPE_TKIP
#define KEY_TYPE_CCMP
#define KEY_TYPE_WEP104
/* added for rtl819x tx procedure */
#define MAX_QUEUE_SIZE

#define BK_QUEUE
#define BE_QUEUE
#define VI_QUEUE
#define VO_QUEUE
#define HCCA_QUEUE
#define TXCMD_QUEUE
#define MGNT_QUEUE
#define HIGH_QUEUE
#define BEACON_QUEUE

#define IE_CISCO_FLAG_POSITION
#define SUPPORT_CKIP_MIC
#define SUPPORT_CKIP_PK
#define RT_RF_OFF_LEVL_HALT_NIC
#define RT_IN_PS_LEVEL(psc, _PS_FLAG)
#define RT_CLEAR_PS_LEVEL(psc, _PS_FLAG)

/* defined for skb cb field */
/* At most 28 byte */
struct cb_desc {};

enum sw_chnl_cmd_id {};

struct sw_chnl_cmd {};

/*--------------------------Define -------------------------------------------*/
#define MGN_1M
#define MGN_2M
#define MGN_5_5M
#define MGN_11M

#define MGN_6M
#define MGN_9M
#define MGN_12M
#define MGN_18M
#define MGN_24M
#define MGN_36M
#define MGN_48M
#define MGN_54M

#define MGN_MCS0
#define MGN_MCS1
#define MGN_MCS2
#define MGN_MCS3
#define MGN_MCS4
#define MGN_MCS5
#define MGN_MCS6
#define MGN_MCS7
#define MGN_MCS8
#define MGN_MCS9
#define MGN_MCS10
#define MGN_MCS11
#define MGN_MCS12
#define MGN_MCS13
#define MGN_MCS14
#define MGN_MCS15

enum hw_variables {};

enum rt_op_mode {};

#define asifs_time

#define MGMT_QUEUE_NUM

#define MAX_IE_LEN

#define msleep_interruptible_rsl

/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
 * 6.2.1.1.2.
 *
 * The figure in section 7.1.2 suggests a body size of up to 2312
 * bytes is allowed, which is a bit confusing, I suspect this
 * represents the 2304 bytes of real data, plus a possible 8 bytes of
 * WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro)
 */
#define RTLLIB_1ADDR_LEN
#define RTLLIB_2ADDR_LEN
#define RTLLIB_3ADDR_LEN
#define RTLLIB_4ADDR_LEN
#define RTLLIB_FCS_LEN

#define RTLLIB_SKBBUFFER_SIZE

#define MIN_FRAG_THRESHOLD
#define MAX_FRAG_THRESHOLD

#define RTLLIB_FTYPE_MGMT
#define RTLLIB_FTYPE_CTL
#define RTLLIB_FTYPE_DATA

#define RTLLIB_SCTL_FRAG
#define RTLLIB_SCTL_SEQ

/* QOS control */
#define RTLLIB_QCTL_TID

#define FC_QOS_BIT
#define is_data_frame(pdu)
#define is_legacy_data_frame(pdu)
#define is_qos_data_frame(pframe)
#define frame_order(pframe)
#define SN_LESS(a, b)
#define SN_EQUAL(a, b)
#define MAX_DEV_ADDR_SIZE

enum act_category {};

enum ba_action {};

enum init_gain_op_type {};

enum wireless_mode {};

#ifndef ETH_P_PAE
#define ETH_P_PAE
#define ETH_P_IP
#define ETH_P_ARP
#endif /* ETH_P_PAE */

#ifndef ETH_P_80211_RAW
#define ETH_P_80211_RAW
#endif

/* IEEE 802.11 defines */

#define P80211_OUI_LEN

struct rtllib_snap_hdr {} __packed;

enum _REG_PREAMBLE_MODE {};

#define SNAP_SIZE

#define WLAN_FC_GET_TYPE(fc)
#define WLAN_FC_GET_STYPE(fc)
#define WLAN_FC_MORE_DATA(fc)

#define WLAN_GET_SEQ_FRAG(seq)
#define WLAN_GET_SEQ_SEQ(seq)

#define RTLLIB_STATMASK_SIGNAL
#define RTLLIB_STATMASK_RSSI
#define RTLLIB_STATMASK_NOISE
#define RTLLIB_STATMASK_WEMASK

#define RTLLIB_CCK_MODULATION
#define RTLLIB_OFDM_MODULATION

#define RTLLIB_CCK_RATE_LEN
#define RTLLIB_CCK_RATE_1MB
#define RTLLIB_CCK_RATE_2MB
#define RTLLIB_CCK_RATE_5MB
#define RTLLIB_CCK_RATE_11MB
#define RTLLIB_OFDM_RATE_LEN
#define RTLLIB_OFDM_RATE_6MB
#define RTLLIB_OFDM_RATE_9MB
#define RTLLIB_OFDM_RATE_12MB
#define RTLLIB_OFDM_RATE_18MB
#define RTLLIB_OFDM_RATE_24MB
#define RTLLIB_OFDM_RATE_36MB
#define RTLLIB_OFDM_RATE_48MB
#define RTLLIB_OFDM_RATE_54MB
#define RTLLIB_BASIC_RATE_MASK

/* this is stolen and modified from the madwifi driver*/
#define RTLLIB_FC0_TYPE_MASK
#define RTLLIB_FC0_TYPE_DATA
#define RTLLIB_FC0_SUBTYPE_MASK
#define RTLLIB_FC0_SUBTYPE_QOS

#define RTLLIB_QOS_HAS_SEQ(fc)

/* this is stolen from ipw2200 driver */
#define IEEE_IBSS_MAC_HASH_SIZE

/* NOTE: This data is for statistical purposes; not all hardware provides this
 *       information for frames received.  Not setting these will not cause
 *       any adverse affects.
 */
struct rtllib_rx_stats {};

/* IEEE 802.11 requires that STA supports concurrent reception of at least
 * three fragmented frames. This define can be increased to support more
 * concurrent frames, but it should be noted that each entry can consume about
 * 2 kB of RAM and increasing cache size will slow down frame reassembly.
 */
#define RTLLIB_FRAG_CACHE_LEN

struct rtllib_frag_entry {};

struct rtllib_device;

#define SEC_ACTIVE_KEY
#define SEC_AUTH_MODE
#define SEC_UNICAST_GROUP
#define SEC_LEVEL
#define SEC_ENABLED

#define SEC_LEVEL_0
#define SEC_LEVEL_1
#define SEC_LEVEL_2
#define SEC_LEVEL_2_CKIP
#define SEC_LEVEL_3

#define SEC_ALG_NONE
#define SEC_ALG_WEP
#define SEC_ALG_TKIP
#define SEC_ALG_CCMP

#define WEP_KEY_LEN
#define SCM_KEY_LEN

struct rtllib_security {} __packed;

/* 802.11 data frame from AP
 *       ,-------------------------------------------------------------------.
 * Bytes |  2   |  2   |    6    |    6    |    6    |  2   | 0..2312 |   4  |
 *       |------|------|---------|---------|---------|------|---------|------|
 * Desc. | ctrl | dura |  DA/RA  |   TA    |    SA   | Sequ |  frame  |  fcs |
 *       |      | tion | (BSSID) |         |         | ence |  data   |      |
 *       `-------------------------------------------------------------------'
 * Total: 28-2340 bytes
 */

/* Management Frame Information Element Types */
enum rtllib_mfie {};

/* Minimal header; can be used for passing 802.11 frames with sufficient
 * information to determine what type of underlying data type is actually
 * stored in the data.
 */
struct rtllib_info_element {} __packed;

struct rtllib_authentication {} __packed __aligned();

struct rtllib_disauth {} __packed __aligned();

struct rtllib_disassoc {} __packed __aligned();

struct rtllib_probe_request {} __packed __aligned();

struct rtllib_probe_response {} __packed __aligned();

/* Alias beacon for probe_response */
#define rtllib_beacon

struct rtllib_assoc_request_frame {} __packed __aligned();

struct rtllib_assoc_response_frame {} __packed __aligned();

struct rtllib_txb {};

#define MAX_SUBFRAME_COUNT
struct rtllib_rxb {};

frameqos;

/* MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs
 * only use 8, and then use extended rates for the remaining supported
 * rates.  Other APs, however, stick all of their supported rates on the
 * main rates information element...
 */
#define MAX_RATES_LENGTH
#define MAX_RATES_EX_LENGTH
#define MAX_NETWORK_COUNT

#define MAX_CHANNEL_NUMBER
#define RTLLIB_SOFTMAC_SCAN_TIME
#define RTLLIB_SOFTMAC_ASSOC_RETRY_TIME

#define MAX_WPA_IE_LEN
#define MAX_WZC_IE_LEN

#define NETWORK_EMPTY_ESSID
#define NETWORK_HAS_OFDM
#define NETWORK_HAS_CCK

/* QoS structure */
#define NETWORK_HAS_QOS_PARAMETERS
#define NETWORK_HAS_QOS_INFORMATION
#define NETWORK_HAS_QOS_MASK
/* 802.11h */
#define NETWORK_HAS_ERP_VALUE

#define QOS_QUEUE_NUM
#define QOS_OUI_LEN
#define QOS_OUI_TYPE
#define QOS_ELEMENT_ID
#define QOS_OUI_INFO_SUB_TYPE
#define QOS_OUI_PARAM_SUB_TYPE
#define QOS_VERSION_1

struct rtllib_qos_information_element {} __packed;

struct rtllib_qos_ac_parameter {} __packed;

struct rtllib_qos_parameter_info {} __packed;

struct rtllib_qos_parameters {} __packed;

struct rtllib_qos_data {};

struct rtllib_tim_parameters {} __packed;

struct rtllib_wmm_ac_param {};

enum eap_type {};

static const char * const eap_types[] =;

static inline const char *eap_get_type(int type)
{}

static inline u8 frame_qos_tid(u8 *buf)
{}

struct eapol {} __packed;

struct rtllib_softmac_stats {};

/* These are the data types that can make up management packets
 *
 * u16 auth_algorithm;
 * u16 auth_sequence;
 * u16 beacon_interval;
 * u16 capability;
 * u8 current_ap[ETH_ALEN];
 * u16 listen_interval;
 * struct {
 *   u16 association_id:14, reserved:2;
 * } __packed;
 * u32 time_stamp[2];
 * u16 reason;
 * u16 status;
 */

#define RTLLIB_DEFAULT_TX_ESSID
#define RTLLIB_DEFAULT_BASIC_RATE

enum {};
#define MAX_SP_Len
#define RTLLIB_QOS_TID
#define QOS_CTL_NOTCONTAIN_ACK

#define RTLLIB_DTIM_MBCAST
#define RTLLIB_DTIM_UCAST
#define RTLLIB_DTIM_VALID
#define RTLLIB_DTIM_INVALID

#define RTLLIB_PS_DISABLED
#define RTLLIB_PS_UNICAST
#define RTLLIB_PS_MBCAST

#define WME_AC_BK
#define WME_AC_BE
#define WME_AC_VI
#define WME_AC_VO
#define WME_AC_PRAM_LEN

#define MAX_RECEIVE_BUFFER_SIZE

#define UP2AC(up)

#define ETHERNET_HEADER_SIZE

enum erp_t {};

struct rtllib_network {};

enum rtl_link_state {};

#define DEFAULT_MAX_SCAN_AGE
#define DEFAULT_FTS

#define CFG_RTLLIB_RESERVE_FCS
#define CFG_RTLLIB_COMPUTE_FCS

struct tx_pending {};

struct bandwidth_autoswitch {};

#define REORDER_WIN_SIZE
#define REORDER_ENTRY_NUM
struct rx_reorder_entry {};

enum fsync_state {};

enum ips_callback_function {};

enum rt_rf_power_state {};

struct rt_pwr_save_ctrl {};

#define RT_RF_CHANGE_SOURCE

#define RF_CHANGE_BY_SW
#define RF_CHANGE_BY_HW
#define RF_CHANGE_BY_PS
#define RF_CHANGE_BY_IPS
#define RF_CHANGE_BY_INIT

enum country_code_type {};

enum scan_op_backup_opt {};

#define RT_MAX_LD_SLOT_NUM
struct rt_link_detect {};

struct sw_cam_table {};

#define TOTAL_CAM_ENTRY
struct rate_adaptive {};

#define NUM_PMKID_CACHE
struct rt_pmkid_list {};

/*************** DRIVER STATUS   *****/
#define STATUS_SCANNING
/*************** DRIVER STATUS   *****/

enum {};

struct rtllib_device {};

#define IEEE_MODE_MASK

/* Generate a 802.11 header */

/* Uses the channel change callback directly
 * instead of [start/stop] scan callbacks
 */
#define IEEE_SOFTMAC_SCAN

/* Perform authentication and association handshake */
#define IEEE_SOFTMAC_ASSOCIATE

/* Generate probe requests */
#define IEEE_SOFTMAC_PROBERQ

/* Generate response to probe requests */
#define IEEE_SOFTMAC_PROBERS

/* The ieee802.11 stack will manage the netif queue
 * wake/stop for the driver, taking care of 802.11
 * fragmentation. See softmac.c for details.
 */
#define IEEE_SOFTMAC_TX_QUEUE

/* Uses only the softmac_data_hard_start_xmit
 * even for TX management frames.
 */
#define IEEE_SOFTMAC_SINGLE_QUEUE

/* Generate beacons.  The stack will enqueue beacons
 * to the card
 */
#define IEEE_SOFTMAC_BEACONS

static inline void *rtllib_priv(struct net_device *dev)
{}

static inline int rtllib_is_empty_essid(const char *essid, int essid_len)
{}

static inline int rtllib_get_hdrlen(u16 fc)
{}

static inline int rtllib_is_ofdm_rate(u8 rate)
{}

static inline int rtllib_is_cck_rate(u8 rate)
{}

/* rtllib.c */
void free_rtllib(struct net_device *dev);
struct net_device *alloc_rtllib(int sizeof_priv);

/* rtllib_tx.c */

int rtllib_encrypt_fragment(struct rtllib_device *ieee,
			    struct sk_buff *frag,
			    int hdr_len);

netdev_tx_t rtllib_xmit(struct sk_buff *skb,  struct net_device *dev);
void rtllib_txb_free(struct rtllib_txb *txb);

/* rtllib_rx.c */
int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
	      struct rtllib_rx_stats *rx_stats);
int rtllib_legal_channel(struct rtllib_device *rtllib, u8 channel);

/* rtllib_wx.c */
int rtllib_wx_get_scan(struct rtllib_device *ieee,
		       struct iw_request_info *info,
		       union iwreq_data *wrqu, char *key);
int rtllib_wx_set_encode(struct rtllib_device *ieee,
			 struct iw_request_info *info,
			 union iwreq_data *wrqu, char *key);
int rtllib_wx_get_encode(struct rtllib_device *ieee,
			 struct iw_request_info *info,
			 union iwreq_data *wrqu, char *key);
int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
			     struct iw_request_info *info,
			     union iwreq_data *wrqu, char *extra);
int rtllib_wx_set_auth(struct rtllib_device *ieee,
		       struct iw_request_info *info,
		       struct iw_param *data, char *extra);
int rtllib_wx_set_mlme(struct rtllib_device *ieee,
		       struct iw_request_info *info,
		       union iwreq_data *wrqu, char *extra);
int rtllib_wx_set_gen_ie(struct rtllib_device *ieee, u8 *ie, size_t len);

/* rtllib_softmac.c */
int rtllib_rx_frame_softmac(struct rtllib_device *ieee, struct sk_buff *skb,
			    struct rtllib_rx_stats *rx_stats, u16 type,
			    u16 stype);
void rtllib_softmac_new_net(struct rtllib_device *ieee,
			    struct rtllib_network *net);

void send_disassociation(struct rtllib_device *ieee, bool deauth, u16 rsn);
void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee);

int rtllib_softmac_init(struct rtllib_device *ieee);
void rtllib_softmac_free(struct rtllib_device *ieee);
void rtllib_disassociate(struct rtllib_device *ieee);
void rtllib_stop_scan(struct rtllib_device *ieee);
bool rtllib_act_scanning(struct rtllib_device *ieee, bool sync_scan);
void rtllib_stop_scan_syncro(struct rtllib_device *ieee);
void rtllib_start_scan_syncro(struct rtllib_device *ieee);
void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr);
void rtllib_sta_ps_send_pspoll_frame(struct rtllib_device *ieee);
void rtllib_start_protocol(struct rtllib_device *ieee);
void rtllib_stop_protocol(struct rtllib_device *ieee);

void rtllib_enable_net_monitor_mode(struct net_device *dev, bool init_state);
void rtllib_disable_net_monitor_mode(struct net_device *dev, bool init_state);

void rtllib_softmac_stop_protocol(struct rtllib_device *ieee);
void rtllib_softmac_start_protocol(struct rtllib_device *ieee);

void rtllib_reset_queue(struct rtllib_device *ieee);
void rtllib_wake_all_queues(struct rtllib_device *ieee);
void rtllib_stop_all_queues(struct rtllib_device *ieee);

void notify_wx_assoc_event(struct rtllib_device *ieee);
void rtllib_ps_tx_ack(struct rtllib_device *ieee, short success);

void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee);
u8 rtllib_ap_sec_type(struct rtllib_device *ieee);

/* rtllib_softmac_wx.c */

int rtllib_wx_get_wap(struct rtllib_device *ieee, struct iw_request_info *info,
		      union iwreq_data *wrqu, char *ext);

int rtllib_wx_set_wap(struct rtllib_device *ieee, struct iw_request_info *info,
		      union iwreq_data *awrq, char *extra);

int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a,
			union iwreq_data *wrqu, char *b);

int rtllib_wx_set_rate(struct rtllib_device *ieee, struct iw_request_info *info,
		       union iwreq_data *wrqu, char *extra);

int rtllib_wx_get_rate(struct rtllib_device *ieee, struct iw_request_info *info,
		       union iwreq_data *wrqu, char *extra);

int rtllib_wx_set_mode(struct rtllib_device *ieee, struct iw_request_info *a,
		       union iwreq_data *wrqu, char *b);

int rtllib_wx_set_scan(struct rtllib_device *ieee, struct iw_request_info *a,
		       union iwreq_data *wrqu, char *b);

int rtllib_wx_set_essid(struct rtllib_device *ieee, struct iw_request_info *a,
			union iwreq_data *wrqu, char *extra);

int rtllib_wx_get_mode(struct rtllib_device *ieee, struct iw_request_info *a,
		       union iwreq_data *wrqu, char *b);

int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
		       union iwreq_data *wrqu, char *b);

int rtllib_wx_get_freq(struct rtllib_device *ieee, struct iw_request_info *a,
		       union iwreq_data *wrqu, char *b);
void rtllib_wx_sync_scan_wq(void *data);

int rtllib_wx_get_name(struct rtllib_device *ieee, struct iw_request_info *info,
		       union iwreq_data *wrqu, char *extra);

int rtllib_wx_set_power(struct rtllib_device *ieee,
			struct iw_request_info *info,
			union iwreq_data *wrqu, char *extra);

int rtllib_wx_get_power(struct rtllib_device *ieee,
			struct iw_request_info *info,
			union iwreq_data *wrqu, char *extra);

int rtllib_wx_set_rts(struct rtllib_device *ieee, struct iw_request_info *info,
		      union iwreq_data *wrqu, char *extra);

int rtllib_wx_get_rts(struct rtllib_device *ieee, struct iw_request_info *info,
		      union iwreq_data *wrqu, char *extra);
#define MAX_RECEIVE_BUFFER_SIZE

void ht_set_connect_bw_mode(struct rtllib_device *ieee,
			enum ht_channel_width bandwidth,
			enum ht_extchnl_offset Offset);
void ht_update_default_setting(struct rtllib_device *ieee);
void ht_construct_capability_element(struct rtllib_device *ieee,
				  u8 *pos_ht_cap, u8 *len,
				  u8 is_encrypt, bool assoc);
void ht_construct_rt2rt_agg_element(struct rtllib_device *ieee,
				u8 *posRT2RTAgg, u8 *len);
void ht_on_assoc_rsp(struct rtllib_device *ieee);
void ht_initialize_ht_info(struct rtllib_device *ieee);
void ht_initialize_bss_desc(struct bss_ht *bss_ht);
void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee,
				   struct rtllib_network *network);
void HT_update_self_and_peer_setting(struct rtllib_device *ieee,
				     struct rtllib_network *network);
u8 ht_get_highest_mcs_rate(struct rtllib_device *ieee, u8 *pMCSRateSet,
		       u8 *pMCSFilter);
extern u8 MCS_FILTER_ALL[];
extern u16 MCS_DATA_RATE[2][2][77];
u8 ht_c_check(struct rtllib_device *ieee, u8 *frame);
void ht_reset_iot_setting(struct rt_hi_throughput *ht_info);
bool is_ht_half_nmode_aps(struct rtllib_device *ieee);
u16  tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate);
int rtllib_rx_add_ba_req(struct rtllib_device *ieee, struct sk_buff *skb);
int rtllib_rx_add_ba_rsp(struct rtllib_device *ieee, struct sk_buff *skb);
int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb);
void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *ts,
			   u8 policy, u8 overwrite_pending);
void rtllib_ts_init_del_ba(struct rtllib_device *ieee,
			   struct ts_common_info *ts_common_info,
			   enum tr_select tx_rx_select);
void rtllib_ba_setup_timeout(struct timer_list *t);
void rtllib_tx_ba_inact_timeout(struct timer_list *t);
void rtllib_rx_ba_inact_timeout(struct timer_list *t);
void rtllib_reset_ba_entry(struct ba_record *ba);
bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *addr,
	   u8 TID, enum tr_select tx_rx_select, bool add_new_ts);
void rtllib_ts_init(struct rtllib_device *ieee);
void rtllib_ts_start_add_ba_process(struct rtllib_device *ieee,
			 struct tx_ts_record *pTxTS);
void remove_peer_ts(struct rtllib_device *ieee, u8 *addr);
void remove_all_ts(struct rtllib_device *ieee);

static inline const char *escape_essid(const char *essid, u8 essid_len)
{}

/* fun with the built-in rtllib stack... */
bool rtllib_mgnt_disconnect(struct rtllib_device *rtllib, u8 rsn);

/* For the function is more related to hardware setting, it's better to use the
 * ieee handler to refer to it.
 */
void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
				     struct rx_ts_record *ts);
int rtllib_parse_info_param(struct rtllib_device *ieee,
			    struct rtllib_info_element *info_element,
			    u16 length,
			    struct rtllib_network *network,
			    struct rtllib_rx_stats *stats);

void rtllib_indicate_packets(struct rtllib_device *ieee,
			     struct rtllib_rxb **prxb_indicate_array, u8  index);
#define RT_ASOC_RETRY_LIMIT
u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee);

#endif /* RTLLIB_H */