From e17675412667bd3c1bba93174973bf30dcb180f7 Mon Sep 17 00:00:00 2001 From: pvvx Date: Fri, 6 Jan 2017 06:38:39 +0300 Subject: [PATCH] add wifi_lib headeres --- .../drivers/wlan/realtek/include/wifi_lib.h | 3552 +++++++++++++++++ .../drivers/wlan/realtek/include/wlan_lib.h | 1809 ++++----- 2 files changed, 4413 insertions(+), 948 deletions(-) create mode 100644 RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wifi_lib.h diff --git a/RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wifi_lib.h b/RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wifi_lib.h new file mode 100644 index 0000000..71a5b5e --- /dev/null +++ b/RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wifi_lib.h @@ -0,0 +1,3552 @@ +/* + wifi_lib.h + RTL871x pvvx +*/ +#ifndef _WLAN_LIB_H +#define _WLAN_LIB_H + +#include "osdep_service.h" +#include "freertos/wrapper.h" + +#define __int8 char +#define __int16 short +#define __int32 int +#define __int64 long long +/* +struct _ADAPTER; +struct dvobj_priv; +union recv_frame; +struct sk_buff; +struct sk_buff_head; +struct sta_info; +struct _cus_ie; +struct fifo_more_data; +struct hw_xmit; +struct tx_buf_desc; +struct recv_buf_stat; +struct _wpa_sta_info; +struct xmit_frame; +struct xmit_buf; +struct submit_ctx; +struct net_device; +struct iwreq; +struct co_data_priv; +*/ +//typedef int __int32_t; +//typedef char __int8_t; +//typedef __int8_t int8_t; +//typedef unsigned int __uint32_t; +//typedef __int32_t int32_t; +//typedef __uint32_t uint32_t; +//typedef uint32_t dma_addr_t; // basic_types.h + +typedef unsigned __int8 __uint8_t; +typedef unsigned __int16 __uint16_t; +typedef unsigned __int64 __uint64_t; +typedef __uint8_t uint8_t; +typedef __uint16_t uint16_t; +typedef __uint64_t uint64_t; +typedef int sint; +typedef unsigned __int8 BOOL; +typedef unsigned __int8 bool; +typedef unsigned __int8 BOOLEAN; +typedef unsigned __int16 __u16; +typedef int __s32; +typedef unsigned __int8 __u8; +typedef __int16 __s16; +typedef unsigned int __u32; + +typedef unsigned __int8 u1Byte; +typedef unsigned __int16 u2Byte; +typedef unsigned __int16 *pu2Byte; +typedef unsigned int u4Byte; +typedef unsigned __int64 u8Byte; +typedef char s1Byte; +typedef __int16 s2Byte; +typedef int s4Byte; +typedef char *ps1Byte; +typedef unsigned __int8 *pu1Byte; +typedef unsigned int *pu4Byte; + +typedef unsigned int sizetype; +typedef struct _ADAPTER _adapter; +typedef void *_lock; +typedef struct list_head _list; +typedef void *PVOID; +typedef struct __queue _queue; +typedef void *_mutex; + +typedef int (*init_done_ptr)(void); + +enum _EFUSE_DEF_TYPE // : __int32 +{ + TYPE_EFUSE_MAX_SECTION = 0x0, + TYPE_EFUSE_REAL_CONTENT_LEN = 0x1, + TYPE_AVAILABLE_EFUSE_BYTES_BANK = 0x2, + TYPE_AVAILABLE_EFUSE_BYTES_TOTAL = 0x3, + TYPE_EFUSE_MAP_LEN = 0x4, + TYPE_EFUSE_PROTECT_BYTES_BANK = 0x5, + TYPE_EFUSE_CONTENT_LEN_BANK = 0x6, +}; + +enum _IFACE_TYPE //: __int32 +{ + IFACE_PORT0 = 0x0, + IFACE_PORT1 = 0x1, + MAX_IFACE_PORT = 0x2, +}; + +enum _FW_ERR0_STATUS_ //: __int32 +{ + FES0_H2C_CMDID = 0x1, + FES0_H2C_PTR = 0x2, + FES0_BB_RW = 0x4, + FES0_TXPKT_TXPAUSE = 0x8, + FES0_TSF_STABLE = 0x10, + FES0_TXSM_STABLE = 0x20, + FES0_RPWM_STABLE = 0x40, + FES0_C2H_TIMEOUT_ERR = 0x80, +}; + +enum _TRPC_ //: __int32 +{ + TPRC_ISSUENULLDATA_1 = 0x26, + TPRC_ISSUENULLDATA_2 = 0x27, + TPRC_PSS2TS3 = 0x2B, + TPRC_PSS0TS1 = 0x2C, + TPRC_PSS2TS4 = 0x2D, + TPRC_PSS2TS5 = 0x2E, + TPRC_PSS0TS6 = 0x2F, +}; + +enum _PS_MODE_SETTING_SELECTION_ // : __int32 +{ + MODE_SETTING_ACTIVE = 0x0, + MODE_SETTING_LEGACY = 0x1, + MODE_SETTING_WMMPS = 0x2, + MODE_SETTING_TDMA = 0x3, +}; + +enum _RxListenBeaconMode_ // : __int32 +{ + RLBM_MIN = 0x0, + RLBM_MAX = 0x1, + RLBM_SELF_DEFINED = 0x2, +}; + +enum _SMART_PS_MODE_FOR_LEGACY_ // : __int32 +{ + SMART_PS_MODE_LEGACY_PWR1 = 0x0, + SMART_PS_MODE_TX_PWR0 = 0x1, + SMART_PS_MODE_TRX_PWR0 = 0x2, +}; + +enum $BFA04BDFA6C0C275C890D1E658AFCEEF // : __int32 +{ + ROM_E_RTW_MSGP_PWR_INDEX_1 = 0x0, + ROM_E_RTW_MSGP_PWR_INDEX_2 = 0x1, + ROM_E_RTW_MSGP_RX_INFO_1 = 0x2, + ROM_E_RTW_MSGP_RX_INFO_2 = 0x3, + ROM_E_RTW_MSGP_RX_INFO_3 = 0x4, + ROM_E_RTW_MSGP_RX_INFO_4 = 0x5, + ROM_E_RTW_MSGP_TX_RATE_1 = 0x6, + ROM_E_RTW_MSGP_TX_RATE_2 = 0x7, + ROM_E_RTW_MSGP_DM_RA_1 = 0x8, + ROM_E_RTW_MSGP_DM_RA_2 = 0x9, + ROM_E_RTW_MSGP_DM_RA_3 = 0xA, + ROM_E_RTW_MSGP_DM_RA_4 = 0xB, + ROM_E_RTW_MSGP_DM_DIG_1 = 0xC, + ROM_E_RTW_MSGP_PWR_TRACKING_1 = 0xD, + ROM_E_RTW_MSGP_PWR_TRACKING_2 = 0xE, + ROM_E_RTW_MSGP_PWR_TRACKING_3 = 0xF, + ROM_E_RTW_MSGP_PWR_TRACKING_4 = 0x10, + ROM_E_RTW_MSGP_PWR_TRACKING_5 = 0x11, + ROM_E_RTW_MSGP_PWR_TRACKING_6 = 0x12, + ROM_E_RTW_MSGP_PWR_TRACKING_7 = 0x13, + ROM_E_RTW_MSGP_RF_IQK_1 = 0x14, + ROM_E_RTW_MSGP_RF_IQK_2 = 0x15, + ROM_E_RTW_MSGP_RF_IQK_3 = 0x16, + ROM_E_RTW_MSGP_RF_IQK_4 = 0x17, + ROM_E_RTW_MSGP_RF_IQK_5 = 0x18, + ROM_E_RTW_MSGP_DM_ADAPTIVITY_1 = 0x19, + ROM_E_RTW_MSGP_DM_ADAPTIVITY_2 = 0x1A, + ROM_E_RTW_MSGP_DM_ADAPTIVITY_3 = 0x1B, + ROM_E_RTW_MSGP_DM_ANT_DIV_1 = 0x1C, + ROM_E_RTW_MSGP_DM_ANT_DIV_2 = 0x1D, + ROM_E_RTW_MSGP_DM_ANT_DIV_3 = 0x1E, + ROM_E_RTW_MSGP_DM_ANT_DIV_4 = 0x1F, + ROM_E_RTW_MSGP_DM_ANT_DIV_5 = 0x20, + ROM_E_RTW_MSGP_MAC_REG_DUMP_1 = 0x21, + ROM_E_RTW_MSGP_BB_REG_DUMP_1 = 0x22, + ROM_E_RTW_MSGP_RF_REG_DUMP_1 = 0x23, + ROM_E_RTW_MSGP_RF_REG_DUMP_2 = 0x24, + ROM_E_RTW_MSGP_REG_DUMP_1 = 0x25, + ROM_E_RTW_MSGP_REG_DUMP_2 = 0x26, + ROM_E_RTW_MSGP_REG_DUMP_3 = 0x27, + ROM_E_RTW_MSGP_READ_REG_1 = 0x28, + ROM_E_RTW_MSGP_READ_REG_2 = 0x29, + ROM_E_RTW_MSGP_READ_REG_3 = 0x2A, + ROM_E_RTW_MSGP_WRITE_REG_1 = 0x2B, + ROM_E_RTW_MSGP_WRITE_REG_2 = 0x2C, + ROM_E_RTW_MSGP_WRITE_REG_3 = 0x2D, + ROM_E_RTW_MSGP_READ_BB_1 = 0x2E, + ROM_E_RTW_MSGP_WRITE_BB_1 = 0x2F, + ROM_E_RTW_MSGP_READ_RF_1 = 0x30, + ROM_E_RTW_MSGP_WRITE_RF_1 = 0x31, + ROM_E_RTW_MSGP_READ_SYS_1 = 0x32, + ROM_E_RTW_MSGP_WRITE_SYS_1 = 0x33, + ROM_E_RTW_MSGP_FIX_CHANNEL_1 = 0x34, + ROM_E_RTW_MSGP_FIX_CHANNEL_2 = 0x35, + ROM_E_RTW_MSGP_PWR_SAVE_MODE_1 = 0x36, + ROM_E_RTW_MSGP_FIX_RATE_1 = 0x37, + ROM_E_RTW_MSGP_GET_ODM_DBG_FLAG_1 = 0x38, + ROM_E_RTW_MSGP_SET_ODM_DBG_FLAG_1 = 0x39, + ROM_E_RTW_MSGP_DUMP_PWR_IDX_1 = 0x3A, + ROM_E_RTW_MSGP_DUMP_INFO_1 = 0x3B, + ROM_E_RTW_MSGP_DUMP_INFO_2 = 0x3C, + ROM_E_RTW_MSGP_DUMP_INFO_3 = 0x3D, + ROM_E_RTW_MSGP_DUMP_INFO_4 = 0x3E, + ROM_E_RTW_MSGP_DUMP_INFO_5 = 0x3F, + ROM_E_RTW_MSGP_DUMP_INFO_6 = 0x40, + ROM_E_RTW_MSGP_DUMP_INFO_7 = 0x41, + ROM_E_RTW_MSGP_DUMP_INFO_8 = 0x42, + ROM_E_RTW_MSGP_DUMP_INFO_9 = 0x43, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_1 = 0x44, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_2 = 0x45, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_3 = 0x46, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_4 = 0x47, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_5 = 0x48, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_6 = 0x49, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_7 = 0x4A, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_8 = 0x4B, + ROM_E_RTW_MSGP_DM_FUNC_FLAG_9 = 0x4C, + ROM_E_RTW_MSGP_RX_MPDU_1 = 0x4D, + ROM_E_RTW_MSGP_AP_TIMEOUT_CHK_1 = 0x4E, + ROM_E_RTW_MSGP_INIT_DRV_SW_1 = 0x4F, + ROM_E_RTW_MSGP_SET_BSSID_1 = 0x50, + ROM_E_RTW_MSGP_SET_SSID_1 = 0x51, + ROM_E_RTW_MSGP_ON_BEACON_1 = 0x52, + ROM_E_RTW_MSGP_ON_AUTH_1 = 0x53, + ROM_E_RTW_MSGP_ON_AUTH_2 = 0x54, + ROM_E_RTW_MSGP_ON_AUTH_CLIENT_1 = 0x55, + ROM_E_RTW_MSGP_ON_ASSOC_REQ_1 = 0x56, + ROM_E_RTW_MSGP_ON_ASSOC_RSP_1 = 0x57, + ROM_E_RTW_MSGP_ON_DE_AUTH_1 = 0x58, + ROM_E_RTW_MSGP_ON_DE_AUTH_2 = 0x59, + ROM_E_RTW_MSGP_ON_DISASSOC_1 = 0x5A, + ROM_E_RTW_MSGP_ON_DISASSOC_2 = 0x5B, + ROM_E_RTW_MSGP_ISSUE_BEACON_1 = 0x5C, + ROM_E_RTW_MSGP_ISSUE_PROBERSP_1 = 0x5D, + ROM_E_RTW_MSGP_ISSUE_PROBEREQ_1 = 0x5E, + ROM_E_RTW_MSGP_ISSUE_AUTH_1 = 0x5F, + ROM_E_RTW_MSGP_ISSUE_ASSOCRSP_1 = 0x60, + ROM_E_RTW_MSGP_ISSUE_ASSOCREQ_1 = 0x61, + ROM_E_RTW_MSGP_ISSUE_NULLDATA_1 = 0x62, + ROM_E_RTW_MSGP_ISSUE_QOS_NULLDATA_1 = 0x63, + ROM_E_RTW_MSGP_ISSUE_DEAUTH_1 = 0x64, + ROM_E_RTW_MSGP_ISSUE_ACTION_BA_1 = 0x65, + ROM_E_RTW_MSGP_ISSUE_BSS_COEXIST_1 = 0x66, + ROM_E_RTW_MSGP_START_CLNT_AUTH_1 = 0x67, + ROM_E_RTW_MSGP_LINKED_STATUS_CHK_1 = 0x68, + ROM_E_RTW_MSGP_SETKEY_HDL_1 = 0x69, + ROM_E_RTW_MSGP_SET_STAKEY_HDL_1 = 0x6A, + ROM_E_RTW_MSGP_SET_STAKEY_HDL_2 = 0x6B, + ROM_E_RTW_MSGP_P2P_BUILD_MGNT_FRAME_1 = 0x6C, + ROM_E_RTW_MSGP_SEND_EAPOL_1 = 0x6D, + ROM_E_RTW_MSGP_SEND_EAPOL_2 = 0x6E, + ROM_E_RTW_MSGP_SEND_EAPOL_3 = 0x6F, + ROM_E_RTW_MSGP_EAPOL_KEY_RECVD_1 = 0x70, + ROM_E_RTW_MSGP_EAPOL_KEY_RECVD_2 = 0x71, + ROM_E_RTW_MSGP_EAPOL_KEY_RECVD_3 = 0x72, + ROM_E_RTW_MSGP_FREE_RECVFRAME_1 = 0x73, + ROM_E_RTW_MSGP_VAR_PORT_SWITCH_1 = 0x74, + ROM_E_RTW_MSGP_VAR_PORT_SWITCH_2 = 0x75, + ROM_E_RTW_MSGP_DOWN_SEMA_1 = 0x76, + ROM_E_RTW_MSGP_MAX = 0x77 +}; + +struct __attribute__((aligned(4))) _PS_PARM_ +{ + uint8_t Enter32KHzPermission; + uint8_t bAllQueueUAPSD; + uint8_t ps_dtim_flag; + uint8_t pstrx_rxcnt_period; + uint8_t NoConnect32k; + uint8_t ack_last_rpwm; + uint8_t TxNull0; + uint8_t TxNull1; + uint8_t TxNull0ok; + uint8_t TxNull1ok; + uint8_t RfOffLicenseForBCNRx; + uint8_t BCNAggEn; + uint8_t IsGoingTo32K; + uint8_t bMaxTrackingBcnMode; + uint8_t BcnTraceDone; + unsigned __int8 smart_ps : 4; + unsigned __int8 RLBM : 4; + uint8_t AwakeInterval; + uint8_t ps_mode; + uint8_t ClkRequestEnable; + uint8_t last_rpwm; + uint8_t current_ps_state; + uint8_t ps_data_open; + uint8_t ps_bcn_pass_time; + uint8_t ps_dtim_period; + uint8_t ps_dtim_cnt; + uint8_t ps_bcn_to; + uint8_t bcn_to_cnt; + uint8_t bcn_to_times_cnt; + uint8_t min_rate_in_rrsr; + uint16_t ps_drv_early_itv; + uint32_t null1_ok_cnt; + uint8_t SlotPeriod; + uint8_t FirstOnPeriod; + uint8_t SecondOnPeriod; + uint8_t ThirdOnPeriod; + uint8_t CurrentSlot; + BOOLEAN TDMAOnPeriod; +}; +typedef struct _PS_PARM_ PS_PARM; +typedef struct _PS_PARM_ *PPS_PARM; + +struct _LEGACY_PS_PPARM_ +{ + unsigned __int8 ps_mode : 7; + unsigned __int8 ClkRequestEnable : 1; + unsigned __int8 RLBM : 4; + unsigned __int8 smart_ps : 4; + uint8_t AwakeInterval; + unsigned __int8 bAllQueueUAPSD : 1; + unsigned __int8 bMaxTrackingBcnMode : 1; + unsigned __int8 rsvd : 6; + uint8_t PwrState; + unsigned __int8 LowPwrRxBCN : 1; + unsigned __int8 AntAutoSwitch : 1; + unsigned __int8 PSAllowBTHighPri : 1; + unsigned __int8 ProtectBCN : 1; + unsigned __int8 SilencePeriod : 1; + unsigned __int8 FastBTConnect : 1; + unsigned __int8 TwoAntennaEn : 1; + unsigned __int8 rsvd2 : 1; + unsigned __int8 AdoptUserSetting : 1; + unsigned __int8 DrvBcnEarlyShift : 3; + unsigned __int8 DrvBcnTimeOut : 4; + uint8_t SlotPeriod; + uint8_t FirstOnPeriod; + uint8_t SecondOnPeriod; + uint8_t ThirdOnPeriod; +}; +typedef struct _LEGACY_PS_PPARM_ LEGACY_PS_PARM; +typedef struct _LEGACY_PS_PPARM_ *PLEGACY_PS_PARM; + +struct _H2CParam_SetPwrMode_parm_ +{ + LEGACY_PS_PARM PwrModeParm; +}; +typedef struct _H2CParam_SetPwrMode_parm_ *PH2CParam_PwrMode; + +struct atomic_t +{ + volatile int counter; +}; + +/* +// dlist.h +struct list_head +{ + _list *next; + _list *prev; +}; + +// freertos_service.h +struct __queue +{ + _list queue; + _lock lock; +}; +*/ + +struct iw_request_info +{ + uint16_t cmd; + uint16_t flags; +}; + +typedef int (*iw_handler)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *); + + +struct _NDIS_802_11_SSID +{ + uint32_t SsidLength; + uint8_t Ssid[36]; +}; + +typedef struct _NDIS_802_11_SSID NDIS_802_11_SSID; +typedef unsigned __int8 NDIS_802_11_MAC_ADDRESS[6]; +typedef int NDIS_802_11_RSSI; + +enum _NDIS_802_11_NETWORK_TYPE //__int32 +{ + Ndis802_11FH = 0x0, + Ndis802_11DS = 0x1, + Ndis802_11OFDM5 = 0x2, + Ndis802_11OFDM24 = 0x3, + Ndis802_11NetworkTypeMax = 0x4, +}; +typedef enum _NDIS_802_11_NETWORK_TYPE NDIS_802_11_NETWORK_TYPE; + +struct _NDIS_802_11_CONFIGURATION_FH +{ + uint32_t Length; + uint32_t HopPattern; + uint32_t HopSet; + uint32_t DwellTime; +}; +typedef struct _NDIS_802_11_CONFIGURATION_FH NDIS_802_11_CONFIGURATION_FH; + +struct _NDIS_802_11_CONFIGURATION +{ + uint32_t Length; + uint32_t BeaconPeriod; + uint32_t ATIMWindow; + uint32_t DSConfig; + NDIS_802_11_CONFIGURATION_FH FHConfig; +}; +typedef struct _NDIS_802_11_CONFIGURATION NDIS_802_11_CONFIGURATION; + +enum _NDIS_802_11_NETWORK_INFRASTRUCTURE // : __int32 +{ + Ndis802_11IBSS = 0x0, + Ndis802_11Infrastructure = 0x1, + Ndis802_11AutoUnknown = 0x2, + Ndis802_11InfrastructureMax = 0x3, + Ndis802_11APMode = 0x4, +}; +typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE NDIS_802_11_NETWORK_INFRASTRUCTURE; + +typedef unsigned __int8 NDIS_802_11_RATES_EX[16]; + +struct _WLAN_PHY_INFO +{ + uint8_t SignalStrength; + uint8_t SignalQuality; + uint8_t Optimum_antenna; + uint8_t Reserved_0; +}; +typedef struct _WLAN_PHY_INFO WLAN_PHY_INFO; + +struct _WLAN_BSSID_EX +{ + uint32_t Length; + NDIS_802_11_MAC_ADDRESS MacAddress; + uint8_t Reserved[2]; + NDIS_802_11_SSID Ssid; + uint32_t Privacy; + NDIS_802_11_RSSI Rssi; + NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; + NDIS_802_11_CONFIGURATION Configuration; + NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; + NDIS_802_11_RATES_EX SupportedRates; + WLAN_PHY_INFO PhyInfo; + uint32_t IELength; + uint8_t IEs[768]; +}; +typedef struct _WLAN_BSSID_EX WLAN_BSSID_EX; + +struct __attribute__((aligned(2))) _WLAN_BCN_INFO +{ + uint8_t encryp_protocol; + int group_cipher; + int pairwise_cipher; + int is_8021x; + unsigned __int16 ht_cap_info; + unsigned __int8 ht_info_infos_0; +}; +typedef struct _WLAN_BCN_INFO WLAN_BCN_INFO; + +struct wlan_network +{ + _list list; + int network_type; + int fixed; + unsigned int last_scanned; + int aid; + int join_res; + WLAN_BSSID_EX network; + WLAN_BCN_INFO BcnInfo; +}; + +/* osdep_service.h +typedef void *_timerHandle; + +struct timer_list +{ + _timerHandle timer_hdl; + unsigned int data; + void (*function)(void *); +}; + +typedef struct timer_list _timer; +*/ + +struct qos_priv +{ + uint32_t qos_option; +}; + +struct __attribute__((packed)) __attribute__((aligned(2))) rtw_ieee80211_ht_cap +{ + unsigned __int16 cap_info; + unsigned __int8 ampdu_params_info; + unsigned __int8 supp_mcs_set[16]; + unsigned __int16 extended_ht_cap_info; + unsigned int tx_BF_cap_info; + unsigned __int8 antenna_selection_info; +}; + +struct ht_priv +{ + uint32_t ht_option; + uint32_t ampdu_enable; + uint8_t bwmode; + uint8_t ch_offset; + uint8_t sgi; + uint8_t agg_enable_bitmap; + uint8_t candidate_tid_bitmap; + uint8_t stbc_cap; + struct rtw_ieee80211_ht_cap ht_cap; +}; + +struct __attribute__((aligned(4))) _RT_LINK_DETECT_T +{ + uint32_t NumTxOkInPeriod; + uint32_t NumRxOkInPeriod; + uint32_t NumRxUnicastOkInPeriod; + BOOLEAN bBusyTraffic; + BOOLEAN bTxBusyTraffic; + BOOLEAN bRxBusyTraffic; + BOOLEAN bHigherBusyTraffic; + BOOLEAN bHigherBusyRxTraffic; + BOOLEAN bHigherBusyTxTraffic; +}; +typedef struct _RT_LINK_DETECT_T RT_LINK_DETECT_T; + +enum _RT_SCAN_TYPE //: __int32 +{ + SCAN_PASSIVE = 0x0, + SCAN_ACTIVE = 0x1, + SCAN_MIX = 0x2, +}; +typedef enum _RT_SCAN_TYPE RT_SCAN_TYPE; + +struct mlme_priv +{ + _lock lock; + sint fw_state; + uint8_t bScanInProcess; + uint8_t to_join; + uint8_t *nic_hdl; + _list *pscanned; + _queue free_bss_pool; + _queue scanned_queue; + uint8_t *free_bss_buf; + uint16_t num_of_scanned; + uint8_t *scan_buf; + uint32_t scan_buf_len; + uint16_t scan_cnt; + uint16_t scan_type; + NDIS_802_11_SSID assoc_ssid; + uint8_t assoc_bssid[6]; + struct wlan_network cur_network; + uint32_t scan_interval; + _timer assoc_timer; + uint8_t assoc_by_bssid; + uint8_t assoc_by_rssi; + _timer scan_to_timer; + uint32_t scan_start_time; + struct qos_priv qospriv; + uint16_t num_sta_no_ht; + uint16_t num_FortyMHzIntolerant; + struct ht_priv htpriv; + RT_LINK_DETECT_T LinkDetectInfo; + _timer dynamic_chk_timer; + uint8_t key_mask; + uint8_t acm_mask; + uint8_t ChannelPlan; + RT_SCAN_TYPE scan_mode; + uint8_t *wps_probe_req_ie; + uint32_t wps_probe_req_ie_len; + uint8_t *wps_assoc_req_ie; + uint32_t wps_assoc_req_ie_len; + uint16_t num_sta_non_erp; + uint16_t num_sta_no_short_slot_time; + uint16_t num_sta_no_short_preamble; + uint16_t num_sta_ht_no_gf; + uint16_t num_sta_ht_20mhz; + uint8_t olbc_ht; + uint16_t ht_op_mode; + uint8_t *wps_beacon_ie; + uint8_t *wps_probe_resp_ie; + uint8_t *wps_assoc_resp_ie; + uint32_t wps_beacon_ie_len; + uint32_t wps_probe_resp_ie_len; + uint32_t wps_assoc_resp_ie_len; + _lock bcn_update_lock; + uint8_t update_bcn; + uint8_t scanning_via_buddy_intf; + union recv_frame *p_copy_recv_frame; +}; + +struct __attribute__((aligned(4))) _RT_CHANNEL_INFO +{ + uint8_t ChannelNum; + RT_SCAN_TYPE ScanType; + uint8_t pscan_config; +}; +typedef struct _RT_CHANNEL_INFO RT_CHANNEL_INFO; + +struct ss_res +{ + int state; + int bss_cnt; + int channel_idx; + int scan_mode; + NDIS_802_11_SSID ssid[1]; +}; + +struct __attribute__((packed)) __attribute__((aligned(1))) ADDBA_request +{ + unsigned __int8 dialog_token; + unsigned __int16 BA_para_set; + unsigned __int16 BA_timeout_value; + unsigned __int16 BA_starting_seqctrl; +}; + +struct AC_param +{ + unsigned __int8 ACI_AIFSN; + unsigned __int8 CW; + unsigned __int16 TXOP_limit; +}; + +struct WMM_para_element +{ + unsigned __int8 QoS_info; + unsigned __int8 reserved; + struct AC_param ac_param[4]; +}; + +struct __attribute__((aligned(4))) $FE810F6EACF8FAA6CBF1198AEAF43F3A +{ + unsigned __int16 HT_caps_info; + unsigned __int8 AMPDU_para; + unsigned __int8 MCS_rate[16]; + unsigned __int16 HT_ext_caps; + unsigned int Beamforming_caps; + unsigned __int8 ASEL_caps; +}; + +union $4DB0E692E0E1D0D49E1F34B7B8486D8E +{ + struct $FE810F6EACF8FAA6CBF1198AEAF43F3A HT_cap_element; + unsigned __int8 HT_cap[26]; +}; + +struct HT_caps_element +{ + union $4DB0E692E0E1D0D49E1F34B7B8486D8E u; +}; + +struct HT_info_element +{ + unsigned __int8 primary_channel; + unsigned __int8 infos[5]; + unsigned __int8 MCS_rate[16]; +}; + +struct FW_Sta_Info +{ + struct sta_info *psta; + uint32_t status; + uint32_t rx_pkt; + uint32_t retry; + NDIS_802_11_RATES_EX SupportedRates; +}; + +struct mlme_ext_info +{ + uint32_t state; + uint32_t reauth_count; + uint32_t reassoc_count; + uint32_t link_count; + uint32_t auth_seq; + uint32_t auth_algo; + uint32_t authModeToggle; + uint32_t enc_algo; + uint32_t key_index; + uint32_t iv; + uint8_t chg_txt[128]; + uint16_t aid; + uint16_t bcn_interval; + uint16_t capability; + uint8_t assoc_AP_vendor; + uint8_t slotTime; + uint8_t preamble_mode; + uint8_t WMM_enable; + uint8_t ERP_enable; + uint8_t ERP_IE; + uint8_t HT_enable; + uint8_t HT_caps_enable; + uint8_t HT_info_enable; + uint8_t HT_protection; + uint8_t turboMode_cts2self; + uint8_t turboMode_rtsen; + uint8_t SM_PS; + uint8_t agg_enable_bitmap; + uint8_t ADDBA_retry_count; + uint8_t candidate_tid_bitmap; + uint8_t dialogToken; + uint8_t bwmode_updated; + uint8_t hidden_ssid_mode; + struct ADDBA_request ADDBA_req; + struct WMM_para_element WMM_param; + struct __attribute__((packed)) __attribute__((aligned(1))) HT_caps_element HT_caps; + struct HT_info_element HT_info; + struct FW_Sta_Info FW_sta_info[5]; +}; + +typedef struct _cus_ie *p_cus_ie; + +struct __attribute__((aligned(2))) mlme_ext_priv +{ + _adapter *padapter; + uint8_t mlmeext_init; + struct atomic_t event_seq; + uint16_t mgnt_seq; + uint8_t cur_channel; + uint8_t cur_bwmode; + uint8_t cur_ch_offset; + uint8_t cur_wireless_mode; + uint8_t max_chan_nums; + RT_CHANNEL_INFO channel_set[14]; + uint8_t basicrate[13]; + uint8_t datarate[13]; + struct ss_res sitesurvey_res; + struct mlme_ext_info mlmext_info; + _timer survey_timer; + _timer link_timer; + uint16_t chan_scan_time; + uint8_t scan_abort; + uint8_t tx_rate; + uint8_t retry; + uint64_t TSFValue; + unsigned __int8 bstart_bss; + uint16_t action_public_rxseq; + _timer reconnect_timer; + uint8_t reconnect_deauth_filtered; + uint8_t reconnect_times; + uint8_t reconnect_cnt; + uint16_t reconnect_timeout; + uint8_t saved_alg; + uint8_t saved_essid[33]; + uint8_t saved_key[32]; + uint16_t saved_key_len; + uint8_t saved_key_idx; + uint8_t saved_wpa_passphrase[65]; + uint8_t saved_eap_method; + uint8_t auto_reconnect; + uint8_t partial_scan; + p_cus_ie cus_ven_ie; + uint8_t ie_num; + uint8_t bChDeauthDisabled; + uint8_t bConcurrentFlushingSTA; +}; + +struct cmd_priv +{ + _queue cmd_queue; + uint8_t cmdthd_running; + _adapter *padapter; +}; + +struct evt_priv +{ + struct atomic_t event_seq; + uint8_t *evt_buf; + uint8_t *evt_allocated_buf; + uint32_t evt_done_cnt; +}; + +struct _io_ops +{ + int (*init_io_priv)(struct dvobj_priv *); + int (*write8_endian)(struct dvobj_priv *, uint32_t, uint32_t, uint32_t); + uint8_t (*_read8)(struct dvobj_priv *, uint32_t, int32_t *); + uint16_t (*_read16)(struct dvobj_priv *, uint32_t, int32_t *); + uint32_t (*_read32)(struct dvobj_priv *, uint32_t, int32_t *); + int32_t (*_write8)(struct dvobj_priv *, uint32_t, uint8_t, int32_t *); + int32_t (*_write16)(struct dvobj_priv *, uint32_t, uint16_t, int32_t *); + int32_t (*_write32)(struct dvobj_priv *, uint32_t, uint32_t, int32_t *); + int (*read_rx_fifo)(struct dvobj_priv *, uint32_t, uint8_t *, uint32_t, struct fifo_more_data *); + int (*write_tx_fifo)(struct dvobj_priv *, uint32_t, uint8_t *, uint32_t); +}; + +struct io_priv +{ + struct _io_ops io_ops; +}; + +struct rtw_tx_ring +{ + struct tx_buf_desc *desc; + dma_addr_t dma; + unsigned int idx; + unsigned int entries; + _queue queue; + uint32_t qlen; +}; + +struct __attribute__((aligned(8))) xmit_priv +{ + _lock lock; + _queue be_pending; + _queue bk_pending; + _queue vi_pending; + _queue vo_pending; + _queue bm_pending; + uint8_t *pallocated_frame_buf; + uint8_t *pxmit_frame_buf; + unsigned int free_xmitframe_cnt; + _queue free_xmit_queue; + _adapter *adapter; + uint8_t vcs_setting; + uint8_t vcs; + uint8_t vcs_type; + uint64_t tx_bytes; + uint64_t tx_pkts; + uint64_t tx_drop; + uint64_t last_tx_bytes; + uint64_t last_tx_pkts; + struct hw_xmit *hwxmits; + uint8_t hwxmit_entry; + struct rtw_tx_ring tx_ring[8]; + int txringcount[8]; + uint8_t beaconDMAing; + _queue free_xmitbuf_queue; + _queue pending_xmitbuf_queue; + uint8_t *pallocated_xmitbuf; + uint8_t *pxmitbuf; + unsigned int free_xmitbuf_cnt; + _queue free_xmit_extbuf_queue; + uint8_t *pallocated_xmit_extbuf; + uint8_t *pxmit_extbuf; + unsigned int free_xmit_extbuf_cnt; + uint16_t nqos_ssn; +}; + +struct rtw_rx_ring +{ + struct recv_buf_stat *desc; + dma_addr_t dma; + unsigned int idx; + struct sk_buff *rx_buf[4]; +}; + +struct signal_stat +{ + uint8_t update_req; + uint8_t avg_val; + uint32_t total_num; + uint32_t total_val; +}; + +struct __attribute__((aligned(8))) recv_priv +{ + _lock lock; + _queue free_recv_queue; + _queue recv_pending_queue; + _queue uc_swdec_pending_queue; + uint8_t *pallocated_frame_buf; + uint8_t *precv_frame_buf; + unsigned int free_recvframe_cnt; + _adapter *adapter; + uint32_t bIsAnyNonBEPkts; + uint64_t rx_bytes; + uint64_t rx_pkts; + uint64_t rx_drop; + uint64_t rx_overflow; + uint64_t last_rx_bytes; + unsigned int rx_icv_err; + unsigned int rx_largepacket_crcerr; + unsigned int rx_smallpacket_crcerr; + unsigned int rx_middlepacket_crcerr; + uint8_t *pallocated_recv_buf; + uint8_t *precv_buf; + _queue free_recv_buf_queue; + uint32_t free_recv_buf_queue_cnt; + struct rtw_rx_ring rx_ring[1]; + int rxringcount; + uint16_t rxbuffersize; + uint8_t is_signal_dbg; + uint8_t signal_strength_dbg; + int8_t rssi; + int8_t rxpwdb; + uint8_t signal_strength; + uint8_t signal_qual; + uint8_t noise; + int RxSNRdB[2]; + int8_t RxRssi[2]; + int FalseAlmCnt_all; + _timer signal_stat_timer; + uint32_t signal_stat_sampling_interval; + struct signal_stat signal_qual_data; + struct signal_stat signal_strength_data; + uint8_t promisc_enabled; + uint8_t promisc_len_used; + _list promisc_list; + _lock promisc_lock; + uint32_t promisc_bk_rcr; + uint16_t promisc_bk_rxfltmap2; + uint8_t promisc_mgntframe_enabled; +}; + +struct __attribute__((aligned(4))) sta_priv +{ + uint8_t *pallocated_stainfo_buf; + uint32_t allocated_stainfo_size; + uint8_t *pstainfo_buf; + _queue free_sta_queue; + _lock sta_hash_lock; + _list sta_hash[5]; + int asoc_sta_count; + _queue sleep_q; + _queue wakeup_q; + _adapter *padapter; + _list asoc_list; + _list auth_list; + _lock asoc_list_lock; + _lock auth_list_lock; + unsigned int auth_to; + unsigned int assoc_to; + unsigned int expire_to; + struct sta_info *sta_aid[5]; + uint16_t sta_dz_bitmap; + uint16_t tim_bitmap; + uint16_t max_num_sta; +}; + +union Keytype +{ + uint8_t skey[16]; + uint32_t lkey[4]; +}; + +struct $7EAAF07643C317F97751F130E632CB13 +{ + uint8_t TSC0; + uint8_t TSC1; + uint8_t TSC2; + uint8_t TSC3; + uint8_t TSC4; + uint8_t TSC5; + uint8_t TSC6; + uint8_t TSC7; +}; + +union pn48 +{ + uint64_t val; + struct $7EAAF07643C317F97751F130E632CB13 _byte_; +}; + +struct _NDIS_802_11_WEP +{ + uint32_t Length; + uint32_t KeyIndex; + uint32_t KeyLength; + uint8_t KeyMaterial[16]; +}; +typedef struct _NDIS_802_11_WEP NDIS_802_11_WEP; + +struct $D75518714447A990003EBC933C23F70E +{ + unsigned int HighPart; + unsigned int LowPart; +}; + +union _LARGE_INTEGER +{ + unsigned __int8 charData[8]; + struct $D75518714447A990003EBC933C23F70E field; +}; +typedef union _LARGE_INTEGER LARGE_INTEGER; + +struct $121C25F90E4E195D1524BBC5399ADEBE +{ + LARGE_INTEGER HighPart; + LARGE_INTEGER LowPart; +}; + +union _OCTET16_INTEGER +{ + unsigned __int8 charData[16]; + struct $121C25F90E4E195D1524BBC5399ADEBE field; +}; +typedef union _OCTET16_INTEGER OCTET16_INTEGER; + +struct $BB6DA6E37D48DEE353E02A8C8F92DDF7 +{ + OCTET16_INTEGER HighPart; + OCTET16_INTEGER LowPart; +}; + +union _OCTET32_INTEGER +{ + unsigned __int8 charData[32]; + struct $BB6DA6E37D48DEE353E02A8C8F92DDF7 field; +}; +typedef union _OCTET32_INTEGER OCTET32_INTEGER; + +struct _OCTET_STRING +{ + unsigned __int8 *Octet; + int Length; +}; +typedef struct _OCTET_STRING OCTET_STRING; + +struct _wpa_global_info +{ + OCTET32_INTEGER Counter; + int GTKAuthenticator; + int GKeyDoneStations; + int GInitAKeys; + int GUpdateStationKeys; + int GkeyReady; + OCTET_STRING AuthInfoElement; + unsigned __int8 AuthInfoBuf[128]; + unsigned __int8 MulticastCipher; + OCTET_STRING GNonce; + unsigned __int8 GNonceBuf[32]; + unsigned __int8 GTK[4][32]; + unsigned __int8 GMK[32]; + int GN; + int GM; + int GTKRekey; +}; +typedef struct _wpa_global_info WPA_GLOBAL_INFO; + +typedef struct _wpa_sta_info WPA_STA_INFO; + +struct __attribute__((aligned(4))) security_priv +{ + uint32_t dot11AuthAlgrthm; + uint32_t dot11PrivacyAlgrthm; + uint32_t dot11PrivacyKeyIndex; + union Keytype dot11DefKey[4]; + uint32_t dot11DefKeylen[4]; + uint32_t dot118021XGrpPrivacy; + uint32_t dot118021XGrpKeyid; + union Keytype dot118021XGrpKey[4]; + union Keytype dot118021XGrptxmickey[4]; + union Keytype dot118021XGrprxmickey[4]; + union pn48 dot11Grptxpn; + union pn48 dot11Grprxpn; + unsigned int dot8021xalg; + unsigned int wpa_psk; + unsigned int wpa_group_cipher; + unsigned int wpa2_group_cipher; + unsigned int wpa_pairwise_cipher; + unsigned int wpa2_pairwise_cipher; + uint8_t wps_ie[512]; + int wps_ie_len; + uint8_t binstallGrpkey; + uint8_t busetkipkey; + uint8_t bcheck_grpkey; + uint8_t bgrpkey_handshake; + int32_t sw_encrypt; + int32_t sw_decrypt; + int32_t hw_decrypted; + uint32_t ndisauthtype; + uint32_t ndisencryptstatus; + NDIS_802_11_WEP ndiswep; + uint8_t supplicant_ie[256]; + uint32_t last_mic_err_time; + uint8_t btkip_countermeasure; + uint8_t btkip_wait_report; + uint32_t btkip_countermeasure_time; + WPA_GLOBAL_INFO wpa_global_info; + uint8_t *palloc_wpastainfo_buf; + uint32_t alloc_wpastainfo_size; + WPA_STA_INFO *wpa_sta_info[3]; + uint8_t wpa_passphrase[65]; + uint8_t wps_phase; +}; + +struct __attribute__((aligned(4))) registry_priv +{ + uint8_t chip_version; + uint8_t hci; + NDIS_802_11_SSID ssid; + uint8_t channel; + uint8_t wireless_mode; + uint8_t scan_mode; + uint8_t vrtl_carrier_sense; + uint8_t vcs_type; + uint16_t rts_thresh; + uint8_t soft_ap; + uint8_t power_mgnt; + uint8_t ps_enable; + uint8_t ips_mode; + uint8_t smart_ps; + uint8_t mp_mode; + uint8_t software_encrypt; + uint8_t software_decrypt; + uint8_t acm_method; + uint8_t wmm_enable; + uint8_t uapsd_enable; + uint32_t beacon_period; + uint8_t ht_enable; + uint8_t ampdu_enable; + uint8_t rx_stbc; + uint8_t ampdu_amsdu; + uint8_t rf_config; + uint8_t power_percentage_idx; + uint8_t wifi_spec; + uint8_t channel_plan; + uint8_t ifname[16]; + uint8_t if2name[16]; + uint8_t RegEnableTxPowerLimit; + uint8_t RegEnableTxPowerByRate; + uint8_t RegEnableKFree; + uint8_t RegPowerBase; + uint8_t RegPwrTblSel; + uint8_t adaptivity_en; + uint8_t adaptivity_mode; + uint8_t adaptivity_dml; + uint8_t adaptivity_dc_backoff; + int8_t adaptivity_th_l2h_ini; +}; + +typedef void *_sema; + +typedef _sema _pwrlock; + +enum _rt_rf_power_state //: __int32 +{ + rf_on = 0x0, + rf_sleep = 0x1, + rf_off = 0x2, + rf_max = 0x3, +}; +typedef enum _rt_rf_power_state rt_rf_power_state; + +struct __attribute__((aligned(4))) pwrctrl_priv +{ + _pwrlock lock; + volatile uint8_t rpwm; + volatile uint8_t cpwm; + volatile uint8_t tog; + volatile uint8_t cpwm_tog; + uint8_t pwr_mode; + uint8_t smart_ps; + uint8_t bcn_ant_mode; + uint32_t alives; + uint64_t wowlan_fw_iv; + uint8_t bpower_saving; + uint8_t b_hw_radio_off; + uint8_t reg_rfoff; + uint8_t reg_pdnmode; + uint32_t rfoff_reason; + uint32_t cur_ps_level; + uint32_t reg_rfps_level; + uint8_t b_support_aspm; + uint8_t b_support_backdoor; + uint8_t const_amdpci_aspm; + unsigned int ips_enter_cnts; + unsigned int ips_leave_cnts; + uint8_t ps_enable; + uint8_t ips_mode; + uint8_t ips_org_mode; + uint8_t ips_mode_req; + unsigned int bips_processing; + uint32_t ips_deny_time; + uint8_t ps_processing; + uint8_t bLeisurePs; + uint8_t LpsIdleCount; + uint8_t power_mgnt; + uint8_t org_power_mgnt; + uint8_t bFwCurrentInPSMode; + uint32_t DelayLPSLastTimeStamp; + uint8_t btcoex_rfon; + int32_t pnp_current_pwr_state; + uint8_t pnp_bstop_trx; + uint8_t bInternalAutoSuspend; + uint8_t bInSuspend; + uint8_t bSupportRemoteWakeup; + _timer pwr_state_check_timer; + int pwr_state_check_interval; + uint8_t pwr_state_check_cnts; + int ps_flag; + rt_rf_power_state rf_pwrstate; + rt_rf_power_state change_rfpwrstate; + uint8_t wepkeymask; + uint8_t bHWPowerdown; + uint8_t bHWPwrPindetect; + uint8_t bkeepfwalive; + uint8_t brfoffbyhw; + unsigned int PS_BBRegBackup[4]; + uint8_t tdma_slot_period; + uint8_t tdma_rfon_period_len_1; + uint8_t tdma_rfon_period_len_2; + uint8_t tdma_rfon_period_len_3; + uint8_t lps_dtim; +}; + +struct __attribute__((aligned(2))) eeprom_priv +{ + uint8_t bautoload_fail_flag; + uint8_t mac_addr[6]; + uint16_t CustomerID; + uint8_t EepromOrEfuse; + uint8_t efuse_eeprom_data[512]; + uint8_t EEPROMRFGainOffset; + uint8_t EEPROMRFGainVal; +}; + +enum _CHANNEL_WIDTH // : __int32 +{ + CHANNEL_WIDTH_20 = 0x0, + CHANNEL_WIDTH_40 = 0x1, + CHANNEL_WIDTH_80 = 0x2, + CHANNEL_WIDTH_160 = 0x3, + CHANNEL_WIDTH_80_80 = 0x4, + CHANNEL_WIDTH_MAX = 0x5, +}; +typedef enum _CHANNEL_WIDTH CHANNEL_WIDTH; + +enum _HAL_DEF_VARIABLE // : __int32 +{ + HAL_DEF_UNDERCORATEDSMOOTHEDPWDB = 0x0, + HAL_DEF_IS_SUPPORT_ANT_DIV = 0x1, + HAL_DEF_CURRENT_ANTENNA = 0x2, + HAL_DEF_DRVINFO_SZ = 0x3, + HAL_DEF_MAX_RECVBUF_SZ = 0x4, + HAL_DEF_RX_PACKET_OFFSET = 0x5, + HAL_DEF_RX_DMA_SZ_WOW = 0x6, + HAL_DEF_RX_DMA_SZ = 0x7, + HAL_DEF_RX_PAGE_SIZE = 0x8, + HAL_DEF_DBG_DM_FUNC = 0x9, + HAL_DEF_RA_DECISION_RATE = 0xA, + HAL_DEF_RA_SGI = 0xB, + HAL_DEF_PT_PWR_STATUS = 0xC, + HW_VAR_MAX_RX_AMPDU_FACTOR = 0xD, + HW_DEF_RA_INFO_DUMP = 0xE, + HAL_DEF_DBG_DUMP_TXPKT = 0xF, + HW_DEF_ODM_DBG_FLAG = 0x10, + HW_DEF_ODM_DBG_LEVEL = 0x11, + HAL_DEF_TX_PAGE_SIZE = 0x12, + HAL_DEF_TX_PAGE_BOUNDARY = 0x13, + HAL_DEF_MACID_SLEEP = 0x14, + HAL_DEF_DBG_RX_INFO_DUMP = 0x15, +}; +typedef enum _HAL_DEF_VARIABLE HAL_DEF_VARIABLE; + +enum _HAL_ODM_VARIABLE // : __int32 +{ + HAL_ODM_STA_INFO = 0x0, + HAL_ODM_DBG_FLAG = 0x1, + HAL_ODM_RX_INFO_DUMP = 0x2, + HAL_ODM_NOISE_MONITOR = 0x3, + HAL_ODM_REGULATION = 0x4, +}; +typedef enum _HAL_ODM_VARIABLE HAL_ODM_VARIABLE; + + +typedef void *_thread_hdl_; + +/* +// osdep_service.h +struct task_struct +{ + const char *task_name; + _thread_hdl_ task; + _sema wakeup_sema; + _sema terminate_sema; + uint32_t blocked; + uint32_t callback_running; +}; +*/ + +typedef struct net_device *_nic_hdl; +/* +// wrapper.h +struct net_device_stats +{ + unsigned int rx_packets; + unsigned int tx_packets; + unsigned int rx_dropped; + unsigned int tx_dropped; + unsigned int rx_bytes; + unsigned int tx_bytes; + unsigned int rx_overflow; +}; +*/ + + +struct dvobj_priv +{ + void *if1; + void *if2; + void *padapters[2]; + uint8_t iface_nums; + uint8_t RtOutPipe[3]; + uint8_t Queue2Pipe[8]; + uint8_t irq_alloc; + uint8_t irq_enabled; + _lock irq_th_lock; +}; + +struct phy_info +{ + uint8_t RxPWDBAll; + uint8_t SignalQuality; + uint8_t RxMIMOSignalStrength[1]; + int8_t RecvSignalPower; + uint8_t SignalStrength; +}; + +struct __attribute__((aligned(4))) rx_pkt_attrib +{ + uint16_t pkt_len; + uint8_t physt; + uint8_t drvinfo_sz; + uint8_t shift_sz; + uint8_t hdrlen; + uint8_t to_fr_ds; + uint8_t amsdu; + uint8_t qos; + uint8_t priority; + uint8_t pw_save; + uint8_t mdata; + uint16_t seq_num; + uint8_t frag_num; + uint8_t mfrag; + uint8_t order; + uint8_t privacy; + uint8_t bdecrypted; + uint8_t encrypt; + uint8_t iv_len; + uint8_t icv_len; + uint8_t crc_err; + uint8_t icv_err; + uint16_t eth_type; + uint8_t dst[6]; + uint8_t src[6]; + uint8_t ta[6]; + uint8_t ra[6]; + uint8_t bssid[6]; + uint8_t ack_policy; + uint8_t tcpchk_valid; + uint8_t ip_chkrpt; + uint8_t tcp_chkrpt; + uint8_t key_index; + uint8_t mcs_rate; + uint8_t rxht; + uint8_t sgi; + uint8_t pkt_rpt_type; + uint32_t MacIDValidEntry[2]; + uint8_t data_rate; + struct phy_info phy_info; +}; + +struct recv_frame_hdr +{ + _list list; + struct sk_buff *pkt; + struct sk_buff *pkt_newalloc; + _adapter *adapter; + uint8_t fragcnt; + int frame_tag; + struct rx_pkt_attrib attrib; + unsigned int len; + uint8_t *rx_head; + uint8_t *rx_data; + uint8_t *rx_tail; + uint8_t *rx_end; + void *precvbuf; + struct sta_info *psta; +}; + +union $AB04817EA6EB89125E28056B7464A4D7 +{ + _list list; + struct recv_frame_hdr hdr; + unsigned int mem[32]; +}; + +union recv_frame +{ + union $AB04817EA6EB89125E28056B7464A4D7 u; +}; + +/* +// skbuff.h +struct sk_buff +{ + struct sk_buff *next; + struct sk_buff *prev; + struct sk_buff_head *list; + unsigned __int8 *head; + unsigned __int8 *data; + unsigned __int8 *tail; + unsigned __int8 *end; + void *dev; + unsigned int len; +}; + +struct sk_buff_head +{ + struct list_head *next; + struct list_head *prev; + unsigned int qlen; +}; +*/ + +struct tx_servq +{ + _list tx_pending; + _queue sta_pending; + int qcnt; +}; + +struct sta_xmit_priv +{ + _lock lock; + sint option; + sint apsd_setting; + struct tx_servq be_q; + struct tx_servq bk_q; + struct tx_servq vi_q; + struct tx_servq vo_q; + _list legacy_dz; + _list apsd; + uint16_t txseq_tid[16]; +}; + +struct stainfo_rxcache +{ + uint16_t tid_rxseq[16]; +}; + +struct sta_recv_priv +{ + _lock lock; + sint option; + _queue defrag_q; + struct stainfo_rxcache rxcache; +}; + +struct stainfo_stats +{ + uint64_t rx_mgnt_pkts; + uint64_t rx_ctrl_pkts; + uint64_t rx_data_pkts; + uint64_t last_rx_mgnt_pkts; + uint64_t last_rx_ctrl_pkts; + uint64_t last_rx_data_pkts; + uint64_t rx_bytes; + uint64_t tx_pkts; + uint64_t tx_bytes; +}; + +struct _RSSI_STA +{ + int32_t UndecoratedSmoothedPWDB; + int32_t UndecoratedSmoothedCCK; + int32_t UndecoratedSmoothedOFDM; + uint64_t PacketMap; + uint8_t ValidBit; + uint32_t OFDM_pkt; +}; +typedef struct _RSSI_STA RSSI_STA; + +struct sta_info +{ + _lock lock; + _list list; + _list hash_list; + _adapter *padapter; + struct sta_xmit_priv sta_xmitpriv; + struct sta_recv_priv sta_recvpriv; + _queue sleep_q; + unsigned int sleepq_len; + unsigned int state; + unsigned int aid; + unsigned int mac_id; + unsigned int qos_option; + uint8_t hwaddr[6]; + unsigned int ieee8021x_blocked; + unsigned int dot118021XPrivacy; + union Keytype dot11tkiptxmickey; + union Keytype dot11tkiprxmickey; + union Keytype dot118021x_UncstKey; + union pn48 dot11txpn; + union pn48 dot11rxpn; + uint8_t bssrateset[16]; + uint32_t bssratelen; + int32_t rssi; + int32_t signal_quality; + uint8_t cts2self; + uint8_t rtsen; + uint8_t raid; + uint8_t init_rate; + uint32_t ra_mask; + uint8_t wireless_mode; + struct stainfo_stats sta_stats; + _timer addba_retry_timer; + uint16_t BA_starting_seqctrl[16]; + struct ht_priv htpriv; + _list asoc_list; + _list auth_list; + unsigned int expire_to; + unsigned int auth_seq; + unsigned int authalg; + unsigned __int8 chg_txt[128]; + uint16_t capability; + uint32_t flags; + int dot8021xalg; + int wpa_psk; + int wpa_group_cipher; + int wpa2_group_cipher; + int wpa_pairwise_cipher; + int wpa2_pairwise_cipher; + uint8_t bpairwise_key_installed; + uint8_t wpa_ie[32]; + uint8_t nonerp_set; + uint8_t no_short_slot_time_set; + uint8_t no_short_preamble_set; + uint8_t no_ht_gf_set; + uint8_t no_ht_set; + uint8_t ht_20mhz_set; + unsigned int tx_ra_bitmap; + uint8_t qos_info; + uint8_t max_sp_len; + uint8_t uapsd_bk; + uint8_t uapsd_be; + uint8_t uapsd_vi; + uint8_t uapsd_vo; + uint8_t has_legacy_ac; + unsigned int sleepq_ac_len; + RSSI_STA rssi_stat; + uint8_t bValid; + uint8_t IOTPeer; + uint8_t rssi_level; + uint8_t RSSI_Path[4]; + uint8_t RSSI_Ave; + uint8_t RXEVM[4]; + uint8_t RXSNR[4]; +}; +/* +// wifi_conf.h +struct __attribute__((aligned(4))) _cus_ie +{ + uint8_t *ie; + uint8_t type; +}; +*/ + +struct fifo_more_data +{ + uint32_t more_data; + uint32_t len; +}; + +struct hw_xmit +{ + _queue *sta_queue; + int accnt; +}; + +struct tx_buf_desc +{ + unsigned int txdw0; + unsigned int txdw1; + unsigned int txdw2; + unsigned int txdw3; + unsigned int txdw4; + unsigned int txdw5; + unsigned int txdw6; + unsigned int txdw7; +}; + +struct recv_buf_stat +{ + unsigned int rxdw0; + unsigned int rxdw1; +}; + +struct _wpa_sta_info +{ + int state; + int gstate; + int RSNEnabled; + int PInitAKeys; + unsigned __int8 UnicastCipher; + LARGE_INTEGER CurrentReplayCounter; + LARGE_INTEGER ReplayCounterStarted; + OCTET_STRING ANonce; + OCTET_STRING SNonce; + unsigned __int8 AnonceBuf[32]; + unsigned __int8 SnonceBuf[32]; + unsigned __int8 PMK[32]; + unsigned __int8 PTK[64]; + OCTET_STRING EAPOLMsgRecvd; + OCTET_STRING EAPOLMsgSend; + OCTET_STRING EapolKeyMsgRecvd; + OCTET_STRING EapolKeyMsgSend; + unsigned __int8 eapSendBuf[512]; + struct timer_list resendTimer; + int resendCnt; + int clientHndshkProcessing; + int clientHndshkDone; + int clientGkeyUpdate; + LARGE_INTEGER clientMICReportReplayCounter; +}; + +struct pkt_attrib +{ + uint8_t type; + uint8_t subtype; + uint8_t bswenc; + uint8_t dhcp_pkt; + uint16_t ether_type; + uint16_t seqnum; + uint16_t pkt_hdrlen; + uint16_t hdrlen; + uint32_t pktlen; + uint32_t last_txcmdsz; + uint8_t encrypt; + uint8_t iv_len; + uint8_t icv_len; + uint8_t iv[18]; + uint8_t icv[16]; + uint8_t priority; + uint8_t ack_policy; + uint8_t mac_id; + uint8_t vcs_mode; + uint8_t dst[6]; + uint8_t src[6]; + uint8_t ta[6]; + uint8_t ra[6]; + uint8_t key_idx; + uint8_t qos_en; + uint8_t ht_en; + uint8_t raid; + uint8_t bwmode; + uint8_t ch_offset; + uint8_t sgi; + uint8_t ampdu_en; + uint8_t mdata; + uint8_t pctrl; + uint8_t triggered; + uint8_t qsel; + uint8_t eosp; + uint8_t rate; + uint8_t intel_proxim; + uint8_t retry_ctrl; + struct sta_info *psta; +}; + +typedef struct sk_buff _pkt; + +struct _XIMT_BUF_ +{ + uint32_t AllocatBufAddr; + uint32_t BufAddr; + uint32_t BufLen; +}; +typedef struct _XIMT_BUF_ XIMT_BUF; + +struct __attribute__((aligned(4))) xmit_frame +{ + _list list; + struct pkt_attrib attrib; + _pkt *pkt; + int frame_tag; + _adapter *padapter; + uint8_t *buf_addr; + struct xmit_buf *pxmitbuf; + uint32_t TxDexAddr; + uint32_t HdrLen; + uint32_t PayLoadAddr; + uint32_t PayLoadLen; + uint32_t TotalLen; + uint32_t BlockNum; + XIMT_BUF BufInfo[4]; + BOOLEAN NoCoalesce; +}; + +struct xmit_buf +{ + _list list; + _adapter *padapter; + _pkt *pkt; + uint8_t *pbuf; + void *priv_data; + uint16_t buf_tag; + uint16_t flags; + uint32_t alloc_sz; + uint32_t len; + struct submit_ctx *sctx; + XIMT_BUF BufInfo[4]; + uint32_t BlockNum; +}; + +struct submit_ctx +{ + uint32_t submit_time; + uint32_t timeout_ms; + int status; +}; +/* +// wrapper.h +struct net_device +{ + char name[16]; + void *priv; + unsigned __int8 dev_addr[6]; + int (*init)(void); + int (*open)(struct net_device *); + int (*stop)(struct net_device *); + int (*hard_start_xmit)(struct sk_buff *, struct net_device *); + int (*do_ioctl)(struct net_device *, struct iwreq *, int); + struct net_device_stats *(*get_stats)(struct net_device *); +}; +*/ +/* +// wireless.h +struct iw_point +{ + void *pointer; + __u16 length; + __u16 flags; +}; + +struct iw_param +{ + __s32 value; + __u8 fixed; + __u8 disabled; + __u16 flags; +}; + + +struct iw_freq +{ + __s32 m; + __s16 e; + __u8 i; + __u8 flags; +}; + +struct iw_quality +{ + __u8 qual; + __u8 level; + __u8 noise; + __u8 updated; +}; + +struct sockaddr_t +{ + __u8 sa_len; + __u8 sa_family; + char sa_data[14]; +}; + +union iwreq_data +{ + char name[16]; + struct iw_point essid; + struct iw_param nwid; + struct iw_freq freq; + struct iw_param sens; + struct iw_param bitrate; + struct iw_param txpower; + struct iw_param rts; + struct iw_param frag; + __u32 mode; + struct iw_param retry; + struct iw_point encoding; + struct iw_param power; + struct iw_quality qual; + struct sockaddr_t ap_addr; + struct sockaddr_t addr; + struct iw_param param; + struct iw_point data; + struct iw_point passphrase; +}; + +struct iwreq +{ + char ifr_name[16]; + union iwreq_data u; +}; +*/ +struct co_data_priv +{ + uint8_t co_ch; + uint8_t co_bw; + uint8_t co_ch_offset; + uint8_t rsvd; +}; + +enum _HARDWARE_TYPE // : __int32 +{ + HARDWARE_TYPE_RTL8180 = 0x0, + HARDWARE_TYPE_RTL8185 = 0x1, + HARDWARE_TYPE_RTL8187 = 0x2, + HARDWARE_TYPE_RTL8188 = 0x3, + HARDWARE_TYPE_RTL8190P = 0x4, + HARDWARE_TYPE_RTL8192E = 0x5, + HARDWARE_TYPE_RTL819xU = 0x6, + HARDWARE_TYPE_RTL8192SE = 0x7, + HARDWARE_TYPE_RTL8192SU = 0x8, + HARDWARE_TYPE_RTL8192CE = 0x9, + HARDWARE_TYPE_RTL8192CU = 0xA, + HARDWARE_TYPE_RTL8192DE = 0xB, + HARDWARE_TYPE_RTL8192DU = 0xC, + HARDWARE_TYPE_RTL8723AE = 0xD, + HARDWARE_TYPE_RTL8723AU = 0xE, + HARDWARE_TYPE_RTL8723AS = 0xF, + HARDWARE_TYPE_RTL8188EE = 0x10, + HARDWARE_TYPE_RTL8188EU = 0x11, + HARDWARE_TYPE_RTL8188ES = 0x12, + HARDWARE_TYPE_RTL8192EE = 0x13, + HARDWARE_TYPE_RTL8192EU = 0x14, + HARDWARE_TYPE_RTL8192ES = 0x15, + HARDWARE_TYPE_RTL8812E = 0x16, + HARDWARE_TYPE_RTL8812AU = 0x17, + HARDWARE_TYPE_RTL8811AU = 0x18, + HARDWARE_TYPE_RTL8821E = 0x19, + HARDWARE_TYPE_RTL8821U = 0x1A, + HARDWARE_TYPE_RTL8821S = 0x1B, + HARDWARE_TYPE_RTL8723BE = 0x1C, + HARDWARE_TYPE_RTL8723BU = 0x1D, + HARDWARE_TYPE_RTL8723BS = 0x1E, + HARDWARE_TYPE_RTL8195A = 0x1F, + HARDWARE_TYPE_RTL8711B = 0x20, + HARDWARE_TYPE_RTL8188FE = 0x21, + HARDWARE_TYPE_RTL8188FU = 0x22, + HARDWARE_TYPE_RTL8188FS = 0x23, + HARDWARE_TYPE_MAX = 0x24, +}; + +struct RF_Shadow_Compare_Map +{ + uint32_t Value; + uint8_t Compare; + uint8_t ErrorOrNot; + uint8_t Recorver; + uint8_t Driver_Write; +}; +typedef struct RF_Shadow_Compare_Map RF_SHADOW_T; + +enum _PS_BBRegBackup_ // : __int32 +{ + PSBBREG_RF0 = 0x0, + PSBBREG_RF1 = 0x1, + PSBBREG_RF2 = 0x2, + PSBBREG_AFE0 = 0x3, + PSBBREG_TOTALCNT = 0x4, +}; + +/* +// hal_irqn.h +enum _IRQn_Type_ // : __int32 +{ + NonMaskableInt_IRQn = 0xFFFFFFF2, + HardFault_IRQn = 0xFFFFFFF3, + MemoryManagement_IRQn = 0xFFFFFFF4, + BusFault_IRQn = 0xFFFFFFF5, + UsageFault_IRQn = 0xFFFFFFF6, + SVCall_IRQn = 0xFFFFFFFB, + DebugMonitor_IRQn = 0xFFFFFFFC, + PendSV_IRQn = 0xFFFFFFFE, + SysTick_IRQn = 0xFFFFFFFF, + SYSTEM_ON_IRQ = 0x0, + WDG_IRQ = 0x1, + TIMER0_IRQ = 0x2, + TIMER1_IRQ = 0x3, + I2C3_IRQ = 0x4, + TIMER2_7_IRQ = 0x5, + SPI0_IRQ = 0x6, + GPIO_IRQ = 0x7, + UART0_IRQ = 0x8, + SPI_FLASH_IRQ = 0x9, + USB_OTG_IRQ = 0xA, + SDIO_HOST_IRQ = 0xB, + SDIO_DEVICE_IRQ = 0xC, + I2S0_PCM0_IRQ = 0xD, + I2S1_PCM1_IRQ = 0xE, + WL_DMA_IRQ = 0xF, + WL_PROTOCOL_IRQ = 0x10, + CRYPTO_IRQ = 0x11, + GMAC_IRQ = 0x12, + PERIPHERAL_IRQ = 0x13, + GDMA0_CHANNEL0_IRQ = 0x14, + GDMA0_CHANNEL1_IRQ = 0x15, + GDMA0_CHANNEL2_IRQ = 0x16, + GDMA0_CHANNEL3_IRQ = 0x17, + GDMA0_CHANNEL4_IRQ = 0x18, + GDMA0_CHANNEL5_IRQ = 0x19, + GDMA1_CHANNEL0_IRQ = 0x1A, + GDMA1_CHANNEL1_IRQ = 0x1B, + GDMA1_CHANNEL2_IRQ = 0x1C, + GDMA1_CHANNEL3_IRQ = 0x1D, + GDMA1_CHANNEL4_IRQ = 0x1E, + GDMA1_CHANNEL5_IRQ = 0x1F, + I2C0_IRQ = 0x40, + I2C1_IRQ = 0x41, + I2C2_IRQ = 0x42, + SPI1_IRQ = 0x48, + SPI2_IRQ = 0x49, + UART1_IRQ = 0x50, + UART2_IRQ = 0x51, + UART_LOG_IRQ = 0x58, + ADC_IRQ = 0x59, + DAC0_IRQ = 0x5B, + DAC1_IRQ = 0x5C, + LP_EXTENSION_IRQ = 0x5D, + PTA_TRX_IRQ = 0x5F, + RXI300_IRQ = 0x60, + NFC_IRQ = 0x61, +}; + +typedef enum _IRQn_Type_ IRQn_Type; + +typedef void (*IRQ_FUN)(void *); + +struct _IRQ_HANDLE_ +{ + IRQ_FUN IrqFun; + IRQn_Type IrqNum; + uint32_t Data; + uint32_t Priority; +}; +typedef struct _IRQ_HANDLE_ IRQ_HANDLE; +*/ +/* +// hal_soc_ps_monitor.h +struct _power_state_ +{ + uint8_t FuncIdx; + uint8_t PowerState; +}; + +typedef struct _power_state_ POWER_STATE; + +struct __attribute__((aligned(4))) _power_mgn_ +{ + uint8_t ActFuncCount; + POWER_STATE PwrState[10]; + uint8_t CurrentState; + uint8_t SDREn; + uint32_t MSPbackup[129]; + uint32_t CPURegbackup[25]; + uint32_t CPUPSP; + uint32_t WakeEventFlag; + BOOL SleepFlag; +}; +typedef struct _power_mgn_ Power_Mgn; + +/* +// hal_gpio.h +enum $E1AD70AB12E7AA6E98B8D89D9B965EB5 //: __int32 +{ + _PORT_A = 0x0, + _PORT_B = 0x1, + _PORT_C = 0x2, + _PORT_D = 0x3, + _PORT_E = 0x4, + _PORT_F = 0x5, + _PORT_G = 0x6, + _PORT_H = 0x7, + _PORT_I = 0x8, + _PORT_J = 0x9, + _PORT_K = 0xA, + _PORT_MAX = 0xB, +}; + +typedef void (*GPIO_IRQ_FUN)(void *, uint32_t); + +typedef void (*GPIO_USER_IRQ_FUN)(uint32_t); + +struct __attribute__((aligned(4))) _HAL_GPIO_ADAPTER_ +{ + IRQ_HANDLE IrqHandle; + GPIO_USER_IRQ_FUN UserIrqHandler; + GPIO_IRQ_FUN PortA_IrqHandler[32]; + void *PortA_IrqData[32]; + void (*EnterCritical)(void); + void (*ExitCritical)(void); + uint32_t Local_Gpio_Dir[3]; + uint8_t Gpio_Func_En; + uint8_t Locked; +}; +typedef struct _HAL_GPIO_ADAPTER_ *PHAL_GPIO_ADAPTER; +*/ + + +struct hal_ops +{ + uint32_t (*hal_power_on)(_adapter *); + uint32_t (*hal_init)(_adapter *); + uint32_t (*hal_deinit)(_adapter *); + void (*free_hal_data)(_adapter *); + uint32_t (*inirp_init)(_adapter *); + uint32_t (*inirp_deinit)(_adapter *); + void (*irp_reset)(_adapter *); + int32_t (*init_xmit_priv)(_adapter *); + void (*free_xmit_priv)(_adapter *); + int32_t (*init_recv_priv)(_adapter *); + void (*free_recv_priv)(_adapter *); + void (*update_txdesc)(struct xmit_frame *, uint8_t *); + void (*InitSwLeds)(_adapter *); + void (*DeInitSwLeds)(_adapter *); + void (*dm_init)(_adapter *); + void (*dm_deinit)(_adapter *); + void (*read_chip_version)(_adapter *); + void (*init_default_value)(_adapter *); + void (*intf_chip_configure)(_adapter *); + void (*read_adapter_info)(_adapter *); + void (*enable_interrupt)(_adapter *); + void (*disable_interrupt)(_adapter *); + int32_t (*interrupt_handler)(_adapter *); + void (*set_bwmode_handler)(_adapter *, CHANNEL_WIDTH, uint8_t); + void (*set_channel_handler)(_adapter *, uint8_t); + void (*set_chnl_bw_handler)(_adapter *, uint8_t, CHANNEL_WIDTH, uint8_t, uint8_t); + void (*hal_dm_watchdog)(_adapter *); + void (*SetHwRegHandler)(_adapter *, uint8_t, uint8_t *); + void (*GetHwRegHandler)(_adapter *, uint8_t, uint8_t *); + uint8_t (*GetHalDefVarHandler)(_adapter *, HAL_DEF_VARIABLE, PVOID); + uint8_t (*SetHalDefVarHandler)(_adapter *, HAL_DEF_VARIABLE, PVOID); + void (*GetHalODMVarHandler)(_adapter *, HAL_ODM_VARIABLE, PVOID, BOOLEAN); + void (*SetHalODMVarHandler)(_adapter *, HAL_ODM_VARIABLE, PVOID, BOOLEAN); + void (*UpdateRAMaskHandler)(_adapter *, uint32_t, uint8_t); + void (*Add_RateATid)(_adapter *, uint32_t, uint8_t *, uint8_t); + void (*clone_haldata)(_adapter *, _adapter *); + void (*run_thread)(_adapter *); + void (*cancel_thread)(_adapter *); + int32_t (*hal_xmit)(_adapter *, struct xmit_frame *); + int32_t (*mgnt_xmit)(_adapter *, struct xmit_frame *); + uint32_t (*read_bbreg)(_adapter *, uint32_t, uint32_t); + void (*write_bbreg)(_adapter *, uint32_t, uint32_t, uint32_t); + uint32_t (*read_rfreg)(_adapter *, uint32_t, uint32_t, uint32_t); + void (*write_rfreg)(_adapter *, uint32_t, uint32_t, uint32_t, uint32_t); + void (*EfusePowerSwitch)(_adapter *, uint8_t, uint8_t); + void (*ReadEFuse)(_adapter *, uint8_t, uint16_t, uint16_t, uint8_t *, BOOLEAN); + void (*EFUSEGetEfuseDefinition)(_adapter *, uint8_t, uint8_t, void *, BOOLEAN); + uint16_t (*EfuseGetCurrentSize)(_adapter *, uint8_t, BOOLEAN); + int (*Efuse_PgPacketWrite)(_adapter *, uint8_t, uint8_t, uint8_t *, BOOLEAN); + uint8_t (*Efuse_WordEnableDataWrite)(_adapter *, uint16_t, uint8_t, uint8_t *, BOOLEAN); + void (*recv_tasklet)(void *); + int32_t (*fill_h2c_cmd)(_adapter *, uint8_t, uint32_t, uint8_t *); + void (*fill_fake_txdesc)(_adapter *, uint8_t *, uint32_t, uint8_t, uint8_t, uint8_t); + uint8_t (*hal_get_tx_buff_rsvd_page_num)(_adapter *, bool); +}; + +struct __attribute__((aligned(4))) _ADAPTER +{ + uint16_t HardwareType; + uint16_t interface_type; + uint32_t work_mode; + struct dvobj_priv *dvobj; + struct mlme_priv mlmepriv; + struct mlme_ext_priv mlmeextpriv; + struct cmd_priv cmdpriv; + struct evt_priv evtpriv; + struct io_priv iopriv; + struct xmit_priv xmitpriv; + struct recv_priv recvpriv; + struct sta_priv stapriv; + struct security_priv securitypriv; + struct registry_priv registrypriv; + struct pwrctrl_priv pwrctrlpriv; + struct eeprom_priv eeprompriv; + PVOID HalData; + uint32_t hal_data_sz; + struct hal_ops HalFunc; + int32_t bDriverStopped; + int32_t bSurpriseRemoved; + int32_t bCardDisableWOHSM; + uint8_t RxStop; + uint32_t IsrContent; + uint32_t ImrContent; + uint8_t EepromAddressSize; + uint8_t hw_init_completed; + uint8_t bDriverIsGoingToUnload; + uint8_t init_adpt_in_progress; + uint8_t bMpDriver; + uint8_t bForwardingDisabled; + struct task_struct isrThread; + struct task_struct cmdThread; + struct task_struct recvtasklet_thread; + struct task_struct xmittasklet_thread; + void (*intf_start)(_adapter *); + void (*intf_stop)(_adapter *); + _nic_hdl pnetdev; + int bup; + struct net_device_stats stats; + uint8_t net_closed; + uint8_t bFWReady; + uint8_t bLinkInfoDump; + uint8_t bRxRSSIDisplay; + _adapter *pbuddy_adapter; + _mutex *hw_init_mutex; + uint8_t isprimary; + uint8_t adapter_type; + uint8_t iface_type; + _mutex *ph2c_fwcmd_mutex; + _mutex *psetch_mutex; + _mutex *psetbw_mutex; + struct co_data_priv *pcodatapriv; + uint8_t fix_rate; +}; +typedef struct _ADAPTER *PADAPTER; + + +enum tag_HAL_IC_Type_Definition // : __int32 +{ + CHIP_8192S = 0x0, + CHIP_8188C = 0x1, + CHIP_8192C = 0x2, + CHIP_8192D = 0x3, + CHIP_8723A = 0x4, + CHIP_8188E = 0x5, + CHIP_8812 = 0x6, + CHIP_8821 = 0x7, + CHIP_8723B = 0x8, + CHIP_8192E = 0x9, + CHIP_8195A = 0xA, + CHIP_8711B = 0xB, + CHIP_8188F = 0xC, +}; +typedef enum tag_HAL_IC_Type_Definition HAL_IC_TYPE_E; + +enum tag_HAL_CHIP_Type_Definition // : __int32 +{ + TEST_CHIP = 0x0, + NORMAL_CHIP = 0x1, + FPGA = 0x2, +}; +typedef enum tag_HAL_CHIP_Type_Definition HAL_CHIP_TYPE_E; + + +enum tag_HAL_Cut_Version_Definition // : __int32 +{ + A_CUT_VERSION = 0x0, + B_CUT_VERSION = 0x1, + C_CUT_VERSION = 0x2, + D_CUT_VERSION = 0x3, + E_CUT_VERSION = 0x4, + F_CUT_VERSION = 0x5, + G_CUT_VERSION = 0x6, + H_CUT_VERSION = 0x7, + I_CUT_VERSION = 0x8, + J_CUT_VERSION = 0x9, + K_CUT_VERSION = 0xA, +}; +typedef enum tag_HAL_Cut_Version_Definition HAL_CUT_VERSION_E; + + +enum tag_HAL_Manufacturer_Version_Definition //: __int32 +{ + CHIP_VENDOR_TSMC = 0x0, + CHIP_VENDOR_UMC = 0x1, + CHIP_VENDOR_SMIC = 0x2, +}; +typedef enum tag_HAL_Manufacturer_Version_Definition HAL_VENDOR_E; + +enum tag_HAL_RF_Type_Definition //: __int32 +{ + RF_TYPE_1T1R = 0x0, + RF_TYPE_1T2R = 0x1, + RF_TYPE_2T2R = 0x2, + RF_TYPE_2T3R = 0x3, + RF_TYPE_2T4R = 0x4, + RF_TYPE_3T3R = 0x5, + RF_TYPE_3T4R = 0x6, + RF_TYPE_4T4R = 0x7, +}; +typedef enum tag_HAL_RF_Type_Definition HAL_RF_TYPE_E; + +struct __attribute__((aligned(4))) tag_HAL_VERSION +{ + HAL_IC_TYPE_E ICType; + HAL_CHIP_TYPE_E ChipType; + HAL_CUT_VERSION_E CUTVersion; + HAL_VENDOR_E VendorType; + HAL_RF_TYPE_E RFType; + uint8_t ROMVer; +}; +typedef struct tag_HAL_VERSION HAL_VERSION; + +enum _HW_VARIABLES //: __int32 +{ + HW_VAR_MEDIA_STATUS = 0x0, + HW_VAR_MEDIA_STATUS1 = 0x1, + HW_VAR_SET_OPMODE = 0x2, + HW_VAR_MAC_ADDR = 0x3, + HW_VAR_BSSID = 0x4, + HW_VAR_INIT_RTS_RATE = 0x5, + HW_VAR_BASIC_RATE = 0x6, + HW_VAR_TXPAUSE = 0x7, + HW_VAR_BCN_FUNC = 0x8, + HW_VAR_CORRECT_TSF = 0x9, + HW_VAR_CHECK_BSSID = 0xA, + HW_VAR_MLME_DISCONNECT = 0xB, + HW_VAR_MLME_SITESURVEY = 0xC, + HW_VAR_MLME_JOIN = 0xD, + HW_VAR_ON_RCR_AM = 0xE, + HW_VAR_OFF_RCR_AM = 0xF, + HW_VAR_BEACON_INTERVAL = 0x10, + HW_VAR_SLOT_TIME = 0x11, + HW_VAR_RESP_SIFS = 0x12, + HW_VAR_ACK_PREAMBLE = 0x13, + HW_VAR_SEC_CFG = 0x14, + HW_VAR_SEC_DK_CFG = 0x15, + HW_VAR_RF_TYPE = 0x16, + HW_VAR_DM_FLAG = 0x17, + HW_VAR_DM_FUNC_OP = 0x18, + HW_VAR_DM_FUNC_SET = 0x19, + HW_VAR_DM_FUNC_CLR = 0x1A, + HW_VAR_CAM_EMPTY_ENTRY = 0x1B, + HW_VAR_CAM_INVALID_ALL = 0x1C, + HW_VAR_CAM_WRITE = 0x1D, + HW_VAR_CAM_READ = 0x1E, + HW_VAR_AC_PARAM_VO = 0x1F, + HW_VAR_AC_PARAM_VI = 0x20, + HW_VAR_AC_PARAM_BE = 0x21, + HW_VAR_AC_PARAM_BK = 0x22, + HW_VAR_ACM_CTRL = 0x23, + HW_VAR_AMPDU_MIN_SPACE = 0x24, + HW_VAR_AMPDU_FACTOR = 0x25, + HW_VAR_RXDMA_AGG_PG_TH = 0x26, + HW_VAR_SET_RPWM = 0x27, + HW_VAR_GET_RPWM = 0x28, + HW_VAR_CPWM = 0x29, + HW_VAR_H2C_FW_PWRMODE = 0x2A, + HW_VAR_H2C_PS_TUNE_PARAM = 0x2B, + HW_VAR_H2C_FW_JOINBSSRPT = 0x2C, + HW_VAR_FWLPS_RF_ON = 0x2D, + HW_VAR_H2C_FW_P2P_PS_OFFLOAD = 0x2E, + HW_VAR_TDLS_WRCR = 0x2F, + HW_VAR_TDLS_INIT_CH_SEN = 0x30, + HW_VAR_TDLS_RS_RCR = 0x31, + HW_VAR_TDLS_DONE_CH_SEN = 0x32, + HW_VAR_INITIAL_GAIN = 0x33, + HW_VAR_TRIGGER_GPIO_0 = 0x34, + HW_VAR_CURRENT_ANTENNA = 0x35, + HW_VAR_ANTENNA_DIVERSITY_LINK = 0x36, + HW_VAR_ANTENNA_DIVERSITY_SELECT = 0x37, + HW_VAR_SWITCH_EPHY_WoWLAN = 0x38, + HW_VAR_EFUSE_USAGE = 0x39, + HW_VAR_EFUSE_BYTES = 0x3A, + HW_VAR_FIFO_CLEARN_UP = 0x3B, + HW_VAR_RESTORE_HW_SEQ = 0x3C, + HW_VAR_HCI_SUS_STATE = 0x3D, + HW_VAR_CHECK_TXBUF = 0x3E, + HW_VAR_APFM_ON_MAC = 0x3F, + HW_VAR_NAV_UPPER = 0x40, + HW_VAR_C2H_HANDLE = 0x41, + HW_VAR_RPT_TIMER_SETTING = 0x42, + HW_VAR_TX_RPT_MAX_MACID = 0x43, + HW_VAR_H2C_MEDIA_STATUS_RPT = 0x44, + HW_VAR_CHK_HI_QUEUE_EMPTY = 0x45, + HW_VAR_DL_BCN_SEL = 0x46, + HW_VAR_PORT_SWITCH = 0x47, + HW_VAR_DM_IN_LPS = 0x48, + HW_VAR_SET_REQ_FW_PS = 0x49, + HW_VAR_FW_PS_STATE = 0x4A, + HW_VAR_DL_RSVD_PAGE = 0x4B, + HW_VAR_MACID_SLEEP = 0x4C, + HW_VAR_MACID_WAKEUP = 0x4D, + HW_VAR_DUMP_MAC_QUEUE_INFO = 0x4E, + HW_VAR_ASIX_IOT = 0x4F, + HW_VAR_PROMISC = 0x50, +}; + + +enum _BAND_TYPE // : __int32 +{ + BAND_ON_2_4G = 0x0, + BAND_ON_5G = 0x1, + BAND_ON_BOTH = 0x2, + BANDMAX = 0x3, +}; +typedef enum _BAND_TYPE BAND_TYPE; + + +struct _BB_REGISTER_DEFINITION +{ + uint32_t rfintfs; + uint32_t rfintfo; + uint32_t rfintfe; + uint32_t rf3wireOffset; + uint32_t rfHSSIPara2; + uint32_t rfLSSIReadBack; + uint32_t rfLSSIReadBackPi; +}; +typedef struct _BB_REGISTER_DEFINITION BB_REGISTER_DEFINITION_T; + +enum dot11AuthAlgrthmNum //: __int32 +{ + dot11AuthAlgrthm_Open = 0x0, + dot11AuthAlgrthm_Shared = 0x1, + dot11AuthAlgrthm_8021X = 0x2, + dot11AuthAlgrthm_Auto = 0x3, + dot11AuthAlgrthm_WAPI = 0x4, + dot11AuthAlgrthm_MaxNum = 0x5, +}; + +enum _RT_CHANNEL_DOMAIN //: __int32 +{ + RT_CHANNEL_DOMAIN_FCC = 0x0, + RT_CHANNEL_DOMAIN_IC = 0x1, + RT_CHANNEL_DOMAIN_ETSI = 0x2, + RT_CHANNEL_DOMAIN_SPAIN = 0x3, + RT_CHANNEL_DOMAIN_FRANCE = 0x4, + RT_CHANNEL_DOMAIN_MKK = 0x5, + RT_CHANNEL_DOMAIN_MKK1 = 0x6, + RT_CHANNEL_DOMAIN_ISRAEL = 0x7, + RT_CHANNEL_DOMAIN_TELEC = 0x8, + RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN = 0x9, + RT_CHANNEL_DOMAIN_WORLD_WIDE_13 = 0xA, + RT_CHANNEL_DOMAIN_TAIWAN = 0xB, + RT_CHANNEL_DOMAIN_CHINA = 0xC, + RT_CHANNEL_DOMAIN_SINGAPORE_INDIA_MEXICO = 0xD, + RT_CHANNEL_DOMAIN_KOREA = 0xE, + RT_CHANNEL_DOMAIN_TURKEY = 0xF, + RT_CHANNEL_DOMAIN_JAPAN = 0x10, + RT_CHANNEL_DOMAIN_FCC_NO_DFS = 0x11, + RT_CHANNEL_DOMAIN_JAPAN_NO_DFS = 0x12, + RT_CHANNEL_DOMAIN_WORLD_WIDE_5G = 0x13, + RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS = 0x14, + RT_CHANNEL_DOMAIN_WORLD_NULL = 0x20, + RT_CHANNEL_DOMAIN_ETSI1_NULL = 0x21, + RT_CHANNEL_DOMAIN_FCC1_NULL = 0x22, + RT_CHANNEL_DOMAIN_MKK1_NULL = 0x23, + RT_CHANNEL_DOMAIN_ETSI2_NULL = 0x24, + RT_CHANNEL_DOMAIN_FCC1_FCC1 = 0x25, + RT_CHANNEL_DOMAIN_WORLD_ETSI1 = 0x26, + RT_CHANNEL_DOMAIN_MKK1_MKK1 = 0x27, + RT_CHANNEL_DOMAIN_WORLD_KCC1 = 0x28, + RT_CHANNEL_DOMAIN_WORLD_FCC2 = 0x29, + RT_CHANNEL_DOMAIN_FCC2_NULL = 0x2A, + RT_CHANNEL_DOMAIN_WORLD_FCC3 = 0x30, + RT_CHANNEL_DOMAIN_WORLD_FCC4 = 0x31, + RT_CHANNEL_DOMAIN_WORLD_FCC5 = 0x32, + RT_CHANNEL_DOMAIN_WORLD_FCC6 = 0x33, + RT_CHANNEL_DOMAIN_FCC1_FCC7 = 0x34, + RT_CHANNEL_DOMAIN_WORLD_ETSI2 = 0x35, + RT_CHANNEL_DOMAIN_WORLD_ETSI3 = 0x36, + RT_CHANNEL_DOMAIN_MKK1_MKK2 = 0x37, + RT_CHANNEL_DOMAIN_MKK1_MKK3 = 0x38, + RT_CHANNEL_DOMAIN_FCC1_NCC1 = 0x39, + RT_CHANNEL_DOMAIN_FCC1_NCC2 = 0x40, + RT_CHANNEL_DOMAIN_GLOBAL_NULL = 0x41, + RT_CHANNEL_DOMAIN_ETSI1_ETSI4 = 0x42, + RT_CHANNEL_DOMAIN_FCC1_FCC2 = 0x43, + RT_CHANNEL_DOMAIN_FCC1_NCC3 = 0x44, + RT_CHANNEL_DOMAIN_WORLD_ETSI5 = 0x45, + RT_CHANNEL_DOMAIN_FCC1_FCC8 = 0x46, + RT_CHANNEL_DOMAIN_WORLD_ETSI6 = 0x47, + RT_CHANNEL_DOMAIN_WORLD_ETSI7 = 0x48, + RT_CHANNEL_DOMAIN_WORLD_ETSI8 = 0x49, + RT_CHANNEL_DOMAIN_WORLD_ETSI9 = 0x50, + RT_CHANNEL_DOMAIN_WORLD_ETSI10 = 0x51, + RT_CHANNEL_DOMAIN_WORLD_ETSI11 = 0x52, + RT_CHANNEL_DOMAIN_FCC1_NCC4 = 0x53, + RT_CHANNEL_DOMAIN_WORLD_ETSI12 = 0x54, + RT_CHANNEL_DOMAIN_FCC1_FCC9 = 0x55, + RT_CHANNEL_DOMAIN_WORLD_ETSI13 = 0x56, + RT_CHANNEL_DOMAIN_FCC1_FCC10 = 0x57, + RT_CHANNEL_DOMAIN_MKK2_MKK4 = 0x58, + RT_CHANNEL_DOMAIN_MAX = 0x59, + RT_CHANNEL_DOMAIN_REALTEK_DEFINE = 0x7F, +}; + +struct _driver_priv +{ + int drv_registered; + _mutex hw_init_mutex; + _mutex h2c_fwcmd_mutex; + _mutex setch_mutex; + _mutex setbw_mutex; +}; +typedef struct _driver_priv drv_priv; + +struct _ADAPTIVITY_STATISTICS +{ + s1Byte TH_L2H_ini_mode2; + s1Byte TH_EDCCA_HL_diff_mode2; + s1Byte TH_EDCCA_HL_diff_backup; + s1Byte IGI_Base; + u1Byte IGI_target; + u1Byte NHMWait; + s1Byte H2L_lb; + s1Byte L2H_lb; + BOOLEAN bFirstLink; + BOOLEAN bCheck; + BOOLEAN DynamicLinkAdaptivity; + u1Byte APNumTH; + u1Byte AdajustIGILevel; +}; +typedef struct _ADAPTIVITY_STATISTICS ADAPTIVITY_STATISTICS; + +struct _ODM_NOISE_MONITOR_ +{ + s1Byte noise[1]; + s2Byte noise_all; +}; +typedef struct _ODM_NOISE_MONITOR_ ODM_NOISE_MONITOR; + +struct _FALSE_ALARM_STATISTICS +{ + u4Byte Cnt_Parity_Fail; + u4Byte Cnt_Rate_Illegal; + u4Byte Cnt_Crc8_fail; + u4Byte Cnt_Mcs_fail; + u4Byte Cnt_Ofdm_fail; + u4Byte Cnt_Ofdm_fail_pre; + u4Byte Cnt_Cck_fail; + u4Byte Cnt_all; + u4Byte Cnt_Fast_Fsync; + u4Byte Cnt_SB_Search_fail; + u4Byte Cnt_OFDM_CCA; + u4Byte Cnt_CCK_CCA; + u4Byte Cnt_CCA_all; + u4Byte Cnt_BW_USC; + u4Byte Cnt_BW_LSC; +}; +typedef struct _FALSE_ALARM_STATISTICS FALSE_ALARM_STATISTICS; + + +enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE //: __int32 +{ + PHY_REG_PG_RELATIVE_VALUE = 0x0, + PHY_REG_PG_EXACT_VALUE = 0x1, +}; +typedef enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE PHY_REG_PG_TYPE; + +struct __attribute__((aligned(4))) _CFO_TRACKING_ +{ + BOOLEAN bATCStatus; + BOOLEAN largeCFOHit; + BOOLEAN bAdjust; + u1Byte CrystalCap; + u1Byte DefXCap; + int CFO_tail[2]; + int CFO_ave_pre; + u4Byte packetCount; + u4Byte packetCount_pre; + BOOLEAN bForceXtalCap; + BOOLEAN bReset; + u1Byte CFO_TH_XTAL_HIGH; + u1Byte CFO_TH_XTAL_LOW; + u1Byte CFO_TH_ATC; +}; +typedef struct _CFO_TRACKING_ CFO_TRACKING; + +struct __attribute__((aligned(8))) _ROM_INFO +{ + u1Byte EEPROMVersion; + u1Byte CrystalCap; + u8Byte DebugComponents; + u4Byte DebugLevel; +}; +typedef struct _ROM_INFO ROM_INFO; +typedef struct _ROM_INFO *PROM_INFO; + +typedef struct sta_info *PSTA_INFO_T; + +struct _ODM_Phy_Dbg_Info_ +{ + s1Byte RxSNRdB[4]; + u4Byte NumQryPhyStatus; + u4Byte NumQryPhyStatusCCK; + u4Byte NumQryPhyStatusOFDM; + u1Byte NumQryBeaconPkt; + s4Byte RxEVM[4]; +}; +typedef struct _ODM_Phy_Dbg_Info_ ODM_PHY_DBG_INFO_T; + +struct _ODM_Mac_Status_Info_ +{ + u1Byte test; +}; +typedef struct _ODM_Mac_Status_Info_ ODM_MAC_INFO; + +struct __attribute__((aligned(4))) _ODM_RA_Info_ +{ + u1Byte RateID; + u4Byte RateMask; + u4Byte RAUseRate; + u1Byte RateSGI; + u1Byte RssiStaRA; + u1Byte PreRssiStaRA; + u1Byte SGIEnable; + u1Byte DecisionRate; + u1Byte PreRate; + u1Byte HighestRate; + u1Byte LowestRate; + u4Byte NscUp; + u4Byte NscDown; + u2Byte RTY[5]; + u4Byte TOTAL; + u2Byte DROP; + u1Byte Active; + u2Byte RptTime; + u1Byte RAWaitingCounter; + u1Byte RAPendingCounter; + u1Byte RAINFO; + u1Byte Initial_BW; + u1Byte BW_setting; + u1Byte DISPT; + u1Byte DISRA; + u1Byte Stage_RA; + u1Byte PRE_BW; + u1Byte MacID; + u1Byte Try_state; + u1Byte Try_done_cnt; + u2Byte RA_counter; + u1Byte Init_Rate_H; + u1Byte Init_Rate_M; + u1Byte Init_Rate_L; + u4Byte Total_TX; + u1Byte TRAINING_RATE; + u1Byte STOP_PT_COUNTER; + u1Byte MODE_SS; + u1Byte PT_smooth_factor; + u1Byte PTActive; + u1Byte PTTryState; + u1Byte PTStage; + u1Byte PTStopCount; + u1Byte PTPreRate; + u1Byte PTPreRssi; + u1Byte PTModeSS; + u1Byte RAstage; + u1Byte PTSmoothFactor; +}; +typedef struct _ODM_RA_Info_ ODM_RA_INFO_T; +typedef struct _ODM_RA_Info_ *PODM_RA_INFO_T; + +struct _FAST_ANTENNA_TRAINNING_ +{ + u1Byte Bssid[6]; + u1Byte antsel_rx_keep_0; + u1Byte antsel_rx_keep_1; + u1Byte antsel_rx_keep_2; + u4Byte antSumRSSI[7]; + u4Byte antRSSIcnt[7]; + u4Byte antAveRSSI[7]; + u1Byte FAT_State; + u4Byte TrainIdx; + u1Byte antsel_a[7]; + u1Byte antsel_b[7]; + u1Byte antsel_c[7]; + u4Byte MainAnt_Sum[7]; + u4Byte AuxAnt_Sum[7]; + u4Byte MainAnt_Cnt[7]; + u4Byte AuxAnt_Cnt[7]; + u4Byte MainAnt_Sum_CCK[7]; + u4Byte AuxAnt_Sum_CCK[7]; + u4Byte MainAnt_Cnt_CCK[7]; + u4Byte AuxAnt_Cnt_CCK[7]; + u1Byte RxIdleAnt; + BOOLEAN bBecomeLinked; + u4Byte MinMaxRSSI; + u1Byte idx_AntDiv_counter_2G; + u1Byte idx_AntDiv_counter_5G; + u4Byte AntDiv_2G_5G; + u4Byte CCK_counter_main; + u4Byte CCK_counter_aux; + u4Byte OFDM_counter_main; + u4Byte OFDM_counter_aux; +}; +typedef struct _FAST_ANTENNA_TRAINNING_ FAT_T; + +struct _Dynamic_Initial_Gain_Threshold_ +{ + BOOLEAN bStopDIG; + BOOLEAN bPauseDIG; + BOOLEAN bIgnoreDIG; + BOOLEAN bPSDInProgress; + u1Byte Dig_Enable_Flag; + u1Byte Dig_Ext_Port_Stage; + int RssiLowThresh; + int RssiHighThresh; + u4Byte FALowThresh; + u4Byte FAHighThresh; + u1Byte CurSTAConnectState; + u1Byte PreSTAConnectState; + u1Byte CurMultiSTAConnectState; + u1Byte PreIGValue; + u1Byte CurIGValue; + u1Byte BackupIGValue; + u1Byte BT30_CurIGI; + u1Byte IGIBackup; + s1Byte BackoffVal; + s1Byte BackoffVal_range_max; + s1Byte BackoffVal_range_min; + u1Byte rx_gain_range_max; + u1Byte rx_gain_range_min; + u1Byte Rssi_val_min; + u1Byte PreCCK_CCAThres; + u1Byte CurCCK_CCAThres; + u1Byte PreCCKPDState; + u1Byte CurCCKPDState; + u1Byte CCKPDBackup; + u1Byte LargeFAHit; + u1Byte ForbiddenIGI; + u4Byte Recover_cnt; + u1Byte DIG_Dynamic_MIN_0; + u1Byte DIG_Dynamic_MIN_1; + BOOLEAN bMediaConnect_0; + BOOLEAN bMediaConnect_1; + u4Byte AntDiv_RSSI_max; + u4Byte RSSI_max; + u1Byte *pbP2pLinkInProgress; +}; +typedef struct _Dynamic_Initial_Gain_Threshold_ DIG_T; + +struct _ODM_RATE_ADAPTIVE +{ + u1Byte Type; + u1Byte HighRSSIThresh; + u1Byte LowRSSIThresh; + u1Byte RATRState; + u1Byte LdpcThres; + BOOLEAN bLowerRtsRate; + BOOLEAN bUseLdpc; +}; +typedef struct _ODM_RATE_ADAPTIVE ODM_RATE_ADAPTIVE; + +struct _Dynamic_Power_Saving_ +{ + u1Byte PreCCAState; + u1Byte CurCCAState; + u1Byte PreRFState; + u1Byte CurRFState; + int Rssi_val_min; + u1Byte initialize; + u4Byte Reg874; + u4Byte RegC70; + u4Byte Reg85C; + u4Byte RegA74; +}; +typedef struct _Dynamic_Power_Saving_ PS_T; + +struct _Dynamic_Primary_CCA +{ + u1Byte PriCCA_flag; + u1Byte intf_flag; + u1Byte intf_type; + u1Byte DupRTS_flag; + u1Byte Monitor_flag; + u1Byte CH_offset; + u1Byte MF_state; +}; +typedef struct _Dynamic_Primary_CCA Pri_CCA_T; + +struct _RX_High_Power_ +{ + u1Byte RXHP_flag; + u1Byte PSD_func_trigger; + u1Byte PSD_bitmap_RXHP[80]; + u1Byte Pre_IGI; + u1Byte Cur_IGI; + u1Byte Pre_pw_th; + u1Byte Cur_pw_th; + BOOLEAN First_time_enter; + BOOLEAN RXHP_enable; + u1Byte TP_Mode; +}; +typedef struct _RX_High_Power_ RXHP_T; + +struct _Rate_Adaptive_Table_ +{ + u1Byte firstconnect; +}; +typedef struct _Rate_Adaptive_Table_ RA_T; + +struct __attribute__((aligned(8))) _SW_Antenna_Switch_ +{ + u1Byte Double_chk_flag; + u1Byte try_flag; + s4Byte PreRSSI; + u1Byte CurAntenna; + u1Byte PreAntenna; + u1Byte RSSI_Trying; + u1Byte TestMode; + u1Byte bTriggerAntennaSwitch; + u1Byte SelectAntennaMap; + u1Byte RSSI_target; + u1Byte reset_idx; + u1Byte SWAS_NoLink_State; + u4Byte SWAS_NoLink_BK_Reg860; + u4Byte SWAS_NoLink_BK_Reg92c; + BOOLEAN ANTA_ON; + BOOLEAN ANTB_ON; + u1Byte Ant5G; + u1Byte Ant2G; + s4Byte RSSI_sum_A; + s4Byte RSSI_sum_B; + s4Byte RSSI_cnt_A; + s4Byte RSSI_cnt_B; + u8Byte lastTxOkCnt; + u8Byte lastRxOkCnt; + u8Byte TXByteCnt_A; + u8Byte TXByteCnt_B; + u8Byte RXByteCnt_A; + u8Byte RXByteCnt_B; + u1Byte TrafficLoad; + u1Byte Train_time; + u1Byte Train_time_flag; +}; +typedef struct _SW_Antenna_Switch_ SWAT_T; + +struct _EDCA_TURBO_ +{ + BOOLEAN bCurrentTurboEDCA; + BOOLEAN bIsCurRDLState; +}; +typedef struct _EDCA_TURBO_ EDCA_T; + +struct _ANT_DETECTED_INFO +{ + BOOLEAN bAntDetected; + u4Byte dBForAntA; + u4Byte dBForAntB; + u4Byte dBForAntO; +}; +typedef struct _ANT_DETECTED_INFO ANT_DETECTED_INFO; + +struct _IQK_MATRIX_REGS_SETTING +{ + BOOLEAN bIQKDone; + s4Byte Value[1][8]; +}; +typedef struct _IQK_MATRIX_REGS_SETTING IQK_MATRIX_REGS_SETTING; + +struct __attribute__((aligned(8))) ODM_RF_Calibration_Structure +{ + u4Byte RegA24; + s4Byte RegE94; + s4Byte RegE9C; + s4Byte RegEB4; + s4Byte RegEBC; + u1Byte TXPowercount; + BOOLEAN bTXPowerTrackingInit; + BOOLEAN bTXPowerTracking; + u1Byte TxPowerTrackControl; + u1Byte TM_Trigger; + u1Byte InternalPA5G[2]; + u1Byte ThermalMeter[2]; + u1Byte ThermalValue; + u1Byte ThermalValue_LCK; + u1Byte ThermalValue_IQK; + u1Byte ThermalValue_DPK; + u1Byte ThermalValue_AVG[8]; + u1Byte ThermalValue_AVG_index; + u1Byte ThermalValue_RxGain; + u1Byte ThermalValue_Crystal; + u1Byte ThermalValue_DPKstore; + u1Byte ThermalValue_DPKtrack; + BOOLEAN TxPowerTrackingInProgress; + BOOLEAN bReloadtxpowerindex; + u1Byte bRfPiEnable; + u4Byte TXPowerTrackingCallbackCnt; + u1Byte bCCKinCH14; + u1Byte CCK_index[1]; + s1Byte PowerIndexOffset_CCK[1]; + s1Byte DeltaPowerIndex_CCK[1]; + s1Byte DeltaPowerIndexLast_CCK[1]; + u1Byte OFDM_index[1]; + s1Byte PowerIndexOffset_OFDM[1]; + s1Byte DeltaPowerIndex_OFDM[1]; + s1Byte DeltaPowerIndexLast_OFDM[1]; + BOOLEAN bTxPowerChanged; + s1Byte XtalOffset; + s1Byte XtalOffsetLast; + u1Byte ThermalValue_HP[8]; + u1Byte ThermalValue_HP_index; + IQK_MATRIX_REGS_SETTING IQKMatrixRegSetting[14]; + u1Byte Delta_LCK; + s1Byte BBSwingDiff2G; + s1Byte BBSwingDiff5G; + s1Byte DeltaSwingTableIdx_2GCCKA_P[30]; + s1Byte DeltaSwingTableIdx_2GCCKA_N[30]; + s1Byte DeltaSwingTableIdx_2GA_P[30]; + s1Byte DeltaSwingTableIdx_2GA_N[30]; + s1Byte DeltaSwingTableXtal_P[30]; + s1Byte DeltaSwingTableXtal_N[30]; + u4Byte RegC04; + u4Byte Reg874; + u4Byte RegC08; + u4Byte RegB68; + u4Byte RegB6C; + u4Byte Reg870; + u4Byte Reg860; + u4Byte Reg864; + BOOLEAN bIQKInitialized; + BOOLEAN bLCKInProgress; + BOOLEAN bAntennaDetected; + BOOLEAN bNeedIQK; + BOOLEAN bIQKInProgress; + u1Byte Delta_IQK; + u4Byte ADDA_backup[16]; + u4Byte IQK_MAC_backup[4]; + u4Byte IQK_BB_backup_recover[9]; + u4Byte IQK_BB_backup[9]; + u4Byte TxIQC_8723B[2][3][2]; + u4Byte RxIQC_8723B[2][2][2]; + u8Byte IQK_StartTime; + u8Byte IQK_ProgressingTime; + u4Byte LOK_Result; + u4Byte APKoutput[2][2]; + u1Byte bAPKdone; + u1Byte bAPKThermalMeterIgnore; + BOOLEAN bDPKFail; + u1Byte bDPdone; + u1Byte bDPPathAOK; + u1Byte bDPPathBOK; + u4Byte TxLOK[2]; + u4Byte DpkTxAGC; + s4Byte DpkGain; + u4Byte DpkThermal[4]; +}; +typedef struct ODM_RF_Calibration_Structure ODM_RF_CAL_T; + + +struct __attribute__((aligned(8))) DM_Out_Source_Dynamic_Mechanism_Structure +{ + PADAPTER Adapter; + BOOLEAN odm_ready; + PHY_REG_PG_TYPE PhyRegPgValueType; + u1Byte PhyRegPgVersion; + u4Byte NumQryPhyStatusAll; + u4Byte LastNumQryPhyStatusAll; + u4Byte RxPWDBAve; + BOOLEAN MPDIG_2G; + u1Byte Times_2G; + BOOLEAN bCckHighPower; + u1Byte RFPathRxEnable; + u1Byte ControlChannel; + u1Byte SupportPlatform; + u4Byte SupportAbility; + u1Byte SupportInterface; + u4Byte SupportICType; + u1Byte CutVersion; + u1Byte FabVersion; + u1Byte RFType; + u1Byte RFEType; + u1Byte BoardType; + u1Byte PackageType; + u1Byte TypeGLNA; + u1Byte TypeGPA; + u1Byte TypeALNA; + u1Byte TypeAPA; + u1Byte ExtLNA; + u1Byte ExtLNA5G; + u1Byte ExtPA; + u1Byte ExtPA5G; + u1Byte ExtTRSW; + u1Byte PatchID; + BOOLEAN bInHctTest; + BOOLEAN bWIFITest; + BOOLEAN bDualMacSmartConcurrent; + u4Byte BK_SupportAbility; + u1Byte AntDivType; + u1Byte odm_Regulation2_4G; + u1Byte odm_Regulation5G; + u1Byte u1Byte_temp; + PADAPTER PADAPTER_temp; + u1Byte *pMacPhyMode; + u8Byte *pNumTxBytesUnicast; + u8Byte *pNumRxBytesUnicast; + u1Byte *pWirelessMode; + u1Byte *pBandType; + u1Byte *pSecChOffset; + u1Byte *pSecurity; + u1Byte *pBandWidth; + u1Byte *pChannel; + BOOLEAN DPK_Done; + BOOLEAN *pbGetValueFromOtherMac; + PADAPTER *pBuddyAdapter; + BOOLEAN *pbMasterOfDMSP; + BOOLEAN *pbScanInProcess; + BOOLEAN *pbPowerSaving; + u1Byte *pOnePathCCA; + u1Byte *pAntennaTest; + BOOLEAN *pbNet_closed; + u1Byte *mp_mode; + u1Byte *pu1ForcedIgiLb; + BOOLEAN *pIsFcsModeEnable; + pu2Byte pForcedDataRate; + BOOLEAN bLinkInProcess; + BOOLEAN bWIFI_Direct; + BOOLEAN bWIFI_Display; + BOOLEAN bLinked; + BOOLEAN bsta_state; + u1Byte RSSI_Min; + u1Byte InterfaceIndex; + BOOLEAN bIsMPChip; + BOOLEAN bOneEntryOnly; + BOOLEAN bBtEnabled; + BOOLEAN bBtConnectProcess; + u1Byte btHsRssi; + BOOLEAN bBtHsOperation; + BOOLEAN bBtDisableEdcaTurbo; + BOOLEAN bBtLimitedDig; + u1Byte RSSI_A; + u1Byte RSSI_B; + u8Byte RSSI_TRSW; + u8Byte RSSI_TRSW_H; + u8Byte RSSI_TRSW_L; + u8Byte RSSI_TRSW_iso; + u1Byte RxRate; + BOOLEAN bNoisyState; + u1Byte TxRate; + u1Byte LinkedInterval; + u1Byte preChannel; + u4Byte TxagcOffsetValueA; + BOOLEAN IsTxagcOffsetPositiveA; + u4Byte TxagcOffsetValueB; + BOOLEAN IsTxagcOffsetPositiveB; + u8Byte lastTxOkCnt; + u8Byte lastRxOkCnt; + u4Byte BbSwingOffsetA; + BOOLEAN IsBbSwingOffsetPositiveA; + u4Byte BbSwingOffsetB; + BOOLEAN IsBbSwingOffsetPositiveB; + u1Byte antdiv_rssi; + u1Byte AntType; + u1Byte pre_AntType; + u1Byte antdiv_period; + u1Byte antdiv_select; + u1Byte NdpaPeriod; + BOOLEAN H2C_RARpt_connect; + u2Byte NHM_cnt_0; + u2Byte NHM_cnt_1; + s1Byte TH_L2H_ini; + s1Byte TH_EDCCA_HL_diff; + s1Byte TH_L2H_ini_backup; + BOOLEAN Carrier_Sense_enable; + u1Byte Adaptivity_IGI_upper; + BOOLEAN adaptivity_flag; + u1Byte DCbackoff; + BOOLEAN Adaptivity_enable; + u1Byte APTotalNum; + ADAPTIVITY_STATISTICS Adaptivity; + ODM_NOISE_MONITOR noise_level; + PSTA_INFO_T pODM_StaInfo[7]; + u2Byte CurrminRptTime; + ODM_RA_INFO_T RAInfo[7]; + BOOLEAN RaSupport88E; + ODM_PHY_DBG_INFO_T PhyDbgInfo; + ODM_MAC_INFO *pMacInfo; + FAT_T DM_FatTable; + DIG_T DM_DigTable; + PS_T DM_PSTable; + Pri_CCA_T DM_PriCCA; + RXHP_T DM_RXHP_Table; + RA_T DM_RA_Table; + PROM_INFO pROMInfo; + FALSE_ALARM_STATISTICS FalseAlmCnt; + CFO_TRACKING DM_CfoTrack; + FALSE_ALARM_STATISTICS FlaseAlmCntBuddyAdapter; + SWAT_T DM_SWAT_Table; + BOOLEAN RSSI_test; + BOOLEAN bNoBeaconIn2s; + EDCA_T DM_EDCA_Table; + u4Byte WMMEDCA_BE; + BOOLEAN *pbDriverStopped; + BOOLEAN *pbDriverIsGoingToPnpSetPowerSleep; + BOOLEAN *pinit_adpt_in_progress; + u1Byte bUseRAMask; + ODM_RATE_ADAPTIVE RateAdaptive; + ANT_DETECTED_INFO AntDetectedInfo; + ODM_RF_CAL_T RFCalibrateInfo; + u1Byte BbSwingIdxOfdm[1]; + u1Byte BbSwingIdxOfdmCurrent; + u1Byte BbSwingIdxOfdmBase[1]; + BOOLEAN BbSwingFlagOfdm; + u1Byte BbSwingIdxCck[1]; + u1Byte BbSwingIdxCckCurrent; + u1Byte BbSwingIdxCckBase[1]; + u1Byte DefaultOfdmIndex; + u1Byte DefaultCckIndex; + BOOLEAN BbSwingFlagCck; + s1Byte Absolute_OFDMSwingIdx[1]; + s1Byte Absolute_CCKSwingIdx[1]; + s1Byte Remnant_OFDMSwingIdx[1]; + s1Byte Remnant_CCKSwingIdx[1]; + s1Byte Modify_TxAGC_Value; + BOOLEAN Modify_TxAGC_Flag_PathA; + BOOLEAN Modify_TxAGC_Flag_PathB; + BOOLEAN Modify_TxAGC_Flag_PathA_CCK; +}; +typedef struct DM_Out_Source_Dynamic_Mechanism_Structure DM_ODM_T; +typedef struct DM_Out_Source_Dynamic_Mechanism_Structure *PDM_ODM_T; + + +enum _PWRTRACK_CONTROL_METHOD //: __int32 +{ + BBSWING = 0x0, + TXAGC = 0x1, + MIX_MODE = 0x2, +}; +typedef enum _PWRTRACK_CONTROL_METHOD PWRTRACK_METHOD; + +typedef void (*FuncSetPwr)(PDM_ODM_T, PWRTRACK_METHOD, u1Byte, u1Byte); +typedef void (*FuncIQK)(PDM_ODM_T, u1Byte, u1Byte, u1Byte); +typedef void (*FuncLCK)(PDM_ODM_T); +typedef void (*FuncSwing)(PDM_ODM_T, ps1Byte *, ps1Byte *, ps1Byte *, ps1Byte *); +typedef void (*FuncSwingXtal)(PDM_ODM_T, ps1Byte *, ps1Byte *); +typedef void (*FuncSetXtal)(PDM_ODM_T); + +struct _TXPWRTRACK_CFG +{ + u1Byte SwingTableSize_CCK; + u1Byte SwingTableSize_OFDM; + u1Byte Threshold_IQK; + u1Byte AverageThermalNum; + u1Byte RfPathCount; + u4Byte ThermalRegAddr; + FuncSetPwr ODM_TxPwrTrackSetPwr; + FuncIQK DoIQK; + FuncLCK PHY_LCCalibrate; + FuncSwing GetDeltaSwingTable; + FuncSwingXtal GetDeltaSwingXtalTable; + FuncSetXtal ODM_TxXtalTrackSetXtal; +}; +typedef struct _TXPWRTRACK_CFG *PTXPWRTRACK_CFG; + +struct _RSVDPAGE_LOC +{ + uint8_t LocProbeRsp; + uint8_t LocPsPoll; + uint8_t LocNullData; + uint8_t LocQosNull; + uint8_t LocBTQosNull; +}; +typedef struct _RSVDPAGE_LOC RSVDPAGE_LOC_8195A; +typedef struct _RSVDPAGE_LOC *PRSVDPAGE_LOC_8195A; + +enum _RT_MEDIA_STATUS //: __int32 +{ + RT_MEDIA_DISCONNECT = 0x0, + RT_MEDIA_CONNECT = 0x1, +}; + +struct _H2CParam_RsvdPage_ +{ + RSVDPAGE_LOC_8195A RsvdPageLoc; + uint8_t *ReservedPagePacket; + uint32_t TotalPacketLen; +}; +typedef struct _H2CParam_RsvdPage_ H2CParam_RsvdPage; +typedef struct _H2CParam_RsvdPage_ *PH2CParam_RsvdPage; + +struct _NDIS_802_11_VARIABLE_IEs +{ + uint8_t ElementID; + uint8_t Length; + uint8_t data[1]; +}; +typedef struct _NDIS_802_11_VARIABLE_IEs *PNDIS_802_11_VARIABLE_IEs; + +enum _NDIS_802_11_AUTHENTICATION_MODE //: __int32 +{ + Ndis802_11AuthModeOpen = 0x0, + Ndis802_11AuthModeShared = 0x1, + Ndis802_11AuthModeAutoSwitch = 0x2, + Ndis802_11AuthModeWPA = 0x3, + Ndis802_11AuthModeWPAPSK = 0x4, + Ndis802_11AuthModeWPANone = 0x5, + Ndis802_11AuthModeWAPI = 0x6, + Ndis802_11AuthModeMax = 0x7, +}; +typedef enum _NDIS_802_11_AUTHENTICATION_MODE NDIS_802_11_AUTHENTICATION_MODE; + +enum _NDIS_802_11_WEP_STATUS //: __int32 +{ + Ndis802_11WEPEnabled = 0x0, + Ndis802_11Encryption1Enabled = 0x0, + Ndis802_11WEPDisabled = 0x1, + Ndis802_11EncryptionDisabled = 0x1, + Ndis802_11WEPKeyAbsent = 0x2, + Ndis802_11Encryption1KeyAbsent = 0x2, + Ndis802_11WEPNotSupported = 0x3, + Ndis802_11EncryptionNotSupported = 0x3, + Ndis802_11Encryption2Enabled = 0x4, + Ndis802_11Encryption2KeyAbsent = 0x5, + Ndis802_11Encryption3Enabled = 0x6, + Ndis802_11Encryption3KeyAbsent = 0x7, + Ndis802_11_EncrypteionWAPI = 0x8, +}; +typedef enum _NDIS_802_11_WEP_STATUS NDIS_802_11_WEP_STATUS; + +struct __attribute__((packed)) __attribute__((aligned(1))) rtk_sc +{ + u8 pattern_type; + u8 smac[6]; + u8 bssid[2][6]; + u8 ssid[32]; + u8 password[64]; + u32 ip_addr; + u8 sync_pkt[9][6]; + u8 profile_pkt[256][6]; + u32 profile_pkt_len; + u8 plain_buf[256]; + u32 plain_len; + u8 key_buf[32]; + u32 key_len; + u8 crypt_buf[256]; + u32 crypt_len; + s32 pattern_index; + struct pattern_ops *pattern[5]; + u8 max_pattern_num; + u8 pin[65]; + u8 default_pin[65]; + u8 have_pin; + u16 device_type; + u8 device_name[64]; + u8 bcast_crypt_buf[256]; +}; +struct pattern_ops; + +typedef s32 (*sc_check_pattern_call_back)(struct pattern_ops *, struct rtk_sc *); +typedef s32 (*sc_get_cipher_info_call_back)(struct pattern_ops *, struct rtk_sc *); +typedef s32 (*sc_generate_key_call_back)(struct pattern_ops *, struct rtk_sc *); +typedef s32 (*sc_decode_profile_call_back)(struct pattern_ops *, struct rtk_sc *); +typedef s32 (*sc_get_tlv_info_call_back)(struct pattern_ops *, struct rtk_sc *); + +struct pattern_ops +{ + u32 index; + u32 flag; + u8 name[32]; + sc_check_pattern_call_back check_pattern; + sc_get_cipher_info_call_back get_cipher_info; + sc_generate_key_call_back generate_key; + sc_decode_profile_call_back decode_profile; + sc_get_tlv_info_call_back get_tlv_info; +}; + +struct __attribute__((aligned(2))) _WL_PWR_CFG_ +{ + uint16_t offset; + uint8_t cut_msk; + u8 fab_msk : 4; + u8 interface_msk : 4; + u8 base : 4; + u8 cmd : 4; + uint8_t msk; + uint8_t value; +}; +typedef struct _WL_PWR_CFG_ WLAN_PWR_CFG; + + +struct cmd_hdl +{ + unsigned int parmsize; + uint8_t (*h2cfuns)(struct _ADAPTER *, uint8_t *); +}; + +struct _cmd_callback +{ + uint32_t cmd_code; + void (*callback)(_adapter *, struct cmd_obj *); +}; + +enum _ODM_Common_Info_Definition //: __int32 +{ + ODM_CMNINFO_PLATFORM = 0x0, + ODM_CMNINFO_ABILITY = 0x1, + ODM_CMNINFO_INTERFACE = 0x2, + ODM_CMNINFO_MP_TEST_CHIP = 0x3, + ODM_CMNINFO_IC_TYPE = 0x4, + ODM_CMNINFO_CUT_VER = 0x5, + ODM_CMNINFO_FAB_VER = 0x6, + ODM_CMNINFO_RF_TYPE = 0x7, + ODM_CMNINFO_RFE_TYPE = 0x8, + ODM_CMNINFO_BOARD_TYPE = 0x9, + ODM_CMNINFO_PACKAGE_TYPE = 0xA, + ODM_CMNINFO_EXT_LNA = 0xB, + ODM_CMNINFO_5G_EXT_LNA = 0xC, + ODM_CMNINFO_EXT_PA = 0xD, + ODM_CMNINFO_5G_EXT_PA = 0xE, + ODM_CMNINFO_GPA = 0xF, + ODM_CMNINFO_APA = 0x10, + ODM_CMNINFO_GLNA = 0x11, + ODM_CMNINFO_ALNA = 0x12, + ODM_CMNINFO_EXT_TRSW = 0x13, + ODM_CMNINFO_PATCH_ID = 0x14, + ODM_CMNINFO_BINHCT_TEST = 0x15, + ODM_CMNINFO_BWIFI_TEST = 0x16, + ODM_CMNINFO_SMART_CONCURRENT = 0x17, + ODM_CMNINFO_DOMAIN_CODE_2G = 0x18, + ODM_CMNINFO_DOMAIN_CODE_5G = 0x19, + ODM_CMNINFO_EEPROMVERSION = 0x1A, + ODM_CMNINFO_CRYSTALCAP = 0x1B, + ODM_CMNINFO_MAC_PHY_MODE = 0x1C, + ODM_CMNINFO_TX_UNI = 0x1D, + ODM_CMNINFO_RX_UNI = 0x1E, + ODM_CMNINFO_WM_MODE = 0x1F, + ODM_CMNINFO_BAND = 0x20, + ODM_CMNINFO_SEC_CHNL_OFFSET = 0x21, + ODM_CMNINFO_SEC_MODE = 0x22, + ODM_CMNINFO_BW = 0x23, + ODM_CMNINFO_CHNL = 0x24, + ODM_CMNINFO_FORCED_RATE = 0x25, + ODM_CMNINFO_DMSP_GET_VALUE = 0x26, + ODM_CMNINFO_BUDDY_ADAPTOR = 0x27, + ODM_CMNINFO_DMSP_IS_MASTER = 0x28, + ODM_CMNINFO_SCAN = 0x29, + ODM_CMNINFO_POWER_SAVING = 0x2A, + ODM_CMNINFO_ONE_PATH_CCA = 0x2B, + ODM_CMNINFO_DRV_STOP = 0x2C, + ODM_CMNINFO_PNP_IN = 0x2D, + ODM_CMNINFO_INIT_ON = 0x2E, + ODM_CMNINFO_ANT_TEST = 0x2F, + ODM_CMNINFO_NET_CLOSED = 0x30, + ODM_CMNINFO_MP_MODE = 0x31, + ODM_CMNINFO_FORCED_IGI_LB = 0x32, + ODM_CMNINFO_P2P_LINK = 0x33, + ODM_CMNINFO_FCS_MODE = 0x34, + ODM_CMNINFO_WIFI_DIRECT = 0x35, + ODM_CMNINFO_WIFI_DISPLAY = 0x36, + ODM_CMNINFO_LINK_IN_PROGRESS = 0x37, + ODM_CMNINFO_LINK = 0x38, + ODM_CMNINFO_STATION_STATE = 0x39, + ODM_CMNINFO_RSSI_MIN = 0x3A, + ODM_CMNINFO_DBG_COMP = 0x3B, + ODM_CMNINFO_DBG_LEVEL = 0x3C, + ODM_CMNINFO_RA_THRESHOLD_HIGH = 0x3D, + ODM_CMNINFO_RA_THRESHOLD_LOW = 0x3E, + ODM_CMNINFO_RF_ANTENNA_TYPE = 0x3F, + ODM_CMNINFO_BT_ENABLED = 0x40, + ODM_CMNINFO_BT_HS_CONNECT_PROCESS = 0x41, + ODM_CMNINFO_BT_HS_RSSI = 0x42, + ODM_CMNINFO_BT_OPERATION = 0x43, + ODM_CMNINFO_BT_LIMITED_DIG = 0x44, + ODM_CMNINFO_BT_DISABLE_EDCA = 0x45, + ODM_CMNINFO_NO_BEACON_IN_2S = 0x46, + ODM_CMNINFO_STA_STATUS = 0x47, + ODM_CMNINFO_PHY_STATUS = 0x48, + ODM_CMNINFO_MAC_STATUS = 0x49, + ODM_CMNINFO_MAX = 0x4A, +}; +typedef enum _ODM_Common_Info_Definition ODM_CMNINFO_E; + +enum _ODM_Support_Ability_Definition // : __int32 +{ + ODM_BB_DIG = 0x1, + ODM_BB_RA_MASK = 0x2, + ODM_BB_DYNAMIC_TXPWR = 0x4, + ODM_BB_FA_CNT = 0x8, + ODM_BB_RSSI_MONITOR = 0x10, + ODM_BB_CCK_PD = 0x20, + ODM_BB_ANT_DIV = 0x40, + ODM_BB_PWR_SAVE = 0x80, + ODM_BB_PWR_TRAIN = 0x100, + ODM_BB_RATE_ADAPTIVE = 0x200, + ODM_BB_PATH_DIV = 0x400, + ODM_BB_PSD = 0x800, + ODM_BB_RXHP = 0x1000, + ODM_BB_ADAPTIVITY = 0x2000, + ODM_BB_CFO_TRACKING = 0x4000, + ODM_BB_NHM_CNT = 0x8000, + ODM_BB_PRIMARY_CCA = 0x10000, + ODM_MAC_EDCA_TURBO = 0x100000, + ODM_MAC_EARLY_MODE = 0x200000, + ODM_RF_TX_PWR_TRACK = 0x1000000, + ODM_RF_RX_GAIN_TRACK = 0x2000000, + ODM_RF_CALIBRATION = 0x4000000, +}; + +enum _RF_PATH //: __int32 +{ + RF_PATH_A = 0x0, + RF_PATH_B = 0x1, + RF_PATH_C = 0x2, + RF_PATH_D = 0x3, +}; +typedef enum _RF_PATH RF_PATH; + +enum _EXTCHNL_OFFSET //: __int32 +{ + EXTCHNL_OFFSET_NO_EXT = 0x0, + EXTCHNL_OFFSET_UPPER = 0x1, + EXTCHNL_OFFSET_NO_DEF = 0x2, + EXTCHNL_OFFSET_LOWER = 0x3, +}; +typedef enum _EXTCHNL_OFFSET EXTCHNL_OFFSET; + +enum MGN_RATE //: __int32 +{ + MGN_1M = 0x2, + MGN_2M = 0x4, + MGN_5_5M = 0xB, + MGN_6M = 0xC, + MGN_9M = 0x12, + MGN_11M = 0x16, + MGN_12M = 0x18, + MGN_18M = 0x24, + MGN_24M = 0x30, + MGN_36M = 0x48, + MGN_48M = 0x60, + MGN_54M = 0x6C, + MGN_MCS32 = 0x7F, + MGN_MCS0 = 0x80, + MGN_MCS1 = 0x81, + MGN_MCS2 = 0x82, + MGN_MCS3 = 0x83, + MGN_MCS4 = 0x84, + MGN_MCS5 = 0x85, + MGN_MCS6 = 0x86, + MGN_MCS7 = 0x87, + MGN_MCS8 = 0x88, + MGN_MCS9 = 0x89, + MGN_MCS10 = 0x8A, + MGN_MCS11 = 0x8B, + MGN_MCS12 = 0x8C, + MGN_MCS13 = 0x8D, + MGN_MCS14 = 0x8E, + MGN_MCS15 = 0x8F, + MGN_MCS16 = 0x90, + MGN_MCS17 = 0x91, + MGN_MCS18 = 0x92, + MGN_MCS19 = 0x93, + MGN_MCS20 = 0x94, + MGN_MCS21 = 0x95, + MGN_MCS22 = 0x96, + MGN_MCS23 = 0x97, + MGN_MCS24 = 0x98, + MGN_MCS25 = 0x99, + MGN_MCS26 = 0x9A, + MGN_MCS27 = 0x9B, + MGN_MCS28 = 0x9C, + MGN_MCS29 = 0x9D, + MGN_MCS30 = 0x9E, + MGN_MCS31 = 0x9F, + MGN_VHT1SS_MCS0 = 0xA0, + MGN_VHT1SS_MCS1 = 0xA1, + MGN_VHT1SS_MCS2 = 0xA2, + MGN_VHT1SS_MCS3 = 0xA3, + MGN_VHT1SS_MCS4 = 0xA4, + MGN_VHT1SS_MCS5 = 0xA5, + MGN_VHT1SS_MCS6 = 0xA6, + MGN_VHT1SS_MCS7 = 0xA7, + MGN_VHT1SS_MCS8 = 0xA8, + MGN_VHT1SS_MCS9 = 0xA9, + MGN_VHT2SS_MCS0 = 0xAA, + MGN_VHT2SS_MCS1 = 0xAB, + MGN_VHT2SS_MCS2 = 0xAC, + MGN_VHT2SS_MCS3 = 0xAD, + MGN_VHT2SS_MCS4 = 0xAE, + MGN_VHT2SS_MCS5 = 0xAF, + MGN_VHT2SS_MCS6 = 0xB0, + MGN_VHT2SS_MCS7 = 0xB1, + MGN_VHT2SS_MCS8 = 0xB2, + MGN_VHT2SS_MCS9 = 0xB3, + MGN_VHT3SS_MCS0 = 0xB4, + MGN_VHT3SS_MCS1 = 0xB5, + MGN_VHT3SS_MCS2 = 0xB6, + MGN_VHT3SS_MCS3 = 0xB7, + MGN_VHT3SS_MCS4 = 0xB8, + MGN_VHT3SS_MCS5 = 0xB9, + MGN_VHT3SS_MCS6 = 0xBA, + MGN_VHT3SS_MCS7 = 0xBB, + MGN_VHT3SS_MCS8 = 0xBC, + MGN_VHT3SS_MCS9 = 0xBD, + MGN_VHT4SS_MCS0 = 0xBE, + MGN_VHT4SS_MCS1 = 0xBF, + MGN_VHT4SS_MCS2 = 0xC0, + MGN_VHT4SS_MCS3 = 0xC1, + MGN_VHT4SS_MCS4 = 0xC2, + MGN_VHT4SS_MCS5 = 0xC3, + MGN_VHT4SS_MCS6 = 0xC4, + MGN_VHT4SS_MCS7 = 0xC5, + MGN_VHT4SS_MCS8 = 0xC6, + MGN_VHT4SS_MCS9 = 0xC7, + MGN_UNKNOWN = 0xC8, +}; + +struct _RT_CHANNEL_PLAN_2G +{ + unsigned __int8 Channel[14]; + unsigned __int8 Len; +}; +typedef struct _RT_CHANNEL_PLAN_2G RT_CHANNEL_PLAN_2G; + +struct _RT_CHANNEL_PLAN_MAP +{ + unsigned __int8 ChannelPlan; + unsigned __int8 Index2G; + unsigned __int8 PwrLmt; +}; +typedef struct _RT_CHANNEL_PLAN_MAP RT_CHANNEL_PLAN_MAP; + + +typedef int (*mac_monitor_ptr)(unsigned __int8 *, char); + +struct mlme_handler +{ + unsigned int num; + unsigned int (*func)(_adapter *, union recv_frame *); +}; + +struct fwevent +{ + uint32_t parmsize; + void (*event_callback)(_adapter *, uint8_t *); +}; + +struct recv_buf +{ + _list list; + PADAPTER adapter; + uint32_t len; + uint8_t *phead; + uint8_t *pdata; + uint8_t *ptail; + uint8_t *pend; + _pkt *pskb; +}; + +struct recv_reorder_ctrl +{ + _adapter *padapter; + uint8_t enable; + uint16_t indicate_seq; + uint16_t wend_b; + uint8_t wsize_b; + _queue pending_recvframe_queue; + _timer reordering_ctrl_timer; +}; + +enum _ODM_RF_RADIO_PATH // : __int32 +{ + ODM_RF_PATH_A = 0x0, + ODM_RF_PATH_B = 0x1, + ODM_RF_PATH_C = 0x2, + ODM_RF_PATH_D = 0x3, + ODM_RF_PATH_AB = 0x4, + ODM_RF_PATH_AC = 0x5, + ODM_RF_PATH_AD = 0x6, + ODM_RF_PATH_BC = 0x7, + ODM_RF_PATH_BD = 0x8, + ODM_RF_PATH_CD = 0x9, + ODM_RF_PATH_ABC = 0xA, + ODM_RF_PATH_ACD = 0xB, + ODM_RF_PATH_BCD = 0xC, + ODM_RF_PATH_ABCD = 0xD, +}; +typedef enum _ODM_RF_RADIO_PATH ODM_RF_RADIO_PATH_E; + +enum tag_PhyDM_TRx_MUX_Type //: __int32 +{ + PhyDM_SHUTDOWN = 0x0, + PhyDM_STANDBY_MODE = 0x1, + PhyDM_TX_MODE = 0x2, + PhyDM_RX_MODE = 0x3, +}; +typedef enum tag_PhyDM_TRx_MUX_Type PhyDM_Trx_MUX_Type; + +enum tag_PhyDM_MACEDCCA_Type //: __int32 +{ + PhyDM_IGNORE_EDCCA = 0x0, + PhyDM_DONT_IGNORE_EDCCA = 0x1, +}; +typedef enum tag_PhyDM_MACEDCCA_Type PhyDM_MACEDCCA_Type; + +enum tag_ODM_PauseDIG_Type //: __int32 +{ + ODM_PAUSE_DIG = 0x1, + ODM_RESUME_DIG = 0x2, +}; +typedef enum tag_ODM_PauseDIG_Type ODM_Pause_DIG_TYPE; + +enum tag_ODM_PauseCCKPD_Type //: __int32 +{ + ODM_PAUSE_CCKPD = 0x1, + ODM_RESUME_CCKPD = 0x2, +}; +typedef enum tag_ODM_PauseCCKPD_Type ODM_Pause_CCKPD_TYPE; + +struct _ODM_Per_Pkt_Info_ +{ + u1Byte DataRate; + u1Byte StationID; + BOOLEAN bPacketMatchBSSID; + BOOLEAN bPacketToSelf; + BOOLEAN bPacketBeacon; +}; +typedef struct _ODM_Per_Pkt_Info_ *PODM_PACKET_INFO_T; + +enum _HAL_STATUS //: __int32 +{ + HAL_STATUS_SUCCESS = 0x0, + HAL_STATUS_FAILURE = 0x1, +}; +typedef enum _HAL_STATUS HAL_STATUS; + +struct _ODM_Phy_Status_Info_ +{ + u1Byte RxPWDBAll; + u1Byte SignalQuality; + u1Byte RxMIMOSignalStrength[1]; + s1Byte RecvSignalPower; + u1Byte SignalStrength; +}; +typedef struct _ODM_Phy_Status_Info_ *PODM_PHY_INFO_T; + +enum _ODM_RF_Config_Type // : __int32 +{ + CONFIG_RF_RADIO = 0x0, + CONFIG_RF_TXPWR_LMT = 0x1, +}; +typedef enum _ODM_RF_Config_Type ODM_RF_Config_Type; + +enum _ODM_BB_Config_Type //: __int32 +{ + CONFIG_BB_PHY_REG = 0x0, + CONFIG_BB_AGC_TAB = 0x1, + CONFIG_BB_AGC_TAB_2G = 0x2, + CONFIG_BB_AGC_TAB_5G = 0x3, + CONFIG_BB_PHY_REG_PG = 0x4, + CONFIG_BB_PHY_REG_MP = 0x5, + CONFIG_BB_AGC_TAB_DIFF = 0x6, +}; +typedef enum _ODM_BB_Config_Type ODM_BB_Config_Type; + +enum _ODM_FW_Config_Type //: __int32 +{ + CONFIG_FW_NIC = 0x0, + CONFIG_FW_NIC_2 = 0x1, + CONFIG_FW_AP = 0x2, + CONFIG_FW_MP = 0x3, + CONFIG_FW_WoWLAN = 0x4, + CONFIG_FW_WoWLAN_2 = 0x5, + CONFIG_FW_AP_WoWLAN = 0x6, + CONFIG_FW_BT = 0x7, +}; +typedef enum _ODM_FW_Config_Type ODM_FW_Config_Type; + + +#endif // _WLAN_LIB_H + diff --git a/RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wlan_lib.h b/RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wlan_lib.h index f47ad75..9e92109 100644 --- a/RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wlan_lib.h +++ b/RTL00_SDKV35a/component/common/drivers/wlan/realtek/include/wlan_lib.h @@ -1,3 +1,7 @@ +/* + wlan_lib.h + RTL871x pvvx +*/ #ifndef _WIFI_LIB_H #define _WIFI_LIB_H @@ -8,152 +12,31 @@ extern "C" { #endif -// rom_rtw_message.o -enum $BFA04BDFA6C0C275C890D1E658AFCEEF : __int32 -{ - ROM_E_RTW_MSGP_PWR_INDEX_1 = 0x0, - ROM_E_RTW_MSGP_PWR_INDEX_2 = 0x1, - ROM_E_RTW_MSGP_RX_INFO_1 = 0x2, - ROM_E_RTW_MSGP_RX_INFO_2 = 0x3, - ROM_E_RTW_MSGP_RX_INFO_3 = 0x4, - ROM_E_RTW_MSGP_RX_INFO_4 = 0x5, - ROM_E_RTW_MSGP_TX_RATE_1 = 0x6, - ROM_E_RTW_MSGP_TX_RATE_2 = 0x7, - ROM_E_RTW_MSGP_DM_RA_1 = 0x8, - ROM_E_RTW_MSGP_DM_RA_2 = 0x9, - ROM_E_RTW_MSGP_DM_RA_3 = 0xA, - ROM_E_RTW_MSGP_DM_RA_4 = 0xB, - ROM_E_RTW_MSGP_DM_DIG_1 = 0xC, - ROM_E_RTW_MSGP_PWR_TRACKING_1 = 0xD, - ROM_E_RTW_MSGP_PWR_TRACKING_2 = 0xE, - ROM_E_RTW_MSGP_PWR_TRACKING_3 = 0xF, - ROM_E_RTW_MSGP_PWR_TRACKING_4 = 0x10, - ROM_E_RTW_MSGP_PWR_TRACKING_5 = 0x11, - ROM_E_RTW_MSGP_PWR_TRACKING_6 = 0x12, - ROM_E_RTW_MSGP_PWR_TRACKING_7 = 0x13, - ROM_E_RTW_MSGP_RF_IQK_1 = 0x14, - ROM_E_RTW_MSGP_RF_IQK_2 = 0x15, - ROM_E_RTW_MSGP_RF_IQK_3 = 0x16, - ROM_E_RTW_MSGP_RF_IQK_4 = 0x17, - ROM_E_RTW_MSGP_RF_IQK_5 = 0x18, - ROM_E_RTW_MSGP_DM_ADAPTIVITY_1 = 0x19, - ROM_E_RTW_MSGP_DM_ADAPTIVITY_2 = 0x1A, - ROM_E_RTW_MSGP_DM_ADAPTIVITY_3 = 0x1B, - ROM_E_RTW_MSGP_DM_ANT_DIV_1 = 0x1C, - ROM_E_RTW_MSGP_DM_ANT_DIV_2 = 0x1D, - ROM_E_RTW_MSGP_DM_ANT_DIV_3 = 0x1E, - ROM_E_RTW_MSGP_DM_ANT_DIV_4 = 0x1F, - ROM_E_RTW_MSGP_DM_ANT_DIV_5 = 0x20, - ROM_E_RTW_MSGP_MAC_REG_DUMP_1 = 0x21, - ROM_E_RTW_MSGP_BB_REG_DUMP_1 = 0x22, - ROM_E_RTW_MSGP_RF_REG_DUMP_1 = 0x23, - ROM_E_RTW_MSGP_RF_REG_DUMP_2 = 0x24, - ROM_E_RTW_MSGP_REG_DUMP_1 = 0x25, - ROM_E_RTW_MSGP_REG_DUMP_2 = 0x26, - ROM_E_RTW_MSGP_REG_DUMP_3 = 0x27, - ROM_E_RTW_MSGP_READ_REG_1 = 0x28, - ROM_E_RTW_MSGP_READ_REG_2 = 0x29, - ROM_E_RTW_MSGP_READ_REG_3 = 0x2A, - ROM_E_RTW_MSGP_WRITE_REG_1 = 0x2B, - ROM_E_RTW_MSGP_WRITE_REG_2 = 0x2C, - ROM_E_RTW_MSGP_WRITE_REG_3 = 0x2D, - ROM_E_RTW_MSGP_READ_BB_1 = 0x2E, - ROM_E_RTW_MSGP_WRITE_BB_1 = 0x2F, - ROM_E_RTW_MSGP_READ_RF_1 = 0x30, - ROM_E_RTW_MSGP_WRITE_RF_1 = 0x31, - ROM_E_RTW_MSGP_READ_SYS_1 = 0x32, - ROM_E_RTW_MSGP_WRITE_SYS_1 = 0x33, - ROM_E_RTW_MSGP_FIX_CHANNEL_1 = 0x34, - ROM_E_RTW_MSGP_FIX_CHANNEL_2 = 0x35, - ROM_E_RTW_MSGP_PWR_SAVE_MODE_1 = 0x36, - ROM_E_RTW_MSGP_FIX_RATE_1 = 0x37, - ROM_E_RTW_MSGP_GET_ODM_DBG_FLAG_1 = 0x38, - ROM_E_RTW_MSGP_SET_ODM_DBG_FLAG_1 = 0x39, - ROM_E_RTW_MSGP_DUMP_PWR_IDX_1 = 0x3A, - ROM_E_RTW_MSGP_DUMP_INFO_1 = 0x3B, - ROM_E_RTW_MSGP_DUMP_INFO_2 = 0x3C, - ROM_E_RTW_MSGP_DUMP_INFO_3 = 0x3D, - ROM_E_RTW_MSGP_DUMP_INFO_4 = 0x3E, - ROM_E_RTW_MSGP_DUMP_INFO_5 = 0x3F, - ROM_E_RTW_MSGP_DUMP_INFO_6 = 0x40, - ROM_E_RTW_MSGP_DUMP_INFO_7 = 0x41, - ROM_E_RTW_MSGP_DUMP_INFO_8 = 0x42, - ROM_E_RTW_MSGP_DUMP_INFO_9 = 0x43, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_1 = 0x44, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_2 = 0x45, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_3 = 0x46, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_4 = 0x47, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_5 = 0x48, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_6 = 0x49, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_7 = 0x4A, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_8 = 0x4B, - ROM_E_RTW_MSGP_DM_FUNC_FLAG_9 = 0x4C, - ROM_E_RTW_MSGP_RX_MPDU_1 = 0x4D, - ROM_E_RTW_MSGP_AP_TIMEOUT_CHK_1 = 0x4E, - ROM_E_RTW_MSGP_INIT_DRV_SW_1 = 0x4F, - ROM_E_RTW_MSGP_SET_BSSID_1 = 0x50, - ROM_E_RTW_MSGP_SET_SSID_1 = 0x51, - ROM_E_RTW_MSGP_ON_BEACON_1 = 0x52, - ROM_E_RTW_MSGP_ON_AUTH_1 = 0x53, - ROM_E_RTW_MSGP_ON_AUTH_2 = 0x54, - ROM_E_RTW_MSGP_ON_AUTH_CLIENT_1 = 0x55, - ROM_E_RTW_MSGP_ON_ASSOC_REQ_1 = 0x56, - ROM_E_RTW_MSGP_ON_ASSOC_RSP_1 = 0x57, - ROM_E_RTW_MSGP_ON_DE_AUTH_1 = 0x58, - ROM_E_RTW_MSGP_ON_DE_AUTH_2 = 0x59, - ROM_E_RTW_MSGP_ON_DISASSOC_1 = 0x5A, - ROM_E_RTW_MSGP_ON_DISASSOC_2 = 0x5B, - ROM_E_RTW_MSGP_ISSUE_BEACON_1 = 0x5C, - ROM_E_RTW_MSGP_ISSUE_PROBERSP_1 = 0x5D, - ROM_E_RTW_MSGP_ISSUE_PROBEREQ_1 = 0x5E, - ROM_E_RTW_MSGP_ISSUE_AUTH_1 = 0x5F, - ROM_E_RTW_MSGP_ISSUE_ASSOCRSP_1 = 0x60, - ROM_E_RTW_MSGP_ISSUE_ASSOCREQ_1 = 0x61, - ROM_E_RTW_MSGP_ISSUE_NULLDATA_1 = 0x62, - ROM_E_RTW_MSGP_ISSUE_QOS_NULLDATA_1 = 0x63, - ROM_E_RTW_MSGP_ISSUE_DEAUTH_1 = 0x64, - ROM_E_RTW_MSGP_ISSUE_ACTION_BA_1 = 0x65, - ROM_E_RTW_MSGP_ISSUE_BSS_COEXIST_1 = 0x66, - ROM_E_RTW_MSGP_START_CLNT_AUTH_1 = 0x67, - ROM_E_RTW_MSGP_LINKED_STATUS_CHK_1 = 0x68, - ROM_E_RTW_MSGP_SETKEY_HDL_1 = 0x69, - ROM_E_RTW_MSGP_SET_STAKEY_HDL_1 = 0x6A, - ROM_E_RTW_MSGP_SET_STAKEY_HDL_2 = 0x6B, - ROM_E_RTW_MSGP_P2P_BUILD_MGNT_FRAME_1 = 0x6C, - ROM_E_RTW_MSGP_SEND_EAPOL_1 = 0x6D, - ROM_E_RTW_MSGP_SEND_EAPOL_2 = 0x6E, - ROM_E_RTW_MSGP_SEND_EAPOL_3 = 0x6F, - ROM_E_RTW_MSGP_EAPOL_KEY_RECVD_1 = 0x70, - ROM_E_RTW_MSGP_EAPOL_KEY_RECVD_2 = 0x71, - ROM_E_RTW_MSGP_EAPOL_KEY_RECVD_3 = 0x72, - ROM_E_RTW_MSGP_FREE_RECVFRAME_1 = 0x73, - ROM_E_RTW_MSGP_VAR_PORT_SWITCH_1 = 0x74, - ROM_E_RTW_MSGP_VAR_PORT_SWITCH_2 = 0x75, - ROM_E_RTW_MSGP_DOWN_SEMA_1 = 0x76, - ROM_E_RTW_MSGP_MAX = 0x77 -}; +#include "wireless.h" +#include "wifi_lib.h" +// rom_rtw_message.o //-------------------------------- // freertos_ioctl.o // Function declarations -extern int rtw_wx_set_autoreconnect(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_wx_get_autoreconnect(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_forwarding_set(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_set_ch_deauth(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); +extern int rtw_wx_set_autoreconnect(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_get_autoreconnect(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_forwarding_set(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_set_ch_deauth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); extern int get_priv_size(int args); -extern int rtw_wx_del_custome_ie(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_wx_set_pscan_freq(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_wx_update_custome_ie(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_set_tos_value(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_get_tx_power(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_wx_set_custome_ie(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_pm_get(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_pm_set(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_wx_read32(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_wx_write32(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_wx_set_freq(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_ex_set(net_device *dev, iw_request_info *info, iwreq_data *wdata, char *extra); -extern void wireless_send_event(net_device *dev, unsigned int cmd, iwreq_data *wrqu, char *extra); +extern int rtw_wx_del_custome_ie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_set_pscan_freq(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_update_custome_ie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_set_tos_value(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_get_tx_power(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_set_custome_ie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_pm_get(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_pm_set(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_read32(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_write32(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_set_freq(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_ex_set(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wdata, char *extra); +extern void wireless_send_event(struct net_device *dev, unsigned int cmd, union iwreq_data *wrqu, char *extra); extern void indicate_wx_custom_event(_adapter *padapter, char *msg); extern void indicate_wx_scan_result_present(__int64 padapter, __int64 a2); extern void indicate_wx_scan_complete_event(__int64 padapter, __int64 a2); @@ -163,21 +46,21 @@ extern void rtw_indicate_wx_assoc_event(__int64 padapter, __int64 a2); extern void rtw_indicate_wx_disassoc_event(__int64 padapter, __int64 a2); extern int rtw_set_wpa_ie(_adapter *padapter, char *pie, int ielen); extern void strtopsk(uint8_t *des, uint8_t *src, int len); -extern int rtw_wx_get_passphrase(net_device *dev, iw_request_info *a, iwreq_data *wrqu, char *extra); -extern int rtw_wx_set_ap_essid(net_device *dev, iw_request_info *a, iwreq_data *wrqu, char *extra); +extern int rtw_wx_get_passphrase(struct net_device *dev, struct iw_request_info *a, union iwreq_data *wrqu, char *extra); +extern int rtw_wx_set_ap_essid(struct net_device *dev, struct iw_request_info *a, union iwreq_data *wrqu, char *extra); extern void mac_reg_dump(_adapter *padapter); extern void bb_reg_dump(_adapter *padapter); extern void rf_reg_dump(_adapter *padapter, int a2, int a3); -extern int rtw_dbg_port(net_device *dev, iw_request_info *info, iwreq_data *wrqu, char *extra); -extern int rtw_get_auto_channel(net_device *dev, u8 *channel_set, int channel_num); +extern int rtw_dbg_port(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); +extern int rtw_get_auto_channel(struct net_device *dev, u8 *channel_set, int channel_num); extern int rtw_set_sta_num(int ap_sta_num); -extern int rtw_del_sta(net_device *dev, u8 *sta_addr); -extern int rtw_ex_get_drv_ability(net_device *dev, iw_request_info *info, iw_point *wrqu, char *extra); -extern int rtw_ex_get(net_device *dev, iw_request_info *info, iwreq_data *wdata, char *extra); -extern void *rtw_ioctl(net_device *dev, iwreq *rq, int cmd); +extern int rtw_del_sta(struct net_device *dev, u8 *sta_addr); +extern int rtw_ex_get_drv_ability(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrqu, char *extra); +extern int rtw_ex_get(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wdata, char *extra); +extern void *rtw_ioctl(struct net_device *dev, struct iwreq *rq, int cmd); // Data declarations -u8 g_user_ap_sta_num; // = 5u; -const iw_priv_args rtw_private_args[26]; /* = +extern u8 g_user_ap_sta_num; // = 5u; +extern const struct iw_priv_args rtw_private_args[26]; /* = { { 35808u, 10239u, 0u, "write" }, { 35809u, 10239u, 10256u, "read" }, @@ -206,7 +89,7 @@ const iw_priv_args rtw_private_args[26]; /* = { 8u, 9216u, 10239u, "get_drv_ability" }, { 9u, 9216u, 10239u, "get_ch_plan" } }; */ -iw_handler rtw_private_handler[17]; /* = +extern iw_handler rtw_private_handler[17]; /* = { (iw_handler)0x58D, (iw_handler)0x4E1, @@ -226,28 +109,28 @@ iw_handler rtw_private_handler[17]; /* = (iw_handler)0x699, (iw_handler)0x165D }; */ -char iw_priv_type_size[8]; // = { '\0', '\x01', '\x01', '\0', '\x04', '\b', '\x10', '\0' }; +extern char iw_priv_type_size[8]; // = { '\0', '\x01', '\x01', '\0', '\x04', '\b', '\x10', '\0' }; //-------------------------------- // freertos_intfs.o // Function declarations -extern net_device_stats *rtw_net_get_stats(net_device *pnetdev); -extern int netdev_if2_close(net_device *pnetdev); -extern int netdev_close(net_device *pnetdev); +extern struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev); +extern int netdev_if2_close(struct net_device *pnetdev); +extern int netdev_close(struct net_device *pnetdev); extern void rtw_if1_deinit(PADAPTER if1); extern void rtw_reset_securitypriv(_adapter *adapter); extern void rtw_os_indicate_disconnect(_adapter *adapter); -extern int rtw_init_netdev_name(net_device *pnetdev, const char *ifname); -extern net_device *rtw_init_netdev(_adapter *old_padapter); -extern int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(_io_ops *)); -extern _adapter *rtw_drv_if2_init(_adapter *primary_padapter, char *name, void (*set_intf_ops)(_io_ops *)); +extern int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname); +extern struct net_device *rtw_init_netdev(_adapter *old_padapter); +extern int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(struct _io_ops *)); +extern _adapter *rtw_drv_if2_init(_adapter *primary_padapter, char *name, void (*set_intf_ops)(struct _io_ops *)); extern void rtw_drv_if2_stop(_adapter *if2); extern void rtw_drv_if2_free(_adapter *primary_padapter); -extern init_done_ptr netdev_open(net_device *pnetdev); -extern int netdev_if2_open(net_device *pnetdev); -extern int netdev_if2_open(net_device *pnetdev); -extern init_done_ptr netdev_open(net_device *pnetdev); -extern net_device *rtw_drv_probe(net_device *parent_dev, uint32_t mode); -extern int rtw_dev_remove(net_device *pnetdev); +extern init_done_ptr netdev_open(struct net_device *pnetdev); +extern int netdev_if2_open(struct net_device *pnetdev); +extern int netdev_if2_open(struct net_device *pnetdev); +extern init_done_ptr netdev_open(struct net_device *pnetdev); +extern struct net_device *rtw_drv_probe(struct net_device *parent_dev, uint32_t mode); +extern int rtw_dev_remove(struct net_device *pnetdev); extern void rtw_drv_entry(); extern void rtw_drv_halt(); // Data declarations @@ -255,7 +138,7 @@ extern init_done_ptr p_wlan_init_done_callback; extern uint8_t rtw_power_percentage_idx; extern init_done_ptr p_wlan_uart_adapter_callback; extern uint8_t rtw_adaptivity_en; -extern uint8_t rtw_adaptivity_mode = 1u; +extern uint8_t rtw_adaptivity_mode; extern int8_t rtw_adaptivity_th_l2h_ini; extern drv_priv drvpriv; //-------------------------------- @@ -308,7 +191,7 @@ extern const u8 Array_MP_8195A_TXPWR_LMT[1176]; extern u8 gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_QFN56_8195A[30]; extern u32 Array_MP_8195A_RadioA[370]; extern u8 gDeltaSwingTableXtal_MP_P_TxXtalTrack_8195A[30]; -extern u8 s1Byte gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_TFBGA96_8195A[32]; +extern u8 gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_TFBGA96_8195A[32]; extern u8 gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_QFN48_8195A[30]; //-------------------------------- // HalPhyRf_8195A.o @@ -347,48 +230,48 @@ extern void PHY_SetRFPathSwitch_8195A(PADAPTER pAdapter, int bMain); // rtk_wlan_if.o // Function declarations extern void timer_wrapper(_timerHandle timer_hdl); -extern net_device *alloc_etherdev(int sizeof_priv); -extern void free_netdev(net_device *dev); -extern int dev_alloc_name(net_device *net_dev, const char *ifname); +extern struct net_device *alloc_etherdev(int sizeof_priv); +extern void free_netdev(struct net_device *dev); +extern int dev_alloc_name(struct net_device *net_dev, const char *ifname); extern void init_timer_wrapper(); -extern void deinit_timer_wrapper(int a1); -extern void init_timer(timer_list *timer); -extern void mod_timer(timer_list *timer, uint32_t delay_time_ms); -extern BOOL timer_pending(const timer_list *timer); -extern void cancel_timer_ex(timer_list *timer); -extern void del_timer_sync(timer_list *timer); +extern void deinit_timer_wrapper(); +extern void init_timer(struct timer_list *timer); +extern void mod_timer(struct timer_list *timer, uint32_t delay_time_ms); +extern BOOL timer_pending(const struct timer_list *timer); +extern void cancel_timer_ex(struct timer_list *timer); +extern void del_timer_sync(struct timer_list *timer); extern void rtw_init_timer(_timer *ptimer, void *adapter, TIMER_FUN pfunc, void *cntx, const char *name); -extern int rtw_cancel_timer(_timer *ptimer); -extern BOOL rltk_get_idx_bydev(net_device *dev); +extern u8 rtw_cancel_timer(_timer *ptimer); +extern BOOL rltk_get_idx_bydev(struct net_device *dev); extern int rltk_wlan_init(int idx_wlan, rtw_mode_t mode); extern void rltk_wlan_deinit(); -extern int rltk_wlan_start(int idx_wlan); +extern void rltk_wlan_start(int idx_wlan); extern int rltk_wlan_check_isup(int idx); extern void rltk_wlan_tx_inc(int idx); extern void rltk_wlan_tx_dec(int idx); -extern sk_buff *rltk_wlan_get_recv_skb(int idx); -extern sk_buff *rltk_wlan_alloc_skb(unsigned int total_len); -extern void rltk_wlan_send_skb(int idx, sk_buff *skb); -extern void rltk_netif_rx(sk_buff *skb); +extern struct sk_buff *rltk_wlan_get_recv_skb(int idx); +extern struct sk_buff *rltk_wlan_alloc_skb(unsigned int total_len); +extern void rltk_wlan_send_skb(int idx, struct sk_buff *skb); +extern void rltk_netif_rx(struct sk_buff *skb); extern int rltk_del_station(const char *ifname, u8 *hwaddr); extern int rltk_get_auto_chl(const char *ifname, u8 *channel_set, int channel_num, int a4); extern int rltk_set_tx_power_percentage(rtw_tx_pwr_percentage_t power_percentage_idx); -extern int rltk_wlan_control(unsigned int cmd, void *data); -extern int rltk_wlan_running(int idx); -extern void rltk_wlan_statistic(int idx, int a2, int a3); +extern int rltk_wlan_control(unsigned long cmd, void *data); +extern unsigned char rltk_wlan_running(unsigned char idx); +extern void rltk_wlan_statistic(unsigned char idx); extern int rltk_wlan_handshake_done(); extern int rltk_wlan_rf_on(); extern int rltk_wlan_rf_off(); extern int rltk_wlan_check_bus(); extern int rltk_wlan_wireless_mode(u8 mode); -extern int rltk_wlan_set_wps_phase(int result); +extern int rltk_wlan_set_wps_phase(unsigned char is_trigger_wps); extern void rltk_wlan_PRE_SLEEP_PROCESSING(); extern int rltk_wlan_is_connected_to_ap(); extern int rtw_ps_enable(int enable); extern int rltk_wifi_fw_test(int argc, char **argv); // Data declarations extern _list timer_table; -extern net_device *rltk_wlan_info; +extern struct net_device *rltk_wlan_info; extern int timer_used_num; extern int max_timer_used_num; //-------------------------------- @@ -434,19 +317,19 @@ extern void EFUSE_ShadowMapUpdate(PADAPTER pAdapter, int efuseType, BOOLEAN bPse // rtw_ieee80211.o // Function declarations extern void rtw_macaddr_cfg(uint8_t *mac_addr, int a2); -extern int rtw_get_cipher_info(wlan_network *pnetwork); -extern void rtw_get_bcn_info(wlan_network *pnetwork); +extern int rtw_get_cipher_info(struct wlan_network *pnetwork); +extern void rtw_get_bcn_info(struct wlan_network *pnetwork); //-------------------------------- // rtw_wlan_util.o // Function declarations -extern int cckrates_included(unsigned __int8 *rate, int ratelen); -extern int cckratesonly_included(unsigned __int8 *rate, int ratelen); +extern int cckrates_included(u8 *rate, int ratelen); +extern int cckratesonly_included(u8 *rate, int ratelen); extern signed int networktype_to_raid_ex(PADAPTER padapter, int network_type); -extern signed int judge_network_type(_adapter *padapter, unsigned __int8 *rate, int ratelen); -extern int ratetbl_val_2wifirate(unsigned __int8 rate); +extern signed int judge_network_type(_adapter *padapter, u8 *rate, int ratelen); +extern int ratetbl_val_2wifirate(u8 rate); extern int is_basicrate(_adapter *padapter, int rate); -extern int ratetbl2rateset(_adapter *padapter, unsigned __int8 *rateset); -extern void get_rate_set(_adapter *padapter, unsigned __int8 *pbssrate, int *bssrate_len, int a4); +extern int ratetbl2rateset(_adapter *padapter, u8 *rateset); +extern void get_rate_set(_adapter *padapter, u8 *pbssrate, int *bssrate_len, int a4); extern void UpdateBrateTbl(PADAPTER Adapter, uint8_t *mBratesOS); extern void UpdateBrateTblForSoftAP(uint8_t *bssrateset, uint32_t bssratelen); extern void Save_DM_Func_Flag(_adapter *padapter, int a2, int a3); @@ -473,27 +356,27 @@ extern void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE); extern void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE); extern void HTOnAssocRsp(_adapter *padapter); extern void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE); -extern void VCS_update(_adapter *padapter, sta_info *psta); -extern int rtw_check_bcn_info(ADAPTER *Adapter, uint8_t *pframe, uint32_t packet_len); -extern void update_beacon_info(_adapter *padapter, uint8_t *pframe, unsigned int pkt_len, sta_info *psta); +extern void VCS_update(_adapter *padapter, struct sta_info *psta); +extern int rtw_check_bcn_info(_adapter *Adapter, uint8_t *pframe, uint32_t packet_len); +extern void update_beacon_info(_adapter *padapter, uint8_t *pframe, unsigned int pkt_len, struct sta_info *psta); extern signed int is_ap_in_tkip(_adapter *padapter); -extern int wifirate2_ratetbl_inx(unsigned __int8 rate); -extern int update_basic_rate(unsigned __int8 *ptn, unsigned int ptn_sz); -extern int update_supported_rate(unsigned __int8 *ptn, unsigned int ptn_sz); -extern int update_MCS_rate(HT_caps_element *pHT_caps); -extern int support_short_GI(_adapter *padapter, HT_caps_element *pHT_caps); +extern int wifirate2_ratetbl_inx(u8 rate); +extern int update_basic_rate(u8 *ptn, unsigned int ptn_sz); +extern int update_supported_rate(u8 *ptn, unsigned int ptn_sz); +extern int update_MCS_rate(struct HT_caps_element *pHT_caps); +extern int support_short_GI(_adapter *padapter, struct HT_caps_element *pHT_caps); extern int get_highest_rate_idx(uint32_t mask); -extern void Update_RA_Entry(_adapter *padapter, sta_info *psta); -extern void enable_rate_adaptive(_adapter *padapter, sta_info *psta); -extern void set_sta_rate(_adapter *padapter, sta_info *psta); +extern void Update_RA_Entry(_adapter *padapter, struct sta_info *psta); +extern void enable_rate_adaptive(_adapter *padapter, struct sta_info *psta); +extern void set_sta_rate(_adapter *padapter, struct sta_info *psta); extern void update_tx_basic_rate(_adapter *padapter, int wirelessmode); extern signed int check_assoc_AP(uint8_t *pframe, unsigned int len); extern void update_IOT_info(_adapter *padapter); extern void update_capinfo(PADAPTER Adapter, uint16_t updateCap); extern void update_wireless_mode(_adapter *padapter, uint32_t a2, int a3); extern void update_bmc_sta_support_rate(_adapter *padapter, uint32_t mac_id); -extern void update_TSF(mlme_ext_priv *pmlmeext, uint8_t *pframe, unsigned int len); -extern void correct_TSF(_adapter *padapter, mlme_ext_priv *pmlmeext); +extern void update_TSF(struct mlme_ext_priv *pmlmeext, uint8_t *pframe, unsigned int len); +extern void correct_TSF(_adapter *padapter, struct mlme_ext_priv *pmlmeext); // Data declarations extern u8 CSWTCH_36[12]; // = { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 }; extern const uint8_t ARTHEROS_OUI1[3]; // = { 0u, 3u, 127u }; @@ -512,37 +395,37 @@ extern const uint8_t AIRGOCAP_OUI[3]; // = { 0u, 10u, 245u }; // wifi_simple_config_parser.o // Function declarations extern s32 bytecopy(u8 *src, u8 *dst, u32 len); -extern s32 rtk_sc_register_pattern(pattern_ops *pp); -extern s32 rtk_sc_generate_key(pattern_ops *pp, rtk_sc *pSc); -extern s32 rtk_sc_decode_profile(pattern_ops *pp, rtk_sc *pSc); -extern s32 rtk_sc_get_tlv_info(pattern_ops *pp, rtk_sc *pSc); -extern s32 mcast_udp_get_cipher_info(pattern_ops *pp, rtk_sc *pSc); -extern s32 mcast_udp_get_pattern(pattern_ops *pp, rtk_sc *pSc); -extern s32 bcast_udp_get_pattern(pattern_ops *pp, rtk_sc *pSc); -extern s32 bcast_udp_get_cipher_info(pattern_ops *pp, rtk_sc *pSc); +extern s32 rtk_sc_register_pattern(struct pattern_ops *pp); +extern s32 rtk_sc_generate_key(struct pattern_ops *pp, struct rtk_sc *pSc); +extern s32 rtk_sc_decode_profile(struct pattern_ops *pp, struct rtk_sc *pSc); +extern s32 rtk_sc_get_tlv_info(struct pattern_ops *pp, struct rtk_sc *pSc); +extern s32 mcast_udp_get_cipher_info(struct pattern_ops *pp, struct rtk_sc *pSc); +extern s32 mcast_udp_get_pattern(struct pattern_ops *pp, struct rtk_sc *pSc); +extern s32 bcast_udp_get_pattern(struct pattern_ops *pp, struct rtk_sc *pSc); +extern s32 bcast_udp_get_cipher_info(struct pattern_ops *pp, struct rtk_sc *pSc); extern s32 rtk_clean_profile_value(); -extern s32 mcast_udp_decode_profile(pattern_ops *pp, rtk_sc *pSc); -extern s32 mcast_udp_generate_key(pattern_ops *pp, rtk_sc *pSc); +extern s32 mcast_udp_decode_profile(struct pattern_ops *pp, struct rtk_sc *pSc); +extern s32 mcast_udp_generate_key(struct pattern_ops *pp, struct rtk_sc *pSc); extern s32 rtk_sc_check_packet(u8 *da, u8 *bssid, s32 length); extern void whc_fix_channel(); extern void whc_unfix_channel(); -extern void simple_config_lib_init(simple_config_lib_config *config); +extern void simple_config_lib_init(struct simple_config_lib_config *config); extern void simple_config_lib_deinit(); -extern int parse_tlv_info_bcast(rtk_sc *pSc, unsigned __int8 *plain_info, int len); -extern s32 mcast_udp_get_profile(pattern_ops *pp, rtk_sc *pSc); +extern int parse_tlv_info_bcast(struct rtk_sc *pSc, u8 *plain_info, int len); +extern s32 mcast_udp_get_profile(struct pattern_ops *pp, struct rtk_sc *pSc); extern void rtk_restart_simple_config(); extern void rtk_stop_simple_config(); -extern s32 rtk_sc_init(char *custom_pin_code, simple_config_lib_config *lib_config); +extern s32 rtk_sc_init(char *custom_pin_code, struct simple_config_lib_config *lib_config); extern void rtk_sc_deinit(); -extern int rtk_sc_check_profile(pattern_ops *pp, rtk_sc *pSc, void *backup_sc_ctx); -extern signed int softAP_simpleConfig_parse(unsigned __int8 *buf, int len, void *backup_sc_ctx, void *psoftAP_ctx); +extern int rtk_sc_check_profile(struct pattern_ops *pp, struct rtk_sc *pSc, void *backup_sc_ctx); +extern signed int softAP_simpleConfig_parse(u8 *buf, int len, void *backup_sc_ctx, void *psoftAP_ctx); extern int rtl_pre_parse(u8 *mac_addr, u8 *buf, void *userdata, u8 **da, u8 **sa, unsigned int *len); extern s32 rtk_start_parse_packet(u8 *da, u8 *sa, s32 len, void *user_data, void *backup_sc_ctx); // Data declarations // Data declarations extern char algn_1; // weak extern const u8 default_key_iv[8]; // = { 166u, 166u, 166u, 166u, 166u, 166u, 166u, 166u }; -extern pattern_ops udp_bcast; /* = +extern struct pattern_ops udp_bcast; /* = { 4u, 10u, { @@ -562,7 +445,7 @@ extern s32 simple_config_status; extern u8 g_ios_mac[6]; // = { 2u, 0u, 0u, 0u, 0u, 0u }; extern u8 use_ios7_mac; extern u8 *custom_pin; -extern pattern_ops udp_mcast_pin; /* = +extern struct pattern_ops udp_mcast_pin; /* = { 3u, 10u, { @@ -576,7 +459,7 @@ extern pattern_ops udp_mcast_pin; /* = (sc_decode_profile_call_back)0x389, (sc_get_tlv_info_call_back)0x62D }; */ -extern pattern_ops udp_bcast_pin; /* = +extern struct pattern_ops udp_bcast_pin; /* = { 5u, 10u, { @@ -601,11 +484,11 @@ extern const u8 sc_device_name[21]; /* = 115u, 105u, 109u, 112u, 108u, 101u, 95u, 99u, 111u, 110u, 102u, 105u, 103u, 95u, 99u, 108u, 105u, 101u, 110u, 116u, 0u }; */ -extern simple_config_lib_config sc_api_fun; +extern struct simple_config_lib_config sc_api_fun; extern u8 fix_sa; extern u32 g_sc_pin_len; -extern pattern_ops *pp; -extern pattern_ops udp_mcast; /* = +extern struct pattern_ops *pp; +extern struct pattern_ops udp_mcast; /* = { 2u, 10u, { @@ -628,11 +511,11 @@ extern const u8 mcast_udp_buffer[65]; /* = 39u, 115u, 125u, 63u, 39u, 95u, 39u, 110u, 38u, 50u, 126u, 66u, 108u, 109u, 38u, 95u, 107u, 63u, 54u, 0u }; */ -extern rtk_sc *g_sc_ctx; +extern struct rtk_sc *g_sc_ctx; //-------------------------------- // wlan_ram_map.o // Function declarations -extern void init_rom_wlan_ram_map() +extern void init_rom_wlan_ram_map(); //-------------------------------- // freertos_isr.o // Function declarations @@ -643,14 +526,14 @@ extern _sema *pExportWlanIrqSemaphore; //-------------------------------- // freertos_recv.o // Function declarations -extern int rtw_os_recv_resource_init(recv_priv *precvpriv, _adapter *padapter); -extern int rtw_os_recv_resource_alloc(_adapter *padapter, recv_frame *precvframe); -extern int rtw_os_recvbuf_resource_alloc(_adapter *padapter, recv_buf *precvbuf); -extern int rtw_os_recvbuf_resource_free(_adapter *padapter, recv_buf *precvbuf); +extern int rtw_os_recv_resource_init(struct recv_priv *precvpriv, _adapter *padapter); +extern int rtw_os_recv_resource_alloc(_adapter *padapter, union recv_frame *precvframe); +extern int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf); +extern int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf); extern int rtw_tkip_countermeasure(_adapter *padapter); extern void rtw_handle_tkip_mic_err(_adapter *padapter, int bgroup); -extern int rtw_recv_indicatepkt(_adapter *padapter, recv_frame *precv_frame); -extern void rtw_init_recv_timer(recv_reorder_ctrl *preorder_ctrl); +extern int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame); +extern void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl); //-------------------------------- // freertos_skbuff.o @@ -659,26 +542,39 @@ extern void skb_fail_inc(int a1); extern int skb_fail_get_and_rst(int a1); extern void init_skb_pool(); extern void init_skb_data_pool(); -extern sk_buff *alloc_skb(int size); -extern void kfree_skb(sk_buff *skb); -extern unsigned __int8 *skb_put(sk_buff *skb, unsigned int len); -extern void skb_reserve(sk_buff *skb, unsigned int len); -extern sk_buff *dev_alloc_skb(unsigned int length, unsigned int reserve_len); -extern void skb_assign_buf(sk_buff *skb, unsigned __int8 *buf, unsigned int len); -extern unsigned __int8 *skb_tail_pointer(const sk_buff *skb); -extern unsigned __int8 *skb_end_pointer(const sk_buff *skb); -extern void skb_set_tail_pointer(sk_buff *skb, const int offset); -extern unsigned __int8 *skb_pull(sk_buff *skb, unsigned int len); -extern sk_buff *skb_copy(const sk_buff *skb, int gfp_mask, unsigned int reserve_len); -extern sk_buff *skb_clone(sk_buff *skb, int gfp_mask); +extern struct sk_buff *alloc_skb(int size); +extern void kfree_skb(struct sk_buff *skb); +extern u8 *skb_put(struct sk_buff *skb, unsigned int len); +extern void skb_reserve(struct sk_buff *skb, unsigned int len); +extern struct sk_buff *dev_alloc_skb(unsigned int length, unsigned int reserve_len); +extern void skb_assign_buf(struct sk_buff *skb, u8 *buf, unsigned int len); +extern u8 *skb_tail_pointer(const struct sk_buff *skb); +extern u8 *skb_end_pointer(const struct sk_buff *skb); +extern void skb_set_tail_pointer(struct sk_buff *skb, const int offset); +extern u8 *skb_pull(struct sk_buff *skb, unsigned int len); +extern struct sk_buff *skb_copy(const struct sk_buff *skb, int gfp_mask, unsigned int reserve_len); +extern struct sk_buff *skb_clone(struct sk_buff *skb, int gfp_mask); // Data declarations extern int skbbuf_used_num; -extern list_head skbdata_list; -extern skb_data skb_data_pool[8]; -extern skb_buf skb_pool[10]; +extern struct list_head skbdata_list; +/* +// skbuff.h, wifi_skbuf.c, rtw_opt_skbuf.c +struct skb_buf { + struct list_head list; + struct sk_buff skb; +}; + +struct skb_data { + struct list_head list; + unsigned char buf[MAX_SKB_BUF_SIZE]; + atomic_t ref; +}; +extern struct skb_data skb_data_pool[8]; +extern struct skb_buf skb_pool[10]; +*/ extern int skbdata_used_num; extern int max_local_skb_num = 10; -extern list_head wrapper_skbbuf_list; +extern struct list_head wrapper_skbbuf_list; extern int max_skbdata_used_num; extern int max_skbbuf_used_num; extern int skb_fail_count; @@ -686,16 +582,16 @@ extern int max_skb_buf_num = 8; //-------------------------------- // freertos_xmit.o // Function declarations -extern signed int rtw_remainder_len(pkt_file *pfile); -extern void rtw_open_pktfile(_pkt *pktptr, pkt_file *pfile); -extern unsigned int rtw_pktfile_read(pkt_file *pfile, uint8_t *rmem, unsigned int rlen); -extern BOOL rtw_endofpktfile(pkt_file *pfile); -extern int rtw_os_xmit_resource_alloc(_adapter *padapter, xmit_buf *pxmitbuf, uint32_t alloc_sz); +extern signed int rtw_remainder_len(struct pkt_file *pfile); +extern void rtw_open_pktfile(_pkt *pktptr, struct pkt_file *pfile); +extern unsigned int rtw_pktfile_read(struct pkt_file *pfile, uint8_t *rmem, unsigned int rlen); +extern BOOL rtw_endofpktfile(struct pkt_file *pfile); +extern int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, uint32_t alloc_sz); extern void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt); -extern void rtw_os_xmit_complete(_adapter *padapter, xmit_frame *pxframe); +extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe); extern void rtw_os_xmit_schedule(_adapter *padapter, _irqL a2, int a3); extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev, int a3); -extern int rtw_os_can_xmit(net_device *dev); +extern int rtw_os_can_xmit(struct net_device *dev); //-------------------------------- // hal_intf.o // Function declarations @@ -722,15 +618,15 @@ extern void rtw_hal_disable_interrupt(_adapter *padapter); extern int rtw_hal_inirp_init(_adapter *padapter); extern int rtw_hal_inirp_deinit(_adapter *padapter); extern void rtw_hal_irp_reset(_adapter *padapter); -extern int32_t rtw_hal_xmit(_adapter *padapter, xmit_frame *pxmitframe); -extern int32_t rtw_hal_mgnt_xmit(_adapter *padapter, xmit_frame *pmgntframe); +extern int32_t rtw_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe); +extern int32_t rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe); extern int32_t rtw_hal_init_xmit_priv(_adapter *padapter); extern void rtw_hal_free_xmit_priv(_adapter *padapter); extern int32_t rtw_hal_init_recv_priv(_adapter *padapter); extern void rtw_hal_free_recv_priv(_adapter *padapter); -extern void rtw_hal_update_ra_mask(sta_info *psta, uint8_t rssi_level); +extern void rtw_hal_update_ra_mask(struct sta_info *psta, uint8_t rssi_level); extern void rtw_hal_add_ra_tid(_adapter *padapter, uint32_t bitmap, uint8_t *arg, uint8_t rssi_level); -extern void rtw_hal_update_txdesc(_adapter *padapter, xmit_frame *pxmitframe, uint8_t *pbuf); +extern void rtw_hal_update_txdesc(_adapter *padapter, struct xmit_frame *pxmitframe, uint8_t *pbuf); extern void rtw_hal_clone_data(_adapter *dst_padapter, _adapter *src_padapter); extern void rtw_hal_start_thread(_adapter *padapter); extern void rtw_hal_stop_thread(_adapter *padapter); @@ -832,10 +728,10 @@ extern signed int HalPwrSeqCmdParsing(_adapter *padapter, uint8_t CutVersion, ui //-------------------------------- // hci_intfs.o // Function declarations -dvobj_priv *hci_dvobj_init(); -extern void hci_dvobj_deinit(dvobj_priv *dvobj); -extern void hci_dvobj_request_irq(dvobj_priv *dvobj); -extern void hci_dvobj_free_irq(dvobj_priv *dvobj); +extern struct dvobj_priv *hci_dvobj_init(); +extern void hci_dvobj_deinit(struct dvobj_priv *dvobj); +extern void hci_dvobj_request_irq(struct dvobj_priv *dvobj); +extern void hci_dvobj_free_irq(struct dvobj_priv *dvobj); // Data declarations //-------------------------------- // rtw_ioctl_set.o @@ -845,406 +741,406 @@ extern int rtw_set_802_11_bssid(_adapter *padapter, uint8_t *bssid); extern int rtw_set_802_11_ssid(_adapter *padapter, NDIS_802_11_SSID *ssid, int a3); extern signed int rtw_set_802_11_infrastructure_mode(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype); extern signed int rtw_set_802_11_bssid_list_scan(_adapter *padapter, NDIS_802_11_SSID *pssid, int ssid_max_num); -extern int rtw_set_802_11_authentication_mode(_adapter *padapter, NDIS_802_11_AUTHENTICATION_MODE authmode); +extern int rtw_set_802_11_authentication_mode(_adapter *padapter, struct NDIS_802_11_AUTHENTICATION_MODE authmode); extern int rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep); // Data declarations //-------------------------------- // rtw_io.o // Function declarations -extern int rtw_read8(ADAPTER *adapter, uint32_t addr); -extern int rtw_read16(ADAPTER *adapter, uint32_t addr); -extern int rtw_read32(ADAPTER *adapter, uint32_t addr); -extern int32_t rtw_write8(ADAPTER *adapter, uint32_t addr, int val); -extern int32_t rtw_write16(ADAPTER *adapter, uint32_t addr, int val); -extern int32_t rtw_write32(ADAPTER *adapter, uint32_t addr, uint32_t val); -extern signed int rtw_read_port(ADAPTER *adapter, uint32_t addr, uint32_t cnt, uint8_t *mem, fifo_more_data *more_data); -extern signed int rtw_write_port(ADAPTER *adapter, uint32_t addr, uint32_t cnt, uint8_t *mem); -extern void rtw_set_chip_endian(ADAPTER *adapter); -extern int rtw_get_chip_endian(PADAPTER padapter); +extern int rtw_read8(_adapter *adapter, uint32_t addr); +extern int rtw_read16(_adapter *adapter, uint32_t addr); +extern int rtw_read32(_adapter *adapter, uint32_t addr); +extern int32_t rtw_write8(_adapter *adapter, uint32_t addr, int val); +extern int32_t rtw_write16(_adapter *adapter, uint32_t addr, int val); +extern int32_t rtw_write32(_adapter *adapter, uint32_t addr, uint32_t val); +extern signed int rtw_read_port(_adapter *adapter, uint32_t addr, uint32_t cnt, uint8_t *mem, struct fifo_more_data *more_data); +extern signed int rtw_write_port(_adapter *adapter, uint32_t addr, uint32_t cnt, uint8_t *mem); +extern void rtw_set_chip_endian(_adapter *adapter); +extern int rtw_get_chip_endian(_adapter padapter); // Data declarations //-------------------------------- // rtw_cmd.o // Function declarations -sint rtw_init_cmd_priv(cmd_priv *pcmdpriv); -sint rtw_init_evt_priv(evt_priv *pevtpriv); -void rtw_free_cmd_priv(cmd_priv *pcmdpriv); -sint rtw_enqueue_cmd(_queue *queue, cmd_obj *obj); -cmd_obj *rtw_dequeue_cmd(_queue *queue, _irqL a2, int a3); -list_head *rtw_observequeue_cmd(_queue *queue); -signed int rtw_init_cmd_priv(cmd_priv *pcmdpriv); -int rtw_cmd_filter(cmd_priv *pcmdpriv, cmd_obj *cmd_obj); -void rtw_free_cmd_obj(cmd_obj *pcmd); -int rtw_enqueue_cmd(cmd_priv *pcmdpriv, cmd_obj *cmd_obj); -void rtw_set_channel_plan_cmd_callback(_adapter *padapter, cmd_obj *pcmd); -void rtw_survey_cmd_callback(_adapter *padapter, cmd_obj *pcmd); -void rtw_disassoc_cmd_callback(_adapter *padapter, cmd_obj *pcmd, int a3); -void rtw_joinbss_cmd_callback(_adapter *padapter, cmd_obj *pcmd); -void rtw_setstaKey_cmdrsp_callback(_adapter *padapter, cmd_obj *pcmd); -void rtw_cmd_thread(thread_context context); -int rtw_createbss_cmd(_adapter *padapter); -int rtw_joinbss_cmd(_adapter *padapter, wlan_network *pnetwork); -int rtw_disassoc_cmd(_adapter *padapter); -int rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype); -int rtw_setstakey_cmd(_adapter *padapter, uint8_t *psta, int unicast_key); -int rtw_clearstakey_cmd(_adapter *padapter, uint8_t *psta, uint8_t entry, int enqueue); -int rtw_addbareq_cmd(_adapter *padapter, int tid, uint8_t *addr); -int rtw_dynamic_chk_wk_cmd(_adapter *padapter); -cmd_obj *rtw_set_chplan_cmd(_adapter *padapter, int chplan, int enqueue); -void dynamic_chk_wk_hdl(_adapter *padapter, uint8_t *pbuf, int sz); -void lps_ctrl_wk_hdl(_adapter *padapter, int lps_ctrl_type, int a3); -int rtw_lps_ctrl_wk_cmd(_adapter *padapter, int lps_ctrl_type, int enqueue); -cmd_obj *rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *pssid, int ssid_max_num); -void rpt_timer_setting_wk_hdl(_adapter *padapter, uint16_t minRptTime, int a3); -int rtw_rpt_timer_cfg_cmd(_adapter *padapter, int minRptTime); -int rtw_ps_cmd(_adapter *padapter); -int rtw_chk_hi_queue_cmd(_adapter *padapter); -signed int rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned __int8 *pbuf, int a3); -int rtw_c2h_wk_cmd(PADAPTER padapter); +extern sint rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); +extern sint rtw_init_evt_priv(struct evt_priv *pevtpriv); +extern void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv); +extern sint rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj); +extern struct cmd_obj *rtw_dequeue_cmd(_queue *queue, _irqL a2, int a3); +extern struct list_head *rtw_observequeue_cmd(_queue *queue); +extern signed int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); +extern int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj); +extern void rtw_free_cmd_obj(struct cmd_obj *pcmd); +//extern int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj); +extern void rtw_set_channel_plan_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd); +extern void rtw_survey_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd); +extern void rtw_disassoc_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd, int a3); +extern void rtw_joinbss_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd); +extern void rtw_setstaKey_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd); +extern void rtw_cmd_thread(thread_context context); +extern int rtw_createbss_cmd(_adapter *padapter); +extern int rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork); +extern int rtw_disassoc_cmd(_adapter *padapter); +extern int rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype); +extern int rtw_setstakey_cmd(_adapter *padapter, uint8_t *psta, int unicast_key); +extern int rtw_clearstakey_cmd(_adapter *padapter, uint8_t *psta, uint8_t entry, int enqueue); +extern int rtw_addbareq_cmd(_adapter *padapter, int tid, uint8_t *addr); +extern int rtw_dynamic_chk_wk_cmd(_adapter *padapter); +extern struct cmd_obj *rtw_set_chplan_cmd(_adapter *padapter, int chplan, int enqueue); +extern void dynamic_chk_wk_hdl(_adapter *padapter, uint8_t *pbuf, int sz); +extern void lps_ctrl_wk_hdl(_adapter *padapter, int lps_ctrl_type, int a3); +extern int rtw_lps_ctrl_wk_cmd(_adapter *padapter, int lps_ctrl_type, int enqueue); +extern struct cmd_obj *rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *pssid, int ssid_max_num); +extern void rpt_timer_setting_wk_hdl(_adapter *padapter, uint16_t minRptTime, int a3); +extern int rtw_rpt_timer_cfg_cmd(_adapter *padapter, int minRptTime); +extern int rtw_ps_cmd(_adapter *padapter); +extern int rtw_chk_hi_queue_cmd(_adapter *padapter); +extern signed int rtw_drvextra_cmd_hdl(_adapter *padapter, u8 *pbuf, int a3); +extern int rtw_c2h_wk_cmd(PADAPTER padapter); // Data declarations -const cmd_hdl wlancmds[63]l -const _cmd_callback rtw_cmd_callback[63]; +extern const struct cmd_hdl wlancmds[63]; +extern const struct _cmd_callback rtw_cmd_callback[63]; //-------------------------------- // netdev.o // Function declarations -net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv); -net_device *rtw_alloc_etherdev(int sizeof_priv); -void rtw_free_netdev(net_device *netdev); +extern struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv); +extern struct net_device *rtw_alloc_etherdev(int sizeof_priv); +extern void rtw_free_netdev(struct net_device *netdev); // Data declarations //-------------------------------- // phydm.o // Function declarations -void ODM_CmnInfoInit(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, u4Byte Value); -void ODM_CmnInfoHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, PVOID pValue); -void ODM_CmnInfoPtrArrayHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, int Index, PVOID pValue); -void ODM_CmnInfoUpdate(PDM_ODM_T pDM_Odm, u4Byte CmnInfo, u8Byte Value); -void odm_CommonInfoSelfInit(PDM_ODM_T pDM_Odm); -void ODM_DMInit(PDM_ODM_T pDM_Odm); -void odm_CommonInfoSelfUpdate(PDM_ODM_T pDM_Odm); -void ODM_DMWatchdog(PDM_ODM_T pDM_Odm); -void odm_CommonInfoSelfReset(PDM_ODM_T pDM_Odm); -ADAPTIVITY_STATISTICS *PhyDM_Get_Structure(PDM_ODM_T pDM_Odm, int Structure_Type); -void odm_SwAntDetectInit(PDM_ODM_T pDM_Odm); +extern void ODM_CmnInfoInit(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, u4Byte Value); +extern void ODM_CmnInfoHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, PVOID pValue); +extern void ODM_CmnInfoPtrArrayHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, int Index, PVOID pValue); +extern void ODM_CmnInfoUpdate(PDM_ODM_T pDM_Odm, u4Byte CmnInfo, u8Byte Value); +extern void odm_CommonInfoSelfInit(PDM_ODM_T pDM_Odm); +extern void ODM_DMInit(PDM_ODM_T pDM_Odm); +extern void odm_CommonInfoSelfUpdate(PDM_ODM_T pDM_Odm); +extern void ODM_DMWatchdog(PDM_ODM_T pDM_Odm); +extern void odm_CommonInfoSelfReset(PDM_ODM_T pDM_Odm); +extern ADAPTIVITY_STATISTICS *PhyDM_Get_Structure(PDM_ODM_T pDM_Odm, int Structure_Type); +extern void odm_SwAntDetectInit(PDM_ODM_T pDM_Odm); // Data declarations //-------------------------------- // rtl8195a_phycfg.o // Function declarations -int PHY_QueryBBReg_8195A_Safe(PADAPTER Adapter, uint32_t RegAddr, uint32_t BitMask); -void PHY_SetBBReg_8195A_Safe(PADAPTER Adapter, uint32_t RegAddr, uint32_t BitMask, uint32_t Data); -int phy_RFSerialRead_8195A(PADAPTER Adapter, RF_PATH eRFPath, uint32_t Offset); -uint32_t PHY_QueryRFReg_8195A(PADAPTER Adapter, uint32_t eRFPath, uint32_t RegAddr, uint32_t BitMask); -void PHY_SetRFReg_8195A(PADAPTER Adapter, uint32_t eRFPath, uint32_t RegAddr, uint32_t BitMask, uint32_t Data); -BOOL PHY_MACConfig8195A(PADAPTER Adapter); -int PHY_BBConfig8195A(PADAPTER Adapter); -int PHY_ConfigRFWithParaFile_8195A(PADAPTER Adapter, uint8_t *pFileName, RF_PATH eRFPath); -void phy_PowerIndexCheck8195A(PADAPTER Adapter, uint8_t channel, uint8_t *cckPowerLevel, uint8_t *ofdmPowerLevel, uint8_t *BW20PowerLevel, uint8_t *BW40PowerLevel); -void PHY_SetTxPowerIndex_8195A(PADAPTER Adapter, uint32_t PowerIndex, int RFPath, int Rate); -void phy_TxPwrAdjInPercentage(PADAPTER Adapter, uint8_t *pTxPwrIdx); -int PHY_GetTxPowerIndex_8195A(PADAPTER pAdapter, int RFPath, int Rate, CHANNEL_WIDTH BandWidth, uint8_t Channel); -void PHY_SetTxPowerLevel8195A(PADAPTER Adapter, int Channel); -void phy_SpurCalibration_8195A(PADAPTER pAdapter); -void phy_SetRegBW_8195A(PADAPTER Adapter, CHANNEL_WIDTH CurrentBW); -int phy_GetSecondaryChnl_8195A(PADAPTER Adapter); -void phy_PostSetBwMode8195A(PADAPTER Adapter); -void phy_SwChnl8195A(PADAPTER pAdapter); -void phy_SwChnlAndSetBwMode8195A(PADAPTER Adapter); -void PHY_HandleSwChnlAndSetBW8195A(PADAPTER Adapter, int bSwitchChannel, int bSetBandWidth, uint8_t ChannelNum, CHANNEL_WIDTH ChnlWidth, EXTCHNL_OFFSET ExtChnlOffsetOf40MHz, EXTCHNL_OFFSET ExtChnlOffsetOf80MHz, uint8_t CenterFrequencyIndex1); -void PHY_SetBWMode8195A(PADAPTER Adapter, CHANNEL_WIDTH Bandwidth, int Offset); -void PHY_SwChnl8195A(PADAPTER Adapter, uint8_t channel); -void PHY_SetSwChnlBWMode8195A(PADAPTER Adapter, uint8_t channel, CHANNEL_WIDTH Bandwidth, int Offset40, uint8_t Offset80); +extern int PHY_QueryBBReg_8195A_Safe(PADAPTER Adapter, uint32_t RegAddr, uint32_t BitMask); +extern void PHY_SetBBReg_8195A_Safe(PADAPTER Adapter, uint32_t RegAddr, uint32_t BitMask, uint32_t Data); +extern int phy_RFSerialRead_8195A(PADAPTER Adapter, RF_PATH eRFPath, uint32_t Offset); +extern uint32_t PHY_QueryRFReg_8195A(PADAPTER Adapter, uint32_t eRFPath, uint32_t RegAddr, uint32_t BitMask); +extern void PHY_SetRFReg_8195A(PADAPTER Adapter, uint32_t eRFPath, uint32_t RegAddr, uint32_t BitMask, uint32_t Data); +extern BOOL PHY_MACConfig8195A(PADAPTER Adapter); +extern int PHY_BBConfig8195A(PADAPTER Adapter); +extern int PHY_ConfigRFWithParaFile_8195A(PADAPTER Adapter, uint8_t *pFileName, RF_PATH eRFPath); +extern void phy_PowerIndexCheck8195A(PADAPTER Adapter, uint8_t channel, uint8_t *cckPowerLevel, uint8_t *ofdmPowerLevel, uint8_t *BW20PowerLevel, uint8_t *BW40PowerLevel); +extern void PHY_SetTxPowerIndex_8195A(PADAPTER Adapter, uint32_t PowerIndex, int RFPath, int Rate); +extern void phy_TxPwrAdjInPercentage(PADAPTER Adapter, uint8_t *pTxPwrIdx); +extern int PHY_GetTxPowerIndex_8195A(PADAPTER pAdapter, int RFPath, int Rate, CHANNEL_WIDTH BandWidth, uint8_t Channel); +extern void PHY_SetTxPowerLevel8195A(PADAPTER Adapter, int Channel); +extern void phy_SpurCalibration_8195A(PADAPTER pAdapter); +extern void phy_SetRegBW_8195A(PADAPTER Adapter, CHANNEL_WIDTH CurrentBW); +extern int phy_GetSecondaryChnl_8195A(PADAPTER Adapter); +extern void phy_PostSetBwMode8195A(PADAPTER Adapter); +extern void phy_SwChnl8195A(PADAPTER pAdapter); +extern void phy_SwChnlAndSetBwMode8195A(PADAPTER Adapter); +extern void PHY_HandleSwChnlAndSetBW8195A(PADAPTER Adapter, int bSwitchChannel, int bSetBandWidth, uint8_t ChannelNum, CHANNEL_WIDTH ChnlWidth, EXTCHNL_OFFSET ExtChnlOffsetOf40MHz, EXTCHNL_OFFSET ExtChnlOffsetOf80MHz, uint8_t CenterFrequencyIndex1); +extern void PHY_SetBWMode8195A(PADAPTER Adapter, CHANNEL_WIDTH Bandwidth, int Offset); +extern void PHY_SwChnl8195A(PADAPTER Adapter, uint8_t channel); +extern void PHY_SetSwChnlBWMode8195A(PADAPTER Adapter, uint8_t channel, CHANNEL_WIDTH Bandwidth, int Offset40, uint8_t Offset80); // Data declarations //-------------------------------- // rtl8195a_pmu_cmd.o // Function declarations -void MediaConnection(PADAPTER padapter, int macid); -void MediaDisconnection(PADAPTER padapter, int macid); -void RATaskEnable(PADAPTER padapter); -void SetMediaStatus(PADAPTER padapter, int macid, int status); -void H2CHDL_JoinInfo(PADAPTER padapter, uint8_t *pCmdBuffer); -void H2CHDL_SetRsvdPage(PADAPTER padapter, uint8_t *pCmdBuffer); -uint32_t H2CCmdCommon(PADAPTER padapter, int ElementID, uint8_t *pCmdBuffer); +extern void MediaConnection(PADAPTER padapter, int macid); +extern void MediaDisconnection(PADAPTER padapter, int macid); +extern void RATaskEnable(PADAPTER padapter); +extern void SetMediaStatus(PADAPTER padapter, int macid, int status); +extern void H2CHDL_JoinInfo(PADAPTER padapter, uint8_t *pCmdBuffer); +extern void H2CHDL_SetRsvdPage(PADAPTER padapter, uint8_t *pCmdBuffer); +extern uint32_t H2CCmdCommon(PADAPTER padapter, int ElementID, uint8_t *pCmdBuffer); // Data declarations //-------------------------------- // rtl8195a_pmu_task.o // Function declarations -void HalTimerEnable(uint32_t TimerId); -void InitTDMATimer(int Period); -void ChangeStateByTDMA(PADAPTER padapter); -void GetMinRateInRRSR(PADAPTER padapter); -void CheckInReqState(PADAPTER padapter); -void InitCheckStateTimer(); -void InitGTimer1ms(PADAPTER padapter, uint8_t IRQDis, int TimerID, uint32_t Period); -void DeInitGTimer1ms(PADAPTER padapter, int TimerID); -void ChangeTransmiteRate(int offset, uint8_t rate); -void PowerBitSetting(int bPowerBit, int offset); -void ChkandChangePS(PPS_PARM pPSParm, int bPowerBit); -int IssueRsvdPagePacketSetting(int PageNum, int bHwSEQEn, uint8_t RtyLmt); -void InitRsvdPgPkt(); -void IssuePSPoll(); -signed int WaitTxStateMachineOk(); -signed int IssueNullData(PPS_PARM pPSParm, int bPowerBit, uint8_t RtyLmt); -void WriteTxPause(uint8_t value, uint8_t rcode); -void PsCloseRF(); -void PsOpenRF(); -void SetPwrStateReg(PPS_PARM pPSParm, int PwrStateType, uint8_t value); -BOOL ChkTxQueueIsEmpty(); -void InitPS(PADAPTER padapter); -void ConfigListenBeaconPeriod(PPS_PARM pPSParm, int RLBM, int AwakeInterval); -signed int PS_S2_Condition_Match(PPS_PARM pPSParm); -signed int PS_S4_Condition_Match(PADAPTER padapter); -unsigned int PS_32K_Condition_Match(); -void PS_S2ToS3ToS0State(PADAPTER padapter, int nulldata0Allow); -void PS_S2ToS0State(PPS_PARM pPSParm); -void PS_S3ToS2orS0State(PPS_PARM pPSParm); -void PS_S0ToS1ToS2State(PADAPTER padapter); -void PS_S1ToS0orS2State(PPS_PARM pPSParm); -void PS_S2ToS4State(PADAPTER padapter); -void PS_S2ToS5State(PPS_PARM pPSParm); -void PS_S5ToS2State(PPS_PARM pPSParm); -void PS_S0ToS6State(PADAPTER padapter); -void PS_S6ToS0State(PPS_PARM pPSParm); -void CheckTSFIsStable(int ReqState); -void WaitHWStateReady(); -void SysClkDown(PPS_PARM pPSParm); -void SysClkUp(PPS_PARM pPSParm); -void ResetPSParm(PADAPTER padapter); -void PS_S4ToS2State(PPS_PARM pPSParm, int ReleaseTxPause); -void SleepTo32K(PPS_PARM pPSParm); -void Change_PS_State(PADAPTER padapter, int request_ps_state, int nulldata0Allow); -void Legacy_PS_Setting(PADAPTER padapter); -void PSModeSetting(PADAPTER padapter, int on); -void ChangePSStateByRPWM(PADAPTER padapter); -void ChangeTDMAState(PADAPTER padapter); -void TDMAChangeStateTask(PADAPTER padapter, _irqL a2); -void EnterPS(PADAPTER padapter); -void SetSmartPSTimer(PADAPTER padapter); -void GTimer7Handle(void *Data); -void SmartPS2InitTimerAndToGetRxPkt(PADAPTER padapter); -void PS_OnBeacon(PADAPTER padapter); -void PSBcnEarlyProcess(PADAPTER padapter); -void PSMtiBcnEarlyProcess(PADAPTER padapter); -void PSRxBcnProcess(PADAPTER padapter); -void TxPktInPSOn(PADAPTER padapter); -void PsBcnToProcess(PADAPTER padapter); -void GTimer6Handle(void *Data); -signed int RPWMProcess(PADAPTER padapter, int benter32k); -void PSSetMode(PADAPTER padapter, PLEGACY_PS_PARM pparm); -void SpeRPT(PADAPTER padapter); -void ISR_BcnEarly(PADAPTER padapter); -void ISR_MtiBcnEarly(PADAPTER padapter); -void ISR_RxBcn(PADAPTER padapter); -void ISR_RxBCMD1(PADAPTER padapter); -void ISR_RxBCMD0(PADAPTER padapter); -void ISR_RxUCMD1(PADAPTER padapter); -void ISR_RxUCMD0(PADAPTER padapter); -void ISR_TxPktIn(PADAPTER padapter); -void H2CHDL_SetPwrMode(PADAPTER padapter, uint8_t *pCmdBuffer); -void CheckInReqStateTask(PADAPTER padapter, int a2, int a3); -uint32_t HalGetNullTxRpt(PADAPTER padapter); -void ISR_TBTT(PADAPTER padapter); -void H2CHDL_BcnIgnoreEDCCA(PADAPTER padapter, uint8_t *pCmdBuffer); -void PMUInitial(PADAPTER padapter); -void PMUTask(PADAPTER padapter); +extern void HalTimerEnable(uint32_t TimerId); +extern void InitTDMATimer(int Period); +extern void ChangeStateByTDMA(PADAPTER padapter); +extern void GetMinRateInRRSR(PADAPTER padapter); +extern void CheckInReqState(PADAPTER padapter); +extern void InitCheckStateTimer(); +extern void InitGTimer1ms(PADAPTER padapter, uint8_t IRQDis, int TimerID, uint32_t Period); +extern void DeInitGTimer1ms(PADAPTER padapter, int TimerID); +extern void ChangeTransmiteRate(int offset, uint8_t rate); +extern void PowerBitSetting(int bPowerBit, int offset); +extern void ChkandChangePS(PPS_PARM pPSParm, int bPowerBit); +extern int IssueRsvdPagePacketSetting(int PageNum, int bHwSEQEn, uint8_t RtyLmt); +extern void InitRsvdPgPkt(); +extern void IssuePSPoll(); +extern signed int WaitTxStateMachineOk(); +extern signed int IssueNullData(PPS_PARM pPSParm, int bPowerBit, uint8_t RtyLmt); +extern void WriteTxPause(uint8_t value, uint8_t rcode); +extern void PsCloseRF(); +extern void PsOpenRF(); +extern void SetPwrStateReg(PPS_PARM pPSParm, int PwrStateType, uint8_t value); +extern BOOL ChkTxQueueIsEmpty(); +extern void InitPS(PADAPTER padapter); +extern void ConfigListenBeaconPeriod(PPS_PARM pPSParm, int RLBM, int AwakeInterval); +extern signed int PS_S2_Condition_Match(PPS_PARM pPSParm); +extern signed int PS_S4_Condition_Match(PADAPTER padapter); +extern unsigned int PS_32K_Condition_Match(); +extern void PS_S2ToS3ToS0State(PADAPTER padapter, int nulldata0Allow); +extern void PS_S2ToS0State(PPS_PARM pPSParm); +extern void PS_S3ToS2orS0State(PPS_PARM pPSParm); +extern void PS_S0ToS1ToS2State(PADAPTER padapter); +extern void PS_S1ToS0orS2State(PPS_PARM pPSParm); +extern void PS_S2ToS4State(PADAPTER padapter); +extern void PS_S2ToS5State(PPS_PARM pPSParm); +extern void PS_S5ToS2State(PPS_PARM pPSParm); +extern void PS_S0ToS6State(PADAPTER padapter); +extern void PS_S6ToS0State(PPS_PARM pPSParm); +extern void CheckTSFIsStable(int ReqState); +extern void WaitHWStateReady(); +extern void SysClkDown(PPS_PARM pPSParm); +extern void SysClkUp(PPS_PARM pPSParm); +extern void ResetPSParm(PADAPTER padapter); +extern void PS_S4ToS2State(PPS_PARM pPSParm, int ReleaseTxPause); +extern void SleepTo32K(PPS_PARM pPSParm); +extern void Change_PS_State(PADAPTER padapter, int request_ps_state, int nulldata0Allow); +extern void Legacy_PS_Setting(PADAPTER padapter); +extern void PSModeSetting(PADAPTER padapter, int on); +extern void ChangePSStateByRPWM(PADAPTER padapter); +extern void ChangeTDMAState(PADAPTER padapter); +extern void TDMAChangeStateTask(PADAPTER padapter, _irqL a2); +extern void EnterPS(PADAPTER padapter); +extern void SetSmartPSTimer(PADAPTER padapter); +extern void GTimer7Handle(void *Data); +extern void SmartPS2InitTimerAndToGetRxPkt(PADAPTER padapter); +extern void PS_OnBeacon(PADAPTER padapter); +extern void PSBcnEarlyProcess(PADAPTER padapter); +extern void PSMtiBcnEarlyProcess(PADAPTER padapter); +extern void PSRxBcnProcess(PADAPTER padapter); +extern void TxPktInPSOn(PADAPTER padapter); +extern void PsBcnToProcess(PADAPTER padapter); +extern void GTimer6Handle(void *Data); +extern signed int RPWMProcess(PADAPTER padapter, int benter32k); +extern void PSSetMode(PADAPTER padapter, PLEGACY_PS_PARM pparm); +extern void SpeRPT(PADAPTER padapter); +extern void ISR_BcnEarly(PADAPTER padapter); +extern void ISR_MtiBcnEarly(PADAPTER padapter); +extern void ISR_RxBcn(PADAPTER padapter); +extern void ISR_RxBCMD1(PADAPTER padapter); +extern void ISR_RxBCMD0(PADAPTER padapter); +extern void ISR_RxUCMD1(PADAPTER padapter); +extern void ISR_RxUCMD0(PADAPTER padapter); +extern void ISR_TxPktIn(PADAPTER padapter); +extern void H2CHDL_SetPwrMode(PADAPTER padapter, uint8_t *pCmdBuffer); +extern void CheckInReqStateTask(PADAPTER padapter, int a2, int a3); +extern uint32_t HalGetNullTxRpt(PADAPTER padapter); +extern void ISR_TBTT(PADAPTER padapter); +extern void H2CHDL_BcnIgnoreEDCCA(PADAPTER padapter, uint8_t *pCmdBuffer); +extern void PMUInitial(PADAPTER padapter); +extern void PMUTask(PADAPTER padapter); // Data declarations -BOOL bCheckStateTIMER; -uint32_t WifiMcuCmdBitMap_20974; +extern BOOL bCheckStateTIMER; +extern uint32_t WifiMcuCmdBitMap_20974; //-------------------------------- // rtl8195a_recv.o // Function declarations -int32_t rtl8195a_init_recv_priv(_adapter *padapter); +extern int32_t rtl8195a_init_recv_priv(_adapter *padapter); // Data declarations //-------------------------------- // rtl8195a_rxdesc.o // Function declarations -void process_rssi(_adapter *padapter, recv_frame *prframe); -int32_t translate2dbm(int signal_strength_idx); -void rtl8195a_query_rx_desc_status(recv_frame *precvframe, uint8_t *pdesc); -void rtl8195a_query_rx_phy_status(recv_frame *precvframe, uint8_t *pphy_status, int a3); +extern void process_rssi(_adapter *padapter, union recv_frame *prframe); +extern int32_t translate2dbm(int signal_strength_idx); +extern void rtl8195a_query_rx_desc_status(union recv_frame *precvframe, uint8_t *pdesc); +extern void rtl8195a_query_rx_phy_status(union recv_frame *precvframe, uint8_t *pphy_status, int a3); // Data declarations //-------------------------------- // rtl8195a_xmit.o // Function declarations -uint8_t *GetTxBufDesc(_adapter *padapter, int queue_index); -void UpdateFirstTxbdtoXmitBuf(_adapter *padapter, xmit_frame *pxmitframe); -BOOL check_nic_enough_desc(_adapter *padapter, pkt_attrib *pattrib); -int32_t rtl8195ab_init_xmit_priv(PADAPTER padapter); -void rtl8195ab_free_xmit_priv(PADAPTER padapter); -uint32_t GetDmaTxbdIdx(uint32_t ff_hwaddr); -xmit_buf *rtl8195a_enqueue_xmitbuf(rtw_tx_ring *ring, xmit_buf *pxmitbuf); -list_head *rtl8195a_dequeue_xmitbuf(rtw_tx_ring *ring); -signed int SetTxbdForLxDMARtl8195ab(_adapter *padapter, xmit_frame *pxmitframe, tx_buf_desc *pTxbd); -void UpdateTxbdHostIndex(_adapter *padapter, uint32_t ff_hwaddr); -xmit_buf *SetXimtBuf(xmit_frame *pxmitframe); -int FreeXimtBuf(xmit_buf *pxmitbuf); -int rtw_dump_xframe(_adapter *padapter, xmit_frame *pxmitframe); -BOOL check_tx_desc_resource(_adapter *padapter, int prio); -list_head *rtw_dequeue_xframe(xmit_priv *pxmitpriv, hw_xmit *phwxmit_i, sint entry); -int32_t rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, xmit_frame *pxmitframe); -void rtl8195ab_xmitframe_resume(_adapter *padapter); -int32_t rtl8195ab_mgnt_xmit(_adapter *padapter, xmit_frame *pmgntframe); -int32_t rtl8195ab_hal_xmit(_adapter *padapter, xmit_frame *pxmitframe); -int32_t rtl8195ab_hal_xmitframe_enqueue(_adapter *padapter, xmit_frame *pxmitframe); +extern uint8_t *GetTxBufDesc(_adapter *padapter, int queue_index); +extern void UpdateFirstTxbdtoXmitBuf(_adapter *padapter, struct xmit_frame *pxmitframe); +extern BOOL check_nic_enough_desc(_adapter *padapter, struct pkt_attrib *pattrib); +extern int32_t rtl8195ab_init_xmit_priv(PADAPTER padapter); +extern void rtl8195ab_free_xmit_priv(PADAPTER padapter); +extern uint32_t GetDmaTxbdIdx(uint32_t ff_hwaddr); +extern struct xmit_buf *rtl8195a_enqueue_xmitbuf(struct rtw_tx_ring *ring, struct xmit_buf *pxmitbuf); +extern struct list_head *rtl8195a_dequeue_xmitbuf(struct rtw_tx_ring *ring); +extern signed int SetTxbdForLxDMARtl8195ab(_adapter *padapter, struct xmit_frame *pxmitframe, struct tx_buf_desc *pTxbd); +extern void UpdateTxbdHostIndex(_adapter *padapter, uint32_t ff_hwaddr); +extern struct xmit_buf *SetXimtBuf(struct xmit_frame *pxmitframe); +extern int FreeXimtBuf(struct xmit_buf *pxmitbuf); +extern int rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe); +extern BOOL check_tx_desc_resource(_adapter *padapter, int prio); +extern struct list_head *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry); +extern int32_t rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe); +extern void rtl8195ab_xmitframe_resume(_adapter *padapter); +extern int32_t rtl8195ab_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe); +extern int32_t rtl8195ab_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe); +extern int32_t rtl8195ab_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe); // Data declarations //-------------------------------- // rtw_intfs.o // Function declarations -signed int rtw_init_default_value(_adapter *padapter); -void rtw_cancel_all_timer(_adapter *padapter); -signed int rtw_free_drv_sw(_adapter *padapter); -signed int rtw_reset_drv_sw(_adapter *padapter); -signed int rtw_init_drv_sw(_adapter *padapter); -int rtw_start_drv_threads(_adapter *padapter); -void rtw_stop_drv_threads(_adapter *padapter); +extern signed int rtw_init_default_value(_adapter *padapter); +extern void rtw_cancel_all_timer(_adapter *padapter); +extern signed int rtw_free_drv_sw(_adapter *padapter); +extern signed int rtw_reset_drv_sw(_adapter *padapter); +extern signed int rtw_init_drv_sw(_adapter *padapter); +extern int rtw_start_drv_threads(_adapter *padapter); +extern void rtw_stop_drv_threads(_adapter *padapter); // Data declarations //-------------------------------- // rtw_mlme.o // Function declarations -void rtw_free_mlme_ie_data(uint8_t **ppie, uint32_t *plen); -void rtw_init_mlme_timer(_adapter *padapter); -void rtw_del_mlme_timer(mlme_priv *pmlmepriv); -void reconnect_timer_hdl(void *FunctionContext); -uint8_t *rtw_init_mlme_priv(_adapter *padapter, int a2, int a3); -void rtw_mfree_mlme_priv_lock(mlme_priv *pmlmepriv); -void rtw_free_mlme_priv_ie_data(mlme_priv *pmlmepriv); -void rtw_free_mlme_priv(mlme_priv *pmlmepriv); -sint rtw_enqueue_network(_queue *queue, wlan_network *pnetwork); -list_head *rtw_alloc_network(mlme_priv *pmlmepriv, _irqL a2, int a3); -void rtw_free_network(mlme_priv *pmlmepriv, wlan_network *pnetwork, int isfreeall); -void rtw_free_network_nolock(mlme_priv *pmlmepriv, wlan_network *pnetwork); -_queue *rtw_find_network(_queue *scanned_queue, uint8_t *addr); -void rtw_free_network_queue(_adapter *padapter, int isfreeall, int a3); -sint rtw_if_up(_adapter *padapter); -void rtw_generate_random_ibss(uint8_t *pibss); -uint8_t *rtw_get_capability_from_ie(uint8_t *ie); -int rtw_get_capability(WLAN_BSSID_EX *bss, int a2, int a3); -uint8_t *rtw_get_beacon_interval_from_ie(uint8_t *ie); -uint8_t *rtw_init_mlme_priv(_adapter *padapter, int a2, int a3); -uint32_t rtw_is_same_ibss(_adapter *adapter, wlan_network *pnetwork); -int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, int a3); -list_head *rtw_get_oldest_wlan_network(_queue *scanned_queue); -void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src, _adapter *padapter, int update_ie); -void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target); -void rtw_add_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork, int a3); -void rtw_survey_event_callback(_adapter *adapter, uint8_t *pbuf, int a3); -void rtw_free_assoc_resources(_adapter *adapter, int lock_scanned_queue); -void rtw_indicate_connect(_adapter *padapter); -void rtw_indicate_disconnect(_adapter *padapter); -void rtw_joinbss_event_callback(_adapter *adapter, uint8_t *pbuf); -signed int search_max_mac_id(_adapter *padapter); -void rtw_stassoc_hw_rpt(_adapter *adapter, sta_info *psta); -void rtw_stassoc_event_callback(_adapter *adapter, uint8_t *pbuf); -void rtw_stadel_event_callback(_adapter *adapter, uint8_t *pbuf); -void rtw_join_timeout_handler(_adapter *adapter, _irqL a2, int a3, int a4); -void rtw_join_timeout_handler(void *FunctionContext, _irqL a2, int a3, int a4); -void rtw_scan_timeout_handler(_adapter *adapter, _irqL a2, int a3); -void rtw_scan_timeout_handler(void *FunctionContext); -void rtw_dynamic_check_timer_handlder(_adapter *adapter); -void dynamic_check_timer_handlder(void *FunctionContext); -int rtw_select_and_join_from_scanned_queue(mlme_priv *pmlmepriv, _irqL a2, int a3); -void rtw_surveydone_event_callback(_adapter *adapter, uint8_t *pbuf); -sint rtw_set_auth(_adapter *adapter, security_priv *psecuritypriv); -sint rtw_set_key(_adapter *adapter, security_priv *psecuritypriv, sint keyid, uint8_t set_tx); -unsigned int rtw_restruct_wmm_ie(_adapter *adapter, uint8_t *in_ie, uint8_t *out_ie, unsigned int in_len, unsigned int initial_out_len); -sint rtw_restruct_sec_ie(_adapter *adapter, uint8_t *in_ie, uint8_t *out_ie, unsigned int in_len); -void rtw_joinbss_reset(_adapter *padapter); -unsigned int rtw_restructure_ht_ie(_adapter *padapter, uint8_t *in_ie, uint8_t *out_ie, unsigned int in_len, unsigned int *pout_len); -void rtw_update_ht_cap(_adapter *padapter, uint8_t *pie, unsigned int ie_len); -void rtw_joinbss_event_prehandle(_adapter *adapter, uint8_t *pbuf, int a3); -void rtw_issue_addbareq_cmd(_adapter *padapter, xmit_frame *pxmitframe); -sint rtw_linked_check(_adapter *padapter); -sint rtw_buddy_adapter_up(sint result); -sint check_buddy_fwstate(sint result, sint state); +extern void rtw_free_mlme_ie_data(uint8_t **ppie, uint32_t *plen); +extern void rtw_init_mlme_timer(_adapter *padapter); +extern void rtw_del_mlme_timer(struct mlme_priv *pmlmepriv); +extern void reconnect_timer_hdl(void *FunctionContext); +extern uint8_t *rtw_init_mlme_priv(_adapter *padapter, int a2, int a3); +extern void rtw_mfree_mlme_priv_lock(struct mlme_priv *pmlmepriv); +extern void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv); +extern void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv); +extern sint rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork); +extern struct list_head *rtw_alloc_network(struct mlme_priv *pmlmepriv, _irqL a2, int a3); +extern void rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, int isfreeall); +extern void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork); +extern _queue *rtw_find_network(_queue *scanned_queue, uint8_t *addr); +extern void rtw_free_network_queue(_adapter *padapter, int isfreeall, int a3); +extern sint rtw_if_up(_adapter *padapter); +extern void rtw_generate_random_ibss(uint8_t *pibss); +extern uint8_t *rtw_get_capability_from_ie(uint8_t *ie); +extern int rtw_get_capability(WLAN_BSSID_EX *bss, int a2, int a3); +extern uint8_t *rtw_get_beacon_interval_from_ie(uint8_t *ie); +extern uint8_t *rtw_init_mlme_priv(_adapter *padapter, int a2, int a3); +extern uint32_t rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork); +extern int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, int a3); +extern struct list_head *rtw_get_oldest_wlan_network(_queue *scanned_queue); +extern void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src, _adapter *padapter, int update_ie); +extern void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target); +extern void rtw_add_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork, int a3); +extern void rtw_survey_event_callback(_adapter *adapter, uint8_t *pbuf, int a3); +extern void rtw_free_assoc_resources(_adapter *adapter, int lock_scanned_queue); +extern void rtw_indicate_connect(_adapter *padapter); +extern void rtw_indicate_disconnect(_adapter *padapter); +extern void rtw_joinbss_event_callback(_adapter *adapter, uint8_t *pbuf); +extern signed int search_max_mac_id(_adapter *padapter); +extern void rtw_stassoc_hw_rpt(_adapter *adapter, struct sta_info *psta); +extern void rtw_stassoc_event_callback(_adapter *adapter, uint8_t *pbuf); +extern void rtw_stadel_event_callback(_adapter *adapter, uint8_t *pbuf); +extern void rtw_join_timeout_handler(_adapter *adapter, _irqL a2, int a3, int a4); +//void rtw_join_timeout_handler(void *FunctionContext, _irqL a2, int a3, int a4); +extern void rtw_scan_timeout_handler(_adapter *adapter, _irqL a2, int a3); +//void rtw_scan_timeout_handler(void *FunctionContext); +extern void rtw_dynamic_check_timer_handlder(_adapter *adapter); +extern void dynamic_check_timer_handlder(void *FunctionContext); +extern int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv, _irqL a2, int a3); +extern void rtw_surveydone_event_callback(_adapter *adapter, uint8_t *pbuf); +extern sint rtw_set_auth(_adapter *adapter, struct security_priv *psecuritypriv); +extern sint rtw_set_key(_adapter *adapter, struct security_priv *psecuritypriv, sint keyid, uint8_t set_tx); +extern unsigned int rtw_restruct_wmm_ie(_adapter *adapter, uint8_t *in_ie, uint8_t *out_ie, unsigned int in_len, unsigned int initial_out_len); +extern sint rtw_restruct_sec_ie(_adapter *adapter, uint8_t *in_ie, uint8_t *out_ie, unsigned int in_len); +extern void rtw_joinbss_reset(_adapter *padapter); +extern unsigned int rtw_restructure_ht_ie(_adapter *padapter, uint8_t *in_ie, uint8_t *out_ie, unsigned int in_len, unsigned int *pout_len); +extern void rtw_update_ht_cap(_adapter *padapter, uint8_t *pie, unsigned int ie_len); +extern void rtw_joinbss_event_prehandle(_adapter *adapter, uint8_t *pbuf, int a3); +extern void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe); +extern sint rtw_linked_check(_adapter *padapter); +extern sint rtw_buddy_adapter_up(sint result); +extern sint check_buddy_fwstate(sint result, sint state); // Data declarations -uint8_t auto_reconnect_running; -void (*p_wlan_autoreconnect_hdl)(rtw_security_t, char *, int, char *, int, int); +extern uint8_t auto_reconnect_running; +extern void (*p_wlan_autoreconnect_hdl)(rtw_security_t, char *, int, char *, int, int); //-------------------------------- // rtw_mlme_ext.o // Function declarations -unsigned __int8 *get_da(unsigned __int8 *pframe); -unsigned __int8 *get_sa(unsigned __int8 *pframe); -signed int OnAction(_adapter *padapter, recv_frame *precv_frame); -signed int DoReserved(_adapter *padapter, recv_frame *precv_frame); -void mgt_dispatcher(_adapter *padapter, mlme_handler *ptable, recv_frame *precv_frame); -int rtw_is_channel_set_contains_channel(RT_CHANNEL_INFO *channel_set, const uint32_t channel_num, int *pchannel_idx); -int init_hw_mlme_ext(_adapter *padapter); -unsigned int init_channel_set(_adapter *padapter, int ChannelPlan, RT_CHANNEL_INFO *channel_set); -void free_mlme_ext_priv(mlme_ext_priv *pmlmeext); -void mgt_dispatcher(_adapter *padapter, recv_frame *precv_frame, int a3); -unsigned int OnAction_public(_adapter *padapter, recv_frame *precv_frame); -signed int OnAction_p2p(_adapter *padapter, recv_frame *precv_frame); -xmit_frame *alloc_mgtxmitframe(xmit_priv *pxmitpriv); -xmit_frame *alloc_FwRsvdframe(xmit_priv *pxmitpriv, uint32_t size); -void update_mgnt_tx_rate(_adapter *padapter, uint8_t rate); -void update_mgntframe_attrib(_adapter *padapter, pkt_attrib *pattrib); -xmit_frame *rtw_build_mgnt_frame(_adapter *padapter, uint8_t *data, int len); -void dump_mgntframe(_adapter *padapter, xmit_frame *pmgntframe); -int rtw_send_mgnt(_adapter *padapter, uint8_t *data, int len, uint16_t flags); -void issue_action_BSSCoexistPacket(_adapter *padapter); -uint32_t update_hidden_ssid(uint8_t *ies, uint32_t ies_len, int hidden_ssid_mode); -void issue_beacon(_adapter *padapter); -void issue_probersp(_adapter *padapter, unsigned __int8 *da, uint8_t is_valid_p2p_probereq); -signed int OnProbeReq(_adapter *padapter, recv_frame *precv_frame); -void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, int blnbc); -void issue_auth(_adapter *padapter, sta_info *psta, int status); -signed int OnAuth(_adapter *padapter, recv_frame *precv_frame); -void issue_asocrsp(_adapter *padapter, unsigned __int16 status, sta_info *pstat, int pkt_type); -void issue_assocreq(_adapter *padapter); -void issue_nulldata(_adapter *padapter, unsigned int power_mode); -void issue_qos_nulldata(_adapter *padapter, unsigned __int8 *da, uint16_t tid); -void issue_deauth(_adapter *padapter, unsigned __int8 *da, uint32_t reason); -void issue_action_BA(_adapter *padapter, unsigned __int8 *raddr, unsigned __int8 action, unsigned __int16 status); -signed int OnAction_back(_adapter *padapter, recv_frame *precv_frame); -signed int send_beacon(_adapter *padapter); -signed int collect_bss_info(_adapter *padapter, recv_frame *precv_frame, WLAN_BSSID_EX *bssid); -void start_clnt_auth(_adapter *padapter); -void start_clnt_assoc(_adapter *padapter); -signed int OnAuthClient(_adapter *padapter, recv_frame *precv_frame); -int report_scan_result_one(_adapter *padapter, WLAN_BSSID_EX *bssid); -int add_site_survey(_adapter *padapter, WLAN_BSSID_EX *bssid); -void report_survey_event(_adapter *padapter, recv_frame *precv_frame); -signed int OnProbeRsp(_adapter *padapter, recv_frame *precv_frame); -void report_surveydone_event(_adapter *padapter); -void report_join_res(_adapter *padapter, int res); -signed int OnAssocRsp(_adapter *padapter, recv_frame *precv_frame); -void report_del_sta_event(_adapter *padapter, unsigned __int8 *MacAddr, unsigned __int16 reason); -signed int receive_disconnect(_adapter *padapter, unsigned __int8 *MacAddr, unsigned __int16 reason); -signed int OnBeacon(_adapter *padapter, recv_frame *precv_frame); -signed int OnDeAuth(_adapter *padapter, recv_frame *precv_frame); -signed int OnDisassoc(_adapter *padapter, recv_frame *precv_frame); -void report_add_sta_event(_adapter *padapter, unsigned __int8 *MacAddr, int cam_idx); -signed int OnAssocReq(_adapter *padapter, recv_frame *precv_frame); -signed int rtw_port_switch_chk(_adapter *adapter); -void update_sta_info(_adapter *padapter, sta_info *psta); -void mlmeext_sta_del_event_callback(_adapter *padapter); -void linked_info_dump(_adapter *padapter, _irqL a2, int a3); -void linked_rx_signal_strehgth_display(_adapter *padapter, int a2); -void linked_status_chk(_adapter *padapter, int a2); -void survey_timer_hdl(_adapter *padapter, int a2); -void survey_timer_hdl(void *FunctionContext); -void link_timer_hdl(_adapter *padapter); -void link_timer_hdl(void *FunctionContext); -void addba_timer_hdl(sta_info *psta); -int NULL_hdl(_adapter *padapter, uint8_t *pbuf); -int setopmode_hdl(_adapter *padapter, uint8_t *pbuf, int a3); -int disconnect_hdl(_adapter *padapter, unsigned __int8 *pbuf, int a3); -int setauth_hdl(_adapter *padapter, unsigned __int8 *pbuf); -int setkey_hdl(_adapter *padapter, uint8_t *pbuf, int a3, int a4); -signed int set_stakey_hdl(_adapter *padapter, uint8_t *pbuf); -int set_tx_beacon_cmd(_adapter *padapter); -int mlme_evt_hdl(_adapter *padapter, unsigned __int8 *pbuf); -int tx_beacon_hdl(_adapter *padapter, unsigned __int8 *pbuf, int a3); -sint check_buddy_mlmeinfo_state(sint result, uint32_t state); -void site_survey(_adapter *padapter, int a2, int a3); -int sitesurvey_cmd_hdl(_adapter *padapter, uint8_t *pbuf, int a3); -int concurrent_chk_start_clnt_join(_adapter *padapter); -void start_clnt_join(_adapter *padapter, int a2, int a3); -signed int join_cmd_hdl(_adapter *padapter, uint8_t *pbuf, int a3); -void concurrent_chk_joinbss_done(_adapter *padapter, int join_res); -void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res, int a3); -signed int set_chplan_hdl(_adapter *padapter, unsigned __int8 *pbuf); -void init_mlme_ext_timer(_adapter *padapter); -int init_mlme_ext_priv(_adapter *padapter); +extern u8 *get_da(u8 *pframe); +extern u8 *get_sa(u8 *pframe); +extern signed int OnAction(_adapter *padapter, union recv_frame *precv_frame); +extern signed int DoReserved(_adapter *padapter, union recv_frame *precv_frame); +extern void mgt_dispatcher(_adapter *padapter, struct mlme_handler *ptable, union recv_frame *precv_frame); +extern int rtw_is_channel_set_contains_channel(RT_CHANNEL_INFO *channel_set, const uint32_t channel_num, int *pchannel_idx); +extern int init_hw_mlme_ext(_adapter *padapter); +extern unsigned int init_channel_set(_adapter *padapter, int ChannelPlan, RT_CHANNEL_INFO *channel_set); +extern void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext); +//void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame, int a3); +extern unsigned int OnAction_public(_adapter *padapter, union recv_frame *precv_frame); +extern signed int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame); +extern struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv); +extern struct xmit_frame *alloc_FwRsvdframe(struct xmit_priv *pxmitpriv, uint32_t size); +extern void update_mgnt_tx_rate(_adapter *padapter, uint8_t rate); +extern void update_mgntframe_attrib(_adapter *padapter, struct pkt_attrib *pattrib); +extern struct xmit_frame *rtw_build_mgnt_frame(_adapter *padapter, uint8_t *data, int len); +extern void dump_mgntframe(_adapter *padapter, struct xmit_frame *pmgntframe); +extern int rtw_send_mgnt(_adapter *padapter, uint8_t *data, int len, uint16_t flags); +extern void issue_action_BSSCoexistPacket(_adapter *padapter); +extern uint32_t update_hidden_ssid(uint8_t *ies, uint32_t ies_len, int hidden_ssid_mode); +extern void issue_beacon(_adapter *padapter); +extern void issue_probersp(_adapter *padapter, u8 *da, uint8_t is_valid_p2p_probereq); +extern signed int OnProbeReq(_adapter *padapter, union recv_frame *precv_frame); +extern void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, int blnbc); +extern void issue_auth(_adapter *padapter, struct sta_info *psta, int status); +extern signed int OnAuth(_adapter *padapter, union recv_frame *precv_frame); +extern void issue_asocrsp(_adapter *padapter, unsigned __int16 status, struct sta_info *pstat, int pkt_type); +extern void issue_assocreq(_adapter *padapter); +extern void issue_nulldata(_adapter *padapter, unsigned int power_mode); +extern void issue_qos_nulldata(_adapter *padapter, u8 *da, uint16_t tid); +extern void issue_deauth(_adapter *padapter, u8 *da, uint32_t reason); +extern void issue_action_BA(_adapter *padapter, u8 *raddr, u8 action, unsigned __int16 status); +extern signed int OnAction_back(_adapter *padapter, union recv_frame *precv_frame); +extern signed int send_beacon(_adapter *padapter); +extern signed int collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSID_EX *bssid); +extern void start_clnt_auth(_adapter *padapter); +extern void start_clnt_assoc(_adapter *padapter); +extern signed int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame); +extern int report_scan_result_one(_adapter *padapter, WLAN_BSSID_EX *bssid); +extern int add_site_survey(_adapter *padapter, WLAN_BSSID_EX *bssid); +extern void report_survey_event(_adapter *padapter, union recv_frame *precv_frame); +extern signed int OnProbeRsp(_adapter *padapter, union recv_frame *precv_frame); +extern void report_surveydone_event(_adapter *padapter); +extern void report_join_res(_adapter *padapter, int res); +extern signed int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame); +extern void report_del_sta_event(_adapter *padapter, u8 *MacAddr, unsigned __int16 reason); +extern signed int receive_disconnect(_adapter *padapter, u8 *MacAddr, unsigned __int16 reason); +extern signed int OnBeacon(_adapter *padapter, union recv_frame *precv_frame); +extern signed int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame); +extern signed int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame); +extern void report_add_sta_event(_adapter *padapter, u8 *MacAddr, int cam_idx); +extern signed int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame); +extern signed int rtw_port_switch_chk(_adapter *adapter); +extern void update_sta_info(_adapter *padapter, struct sta_info *psta); +extern void mlmeext_sta_del_event_callback(_adapter *padapter); +extern void linked_info_dump(_adapter *padapter, _irqL a2, int a3); +extern void linked_rx_signal_strehgth_display(_adapter *padapter, int a2); +extern void linked_status_chk(_adapter *padapter, int a2); +extern void survey_timer_hdl(_adapter *padapter, int a2); +//void survey_timer_hdl(void *FunctionContext); +extern void link_timer_hdl(_adapter *padapter); +//void link_timer_hdl(void *FunctionContext); +extern void addba_timer_hdl(struct sta_info *psta); +extern int NULL_hdl(_adapter *padapter, uint8_t *pbuf); +extern int setopmode_hdl(_adapter *padapter, uint8_t *pbuf, int a3); +extern int disconnect_hdl(_adapter *padapter, u8 *pbuf, int a3); +extern int setauth_hdl(_adapter *padapter, u8 *pbuf); +extern int setkey_hdl(_adapter *padapter, uint8_t *pbuf, int a3, int a4); +extern signed int set_stakey_hdl(_adapter *padapter, uint8_t *pbuf); +extern int set_tx_beacon_cmd(_adapter *padapter); +extern int mlme_evt_hdl(_adapter *padapter, u8 *pbuf); +extern int tx_beacon_hdl(_adapter *padapter, u8 *pbuf, int a3); +extern sint check_buddy_mlmeinfo_state(sint result, uint32_t state); +extern void site_survey(_adapter *padapter, int a2, int a3); +extern int sitesurvey_cmd_hdl(_adapter *padapter, uint8_t *pbuf, int a3); +extern int concurrent_chk_start_clnt_join(_adapter *padapter); +extern void start_clnt_join(_adapter *padapter, int a2, int a3); +extern signed int join_cmd_hdl(_adapter *padapter, uint8_t *pbuf, int a3); +extern void concurrent_chk_joinbss_done(_adapter *padapter, int join_res); +extern void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res, int a3); +extern signed int set_chplan_hdl(_adapter *padapter, u8 *pbuf); +extern void init_mlme_ext_timer(_adapter *padapter); +extern int init_mlme_ext_priv(_adapter *padapter); // Data declarations -const RT_CHANNEL_PLAN_2G RTW_ChannelPlan2G[8]; /* = +extern const RT_CHANNEL_PLAN_2G RTW_ChannelPlan2G[8]; /* = { { { 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u, 11u, 12u, 13u, 0u }, 13u }, { { 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u, 11u, 12u, 13u, 0u }, 13u }, @@ -1255,9 +1151,9 @@ const RT_CHANNEL_PLAN_2G RTW_ChannelPlan2G[8]; /* = { { 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u, 11u, 12u, 13u, 0u }, 13u }, { { 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u, 9u, 10u, 11u, 12u, 13u, 0u }, 13u } }; */ -const uint8_t WPS_OUI[4]; // = { 0u, 80u, 242u, 4u }; -mac_monitor_ptr mac_monitor_callback; -mlme_handler mlme_sta_tbl[14]; /* = +extern const uint8_t WPS_OUI[4]; // = { 0u, 80u, 242u, 4u }; +extern mac_monitor_ptr mac_monitor_callback; +extern struct mlme_handler mlme_sta_tbl[14]; /* = { { 0u, (unsigned int (*)(_adapter *, recv_frame *))0x2FA1 }, { 16u, (unsigned int (*)(_adapter *, recv_frame *))0x28A9 }, @@ -1274,13 +1170,13 @@ mlme_handler mlme_sta_tbl[14]; /* = { 192u, (unsigned int (*)(_adapter *, recv_frame *))0x2C65 }, { 208u, (unsigned int (*)(_adapter *, recv_frame *))0x4F } }; */ -_UNKNOWN unk_4AE4; // weak -list_head *mf_list_head; -const uint8_t WMM_INFO_OUI[6]; // = { 0u, 80u, 242u, 2u, 0u, 1u }; -uint8_t pscan_retry_cnt_21430; -const uint8_t RTW_WPA_OUI[4]; // = { 0u, 80u, 242u, 1u }; -const uint8_t WMM_PARA_OUI[6]; // = { 0u, 80u, 242u, 2u, 1u, 1u }; -const RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[8]; /* = +//_UNKNOWN unk_4AE4; // weak +extern struct list_head *mf_list_head; +extern const uint8_t WMM_INFO_OUI[6]; // = { 0u, 80u, 242u, 2u, 0u, 1u }; +extern uint8_t pscan_retry_cnt_21430; +extern const uint8_t RTW_WPA_OUI[4]; // = { 0u, 80u, 242u, 1u }; +extern const uint8_t WMM_PARA_OUI[6]; // = { 0u, 80u, 242u, 2u, 1u, 1u }; +extern const RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[8]; /* = { { 32u, 0u, 3u }, { 33u, 1u, 2u }, @@ -1291,9 +1187,9 @@ const RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[8]; /* = { 71u, 7u, 4u }, { 88u, 6u, 1u } }; */ -const uint8_t null_addr[6]; // = { 0u, 0u, 0u, 0u, 0u, 0u }; -const uint8_t WMM_OUI[4]; // = { 0u, 80u, 242u, 2u }; -const fwevent wlanevents[24]; /* = +extern const uint8_t null_addr[6]; // = { 0u, 0u, 0u, 0u, 0u, 0u }; +extern const uint8_t WMM_OUI[4]; // = { 0u, 80u, 242u, 2u }; +extern const struct fwevent wlanevents[24]; /* = { { 0u, &rtw_dummy_event_callback }, { 0u, NULL }, @@ -1323,403 +1219,403 @@ const fwevent wlanevents[24]; /* = //-------------------------------- // rtw_promisc.o // Function declarations -unsigned __int8 *get_hdr_bssid(unsigned __int8 *pframe); -int filter_packet(unsigned __int8 *buf, int length); -signed int promisc_get_encrypt(_adapter *padapter, uint8_t *bssid); -void promisc_info_get(_adapter *padapter, recv_frame *prframe, ieee80211_frame_info_t *ppromisc_info, int a4); -void promisc_set_enable(_adapter *padapter, int enabled, int len_used); -void promisc_deinit(_adapter *padapter); -int promisc_recv_func(_adapter *padapter, recv_frame *rframe); -int promisc_set(rtw_rcr_level_t enabled, void (*callback)(unsigned __int8 *, unsigned int, void *), int len_used); -int promisc_set_mgntframe(int result); -int is_promisc_enabled(); -void promisc_issue_probereq(); -void promisc_issue_probersp(unsigned __int8 *da); -int promisc_get_fixed_channel(void *fixed_bssid, uint8_t *ssid, int *ssid_length); +extern u8 *get_hdr_bssid(u8 *pframe); +extern int filter_packet(u8 *buf, int length); +extern signed int promisc_get_encrypt(_adapter *padapter, uint8_t *bssid); +extern void promisc_info_get(_adapter *padapter, union recv_frame *prframe, ieee80211_frame_info_t *ppromisc_info, int a4); +extern void promisc_set_enable(_adapter *padapter, int enabled, int len_used); +extern void promisc_deinit(_adapter *padapter); +extern int promisc_recv_func(_adapter *padapter, union recv_frame *rframe); +extern int promisc_set(rtw_rcr_level_t enabled, void (*callback)(u8 *, unsigned int, void *), int len_used); +extern int promisc_set_mgntframe(int result); +extern int is_promisc_enabled(); +extern void promisc_issue_probereq(); +extern void promisc_issue_probersp(u8 *da); +extern int promisc_get_fixed_channel(void *fixed_bssid, uint8_t *ssid, int *ssid_length); // Data declarations -void (*promisc_callback_all)(unsigned __int8 *, unsigned int, void *); -_sema promisc_sema; -const unsigned __int8 zero_bssid[6]; // = { 0u, 0u, 0u, 0u, 0u, 0u }; -void (*promisc_callback)(unsigned __int8 *, unsigned int, void *); +extern void (*promisc_callback_all)(u8 *, unsigned int, void *); +extern _sema promisc_sema; +extern const u8 zero_bssid[6]; // = { 0u, 0u, 0u, 0u, 0u, 0u }; +extern void (*promisc_callback)(u8 *, unsigned int, void *); //-------------------------------- // rtw_psk.o // Function declarations -void SetEAPOL_KEYIV(OCTET_STRING ocDst, __int64 a2, OCTET32_INTEGER oc32Counter); -void ToDrv_SetPTK(_adapter *padapter, sta_info *psta); -void Message_ReplayCounter_OC2LI(int a1, LARGE_INTEGER *li); -int Message_SmallerEqualReplayCounter(LARGE_INTEGER li1, int a2); -void Message_setReplayCounter(int a1, unsigned int h, unsigned int l); -void INCLargeInteger(LARGE_INTEGER *x); -void INCOctet16_INTEGER(OCTET16_INTEGER *x); -OCTET32_INTEGER *INCOctet32_INTEGER(OCTET32_INTEGER *x); -void ToDrv_DisconnectSTA(_adapter *padapter, sta_info *psta, int reason); -int CheckMIC(OCTET_STRING EAPOLMsgRecvd, unsigned __int8 *key, int keylen); -void CalcMIC(OCTET_STRING EAPOLMsgSend, int algo, unsigned __int8 *key, int keylen); -int DecWPA2KeyData(WPA_STA_INFO *pStaInfo, unsigned __int8 *key, int keylen, unsigned __int8 *kek, int keklen, unsigned __int8 *kout); -int DecGTK(OCTET_STRING EAPOLMsgRecvd, unsigned __int8 *kek, int keklen, int keylen, unsigned __int8 *kout); -void ToDrv_SetGTK(_adapter *padapter); -void init_wpa_sta_info(_adapter *padapter, sta_info *psta); -void SendEAPOL(_adapter *padapter, sta_info *psta, int resend); -void ClientSendEAPOL(_adapter *padapter, sta_info *psta, int resend); -void ResendTimeout(void *task_psta, _irqL a2); -void EAPOLKeyRecvd(_adapter *padapter, sta_info *psta); -void ClientEAPOLKeyRecvd(_adapter *padapter, sta_info *psta); -void set_wpa_global_PSK(unsigned __int8 *key); -void psk_derive(_adapter *padapter, unsigned __int8 *passphrase, unsigned __int8 *ssid); -void psk_init(_adapter *padapter, unsigned __int8 *pie, int ielen); -int psk_strip_rsn_pairwise(uint8_t *ie, int ie_len); -int psk_strip_wpa_pairwise(uint8_t *ie, int ie_len); -int tkip_send_mic_failure_report(_adapter *padapter); +extern void SetEAPOL_KEYIV(OCTET_STRING ocDst, __int64 a2, OCTET32_INTEGER oc32Counter); +extern void ToDrv_SetPTK(_adapter *padapter, struct sta_info *psta); +extern void Message_ReplayCounter_OC2LI(int a1, LARGE_INTEGER *li); +extern int Message_SmallerEqualReplayCounter(LARGE_INTEGER li1, int a2); +extern void Message_setReplayCounter(int a1, unsigned int h, unsigned int l); +extern void INCLargeInteger(LARGE_INTEGER *x); +extern void INCOctet16_INTEGER(OCTET16_INTEGER *x); +extern OCTET32_INTEGER *INCOctet32_INTEGER(OCTET32_INTEGER *x); +extern void ToDrv_DisconnectSTA(_adapter *padapter, struct sta_info *psta, int reason); +extern int CheckMIC(OCTET_STRING EAPOLMsgRecvd, u8 *key, int keylen); +extern void CalcMIC(OCTET_STRING EAPOLMsgSend, int algo, u8 *key, int keylen); +extern int DecWPA2KeyData(WPA_STA_INFO *pStaInfo, u8 *key, int keylen, u8 *kek, int keklen, u8 *kout); +extern int DecGTK(OCTET_STRING EAPOLMsgRecvd, u8 *kek, int keklen, int keylen, u8 *kout); +extern void ToDrv_SetGTK(_adapter *padapter); +extern void init_wpa_sta_info(_adapter *padapter, struct sta_info *psta); +extern void SendEAPOL(_adapter *padapter, struct sta_info *psta, int resend); +extern void ClientSendEAPOL(_adapter *padapter, struct sta_info *psta, int resend); +extern void ResendTimeout(void *task_psta, _irqL a2); +extern void EAPOLKeyRecvd(_adapter *padapter, struct sta_info *psta); +extern void ClientEAPOLKeyRecvd(_adapter *padapter, struct sta_info *psta); +extern void set_wpa_global_PSK(u8 *key); +extern void psk_derive(_adapter *padapter, u8 *passphrase, u8 *ssid); +extern void psk_init(_adapter *padapter, u8 *pie, int ielen); +extern int psk_strip_rsn_pairwise(uint8_t *ie, int ie_len); +extern int psk_strip_wpa_pairwise(uint8_t *ie, int ie_len); +extern int tkip_send_mic_failure_report(_adapter *padapter); // Data declarations -uint8_t psk_essid[2][36]; -uint8_t psk_passphrase[2][65]; -char PMKID_KDE_TYPE_17744[6]; -uint8_t wpa_global_PSK[2][40]; +extern uint8_t psk_essid[2][36]; +extern uint8_t psk_passphrase[2][65]; +extern char PMKID_KDE_TYPE_17744[6]; +extern uint8_t wpa_global_PSK[2][40]; //-------------------------------- // rtw_pwrctrl.o // Function declarations -void pwr_state_check_handler(void *FunctionContext); -void ips_enter(_adapter *padapter); -int ips_leave(_adapter *padapter); -signed int rtw_pwr_unassociated_idle(_adapter *adapter); -void rtw_ps_processor(_adapter *padapter); -void rtw_set_rpwm(PADAPTER padapter, uint8_t pslv); -int PS_RDY_CHECK(_adapter *padapter); -void rtw_set_ps_mode(PADAPTER padapter, int ps_mode, int smart_ps, int bcn_ant_mode); -int32_t LPS_RF_ON_check(PADAPTER padapter, uint32_t delay_ms); -void LPS_Enter(PADAPTER padapter); -void LPS_Leave(PADAPTER padapter); -void LeaveAllPowerSaveMode(PADAPTER Adapter); -void rtw_init_pwrctrl_priv(PADAPTER padapter); -void rtw_free_pwrctrl_priv(PADAPTER adapter); -int rtw_pwr_wakeup(_adapter *padapter, uint32_t ips_deffer_ms, const char *caller); -int rtw_pm_set_lps(_adapter *padapter, int mode); -int rtw_pm_set_ips(_adapter *padapter, int mode); -int rtw_pm_set_tdma_param(_adapter *padapter, uint8_t tdma_slot_period, uint8_t tdma_rfon_period_len_1, uint8_t tdma_rfon_period_len_2, uint8_t tdma_rfon_period_len_3); -int rtw_pm_set_lps_dtim(_adapter *padapter, uint8_t lps_dtim); -int rtw_pm_get_lps_dtim(_adapter *padapter); +extern void pwr_state_check_handler(void *FunctionContext); +extern void ips_enter(_adapter *padapter); +extern int ips_leave(_adapter *padapter); +extern signed int rtw_pwr_unassociated_idle(_adapter *adapter); +extern void rtw_ps_processor(_adapter *padapter); +extern void rtw_set_rpwm(PADAPTER padapter, uint8_t pslv); +extern int PS_RDY_CHECK(_adapter *padapter); +extern void rtw_set_ps_mode(PADAPTER padapter, int ps_mode, int smart_ps, int bcn_ant_mode); +extern int32_t LPS_RF_ON_check(PADAPTER padapter, uint32_t delay_ms); +extern void LPS_Enter(PADAPTER padapter); +extern void LPS_Leave(PADAPTER padapter); +extern void LeaveAllPowerSaveMode(PADAPTER Adapter); +extern void rtw_init_pwrctrl_priv(PADAPTER padapter); +extern void rtw_free_pwrctrl_priv(PADAPTER adapter); +extern int rtw_pwr_wakeup(_adapter *padapter, uint32_t ips_deffer_ms, const char *caller); +extern int rtw_pm_set_lps(_adapter *padapter, int mode); +extern int rtw_pm_set_ips(_adapter *padapter, int mode); +extern int rtw_pm_set_tdma_param(_adapter *padapter, uint8_t tdma_slot_period, uint8_t tdma_rfon_period_len_1, uint8_t tdma_rfon_period_len_2, uint8_t tdma_rfon_period_len_3); +extern int rtw_pm_set_lps_dtim(_adapter *padapter, uint8_t lps_dtim); +extern int rtw_pm_get_lps_dtim(_adapter *padapter); // Data declarations //-------------------------------- // rtw_recv.o // Function declarations -uint8_t *recvframe_pull(uint8_t *result, sint sz); -uint8_t *recvframe_pull_tail(uint8_t *result, sint sz); -void rtw_signal_stat_timer_hdl(void *FunctionContext); -void rtw_init_sta_recv_priv(sta_recv_priv *psta_recvpriv); -sint rtw_init_recv_priv(recv_priv *precvpriv, _adapter *padapter); -void rtw_mfree_recv_priv_lock(recv_priv *precvpriv); -list_head *rtw_alloc_recvframe(_queue *pfree_recv_queue); -list_head *rtw_alloc_recvframe(_queue *pfree_recv_queue, _irqL a2, int a3); -int rtw_free_recvframe(recv_frame *precvframe, _queue *pfree_recv_queue); -sint rtw_enqueue_recvframe(recv_frame *precvframe, _queue *queue); -sint rtw_enqueue_recvframe(recv_frame *precvframe, _queue *queue); -void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue); -int rtw_free_uc_swdec_pending_queue(_adapter *adapter, _irqL a2, int a3); -void rtw_free_recv_priv(recv_priv *precvpriv); -sint rtw_enqueue_recvbuf_to_head(recv_buf *precvbuf, _queue *queue); -uint32_t rtw_free_buf_pending_queue(_adapter *adapter); -sint rtw_enqueue_recvbuf(recv_buf *precvbuf, _queue *queue); -list_head *rtw_dequeue_recvbuf(_queue *queue, _irqL a2, int a3); -sint recvframe_chkmic(_adapter *adapter, recv_frame *precvframe, int a3, int a4); -recv_frame *decryptor(_adapter *padapter, recv_frame *precv_frame); -recv_frame *portctrl(_adapter *adapter, recv_frame *precv_frame); -sint recv_decache(recv_frame *precv_frame, uint8_t bretry, stainfo_rxcache *prxcache); -void process_pwrbit_data(_adapter *padapter, recv_frame *precv_frame, int a3, int a4); -void process_wmmps_data(_adapter *padapter, recv_frame *precv_frame); -void count_rx_stats(_adapter *padapter, recv_frame *prframe, sta_info *sta); -sint sta2sta_data_frame(_adapter *adapter, recv_frame *precv_frame, sta_info **psta, int a4); -sint ap2sta_data_frame(_adapter *adapter, recv_frame *precv_frame, sta_info **psta); -sint sta2ap_data_frame(_adapter *adapter, recv_frame *precv_frame, sta_info **psta); -sint validate_recv_ctrl_frame(_adapter *padapter, recv_frame *precv_frame); -sint validate_recv_data_frame(_adapter *adapter, recv_frame *precv_frame); -sint wlanhdr_to_ethhdr(recv_frame *precvframe, int a2, int a3); -recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q); -_queue *recvframe_chk_defrag(PADAPTER padapter, recv_frame *precv_frame); -sint validate_recv_mgnt_frame(PADAPTER padapter, recv_frame **pprecv_frame); -sint validate_recv_frame(_adapter *adapter, recv_frame **pprecv_frame); -int amsdu_to_msdu(_adapter *padapter, recv_frame *prframe); -int check_indicate_seq(recv_reorder_ctrl *preorder_ctrl, int seq_num); -int enqueue_reorder_recvframe(recv_reorder_ctrl *preorder_ctrl, recv_frame *prframe); -int recv_indicatepkts_in_order(_adapter *padapter, recv_reorder_ctrl *preorder_ctrl, int bforced); -int recv_indicatepkt_reorder(_adapter *padapter, recv_frame *prframe, int a3); -void rtw_reordering_ctrl_timeout_handler(void *pcontext, _irqL a2); -int process_recv_indicatepkts(_adapter *padapter, recv_frame *prframe, int a3); -int recv_func_prehandle(_adapter *padapter, recv_frame *rframe, int a3); -int recv_func_posthandle(_adapter *padapter, recv_frame *prframe); -int recv_func(_adapter *padapter, recv_frame *rframe, int a3); -int32_t rtw_recv_entry(recv_frame *precvframe, int a2, int a3); -void rtw_recv_tasklet(thread_context context); +extern uint8_t *recvframe_pull(uint8_t *result, sint sz); +extern uint8_t *recvframe_pull_tail(uint8_t *result, sint sz); +extern void rtw_signal_stat_timer_hdl(void *FunctionContext); +extern void rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv); +extern sint rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter); +extern void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv); +extern struct list_head *rtw_alloc_recvframe(_queue *pfree_recv_queue); +//struct list_head *rtw_alloc_recvframe(_queue *pfree_recv_queue, _irqL a2, int a3); +extern int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue); +extern sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue); +extern sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue); +extern void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue); +extern int rtw_free_uc_swdec_pending_queue(_adapter *adapter, _irqL a2, int a3); +extern void rtw_free_recv_priv(struct recv_priv *precvpriv); +extern sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue); +extern uint32_t rtw_free_buf_pending_queue(_adapter *adapter); +extern sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue); +extern struct list_head *rtw_dequeue_recvbuf(_queue *queue, _irqL a2, int a3); +extern sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe, int a3, int a4); +extern union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame); +extern union recv_frame *portctrl(_adapter *adapter, union recv_frame *precv_frame); +extern sint recv_decache(union recv_frame *precv_frame, uint8_t bretry, struct stainfo_rxcache *prxcache); +extern void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_frame, int a3, int a4); +extern void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame); +extern void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_info *sta); +extern sint sta2sta_data_frame(_adapter *adapter, union recv_frame *precv_frame, struct sta_info **psta, int a4); +extern sint ap2sta_data_frame(_adapter *adapter, union recv_frame *precv_frame, struct sta_info **psta); +extern sint sta2ap_data_frame(_adapter *adapter, union recv_frame *precv_frame, struct sta_info **psta); +extern sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame); +extern sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame); +extern sint wlanhdr_to_ethhdr(union recv_frame *precvframe, int a2, int a3); +extern union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q); +extern _queue *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *precv_frame); +extern sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame **pprecv_frame); +extern sint validate_recv_frame(_adapter *adapter, union recv_frame **pprecv_frame); +extern int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe); +extern int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, int seq_num); +extern int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe); +extern int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced); +extern int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe, int a3); +extern void rtw_reordering_ctrl_timeout_handler(void *pcontext, _irqL a2); +extern int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe, int a3); +extern int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe, int a3); +extern int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe); +extern int recv_func(_adapter *padapter, union recv_frame *rframe, int a3); +extern int32_t rtw_recv_entry(union recv_frame *precvframe, int a2, int a3); +extern void rtw_recv_tasklet(thread_context context); // Data declarations -const uint8_t SNAP_ETH_TYPE_APPLETALK_AARP[2]; // = { 128u, 243u }; -const uint8_t SNAP_ETH_TYPE_IPX[2]; // = { 129u, 55u }; -const uint8_t rtw_bridge_tunnel_header[6]; // = { 170u, 170u, 3u, 0u, 0u, 248u }; -const uint8_t oui_8021h[3] =; // { 0u, 0u, 248u }; -const uint8_t rtw_rfc1042_header[6]; // = { 170u, 170u, 3u, 0u, 0u, 0u }; -const uint8_t SNAP_HDR_APPLETALK_DDP[3]; // = { 8u, 0u, 7u }; -const uint8_t SNAP_ETH_TYPE_APPLETALK_DDP[2]; // = { 128u, 155u }; -const uint8_t oui_rfc1042[3]; // = { 0u, 0u, 0u }; +extern const uint8_t SNAP_ETH_TYPE_APPLETALK_AARP[2]; // = { 128u, 243u }; +extern const uint8_t SNAP_ETH_TYPE_IPX[2]; // = { 129u, 55u }; +extern const uint8_t rtw_bridge_tunnel_header[6]; // = { 170u, 170u, 3u, 0u, 0u, 248u }; +extern const uint8_t oui_8021h[3]; // = { 0u, 0u, 248u }; +extern const uint8_t rtw_rfc1042_header[6]; // = { 170u, 170u, 3u, 0u, 0u, 0u }; +extern const uint8_t SNAP_HDR_APPLETALK_DDP[3]; // = { 8u, 0u, 7u }; +extern const uint8_t SNAP_ETH_TYPE_APPLETALK_DDP[2]; // = { 128u, 155u }; +extern const uint8_t oui_rfc1042[3]; // = { 0u, 0u, 0u }; //-------------------------------- // rtw_security.o // Function declarations -void rtw_wep_encrypt(_adapter *padapter, uint8_t *pxmitframe); -void rtw_wep_decrypt(_adapter *padapter, uint8_t *precvframe); -signed int rtw_tkip_encrypt(_adapter *padapter, uint8_t *pxmitframe); -int rtw_tkip_decrypt(_adapter *padapter, uint8_t *precvframe); -signed int rtw_aes_encrypt(_adapter *padapter, uint8_t *pxmitframe, int a3, int a4); -int rtw_aes_decrypt(_adapter *padapter, uint8_t *precvframe, int a3, int a4); -void rtw_use_tkipkey_handler(void *FunctionContext); -int rtw_init_sec_priv(_adapter *padapter); -void rtw_free_sec_priv(security_priv *psecpriv); +extern void rtw_wep_encrypt(_adapter *padapter, uint8_t *pxmitframe); +extern void rtw_wep_decrypt(_adapter *padapter, uint8_t *precvframe); +extern signed int rtw_tkip_encrypt(_adapter *padapter, uint8_t *pxmitframe); +extern int rtw_tkip_decrypt(_adapter *padapter, uint8_t *precvframe); +extern signed int rtw_aes_encrypt(_adapter *padapter, uint8_t *pxmitframe, int a3, int a4); +extern int rtw_aes_decrypt(_adapter *padapter, uint8_t *precvframe, int a3, int a4); +extern void rtw_use_tkipkey_handler(void *FunctionContext); +extern int rtw_init_sec_priv(_adapter *padapter); +extern void rtw_free_sec_priv(struct security_priv *psecpriv); // Data declarations //-------------------------------- // rtw_sta_mgt.o // Function declarations -int wifi_mac_hash(uint8_t *mac); -void rtw_init_stainfo(sta_info *psta); -int rtw_init_sta_priv(_adapter *padapter); -void rtw_free_sta_xmit_priv_lock(sta_xmit_priv *psta_xmitpriv); -void rtw_mfree_stainfo(sta_info *psta); -void rtw_mfree_sta_priv_lock(sta_priv *pstapriv); -signed int rtw_free_sta_priv(sta_priv *pstapriv); -void init_addba_retry_timer(_adapter *padapter, sta_info *psta); -sta_info *rtw_alloc_stainfo(sta_priv *pstapriv, uint8_t *hwaddr, _irqL a3, _irqL a4); -signed int rtw_free_stainfo(_adapter *padapter, sta_info *psta, int a3); -sta_info *rtw_get_stainfo(sta_priv *pstapriv, uint8_t *hwaddr, int a3, int a4); -signed int rtw_init_bcmc_stainfo(_adapter *padapter, int a2, int a3); -sta_info *rtw_get_bcmc_stainfo(_adapter *padapter, int a2, int a3); -void rtw_free_all_stainfo(_adapter *padapter, _irqL a2, int a3); +extern int wifi_mac_hash(uint8_t *mac); +extern void rtw_init_stainfo(struct sta_info *psta); +extern int rtw_init_sta_priv(_adapter *padapter); +extern void rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv); +extern void rtw_mfree_stainfo(struct sta_info *psta); +extern void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv); +extern signed int rtw_free_sta_priv(struct sta_priv *pstapriv); +extern void init_addba_retry_timer(_adapter *padapter, struct sta_info *psta); +extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, uint8_t *hwaddr, _irqL a3, _irqL a4); +extern signed int rtw_free_stainfo(_adapter *padapter, struct sta_info *psta, int a3); +extern struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, uint8_t *hwaddr, int a3, int a4); +extern signed int rtw_init_bcmc_stainfo(_adapter *padapter, int a2, int a3); +extern struct sta_info *rtw_get_bcmc_stainfo(_adapter *padapter, int a2, int a3); +extern void rtw_free_all_stainfo(_adapter *padapter, _irqL a2, int a3); // Data declarations //-------------------------------- // rtw_xmit.o // Function declarations -void init_txservq(tx_servq *ptxservq); -void set_qos(pkt_file *ppktfile, pkt_attrib *pattrib); -void rtw_init_sta_xmit_priv(sta_xmit_priv *psta_xmitpriv); -void rtw_mfree_xmit_priv_lock(xmit_priv *pxmitpriv); -int qos_acm(uint8_t acm_mask, int priority); -int32_t xmitframe_addmic(_adapter *padapter, xmit_frame *pxmitframe); -int32_t xmitframe_swencrypt(_adapter *padapter, xmit_frame *pxmitframe); -int32_t rtw_make_wlanhdr(_adapter *padapter, uint8_t *hdr, pkt_attrib *pattrib); -int32_t rtw_txframes_pending(_adapter *padapter); -int32_t rtw_txframes_sta_ac_pending(_adapter *padapter, pkt_attrib *pattrib); -void rtw_txframes_update_attrib_vcs_info(_adapter *padapter, xmit_frame *pxmitframe); -int rtw_calculate_wlan_pkt_size_by_attribue(pkt_attrib *pattrib); -int32_t rtw_put_snap(uint8_t *data, int h_proto); -void rtw_update_protection(_adapter *padapter, uint8_t *ie, unsigned int ie_len); -void rtw_count_tx_stats(PADAPTER padapter, xmit_frame *pxmitframe, __int64 sz); -int32_t rtw_free_xmitbuf_ext(xmit_priv *pxmitpriv, xmit_buf *pxmitbuf, int a3); -list_head *rtw_alloc_xmitframe(xmit_priv *pxmitpriv, _irqL a2); -int32_t rtw_free_xmitframe(xmit_priv *pxmitpriv, xmit_frame *pxmitframe); -void rtw_free_xmitframe_queue(xmit_priv *pxmitpriv, _queue *pframequeue); -tx_servq *rtw_get_sta_pending(_adapter *padapter, sta_info *psta, sint up, uint8_t *ac); -sta_info *rtw_xmit_classifier(_adapter *padapter, xmit_frame *pxmitframe); -BOOL rtw_xmitframe_enqueue(_adapter *padapter, xmit_frame *pxmitframe); -void rtw_alloc_hwxmits(_adapter *padapter); -void rtw_free_hwxmits(_adapter *padapter); -void rtw_free_xmit_priv(xmit_priv *pxmitpriv); -void rtw_init_hwxmits(hw_xmit *phwxmit, sint entry); -int32_t rtw_init_xmit_priv(xmit_priv *pxmitpriv, _adapter *padapter); -signed int rtw_get_ff_hwaddr(xmit_frame *pxmitframe); -sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, xmit_frame *pxmitframe); -void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, sta_info *psta, _queue *pframequeue); -void stop_sta_xmit(_adapter *padapter, sta_info *psta); -void wakeup_sta_to_xmit(_adapter *padapter, sta_info *psta); -void xmit_delivery_enabled_frames(_adapter *padapter, sta_info *psta, int a3); -void rtw_xmit_tasklet(thread_context context); -int32_t rtw_xmit(_adapter *padapter, _pkt **ppkt); -BOOL rtw_sctx_chk_waring_status(int status); -void rtw_sctx_done_err(submit_ctx **sctx, int status); -list_head *rtw_alloc_xmitbuf(xmit_priv *pxmitpriv, _irqL a2); -int32_t rtw_free_xmitbuf(xmit_priv *pxmitpriv, xmit_buf *pxmitbuf, int a3); -xmit_buf *rtw_alloc_xmitbuf_ext(xmit_priv *pxmitpriv, uint32_t size, int a3); -void rtw_sctx_done(submit_ctx **sctx); +extern void init_txservq(struct tx_servq *ptxservq); +extern void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib); +extern void rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv); +extern void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv); +extern int qos_acm(uint8_t acm_mask, int priority); +extern int32_t xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe); +extern int32_t xmitframe_swencrypt(_adapter *padapter, struct xmit_frame *pxmitframe); +extern int32_t rtw_make_wlanhdr(_adapter *padapter, uint8_t *hdr, struct pkt_attrib *pattrib); +extern int32_t rtw_txframes_pending(_adapter *padapter); +extern int32_t rtw_txframes_sta_ac_pending(_adapter *padapter, struct pkt_attrib *pattrib); +extern void rtw_txframes_update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitframe); +extern int rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib); +extern int32_t rtw_put_snap(uint8_t *data, int h_proto); +extern void rtw_update_protection(_adapter *padapter, uint8_t *ie, unsigned int ie_len); +extern void rtw_count_tx_stats(PADAPTER padapter, struct xmit_frame *pxmitframe, __int64 sz); +extern int32_t rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf, int a3); +extern struct list_head *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv, _irqL a2); +extern int32_t rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe); +extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue); +extern struct tx_servq *rtw_get_sta_pending(_adapter *padapter, struct sta_info *psta, sint up, uint8_t *ac); +extern struct sta_info *rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe); +extern BOOL rtw_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe); +extern void rtw_alloc_hwxmits(_adapter *padapter); +extern void rtw_free_hwxmits(_adapter *padapter); +extern void rtw_free_xmit_priv(struct xmit_priv *pxmitpriv); +extern void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry); +extern int32_t rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter); +extern signed int rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe); +extern sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe); +extern void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_info *psta, _queue *pframequeue); +extern void stop_sta_xmit(_adapter *padapter, struct sta_info *psta); +extern void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta); +extern void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta, int a3); +extern void rtw_xmit_tasklet(thread_context context); +extern int32_t rtw_xmit(_adapter *padapter, _pkt **ppkt); +extern BOOL rtw_sctx_chk_waring_status(int status); +extern void rtw_sctx_done_err(struct submit_ctx **sctx, int status); +extern struct list_head *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv, _irqL a2); +extern int32_t rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf, int a3); +extern struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv, uint32_t size, int a3); +extern void rtw_sctx_done(struct submit_ctx **sctx); // Data declarations //-------------------------------- // phydm_RegConfig8195A.o // Function declarations -void __fastcall odm_ConfigRFReg_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Data, ODM_RF_RADIO_PATH_E RF_PATH, u4Byte RegAddr); -void __fastcall odm_ConfigRF_RadioA_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Data); // idb -void __fastcall odm_ConfigBB_AGC_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Bitmask, u4Byte Data); // idb -void __fastcall odm_ConfigBB_PHY_REG_PG_8195A(PDM_ODM_T pDM_Odm, u4Byte Band, u4Byte RfPath, u4Byte TxNum, u4Byte Addr, u4Byte Bitmask, u4Byte Data); -void __fastcall odm_ConfigBB_PHY_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Bitmask, u4Byte Data); // idb -void __fastcall odm_ConfigBB_TXPWR_LMT_8195A(PDM_ODM_T pDM_Odm, int Regulation, int Band, int Bandwidth, u1Byte RateSection, u1Byte RfPath, u1Byte Channel, u1Byte PowerLimit); +extern void odm_ConfigRFReg_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Data, ODM_RF_RADIO_PATH_E RF_PATH, u4Byte RegAddr); +extern void odm_ConfigRF_RadioA_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Data); // idb +extern void odm_ConfigBB_AGC_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Bitmask, u4Byte Data); // idb +extern void odm_ConfigBB_PHY_REG_PG_8195A(PDM_ODM_T pDM_Odm, u4Byte Band, u4Byte RfPath, u4Byte TxNum, u4Byte Addr, u4Byte Bitmask, u4Byte Data); +extern void odm_ConfigBB_PHY_8195A(PDM_ODM_T pDM_Odm, u4Byte Addr, u4Byte Bitmask, u4Byte Data); // idb +extern void odm_ConfigBB_TXPWR_LMT_8195A(PDM_ODM_T pDM_Odm, int Regulation, int Band, int Bandwidth, u1Byte RateSection, u1Byte RfPath, u1Byte Channel, u1Byte PowerLimit); // Data declarations //-------------------------------- // lxbus_hci_intf.o // Function declarations -dvobj_priv *hci_lxbus_dvobj_init(); // idb -void __fastcall hci_lxbus_dvobj_deinit(dvobj_priv *dvobj); // idb -void __fastcall hci_lxbus_dvobj_request_irq(dvobj_priv *dvobj); // idb -void __fastcall hci_lxbus_free_irq(dvobj_priv *dvobj); // idb -void __fastcall hci_lxbus_intf_stop(PADAPTER padapter); // idb +extern struct dvobj_priv *hci_lxbus_dvobj_init(); // idb +extern void hci_lxbus_dvobj_deinit(struct dvobj_priv *dvobj); // idb +extern void hci_lxbus_dvobj_request_irq(struct dvobj_priv *dvobj); // idb +extern void hci_lxbus_free_irq(struct dvobj_priv *dvobj); // idb +extern void hci_lxbus_intf_stop(PADAPTER padapter); // idb // Data declarations //-------------------------------- // lxbus_intf.o // Function declarations -signed int __fastcall lextra_bus_dma_Interrupt(void *data); +extern signed int lextra_bus_dma_Interrupt(void *data); // Data declarations //-------------------------------- // lxbus_ops.o // Function declarations -void __fastcall rtl8195a_free_rx_ring(_adapter *padapter); // idb -int __fastcall bus_write32(dvobj_priv *pintfhdl, uint32_t addr, uint32_t val, int32_t *err); // idb -int __fastcall bus_write16(dvobj_priv *pintfhdl, uint32_t addr, int val, int32_t *err); -int __fastcall bus_write8(dvobj_priv *pintfhdl, uint32_t addr, int val, int32_t *err); -uint32_t __fastcall bus_read32(dvobj_priv *pintfhdl, uint32_t addr, int32_t *err); // idb -int __fastcall bus_read16(dvobj_priv *pintfhdl, uint32_t addr, int32_t *err); -int __fastcall bus_read8(dvobj_priv *pintfhdl, uint32_t addr, int32_t *err); -void __fastcall rtl8195a_free_tx_ring(_adapter *padapter, unsigned int prio); // idb -signed int __fastcall rtl8195a_init_desc_ring(_adapter *padapter); -signed int __fastcall rtl8195a_free_desc_ring(_adapter *padapter); -void __fastcall rtl8195a_reset_desc_ring(_adapter *padapter, _irqL a2, int a3); -void __fastcall InitLxDmaRtl8195a(_adapter *Adapter); // idb -void __fastcall rtl8195a_prepare_bcn_tasklet(void *priv); // idb -signed int __fastcall get_txdesc_buf_addr(int ff_hwaddr); -signed int __fastcall rtl8195a_check_txdesc_closed(_adapter *padapter, uint32_t queue_idx, uint32_t index); -void __fastcall rtl8195a_tx_isr(PADAPTER Adapter, int prio); // idb -signed int __fastcall InterruptRecognized8195a(PADAPTER Adapter); -void __fastcall InitInterrupt8195a(PADAPTER padapter); // idb -void __fastcall EnableDMA8195a(PADAPTER padapter); // idb -void __fastcall EnableInterrupt8195a(PADAPTER padapter); // idb -void __fastcall DisableDMA8195a(PADAPTER padapter); // idb -void __fastcall DisableInterrupt8195a(PADAPTER padapter); // idb -void __fastcall UpdateInterruptMask8195a(PADAPTER Adapter, uint32_t *pAddMSRB, uint32_t *pRemoveMSR); // idb -signed int __fastcall CheckRxTgRtl8195a(_adapter *padapter, uint8_t *rx_desc, uint16_t rx_queue_idx); -int __fastcall rtl8192ee_check_rxdesc_remain(_adapter *padapter, int rx_queue_idx); -void __fastcall rtl8195a_recv_tasklet(void *priv); // idb -void __fastcall rtl8195a_tx_int_handler(_adapter *padapter, int a2, int a3); -int32_t __fastcall InterruptHandle8195a(_adapter *padapter, int a2, int a3); -void __fastcall rtl8195a_xmit_tasklet(void *priv); // idb -void __fastcall lxbus_set_intf_ops(_io_ops *pops); // idb +extern void rtl8195a_free_rx_ring(_adapter *padapter); // idb +extern int bus_write32(struct dvobj_priv *pintfhdl, uint32_t addr, uint32_t val, int32_t *err); // idb +extern int bus_write16(struct dvobj_priv *pintfhdl, uint32_t addr, int val, int32_t *err); +extern int bus_write8(struct dvobj_priv *pintfhdl, uint32_t addr, int val, int32_t *err); +extern uint32_t bus_read32(struct dvobj_priv *pintfhdl, uint32_t addr, int32_t *err); // idb +extern int bus_read16(struct dvobj_priv *pintfhdl, uint32_t addr, int32_t *err); +extern int bus_read8(struct dvobj_priv *pintfhdl, uint32_t addr, int32_t *err); +extern void rtl8195a_free_tx_ring(_adapter *padapter, unsigned int prio); // idb +extern signed int rtl8195a_init_desc_ring(_adapter *padapter); +extern signed int rtl8195a_free_desc_ring(_adapter *padapter); +extern void rtl8195a_reset_desc_ring(_adapter *padapter, _irqL a2, int a3); +extern void InitLxDmaRtl8195a(_adapter *Adapter); // idb +extern void rtl8195a_prepare_bcn_tasklet(void *priv); // idb +extern signed int get_txdesc_buf_addr(int ff_hwaddr); +extern signed int rtl8195a_check_txdesc_closed(_adapter *padapter, uint32_t queue_idx, uint32_t index); +extern void rtl8195a_tx_isr(PADAPTER Adapter, int prio); // idb +extern signed int InterruptRecognized8195a(PADAPTER Adapter); +extern void InitInterrupt8195a(PADAPTER padapter); // idb +extern void EnableDMA8195a(PADAPTER padapter); // idb +extern void EnableInterrupt8195a(PADAPTER padapter); // idb +extern void DisableDMA8195a(PADAPTER padapter); // idb +extern void DisableInterrupt8195a(PADAPTER padapter); // idb +extern void UpdateInterruptMask8195a(PADAPTER Adapter, uint32_t *pAddMSRB, uint32_t *pRemoveMSR); // idb +extern signed int CheckRxTgRtl8195a(_adapter *padapter, uint8_t *rx_desc, uint16_t rx_queue_idx); +extern int rtl8192ee_check_rxdesc_remain(_adapter *padapter, int rx_queue_idx); +extern void rtl8195a_recv_tasklet(void *priv); // idb +extern void rtl8195a_tx_int_handler(_adapter *padapter, int a2, int a3); +extern int32_t InterruptHandle8195a(_adapter *padapter, int a2, int a3); +extern void rtl8195a_xmit_tasklet(void *priv); // idb +extern void lxbus_set_intf_ops(struct _io_ops *pops); // idb // Data declarations -uint8_t rx_ring_pool[4][2104]; // idb -u16 CSWTCH_48[8]; // = { 928, 932, 936, 940, 936, 944, 952, 936 }; // idb -uint8_t stop_report_count_20629; // idb +extern uint8_t rx_ring_pool[4][2104]; // idb +extern u16 CSWTCH_48[8]; // = { 928, 932, 936, 940, 936, 944, 952, 936 }; // idb +extern uint8_t stop_report_count_20629; // idb //-------------------------------- // phydm_ACS.o // Function declarations -void __fastcall phydm_CLMInit(PVOID pDM_VOID, u2Byte sampleNum); // idb -void __fastcall phydm_CLMtrigger(PVOID pDM_VOID); // idb -int __fastcall phydm_checkCLMready(PVOID pDM_VOID); -int __fastcall phydm_getCLMresult(PVOID pDM_VOID); -void __fastcall phydm_NHMInit(PVOID pDM_VOID, u2Byte sampleNum, int round); -void __fastcall phydm_NHMtrigger(PVOID pDM_VOID); // idb -void __fastcall phydm_FalseAlarmCounterStatistics(PVOID pDM_VOID); // idb -void __fastcall phydm_getNHMresult(PVOID pDM_VOID, unsigned int *fa_crc32_total_cnt, unsigned int *cca_count, unsigned int *nhm_cnt_exp_sum, unsigned __int8 round); +extern void phydm_CLMInit(PVOID pDM_VOID, u2Byte sampleNum); // idb +extern void phydm_CLMtrigger(PVOID pDM_VOID); // idb +extern int phydm_checkCLMready(PVOID pDM_VOID); +extern int phydm_getCLMresult(PVOID pDM_VOID); +extern void phydm_NHMInit(PVOID pDM_VOID, u2Byte sampleNum, int round); +extern void phydm_NHMtrigger(PVOID pDM_VOID); // idb +extern void phydm_FalseAlarmCounterStatistics(PVOID pDM_VOID); // idb +extern void phydm_getNHMresult(PVOID pDM_VOID, unsigned int *fa_crc32_total_cnt, unsigned int *cca_count, unsigned int *nhm_cnt_exp_sum, u8 round); // Data declarations //-------------------------------- // PhyDM_Adaptivity.o // Function declarations -void __fastcall Phydm_CheckAdaptivity(PVOID pDM_VOID); // idb -void __fastcall Phydm_NHMCounterStatisticsInit(PVOID pDM_VOID); // idb -void __fastcall Phydm_GetNHMCounterStatistics(PVOID pDM_VOID); // idb -void __fastcall Phydm_NHMCounterStatisticsReset(PVOID pDM_VOID); // idb -void __fastcall Phydm_NHMCounterStatistics(PVOID pDM_VOID); // idb -void __fastcall Phydm_SetEDCCAThreshold(PVOID pDM_VOID, s1Byte H2L, s1Byte L2H); // idb -void __fastcall Phydm_SetTRxMux(PVOID pDM_VOID, PhyDM_Trx_MUX_Type txMode, PhyDM_Trx_MUX_Type rxMode); // idb -void __fastcall Phydm_MACEDCCAState(PVOID pDM_VOID, PhyDM_MACEDCCA_Type State); // idb -BOOL __fastcall Phydm_CalNHMcnt(PVOID pDM_VOID); -void __fastcall Phydm_CheckEnvironment(PVOID pDM_VOID); // idb -void __fastcall Phydm_SearchPwdBLowerBound(PVOID pDM_VOID); // idb -void __fastcall Phydm_AdaptivityInit(PVOID pDM_VOID); // idb -void __fastcall Phydm_Adaptivity(PVOID pDM_VOID, int IGI); +extern void Phydm_CheckAdaptivity(PVOID pDM_VOID); // idb +extern void Phydm_NHMCounterStatisticsInit(PVOID pDM_VOID); // idb +extern void Phydm_GetNHMCounterStatistics(PVOID pDM_VOID); // idb +extern void Phydm_NHMCounterStatisticsReset(PVOID pDM_VOID); // idb +extern void Phydm_NHMCounterStatistics(PVOID pDM_VOID); // idb +extern void Phydm_SetEDCCAThreshold(PVOID pDM_VOID, s1Byte H2L, s1Byte L2H); // idb +extern void Phydm_SetTRxMux(PVOID pDM_VOID, PhyDM_Trx_MUX_Type txMode, PhyDM_Trx_MUX_Type rxMode); // idb +extern void Phydm_MACEDCCAState(PVOID pDM_VOID, PhyDM_MACEDCCA_Type State); // idb +extern BOOL Phydm_CalNHMcnt(PVOID pDM_VOID); +extern void Phydm_CheckEnvironment(PVOID pDM_VOID); // idb +extern void Phydm_SearchPwdBLowerBound(PVOID pDM_VOID); // idb +extern void Phydm_AdaptivityInit(PVOID pDM_VOID); // idb +extern void Phydm_Adaptivity(PVOID pDM_VOID, int IGI); // Data declarations //-------------------------------- // PhyDM_AntDiv.o // Function declarations -void __fastcall ODM_SwAntDivRestAfterLink(PDM_ODM_T pDM_Odm); // idb +extern void ODM_SwAntDivRestAfterLink(PDM_ODM_T pDM_Odm); // idb // Data declarations //-------------------------------- // phydm_CfoTracking.o // Function declarations -void __fastcall ODM_CfoTrackingInit(PVOID pDM_VOID); -void __fastcall ODM_CfoTracking(PVOID pDM_VOID); -void __fastcall ODM_ParsingCFO(PVOID pDM_VOID, PVOID pPktinfo_VOID, s1Byte *pcfotail); +extern void ODM_CfoTrackingInit(PVOID pDM_VOID); +extern void ODM_CfoTracking(PVOID pDM_VOID); +extern void ODM_ParsingCFO(PVOID pDM_VOID, PVOID pPktinfo_VOID, s1Byte *pcfotail); // Data declarations //-------------------------------- // phydm_debug.o // Function declarations -void __fastcall ODM_InitDebugSetting(PDM_ODM_T pDM_Odm); // idb +extern void ODM_InitDebugSetting(PDM_ODM_T pDM_Odm); // idb // Data declarations //-------------------------------- // phydm_DIG.o // Function declarations -void __fastcall ODM_ChangeDynamicInitGainThresh(PVOID pDM_VOID, u4Byte DM_Type, u4Byte DM_Value); -int __fastcall getIGIForDiff(int value_IGI); -void __fastcall ODM_Write_DIG(PVOID pDM_VOID, u1Byte CurrentIGI); -void __fastcall odm_PauseDIG(PVOID pDM_VOID, ODM_Pause_DIG_TYPE PauseType, u1Byte IGIValue); -u1Byte __fastcall odm_ForbiddenIGICheck(PVOID pDM_VOID, u1Byte DIG_Dynamic_MIN, u1Byte CurrentIGI); -void __fastcall ODM_Write_CCK_CCA_Thres(PVOID pDM_VOID, u1Byte CurCCK_CCAThres); -void __fastcall odm_PauseCCKPacketDetection(PVOID pDM_VOID, ODM_Pause_CCKPD_TYPE PauseType, u1Byte CCKPDThreshold); -void __fastcall odm_DIGInit(PVOID pDM_VOID); -BOOLEAN __fastcall odm_DigAbort(PVOID pDM_VOID); -void __fastcall odm_DIGbyRSSI_LPS(PVOID pDM_VOID); -void __fastcall odm_FAThresholdCheck(PVOID pDM_VOID, u4Byte *dm_FA_thres); -void __fastcall odm_DIG(PVOID pDM_VOID); -void __fastcall odm_FalseAlarmCounterStatistics(PVOID pDM_VOID); -void __fastcall odm_CCKPacketDetectionThresh(PVOID pDM_VOID); +extern void ODM_ChangeDynamicInitGainThresh(PVOID pDM_VOID, u4Byte DM_Type, u4Byte DM_Value); +extern int getIGIForDiff(int value_IGI); +extern void ODM_Write_DIG(PVOID pDM_VOID, u1Byte CurrentIGI); +extern void odm_PauseDIG(PVOID pDM_VOID, ODM_Pause_DIG_TYPE PauseType, u1Byte IGIValue); +extern u1Byte odm_ForbiddenIGICheck(PVOID pDM_VOID, u1Byte DIG_Dynamic_MIN, u1Byte CurrentIGI); +extern void ODM_Write_CCK_CCA_Thres(PVOID pDM_VOID, u1Byte CurCCK_CCAThres); +extern void odm_PauseCCKPacketDetection(PVOID pDM_VOID, ODM_Pause_CCKPD_TYPE PauseType, u1Byte CCKPDThreshold); +extern void odm_DIGInit(PVOID pDM_VOID); +extern BOOLEAN odm_DigAbort(PVOID pDM_VOID); +extern void odm_DIGbyRSSI_LPS(PVOID pDM_VOID); +extern void odm_FAThresholdCheck(PVOID pDM_VOID, u4Byte *dm_FA_thres); +extern void odm_DIG(PVOID pDM_VOID); +extern void odm_FalseAlarmCounterStatistics(PVOID pDM_VOID); +extern void odm_CCKPacketDetectionThresh(PVOID pDM_VOID); // Data declarations -BOOLEAN bPaused_20545; // idb +extern BOOLEAN bPaused_20545; // idb //-------------------------------- // phydm_HWConfig.o // Function declarations -u1Byte __fastcall odm_QueryRxPwrPercentage(s1Byte AntPower); -s4Byte __fastcall odm_SignalScaleMapping_92CSeries_patch_RT_CID_819x_Lenovo(PDM_ODM_T pDM_Odm, s4Byte CurrSig); -s4Byte __fastcall odm_SignalScaleMapping_92CSeries_patch_RT_CID_819x_Netcore(PDM_ODM_T pDM_Odm, s4Byte CurrSig); -s4Byte __fastcall odm_SignalScaleMapping_92CSeries(PDM_ODM_T pDM_Odm, s4Byte CurrSig); -s4Byte __fastcall odm_SignalScaleMapping(PDM_ODM_T pDM_Odm, s4Byte CurrSig); -void __fastcall odm_RxPhyStatus8195A_Parsing(PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, pu1Byte pPhyStatus, PODM_PACKET_INFO_T pPktinfo); -void __fastcall odm_Process_RSSIForDM_8195A(PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, PODM_PACKET_INFO_T pPktinfo, pu1Byte pPhyStatus); -void __fastcall ODM_PhyStatusQuery_8195A(PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, pu1Byte pPhyStatus, PODM_PACKET_INFO_T pPktinfo); -HAL_STATUS __fastcall ODM_ConfigRFWithHeaderFile(PDM_ODM_T pDM_Odm, ODM_RF_Config_Type ConfigType, ODM_RF_RADIO_PATH_E eRFPath); -HAL_STATUS __fastcall ODM_ConfigRFWithTxPwrTrackHeaderFile(PDM_ODM_T pDM_Odm); -HAL_STATUS __fastcall ODM_ConfigBBWithHeaderFile(PDM_ODM_T pDM_Odm, ODM_BB_Config_Type ConfigType); -HAL_STATUS __fastcall ODM_ConfigMACWithHeaderFile(PDM_ODM_T pDM_Odm); -HAL_STATUS __fastcall ODM_ConfigFWWithHeaderFile(PDM_ODM_T pDM_Odm, ODM_FW_Config_Type ConfigType, u1Byte *pFirmware, u4Byte *pSize); -u4Byte __fastcall ODM_GetHWImgVersion(PDM_ODM_T pDM_Odm); +extern u1Byte odm_QueryRxPwrPercentage(s1Byte AntPower); +extern s4Byte odm_SignalScaleMapping_92CSeries_patch_RT_CID_819x_Lenovo(PDM_ODM_T pDM_Odm, s4Byte CurrSig); +extern s4Byte odm_SignalScaleMapping_92CSeries_patch_RT_CID_819x_Netcore(PDM_ODM_T pDM_Odm, s4Byte CurrSig); +extern s4Byte odm_SignalScaleMapping_92CSeries(PDM_ODM_T pDM_Odm, s4Byte CurrSig); +extern s4Byte odm_SignalScaleMapping(PDM_ODM_T pDM_Odm, s4Byte CurrSig); +extern void odm_RxPhyStatus8195A_Parsing(PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, pu1Byte pPhyStatus, PODM_PACKET_INFO_T pPktinfo); +extern void odm_Process_RSSIForDM_8195A(PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, PODM_PACKET_INFO_T pPktinfo, pu1Byte pPhyStatus); +extern void ODM_PhyStatusQuery_8195A(PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, pu1Byte pPhyStatus, PODM_PACKET_INFO_T pPktinfo); +extern HAL_STATUS ODM_ConfigRFWithHeaderFile(PDM_ODM_T pDM_Odm, ODM_RF_Config_Type ConfigType, ODM_RF_RADIO_PATH_E eRFPath); +extern HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile(PDM_ODM_T pDM_Odm); +extern HAL_STATUS ODM_ConfigBBWithHeaderFile(PDM_ODM_T pDM_Odm, ODM_BB_Config_Type ConfigType); +extern HAL_STATUS ODM_ConfigMACWithHeaderFile(PDM_ODM_T pDM_Odm); +extern HAL_STATUS ODM_ConfigFWWithHeaderFile(PDM_ODM_T pDM_Odm, ODM_FW_Config_Type ConfigType, u1Byte *pFirmware, u4Byte *pSize); +extern u4Byte ODM_GetHWImgVersion(PDM_ODM_T pDM_Odm); // Data declarations //-------------------------------- // phydm_interface.o // Function declarations -u1Byte __fastcall ODM_Read1Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr); -u2Byte __fastcall ODM_Read2Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr); -u4Byte __fastcall ODM_Read4Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr); -void __fastcall ODM_Write1Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u1Byte Data); -void __fastcall ODM_Write2Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u2Byte Data); -void __fastcall ODM_Write4Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte Data); -void __fastcall ODM_SetMACReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask, u4Byte Data); -u4Byte __fastcall ODM_GetMACReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask); -void __fastcall ODM_SetBBReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask, u4Byte Data); -u4Byte __fastcall ODM_GetBBReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask); +extern u1Byte ODM_Read1Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr); +extern u2Byte ODM_Read2Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr); +extern u4Byte ODM_Read4Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr); +extern void ODM_Write1Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u1Byte Data); +extern void ODM_Write2Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u2Byte Data); +extern void ODM_Write4Byte(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte Data); +extern void ODM_SetMACReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask, u4Byte Data); +extern u4Byte ODM_GetMACReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask); +extern void ODM_SetBBReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask, u4Byte Data); +extern u4Byte ODM_GetBBReg(PDM_ODM_T pDM_Odm, u4Byte RegAddr, u4Byte BitMask); // void __usercall ODM_SetRFReg(PDM_ODM_T pDM_Odm@, ODM_RF_RADIO_PATH_E eRFPath@, u4Byte RegAddr@, u4Byte BitMask@, u4Byte Data); -u4Byte __fastcall ODM_GetRFReg(PDM_ODM_T pDM_Odm, ODM_RF_RADIO_PATH_E eRFPath, u4Byte RegAddr, u4Byte BitMask); -void __fastcall ODM_AllocateMemory(PDM_ODM_T pDM_Odm, PVOID *pPtr, u4Byte length); -void __fastcall ODM_FreeMemory(PDM_ODM_T pDM_Odm, PVOID pPtr, u4Byte length); -void __fastcall ODM_MoveMemory(PDM_ODM_T pDM_Odm, PVOID pDest, PVOID pSrc, u4Byte Length); -u8Byte __fastcall ODM_GetCurrentTime(PDM_ODM_T pDM_Odm); -u8Byte __fastcall ODM_GetProgressingTime(PDM_ODM_T pDM_Odm, u8Byte Start_Time); +extern u4Byte ODM_GetRFReg(PDM_ODM_T pDM_Odm, ODM_RF_RADIO_PATH_E eRFPath, u4Byte RegAddr, u4Byte BitMask); +extern void ODM_AllocateMemory(PDM_ODM_T pDM_Odm, PVOID *pPtr, u4Byte length); +extern void ODM_FreeMemory(PDM_ODM_T pDM_Odm, PVOID pPtr, u4Byte length); +extern void ODM_MoveMemory(PDM_ODM_T pDM_Odm, PVOID pDest, PVOID pSrc, u4Byte Length); +extern u8Byte ODM_GetCurrentTime(PDM_ODM_T pDM_Odm); +extern u8Byte ODM_GetProgressingTime(PDM_ODM_T pDM_Odm, u8Byte Start_Time); // Data declarations //-------------------------------- // phydm_PowerTracking.o // Function declarations -signed int __fastcall getSwingIndex(PVOID pDM_VOID); -void __fastcall odm_TXPowerTrackingThermalMeterInit(PVOID pDM_VOID); // idb -void __fastcall odm_TXPowerTrackingCheckIOT(PVOID pDM_VOID); // idb -void __fastcall ODM_TXPowerTrackingCheck(PVOID pDM_VOID); // idb +extern signed int getSwingIndex(PVOID pDM_VOID); +extern void odm_TXPowerTrackingThermalMeterInit(PVOID pDM_VOID); // idb +extern void odm_TXPowerTrackingCheckIOT(PVOID pDM_VOID); // idb +extern void ODM_TXPowerTrackingCheck(PVOID pDM_VOID); // idb // Data declarations -const u4Byte OFDMSwingTable_New[43]; +extern const u4Byte OFDMSwingTable_New[43]; //-------------------------------- // phydm_RaInfo.o // Function declarations -void __fastcall odm_RSSIMonitorInit(PVOID pDM_VOID); -void __fastcall ODM_RAPostActionOnAssoc(PVOID pDM_VOID); -void __fastcall odm_RSSIMonitorCheckIOT(PVOID pDM_VOID); -void __fastcall odm_RSSIMonitorCheck(PVOID pDM_VOID); -void __fastcall odm_RateAdaptiveMaskInit(PVOID pDM_VOID); -BOOLEAN __fastcall ODM_RAStateCheck(PVOID pDM_VOID, s4Byte RSSI, BOOLEAN bForceUpdate, pu1Byte pRATRState); -void __fastcall odm_RefreshRateAdaptiveMaskIOT(PVOID pDM_VOID); -void __fastcall odm_RefreshRateAdaptiveMask(PVOID pDM_VOID); -u4Byte __fastcall ODM_Get_Rate_Bitmap(PVOID pDM_VOID, u4Byte macid, u4Byte ra_mask, u1Byte rssi_level); +extern void odm_RSSIMonitorInit(PVOID pDM_VOID); +extern void ODM_RAPostActionOnAssoc(PVOID pDM_VOID); +extern void odm_RSSIMonitorCheckIOT(PVOID pDM_VOID); +extern void odm_RSSIMonitorCheck(PVOID pDM_VOID); +extern void odm_RateAdaptiveMaskInit(PVOID pDM_VOID); +extern BOOLEAN ODM_RAStateCheck(PVOID pDM_VOID, s4Byte RSSI, BOOLEAN bForceUpdate, pu1Byte pRATRState); +extern void odm_RefreshRateAdaptiveMaskIOT(PVOID pDM_VOID); +extern void odm_RefreshRateAdaptiveMask(PVOID pDM_VOID); +extern u4Byte ODM_Get_Rate_Bitmap(PVOID pDM_VOID, u4Byte macid, u4Byte ra_mask, u1Byte rssi_level); // Data declarations //-------------------------------- // @@ -1738,9 +1634,26 @@ u4Byte __fastcall ODM_Get_Rate_Bitmap(PVOID pDM_VOID, u4Byte macid, u4Byte ra_ma // Function declarations // Data declarations - - #ifdef __cplusplus } #endif #endif // _WIFI_LIB_H + + + + + + + + + + + + + + + + + + +