#ifndef __RTL_WIFI_H__
#define __RTL_WIFI_H__
#define pr_fmt(fmt) …
#include <linux/sched.h>
#include <linux/firmware.h>
#include <linux/etherdevice.h>
#include <linux/vmalloc.h>
#include <linux/usb.h>
#include <net/mac80211.h>
#include <linux/completion.h>
#include <linux/bitfield.h>
#include "debug.h"
#define MASKBYTE0 …
#define MASKBYTE1 …
#define MASKBYTE2 …
#define MASKBYTE3 …
#define MASKH3BYTES …
#define MASKHWORD …
#define MASKLWORD …
#define MASKDWORD …
#define MASK12BITS …
#define MASKH4BITS …
#define MASKOFDM_D …
#define MASKCCK …
#define MASK4BITS …
#define MASK20BITS …
#define RFREG_OFFSET_MASK …
#define MASKBYTE0 …
#define MASKBYTE1 …
#define MASKBYTE2 …
#define MASKBYTE3 …
#define MASKHWORD …
#define MASKLWORD …
#define MASKDWORD …
#define MASK12BITS …
#define MASKH4BITS …
#define MASKOFDM_D …
#define MASKCCK …
#define MASK4BITS …
#define MASK20BITS …
#define RFREG_OFFSET_MASK …
#define MAC0_ACCESS_PHY1 …
#define MAC1_ACCESS_PHY0 …
#define RF_CHANGE_BY_INIT …
#define RF_CHANGE_BY_IPS …
#define RF_CHANGE_BY_PS …
#define RF_CHANGE_BY_HW …
#define RF_CHANGE_BY_SW …
#define IQK_ADDA_REG_NUM …
#define IQK_MAC_REG_NUM …
#define IQK_THRESHOLD …
#define MAX_KEY_LEN …
#define KEY_BUF_SIZE …
#define AC0_BE …
#define AC1_BK …
#define AC2_VI …
#define AC3_VO …
#define AC_MAX …
#define QOS_QUEUE_NUM …
#define RTL_MAC80211_NUM_QUEUE …
#define REALTEK_USB_VENQT_MAX_BUF_SIZE …
#define RTL_USB_MAX_RX_COUNT …
#define QBSS_LOAD_SIZE …
#define MAX_WMMELE_LENGTH …
#define ASPM_L1_LATENCY …
#define TOTAL_CAM_ENTRY …
#define RTL_SLOT_TIME_9 …
#define RTL_SLOT_TIME_20 …
#define SNAP_SIZE …
#define PROTOC_TYPE_SIZE …
#define MAC80211_3ADDR_LEN …
#define MAC80211_4ADDR_LEN …
#define CHANNEL_MAX_NUMBER …
#define CHANNEL_MAX_NUMBER_2G …
#define CHANNEL_MAX_NUMBER_5G …
#define CHANNEL_MAX_NUMBER_5G_80M …
#define CHANNEL_GROUP_MAX …
#define MAX_PG_GROUP …
#define CHANNEL_GROUP_MAX_2G …
#define CHANNEL_GROUP_IDX_5GL …
#define CHANNEL_GROUP_IDX_5GM …
#define CHANNEL_GROUP_IDX_5GH …
#define CHANNEL_GROUP_MAX_5G …
#define AVG_THERMAL_NUM …
#define AVG_THERMAL_NUM_88E …
#define AVG_THERMAL_NUM_8723BE …
#define MAX_TID_COUNT …
#define FCS_LEN …
#define EM_HDR_LEN …
enum rtl8192c_h2c_cmd { … };
enum { … };
enum rtl_c2h_evt_v1 { … };
enum rtl_c2h_evt_v2 { … };
#define GET_C2H_CMD_ID(c2h) …
#define GET_C2H_SEQ(c2h) …
#define C2H_DATA_OFFSET …
#define GET_C2H_DATA_PTR(c2h) …
#define GET_TX_REPORT_SN_V1(c2h) …
#define GET_TX_REPORT_ST_V1(c2h) …
#define GET_TX_REPORT_RETRY_V1(c2h) …
#define GET_TX_REPORT_SN_V2(c2h) …
#define GET_TX_REPORT_ST_V2(c2h) …
#define GET_TX_REPORT_RETRY_V2(c2h) …
#define MAX_TX_COUNT …
#define MAX_REGULATION_NUM …
#define MAX_RF_PATH_NUM …
#define MAX_RATE_SECTION_NUM …
#define MAX_2_4G_BANDWIDTH_NUM …
#define MAX_5G_BANDWIDTH_NUM …
#define MAX_RF_PATH …
#define MAX_CHNL_GROUP_24G …
#define MAX_CHNL_GROUP_5G …
#define TX_PWR_BY_RATE_NUM_BAND …
#define TX_PWR_BY_RATE_NUM_RF …
#define TX_PWR_BY_RATE_NUM_SECTION …
#define TX_PWR_BY_RATE_NUM_RATE …
#define MAX_BASE_NUM_IN_PHY_REG_PG_24G …
#define MAX_BASE_NUM_IN_PHY_REG_PG_5G …
#define BUFDESC_SEG_NUM …
#define DEL_SW_IDX_SZ …
#define RTL8192EE_SEG_NUM …
enum rf_tx_num { … };
#define PACKET_NORMAL …
#define PACKET_DHCP …
#define PACKET_ARP …
#define PACKET_EAPOL …
#define MAX_SUPPORT_WOL_PATTERN_NUM …
#define RSVD_WOL_PATTERN_NUM …
#define WKFMCAM_ADDR_NUM …
#define WKFMCAM_SIZE …
#define MAX_WOL_BIT_MASK_SIZE …
#define MIN_WOL_PATTERN_SIZE …
#define MAX_WOL_PATTERN_SIZE …
#define WAKE_ON_MAGIC_PACKET …
#define WAKE_ON_PATTERN_MATCH …
#define WOL_REASON_PTK_UPDATE …
#define WOL_REASON_GTK_UPDATE …
#define WOL_REASON_DISASSOC …
#define WOL_REASON_DEAUTH …
#define WOL_REASON_AP_LOST …
#define WOL_REASON_MAGIC_PKT …
#define WOL_REASON_UNICAST_PKT …
#define WOL_REASON_PATTERN_PKT …
#define WOL_REASON_RTD3_SSID_MATCH …
#define WOL_REASON_REALWOW_V2_WAKEUPPKT …
#define WOL_REASON_REALWOW_V2_ACKLOST …
struct rtlwifi_firmware_header { … };
struct txpower_info_2g { … };
struct txpower_info_5g { … };
enum rate_section { … };
enum intf_type { … };
enum radio_path { … };
enum radio_mask { … };
enum regulation_txpwr_lmt { … };
enum rt_eeprom_type { … };
enum ttl_status { … };
enum hardware_type { … };
#define RTL_HW_TYPE(rtlpriv) …
#define IS_NEW_GENERATION_IC(rtlpriv) …
#define IS_HARDWARE_TYPE_8192CE(rtlpriv) …
#define IS_HARDWARE_TYPE_8812(rtlpriv) …
#define IS_HARDWARE_TYPE_8821(rtlpriv) …
#define IS_HARDWARE_TYPE_8723A(rtlpriv) …
#define IS_HARDWARE_TYPE_8723B(rtlpriv) …
#define IS_HARDWARE_TYPE_8192E(rtlpriv) …
#define IS_HARDWARE_TYPE_8822B(rtlpriv) …
#define RX_HAL_IS_CCK_RATE(rxmcs) …
enum scan_operation_backup_opt { … };
enum rf_pwrstate { … };
struct bb_reg_def { … };
enum io_type { … };
enum hw_variables { … };
enum rt_media_status { … };
enum rt_oem_id { … };
enum hw_descs { … };
enum prime_sc { … };
enum rf_type { … };
enum ht_channel_width { … };
enum rt_enc_alg { … };
enum rtl_hal_state { … };
enum rtl_desc_rate { … };
enum rtl_var_map { … };
enum _fw_ps_mode { … };
enum rt_psmode { … };
enum led_ctl_mode { … };
enum rtl_led_pin { … };
enum acm_method { … };
enum macphy_mode { … };
enum band_type { … };
aci_aifsn;
enum wireless_mode { … };
#define IS_WIRELESS_MODE_A(wirelessmode) …
#define IS_WIRELESS_MODE_B(wirelessmode) …
#define IS_WIRELESS_MODE_G(wirelessmode) …
#define IS_WIRELESS_MODE_N_24G(wirelessmode) …
#define IS_WIRELESS_MODE_N_5G(wirelessmode) …
enum ratr_table_mode { … };
enum ratr_table_mode_new { … };
enum rtl_link_state { … };
enum act_category { … };
enum ba_action { … };
enum rt_polarity_ctl { … };
enum fw_wow_reason_v2 { … };
enum wolpattern_type { … };
enum package_type { … };
enum rtl_spec_ver { … };
enum dm_info_query { … };
enum rx_packet_type { … };
struct rtlwifi_tx_info { … };
static inline struct rtlwifi_tx_info *rtl_tx_skb_cb_info(struct sk_buff *skb)
{ … }
struct octet_string { … };
struct rtl_led_ctl { … };
struct rtl_qos_parameters { … } __packed;
struct rt_smooth_data { … };
struct false_alarm_statistics { … };
struct init_gain { … };
struct wireless_stats { … };
struct rate_adaptive { … };
struct regd_pair_mapping { … };
struct dynamic_primary_cca { … };
struct rtl_regulatory { … };
struct rtl_rfkill { … };
#define P2P_MAX_NOA_NUM …
enum p2p_role { … };
enum p2p_ps_state { … };
enum p2p_ps_mode { … };
struct rtl_p2p_ps_info { … };
struct p2p_ps_offload_t { … };
#define IQK_MATRIX_REG_NUM …
#define IQK_MATRIX_SETTINGS_NUM …
struct iqk_matrix_regs { … };
struct phy_parameters { … };
enum hw_param_tab_index { … };
struct rtl_phy { … };
#define MAX_TID_COUNT …
#define RTL_AGG_STOP …
#define RTL_AGG_PROGRESS …
#define RTL_AGG_START …
#define RTL_AGG_OPERATIONAL …
#define RTL_RX_AGG_START …
#define RTL_RX_AGG_STOP …
#define RTL_AGG_EMPTYING_HW_QUEUE_ADDBA …
#define RTL_AGG_EMPTYING_HW_QUEUE_DELBA …
struct rtl_ht_agg { … };
struct rssi_sta { … };
struct rtl_tid_data { … };
struct rtl_sta_info { … } __packed;
struct rtl_priv;
struct rtl_io { … };
struct rtl_mac { … };
struct btdm_8723 { … };
struct bt_coexist_8723 { … };
struct rtl_hal { … };
struct rtl_security { … };
#define ASSOCIATE_ENTRY_NUM …
struct fast_ant_training { … };
struct dm_phy_dbg_info { … };
struct rtl_dm { … };
#define EFUSE_MAX_LOGICAL_SIZE …
struct rtl_efuse { … };
struct rtl_efuse_ops { … };
struct rtl_tx_report { … };
struct rtl_ps_ctl { … };
struct rtl_stats { … };
struct rt_link_detect { … };
struct rtl_tcb_desc { … };
struct rtl_wow_pattern { … };
struct rtl_int { … };
struct rtl_hal_ops { … };
struct rtl_intf_ops { … };
struct rtl_mod_params { … };
struct rtl_hal_usbint_cfg { … };
struct rtl_hal_cfg { … };
struct rtl_locks { … };
struct rtl_works { … };
struct rtl_debug { … };
#define MIMO_PS_STATIC …
#define MIMO_PS_DYNAMIC …
#define MIMO_PS_NOLIMIT …
struct rtl_dmsp_ctl { … };
struct ps_t { … };
struct dig_t { … };
struct rtl_global_var { … };
#define IN_4WAY_TIMEOUT_TIME …
struct rtl_btc_info { … };
struct bt_coexist_info { … };
struct rtl_btc_ops { … };
struct proxim { … };
struct rtl_c2hcmd { … };
struct rtl_bssid_entry { … };
struct rtl_scan_list { … };
struct rtl_priv { … };
#define rtl_priv(hw) …
#define rtl_mac(rtlpriv) …
#define rtl_hal(rtlpriv) …
#define rtl_efuse(rtlpriv) …
#define rtl_psc(rtlpriv) …
enum bt_ant_num { … };
enum bt_ant_path { … };
enum bt_co_type { … };
enum bt_cur_state { … };
enum bt_service_type { … };
enum bt_radio_shared { … };
#define N_BYTE_ALIGMENT(__value, __aligment) …
#define byte(x, n) …
#define packet_get_type(_packet) …
#define RTL_WATCH_DOG_TIME …
#define MSECS(t) …
#define WLAN_FC_GET_VERS(fc) …
#define WLAN_FC_GET_TYPE(fc) …
#define WLAN_FC_GET_STYPE(fc) …
#define WLAN_FC_MORE_DATA(fc) …
#define rtl_dm(rtlpriv) …
#define RT_RF_OFF_LEVL_ASPM …
#define RT_RF_OFF_LEVL_CLK_REQ …
#define RT_RF_OFF_LEVL_PCI_D3 …
#define RT_RF_OFF_LEVL_HALT_NIC …
#define RT_RF_OFF_LEVL_FREE_FW …
#define RT_RF_OFF_LEVL_FW_32K …
#define RT_RF_PS_LEVEL_ALWAYS_ASPM …
#define RT_PS_LEVEL_ASPM …
#define RT_RF_LPS_DISALBE_2R …
#define RT_RF_LPS_LEVEL_ASPM …
#define RT_IN_PS_LEVEL(ppsc, _ps_flg) …
#define RT_CLEAR_PS_LEVEL(ppsc, _ps_flg) …
#define RT_SET_PS_LEVEL(ppsc, _ps_flg) …
#define FILL_OCTET_STRING(_os, _octet, _len) …
#define CP_MACADDR(des, src) …
#define LDPC_HT_ENABLE_RX …
#define LDPC_HT_ENABLE_TX …
#define LDPC_HT_TEST_TX_ENABLE …
#define LDPC_HT_CAP_TX …
#define STBC_HT_ENABLE_RX …
#define STBC_HT_ENABLE_TX …
#define STBC_HT_TEST_TX_ENABLE …
#define STBC_HT_CAP_TX …
#define LDPC_VHT_ENABLE_RX …
#define LDPC_VHT_ENABLE_TX …
#define LDPC_VHT_TEST_TX_ENABLE …
#define LDPC_VHT_CAP_TX …
#define STBC_VHT_ENABLE_RX …
#define STBC_VHT_ENABLE_TX …
#define STBC_VHT_TEST_TX_ENABLE …
#define STBC_VHT_CAP_TX …
extern u8 channel5g[CHANNEL_MAX_NUMBER_5G];
extern u8 channel5g_80m[CHANNEL_MAX_NUMBER_5G_80M];
static inline u8 rtl_read_byte(struct rtl_priv *rtlpriv, u32 addr)
{ … }
static inline u16 rtl_read_word(struct rtl_priv *rtlpriv, u32 addr)
{ … }
static inline u32 rtl_read_dword(struct rtl_priv *rtlpriv, u32 addr)
{ … }
static inline void rtl_write_byte(struct rtl_priv *rtlpriv, u32 addr, u8 val8)
{ … }
static inline void rtl_write_byte_with_val32(struct ieee80211_hw *hw,
u32 addr, u32 val8)
{ … }
static inline void rtl_write_word(struct rtl_priv *rtlpriv, u32 addr, u16 val16)
{ … }
static inline void rtl_write_dword(struct rtl_priv *rtlpriv,
u32 addr, u32 val32)
{ … }
static inline void rtl_write_chunk(struct rtl_priv *rtlpriv,
u32 addr, u32 length, u8 *data)
{ … }
static inline u32 rtl_get_bbreg(struct ieee80211_hw *hw,
u32 regaddr, u32 bitmask)
{ … }
static inline void rtl_set_bbreg(struct ieee80211_hw *hw, u32 regaddr,
u32 bitmask, u32 data)
{ … }
static inline void rtl_set_bbreg_with_dwmask(struct ieee80211_hw *hw,
u32 regaddr, u32 data)
{ … }
static inline u32 rtl_get_rfreg(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 regaddr,
u32 bitmask)
{ … }
static inline void rtl_set_rfreg(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 regaddr,
u32 bitmask, u32 data)
{ … }
static inline bool is_hal_stop(struct rtl_hal *rtlhal)
{ … }
static inline void set_hal_start(struct rtl_hal *rtlhal)
{ … }
static inline void set_hal_stop(struct rtl_hal *rtlhal)
{ … }
static inline u8 get_rf_type(struct rtl_phy *rtlphy)
{ … }
static inline struct ieee80211_hdr *rtl_get_hdr(struct sk_buff *skb)
{ … }
static inline __le16 rtl_get_fc(struct sk_buff *skb)
{ … }
static inline u16 rtl_get_tid(struct sk_buff *skb)
{ … }
static inline struct ieee80211_sta *get_sta(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
const u8 *bssid)
{ … }
static inline struct ieee80211_sta *rtl_find_sta(struct ieee80211_hw *hw,
u8 *mac_addr)
{ … }
static inline u32 calculate_bit_shift(u32 bitmask)
{ … }
#endif