mirror of
https://github.com/RinCat/RTL88x2BU-Linux-Driver.git
synced 2026-01-29 07:16:35 +00:00
Update to 5.13.1 from upstream
This commit is contained in:
@@ -97,6 +97,8 @@ PHY_SetTxPowerLevel8188F(
|
||||
u8 channel
|
||||
);
|
||||
|
||||
void rtl8188f_set_txpwr_done(_adapter *adapter);
|
||||
|
||||
void
|
||||
PHY_SetSwChnlBWMode8188F(
|
||||
PADAPTER Adapter,
|
||||
|
||||
@@ -41,6 +41,7 @@ typedef enum tag_HAL_IC_Type_Definition {
|
||||
CHIP_8188GTV = 18,
|
||||
CHIP_8822C = 19,
|
||||
CHIP_8814B = 20,
|
||||
CHIP_8723F = 21,
|
||||
} HAL_IC_TYPE_E;
|
||||
|
||||
/* HAL_CHIP_TYPE_E */
|
||||
@@ -130,6 +131,7 @@ typedef struct tag_HAL_VERSION {
|
||||
#define IS_8710B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8710B) ? TRUE : FALSE)
|
||||
#define IS_8822C_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8822C) ? TRUE : FALSE)
|
||||
#define IS_8814B_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8814B) ? TRUE : FALSE)
|
||||
#define IS_8723F_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8723F) ? TRUE : FALSE)
|
||||
|
||||
#define IS_8192F_SERIES(version)\
|
||||
((GET_CVID_IC_TYPE(version) == CHIP_8192F) ? TRUE : FALSE)
|
||||
|
||||
@@ -127,7 +127,6 @@
|
||||
|
||||
/*#endif*/ /* CONFIG_MP_INCLUDED */
|
||||
|
||||
#define CONFIG_AP_MODE 1
|
||||
#ifdef CONFIG_AP_MODE
|
||||
/* #define CONFIG_INTERRUPT_BASED_TXBCN */ /* Tx Beacon when driver BCN_OK ,BCN_ERR interrupt occurs */
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_INTERRUPT_BASED_TXBCN)
|
||||
@@ -145,7 +144,6 @@
|
||||
#define CONFIG_FIND_BEST_CHANNEL 1
|
||||
#endif
|
||||
|
||||
#define CONFIG_P2P 1
|
||||
#ifdef CONFIG_P2P
|
||||
/* The CONFIG_WFD is for supporting the Wi-Fi display */
|
||||
#define CONFIG_WFD
|
||||
@@ -190,8 +188,6 @@
|
||||
|
||||
/*#define CONFIG_RTW_80211K*/
|
||||
|
||||
#define CONFIG_LAYER2_ROAMING
|
||||
#define CONFIG_LAYER2_ROAMING_RESUME
|
||||
/*#define CONFIG_ADAPTOR_INFO_CACHING_FILE */ /* now just applied on 8192cu only, should make it general... */
|
||||
/*#define CONFIG_RESUME_IN_WORKQUEUE */
|
||||
/*#define CONFIG_SET_SCAN_DENY_TIMER */
|
||||
@@ -202,7 +198,7 @@
|
||||
/* #define CONFIG_BACKGROUND_NOISE_MONITOR */
|
||||
#endif
|
||||
#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
|
||||
|
||||
#define RTW_FORCE_CTS_TO_SELF_UNDER_LOW_RSSI
|
||||
|
||||
/*
|
||||
* Interface Related Config
|
||||
|
||||
@@ -85,6 +85,14 @@ enum rf_type {
|
||||
RF_3T3R = 5,
|
||||
RF_3T4R = 6,
|
||||
RF_4T4R = 7,
|
||||
RF_4T3R = 8,
|
||||
RF_4T2R = 9,
|
||||
RF_4T1R = 10,
|
||||
RF_3T2R = 11,
|
||||
RF_3T1R = 12,
|
||||
RF_2T1R = 13,
|
||||
RF_1T4R = 14,
|
||||
RF_1T3R = 15,
|
||||
RF_TYPE_MAX,
|
||||
};
|
||||
|
||||
@@ -191,6 +199,7 @@ struct ra_sta_info {
|
||||
struct dtp_info {
|
||||
u8 dyn_tx_power; /*Dynamic Tx power offset*/
|
||||
u8 last_tx_power;
|
||||
boolean sta_is_alive;
|
||||
u8 sta_tx_high_power_lvl:4;
|
||||
u8 sta_last_dtp_lvl:4;
|
||||
};
|
||||
@@ -248,6 +257,7 @@ struct phydm_phyinfo_struct {
|
||||
u8 cnt_pw2cca;
|
||||
u8 cnt_cca2agc_rdy;
|
||||
/*ODM_PHY_STATUS_NEW_TYPE_SUPPORT*/
|
||||
u8 rx_cck_evm;
|
||||
};
|
||||
|
||||
struct phydm_perpkt_info_struct {
|
||||
|
||||
253
include/drv_conf.h
Executable file → Normal file
253
include/drv_conf.h
Executable file → Normal file
@@ -18,6 +18,15 @@
|
||||
#include "hal_ic_cfg.h"
|
||||
|
||||
#define CONFIG_RSSI_PRIORITY
|
||||
|
||||
/*
|
||||
* RTW_BUSY_DENY_SCAN control if scan would be denied by busy traffic.
|
||||
* When this defined, BUSY_TRAFFIC_SCAN_DENY_PERIOD would be used to judge if
|
||||
* scan request coming from scan UI. Scan request from scan UI would be
|
||||
* exception and never be denied by busy traffic.
|
||||
*/
|
||||
#define RTW_BUSY_DENY_SCAN
|
||||
|
||||
#ifdef CONFIG_RTW_REPEATER_SON
|
||||
#ifndef CONFIG_AP
|
||||
#define CONFIG_AP
|
||||
@@ -32,9 +41,10 @@
|
||||
#define CONFIG_RTW_REPEATER_SON_ID 0x02040608
|
||||
#endif
|
||||
//#define CONFIG_RTW_REPEATER_SON_ROOT
|
||||
#ifndef CONFIG_RTW_REPEATER_SON_ROOT
|
||||
#define CONFIG_LAYER2_ROAMING_ACTIVE
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_REPEATER_SON_ROOT
|
||||
#undef CONFIG_ROAMING_FLAG
|
||||
#define CONFIG_ROAMING_FLAG 0x7
|
||||
#endif
|
||||
#undef CONFIG_POWER_SAVING
|
||||
#endif
|
||||
|
||||
@@ -62,15 +72,87 @@
|
||||
|
||||
#endif
|
||||
|
||||
/* Older Android kernel doesn't has CONFIG_ANDROID defined,
|
||||
* add this to force CONFIG_ANDROID defined */
|
||||
#ifdef CONFIG_PLATFORM_ANDROID
|
||||
#ifndef CONFIG_ANDROID
|
||||
#define CONFIG_ANDROID
|
||||
#endif
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
/*#define CONFIG_RTW_ROAM_QUICKSCAN */ /* active_roaming is required. i.e CONFIG_ROAMING_FLAG[bit2] MUST be enabled */
|
||||
/*#define CONFIG_RTW_ROAM_QUICKSCAN_TH 60*/
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ANDROID
|
||||
/* Default enable single wiphy if driver ver >= 5.9 */
|
||||
#define RTW_SINGLE_WIPHY
|
||||
|
||||
#ifdef CONFIG_RTW_ANDROID
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
#ifndef CONFIG_IOCTL_CFG80211
|
||||
#define CONFIG_IOCTL_CFG80211
|
||||
#endif
|
||||
|
||||
#ifndef RTW_USE_CFG80211_STA_EVENT
|
||||
#define RTW_USE_CFG80211_STA_EVENT
|
||||
#endif
|
||||
|
||||
#if (CONFIG_RTW_ANDROID > 4)
|
||||
#ifndef CONFIG_RADIO_WORK
|
||||
#define CONFIG_RADIO_WORK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (CONFIG_RTW_ANDROID <= 7)
|
||||
#ifdef RTW_SINGLE_WIPHY
|
||||
#undef RTW_SINGLE_WIPHY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (CONFIG_RTW_ANDROID >= 8)
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
|
||||
#ifndef CONFIG_RTW_WIFI_HAL
|
||||
#define CONFIG_RTW_WIFI_HAL
|
||||
#endif
|
||||
#else
|
||||
#error "Linux kernel version is too old\n"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_WIFI_HAL
|
||||
#ifndef CONFIG_RTW_WIFI_HAL_DEBUG
|
||||
//#define CONFIG_RTW_WIFI_HAL_DEBUG
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_CFGVENDOR_LLSTATS
|
||||
#define CONFIG_RTW_CFGVENDOR_LLSTATS
|
||||
#endif
|
||||
#if (CONFIG_RTW_ANDROID < 11)
|
||||
#ifndef CONFIG_RTW_CFGVENDOR_RANDOM_MAC_OUI
|
||||
#define CONFIG_RTW_CFGVENDOR_RANDOM_MAC_OUI
|
||||
#endif
|
||||
#else
|
||||
#ifndef CONFIG_RTW_SCAN_RAND
|
||||
#define CONFIG_RTW_SCAN_RAND
|
||||
#endif
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_CFGVENDOR_RSSIMONITOR
|
||||
#define CONFIG_RTW_CFGVENDOR_RSSIMONITOR
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_CFGVENDOR_WIFI_LOGGER
|
||||
#define CONFIG_RTW_CFGVENDOR_WIFI_LOGGER
|
||||
#endif
|
||||
#if (CONFIG_RTW_ANDROID >= 10)
|
||||
#ifndef CONFIG_RTW_CFGVENDOR_WIFI_OFFLOAD
|
||||
//#define CONFIG_RTW_CFGVENDOR_WIFI_OFFLOAD
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_HOSTAPD_ACS
|
||||
#define CONFIG_RTW_HOSTAPD_ACS
|
||||
#endif
|
||||
#ifndef CONFIG_KERNEL_PATCH_EXTERNAL_AUTH
|
||||
#define CONFIG_KERNEL_PATCH_EXTERNAL_AUTH
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_ABORT_SCAN
|
||||
#define CONFIG_RTW_ABORT_SCAN
|
||||
#endif
|
||||
#endif
|
||||
#endif // CONFIG_RTW_WIFI_HAL
|
||||
|
||||
|
||||
/* Some Android build will restart the UI while non-printable ascii is passed
|
||||
* between java and c/c++ layer (JNI). We force CONFIG_VALIDATE_SSID
|
||||
* for Android here. If you are sure there is no risk on your system about this,
|
||||
@@ -79,7 +161,7 @@
|
||||
|
||||
/* Android expect dbm as the rx signal strength unit */
|
||||
#define CONFIG_SIGNAL_DISPLAY_DBM
|
||||
#endif
|
||||
#endif // CONFIG_RTW_ANDROID
|
||||
|
||||
/*
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_RESUME_IN_WORKQUEUE)
|
||||
@@ -111,7 +193,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WIFI_MONITOR
|
||||
#define CONFIG_MONITOR_MODE_XMIT
|
||||
/* #define CONFIG_MONITOR_MODE_XMIT */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CUSTOMER_ALIBABA_GENERAL
|
||||
@@ -132,9 +214,47 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_RTW_DATA_BMC_TO_UC
|
||||
#define CONFIG_RTW_DATA_BMC_TO_UC 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
#define CONFIG_LIMITED_AP_NUM 1
|
||||
#define CONFIG_TX_MCAST2UNI /* AP mode support IP multicast->unicast */
|
||||
|
||||
#ifndef CONFIG_RTW_AP_DATA_BMC_TO_UC
|
||||
#define CONFIG_RTW_AP_DATA_BMC_TO_UC 1
|
||||
#endif
|
||||
#if CONFIG_RTW_AP_DATA_BMC_TO_UC
|
||||
#undef CONFIG_RTW_DATA_BMC_TO_UC
|
||||
#define CONFIG_RTW_DATA_BMC_TO_UC 1
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_AP_SRC_B2U_FLAGS
|
||||
#define CONFIG_RTW_AP_SRC_B2U_FLAGS 0x8 /* see RTW_AP_B2U_XXX */
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_AP_FWD_B2U_FLAGS
|
||||
#define CONFIG_RTW_AP_FWD_B2U_FLAGS 0x8 /* see RTW_AP_B2U_XXX */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
#ifndef CONFIG_AP_MODE
|
||||
#error "enable CONFIG_RTW_MULTI_AP without CONFIG_AP_MODE"
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_WDS
|
||||
#define CONFIG_RTW_WDS
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_UNASOC_STA_MODE_OF_STYPE
|
||||
#define CONFIG_RTW_UNASOC_STA_MODE_OF_STYPE {2, 1} /* BMC:2 for all, NMY_UC:1 for interested target */
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_NLRTW
|
||||
#define CONFIG_RTW_NLRTW
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_WNM
|
||||
#define CONFIG_RTW_WNM
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_80211K
|
||||
#define CONFIG_RTW_80211K
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
@@ -169,6 +289,16 @@
|
||||
#ifndef CONFIG_RTW_MESH_DATA_BMC_TO_UC
|
||||
#define CONFIG_RTW_MESH_DATA_BMC_TO_UC 1
|
||||
#endif
|
||||
#if CONFIG_RTW_MESH_DATA_BMC_TO_UC
|
||||
#undef CONFIG_RTW_DATA_BMC_TO_UC
|
||||
#define CONFIG_RTW_DATA_BMC_TO_UC 1
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_MSRC_B2U_FLAGS
|
||||
#define CONFIG_RTW_MSRC_B2U_FLAGS 0x0 /* see RTW_MESH_B2U_XXX */
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_MFWD_B2U_FLAGS
|
||||
#define CONFIG_RTW_MFWD_B2U_FLAGS 0x2 /* see RTW_MESH_B2U_XXX */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SCAN_BACKOP) && defined(CONFIG_AP_MODE)
|
||||
@@ -177,7 +307,6 @@
|
||||
|
||||
#define RTW_SCAN_SPARSE_MIRACAST 1
|
||||
#define RTW_SCAN_SPARSE_BG 0
|
||||
#define RTW_SCAN_SPARSE_ROAMING_ACTIVE 1
|
||||
|
||||
#ifndef CONFIG_TX_AC_LIFETIME
|
||||
#define CONFIG_TX_AC_LIFETIME 1
|
||||
@@ -222,7 +351,7 @@
|
||||
#ifndef CONFIG_IEEE80211_BAND_5GHZ
|
||||
#if defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8821C) \
|
||||
|| defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8822C) \
|
||||
|| defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8814B)
|
||||
|| defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8814B) || defined(CONFIG_RTL8723F)
|
||||
#define CONFIG_IEEE80211_BAND_5GHZ 1
|
||||
#else
|
||||
#define CONFIG_IEEE80211_BAND_5GHZ 0
|
||||
@@ -280,6 +409,9 @@
|
||||
#endif
|
||||
|
||||
#if RTW_DEF_MODULE_REGULATORY_CERT
|
||||
#ifdef CONFIG_REGD_SRC_FROM_OS
|
||||
#error "CONFIG_REGD_SRC_FROM_OS is not supported when enable RTW_DEF_MODULE_REGULATORY_CERT"
|
||||
#endif
|
||||
/* force enable TX power by rate and TX power limit */
|
||||
#undef CONFIG_TXPWR_BY_RATE_EN
|
||||
#undef CONFIG_TXPWR_LIMIT_EN
|
||||
@@ -292,16 +424,35 @@
|
||||
#define CONFIG_TXPWR_LIMIT 1
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_RTW_REGD_SRC
|
||||
#define CONFIG_RTW_REGD_SRC 1 /* 0:RTK_PRIV, 1:OS */
|
||||
#endif
|
||||
|
||||
#define CONFIG_IOCTL_WEXT
|
||||
|
||||
#ifdef CONFIG_RTW_IPCAM_APPLICATION
|
||||
#undef CONFIG_TXPWR_BY_RATE_EN
|
||||
#define CONFIG_TXPWR_BY_RATE_EN 1
|
||||
#define CONFIG_RTW_CUSTOMIZE_BEEDCA 0x0000431C
|
||||
#define CONFIG_RTW_CUSTOMIZE_BWMODE 0x00
|
||||
#define CONFIG_RTW_CUSTOMIZE_RLSTA 0x30
|
||||
#define CONFIG_CHECK_SPECIFIC_IE_CONTENT
|
||||
#ifdef CONFIG_CUSTOMER_EZVIZ_CHIME2
|
||||
#undef CONFIG_ACTIVE_KEEP_ALIVE_CHECK
|
||||
#endif
|
||||
#if defined(CONFIG_RTL8192E) || defined(CONFIG_RTL8192F) || defined(CONFIG_RTL8822B)
|
||||
#define CONFIG_RTW_TX_NPATH_EN /* mutually incompatible with STBC_TX & Beamformer */
|
||||
#endif
|
||||
#endif
|
||||
/* #define CONFIG_RTW_TOKEN_BASED_XMIT */
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
#define NR_TBTX_SLOT 4
|
||||
#define NR_MAXSTA_INSLOT 5
|
||||
#define TBTX_TX_DURATION 30
|
||||
|
||||
#define MAX_TXPAUSE_DURATION (TBTX_TX_DURATION*NR_TBTX_SLOT)
|
||||
#endif
|
||||
|
||||
/*#define CONFIG_EXTEND_LOWRATE_TXOP */
|
||||
|
||||
#ifndef CONFIG_RTW_RX_AMPDU_SZ_LIMIT_1SS
|
||||
@@ -349,6 +500,10 @@
|
||||
#define CONFIG_RTW_TARGET_TX_PWR_5G_D {-1, -1, -1, -1, -1, -1, -1, -1, -1}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_RTW_ANTENNA_GAIN
|
||||
#define CONFIG_RTW_ANTENNA_GAIN 0x7FFF /* == UNSPECIFIED_MBM */
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_RTW_AMPLIFIER_TYPE_2G
|
||||
#define CONFIG_RTW_AMPLIFIER_TYPE_2G 0
|
||||
#endif
|
||||
@@ -392,7 +547,8 @@ defined(CONFIG_RTL8188GTV) || defined(CONFIG_RTL8192F) || \
|
||||
defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8710B) || \
|
||||
defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8723D)
|
||||
#define CONFIG_HWMPCAP_GEN1
|
||||
#elif defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822C) /*|| defined(CONFIG_RTL8814A)*/
|
||||
#elif defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822C) || \
|
||||
defined(CONFIG_RTL8723F) /*|| defined(CONFIG_RTL8814A)*/
|
||||
#define CONFIG_HWMPCAP_GEN2
|
||||
#elif defined(CONFIG_RTL8814B) /*Address CAM - 128*/
|
||||
#define CONFIG_HWMPCAP_GEN3
|
||||
@@ -422,7 +578,9 @@ defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8723D)
|
||||
#endif
|
||||
|
||||
#if (CONFIG_IFACE_NUMBER > 2)
|
||||
#define CONFIG_MI_WITH_MBSSID_CAM
|
||||
#ifndef CONFIG_HWMPCAP_GEN3
|
||||
#define CONFIG_MI_WITH_MBSSID_CAM
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
||||
#define CONFIG_MBSSID_CAM
|
||||
@@ -451,6 +609,17 @@ defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8723D)
|
||||
#endif
|
||||
|
||||
#endif /*CONFIG_HWMPCAP_GEN2*/
|
||||
|
||||
#ifdef CONFIG_HWMPCAP_GEN3
|
||||
#define CONFIG_PORT_BASED_TXBCN
|
||||
#undef CONFIG_SUPPORT_MULTI_BCN
|
||||
#undef CONFIG_SWTIMER_BASED_TXBCN
|
||||
#undef CONFIG_LIMITED_AP_NUM
|
||||
#define CONFIG_LIMITED_AP_NUM 4
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define CONFIG_PORT_BASED_HIQ /* 8814BU doesn't support */
|
||||
#endif
|
||||
#endif
|
||||
#endif /*CONFIG_AP_MODE*/
|
||||
|
||||
#ifdef CONFIG_HWMPCAP_GEN2 /*CONFIG_RTL8822B/CONFIG_RTL8821C/CONFIG_RTL8822C*/
|
||||
@@ -459,9 +628,24 @@ defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8723D)
|
||||
#endif/*CONFIG_HWMPCAP_GEN2*/
|
||||
#endif/*(CONFIG_IFACE_NUMBER > 2)*/
|
||||
|
||||
#if defined(CONFIG_MI_UNIQUE_MACADDR_BIT)
|
||||
#if !defined(CONFIG_MI_WITH_MBSSID_CAM)
|
||||
#error "CONFIG_MI_UNIQUE_MACADDR_BIT should not be used without multiple interface !!"
|
||||
#endif
|
||||
#if (CONFIG_MI_UNIQUE_MACADDR_BIT < 24) || ( 47 < CONFIG_MI_UNIQUE_MACADDR_BIT)
|
||||
#error "CONFIG_MI_UNIQUE_MACADDR_BIT should be the bit in NIC specific mac address(BIT[24:47] !!"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MACID_NUM_SW_LIMIT 32
|
||||
#define SEC_CAM_ENT_NUM_SW_LIMIT 32
|
||||
|
||||
#ifdef SEC_DEFAULT_KEY_SEARCH
|
||||
#if (CONFIG_IFACE_NUMBER >= 2)
|
||||
#error "Default Key Search only work with only one interface case!"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_WOWLAN) && (defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822C) || defined(CONFIG_RTL8814B))
|
||||
#define CONFIG_WOW_PATTERN_HW_CAM
|
||||
#endif
|
||||
@@ -500,20 +684,8 @@ defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8723D)
|
||||
#endif /* CONFIG_SDIO_HCI || CONFIG_USB_RX_AGGREGATION */
|
||||
|
||||
#ifdef CONFIG_RTW_HOSTAPD_ACS
|
||||
#if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8814A)
|
||||
#ifndef CONFIG_FIND_BEST_CHANNEL
|
||||
#define CONFIG_FIND_BEST_CHANNEL
|
||||
#endif
|
||||
#else
|
||||
#ifdef CONFIG_FIND_BEST_CHANNEL
|
||||
#undef CONFIG_FIND_BEST_CHANNEL
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_ACS
|
||||
#define CONFIG_RTW_ACS
|
||||
#endif
|
||||
#ifndef CONFIG_BACKGROUND_NOISE_MONITOR
|
||||
#define CONFIG_BACKGROUND_NOISE_MONITOR
|
||||
#endif
|
||||
#ifndef CONFIG_RTW_ACS
|
||||
#define CONFIG_RTW_ACS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -593,12 +765,31 @@ defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8723D)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
#ifndef CONFIG_WOWLAN
|
||||
#error "WAR OFFLOAD is part of WOWLAN"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6)
|
||||
#ifndef CONFIG_WOWLAN
|
||||
#error "mDNS OFFLOAD is part of WOWLAN"
|
||||
#endif
|
||||
#ifndef CONFIG_WAR_OFFLOAD
|
||||
#define CONFIG_WAR_OFFLOAD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CONFIG_RTW_TPT_MODE
|
||||
|
||||
#ifdef CONFIG_PCI_BCN_POLLING
|
||||
#define CONFIG_BCN_ICF
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_RTW_MGMT_QUEUE
|
||||
#define CONFIG_RTW_MGMT_QUEUE
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_PCI_MSI
|
||||
#define CONFIG_RTW_PCI_MSI_DISABLE
|
||||
#endif
|
||||
|
||||
@@ -92,6 +92,15 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
||||
#include "../hal/hal_dm.h"
|
||||
#include <rtw_qos.h>
|
||||
#include <rtw_pwrctrl.h>
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
#include <rtw_ft.h>
|
||||
#endif
|
||||
#if defined(CONFIG_RTW_WNM) || defined(CONFIG_RTW_80211K)
|
||||
#include <rtw_wnm.h>
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_MBO
|
||||
#include <rtw_mbo.h>
|
||||
#endif
|
||||
#include <rtw_mlme.h>
|
||||
#include <mlme_osdep.h>
|
||||
#include <rtw_io.h>
|
||||
@@ -105,9 +114,15 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
||||
#include <rtw_mlme_ext.h>
|
||||
#include <rtw_mi.h>
|
||||
#include <rtw_ap.h>
|
||||
#ifdef CONFIG_RTW_WDS
|
||||
#include "../core/wds/rtw_wds.h"
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
#include "../core/mesh/rtw_mesh.h"
|
||||
#endif
|
||||
#ifdef CONFIG_WIFI_MONITOR
|
||||
#include "../core/monitor/rtw_radiotap.h"
|
||||
#endif
|
||||
#include <rtw_efuse.h>
|
||||
#include <rtw_version.h>
|
||||
#include <rtw_odm.h>
|
||||
@@ -156,6 +171,8 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
||||
#include <rtw_rson.h>
|
||||
#endif /*CONFIG_RTW_REPEATER_SON */
|
||||
|
||||
#include <rtw_roch.h>
|
||||
|
||||
#define SPEC_DEV_ID_NONE BIT(0)
|
||||
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
|
||||
#define SPEC_DEV_ID_ENABLE_PS BIT(2)
|
||||
@@ -248,7 +265,19 @@ struct registry_priv {
|
||||
u8 tx_bw_mode;
|
||||
#ifdef CONFIG_AP_MODE
|
||||
u8 bmc_tx_rate;
|
||||
#if CONFIG_RTW_AP_DATA_BMC_TO_UC
|
||||
u8 ap_src_b2u_flags;
|
||||
u8 ap_fwd_b2u_flags;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
#if CONFIG_RTW_MESH_DATA_BMC_TO_UC
|
||||
u8 msrc_b2u_flags;
|
||||
u8 mfwd_b2u_flags;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
u8 ht_enable;
|
||||
/* 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160MHz */
|
||||
@@ -259,6 +288,7 @@ struct registry_priv {
|
||||
u8 rx_stbc;
|
||||
u8 rx_ampdu_amsdu;/* Rx A-MPDU Supports A-MSDU is permitted */
|
||||
u8 tx_ampdu_amsdu;/* Tx A-MPDU Supports A-MSDU is permitted */
|
||||
u8 tx_quick_addba_req;
|
||||
u8 rx_ampdu_sz_limit_by_nss_bw[4][4]; /* 1~4SS, BW20~BW160 */
|
||||
/* Short GI support Bit Map */
|
||||
/* BIT0 - 20MHz, 1: support, 0: non-support */
|
||||
@@ -291,20 +321,24 @@ struct registry_priv {
|
||||
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
u8 vht_enable; /* 0:disable, 1:enable, 2:auto */
|
||||
u8 vht_24g_enable; /* 0:disable, 1:enable */
|
||||
u8 ampdu_factor;
|
||||
u8 vht_rx_mcs_map[2];
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
|
||||
u8 lowrate_two_xmit;
|
||||
|
||||
u8 low_power ;
|
||||
|
||||
u8 wifi_spec;/* !turbo_mode */
|
||||
|
||||
u8 rf_path; /*rf_config*/
|
||||
u8 trx_path_bmp; /* [7:4]TX path bmp, [0:3]RX path bmp, 0: not specified */
|
||||
u8 tx_path_lmt; /* limit of TX path number, 0: not specified */
|
||||
u8 rx_path_lmt; /* limit of TX path number, 0: not specified */
|
||||
u8 tx_nss;
|
||||
u8 rx_nss;
|
||||
|
||||
#ifdef CONFIG_REGD_SRC_FROM_OS
|
||||
enum regd_src_t regd_src;
|
||||
#endif
|
||||
char alpha2[2];
|
||||
u8 channel_plan;
|
||||
u8 excl_chs[MAX_CHANNEL_NUM];
|
||||
@@ -367,6 +401,7 @@ struct registry_priv {
|
||||
#if CONFIG_IEEE80211_BAND_5GHZ
|
||||
s8 target_tx_pwr_5g[RF_PATH_MAX][RATE_SECTION_NUM - 1];
|
||||
#endif
|
||||
s16 antenna_gain;
|
||||
|
||||
u8 tsf_update_pause_factor;
|
||||
u8 tsf_update_restore_factor;
|
||||
@@ -419,7 +454,7 @@ struct registry_priv {
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
u8 dfs_region_domain;
|
||||
#endif
|
||||
|
||||
u8 amsdu_mode;
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
u8 en_mcc;
|
||||
u32 rtw_mcc_single_tx_cri;
|
||||
@@ -446,10 +481,13 @@ struct registry_priv {
|
||||
#endif /* CONFIG_RTW_NAPI */
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
u8 wowlan_enable;
|
||||
u8 wakeup_event;
|
||||
u8 suspend_type;
|
||||
#endif
|
||||
|
||||
u8 recvbuf_nr;
|
||||
|
||||
#ifdef CONFIG_SUPPORT_TRX_SHARED
|
||||
u8 trx_share_mode;
|
||||
#endif
|
||||
@@ -496,16 +534,31 @@ struct registry_priv {
|
||||
u8 tdmadig_mode;
|
||||
u8 tdmadig_dynamic;
|
||||
#endif/*CONFIG_TDMADIG*/
|
||||
u8 en_dyn_rrsr;
|
||||
u32 set_rrsr_value;
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
u8 peer_alive_based_preq;
|
||||
#endif
|
||||
|
||||
#ifdef RTW_BUSY_DENY_SCAN
|
||||
/*
|
||||
* vht_2g4: use VHT rate on 2.4G or not
|
||||
* 0: deny
|
||||
* 1: allow
|
||||
* scan_interval_thr means scan interval threshold which is used to
|
||||
* judge if user is in scan page or not.
|
||||
* If scan interval < scan_interval_thr we guess user is in scan page,
|
||||
* and driver won't deny any scan request at that time.
|
||||
* Its default value comes from compiler flag
|
||||
* BUSY_TRAFFIC_SCAN_DENY_PERIOD, and unit is ms.
|
||||
*/
|
||||
u8 vht_2g4;
|
||||
u32 scan_interval_thr;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8822C_XCAP_NEW_POLICY
|
||||
u8 rtw_8822c_xcap_overwrite;
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
u8 unassoc_sta_mode_of_stype[UNASOC_STA_SRC_NUM];
|
||||
u16 max_unassoc_sta_cnt;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* For registry parameters */
|
||||
@@ -539,12 +592,21 @@ struct registry_priv {
|
||||
#define REGSTY_IS_BW_2G_SUPPORT(regsty, bw) (REGSTY_BW_2G((regsty)) >= (bw))
|
||||
#define REGSTY_IS_BW_5G_SUPPORT(regsty, bw) (REGSTY_BW_5G((regsty)) >= (bw))
|
||||
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
#define REGSTY_IS_11AC_ENABLE(regsty) ((regsty)->vht_enable != 0)
|
||||
#define REGSTY_IS_11AC_AUTO(regsty) ((regsty)->vht_enable == 2)
|
||||
#define REGSTY_IS_11AC_24G_ENABLE(regsty) ((regsty)->vht_24g_enable != 0)
|
||||
#else
|
||||
#define REGSTY_IS_11AC_ENABLE(regsty) 0
|
||||
#define REGSTY_IS_11AC_AUTO(regsty) 0
|
||||
#define REGSTY_IS_11AC_24G_ENABLE(regsty) 0
|
||||
#endif
|
||||
|
||||
#define rtw_is_vht_2g4(adapter) ((adapter)->registrypriv.vht_2g4 != 0)
|
||||
#define rtw_set_vht_2g4(adapter, enable) \
|
||||
((adapter)->registrypriv.vht_2g4 = (enable ? 1 : 0))
|
||||
#ifdef CONFIG_REGD_SRC_FROM_OS
|
||||
#define REGSTY_REGD_SRC_FROM_OS(regsty) ((regsty)->regd_src == REGD_SRC_OS)
|
||||
#else
|
||||
#define REGSTY_REGD_SRC_FROM_OS(regsty) 0
|
||||
#endif
|
||||
|
||||
typedef struct rtw_if_operations {
|
||||
int __must_check (*read)(struct dvobj_priv *d, unsigned int addr, void *buf,
|
||||
@@ -623,6 +685,7 @@ struct rx_logs {
|
||||
u32 core_rx_post_decrypt_tkip;
|
||||
u32 core_rx_post_decrypt_aes;
|
||||
u32 core_rx_post_decrypt_wapi;
|
||||
u32 core_rx_post_decrypt_gcmp;
|
||||
u32 core_rx_post_decrypt_hw;
|
||||
u32 core_rx_post_decrypt_unknown;
|
||||
u32 core_rx_post_decrypt_err;
|
||||
@@ -773,10 +836,12 @@ struct rtw_traffic_statistics {
|
||||
};
|
||||
|
||||
#define SEC_CAP_CHK_BMC BIT0
|
||||
#define SEC_CAP_CHK_EXTRA_SEC BIT1 /* 256 bit */
|
||||
#define SEC_CAP_CHK_WRITE_CAM_NEW_RULE BIT2
|
||||
|
||||
#define MACID_DROP BIT0
|
||||
#define MACID_DROP_INDIRECT BIT1
|
||||
|
||||
|
||||
#define SEC_STATUS_STA_PK_GK_CONFLICT_DIS_BMC_SEARCH BIT0
|
||||
|
||||
struct sec_cam_bmp {
|
||||
@@ -857,7 +922,6 @@ struct macid_ctl_t {
|
||||
u8 op_num[H2C_MSR_ROLE_MAX]; /* number of macid having h2c_msr's OPMODE = 1 for specific ROLE */
|
||||
|
||||
struct sta_info *sta[MACID_NUM_SW_LIMIT]; /* corresponding stainfo when macid is not shared */
|
||||
|
||||
u8 macid_cap;
|
||||
/* macid sleep registers */
|
||||
#ifdef CONFIG_PROTSEL_MACSLEEP
|
||||
@@ -938,12 +1002,34 @@ struct macid_ctl_t {
|
||||
#define OFFCHS_LEAVE_OP 2
|
||||
#define OFFCHS_BACKING_OP 3
|
||||
|
||||
#define TPC_MODE_DISABLE 0
|
||||
#define TPC_MODE_MANUAL 1
|
||||
#define TPC_MODE_INVALID 2 /* keep last */
|
||||
|
||||
#define TPC_MANUAL_CONSTRAINT_MAX 600 /* mB */
|
||||
|
||||
struct rf_ctl_t {
|
||||
enum regd_src_t regd_src;
|
||||
const struct country_chplan *country_ent;
|
||||
u8 ChannelPlan;
|
||||
u8 max_chan_nums;
|
||||
RT_CHANNEL_INFO channel_set[MAX_CHANNEL_NUM];
|
||||
struct op_class_pref_t **spt_op_class_ch;
|
||||
u8 cap_spt_op_class_num;
|
||||
u8 reg_spt_op_class_num;
|
||||
u8 cur_spt_op_class_num;
|
||||
struct p2p_channels channel_list;
|
||||
#ifdef CONFIG_RTW_MBO
|
||||
struct npref_ch_rtp ch_rtp;
|
||||
#endif
|
||||
|
||||
s16 antenna_gain; /* mBi */
|
||||
|
||||
u8 op_class;
|
||||
u8 op_ch;
|
||||
s16 op_txpwr_max; /* EIRP in mBm */
|
||||
u8 if_op_class[CONFIG_IFACE_NUMBER];
|
||||
u8 if_op_ch[CONFIG_IFACE_NUMBER];
|
||||
|
||||
_mutex offch_mutex;
|
||||
u8 offch_state;
|
||||
@@ -970,11 +1056,18 @@ struct rf_ctl_t {
|
||||
u8 txpwr_lmt_5g_20_40_ref;
|
||||
#endif
|
||||
#endif
|
||||
u8 tpc_mode;
|
||||
u16 tpc_manual_constraint; /* mB */
|
||||
|
||||
bool ch_sel_within_same_band;
|
||||
|
||||
#if CONFIG_DFS
|
||||
u8 csa_ch;
|
||||
u8 csa_switch_cnt;
|
||||
u8 csa_ch_offset;
|
||||
u8 csa_ch_width;
|
||||
u8 csa_ch_freq_seg0; /* Channel Center Frequency Segment 0 */
|
||||
u8 csa_ch_freq_seg1; /* Channel Center Frequency Segment 1 */
|
||||
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
u8 dfs_region_domain;
|
||||
@@ -994,6 +1087,7 @@ struct rf_ctl_t {
|
||||
#if CONFIG_DFS_SLAVE_WITH_RADAR_DETECT
|
||||
u8 dfs_slave_with_rd;
|
||||
#endif
|
||||
u8 dfs_ch_sel_e_flags;
|
||||
u8 dfs_ch_sel_d_flags;
|
||||
|
||||
u8 dbg_dfs_fake_radar_detect_cnt;
|
||||
@@ -1003,6 +1097,13 @@ struct rf_ctl_t {
|
||||
#endif /* CONFIG_DFS */
|
||||
};
|
||||
|
||||
struct wow_ctl_t {
|
||||
u8 wow_cap;
|
||||
};
|
||||
|
||||
#define WOW_CAP_TKIP_OL BIT0
|
||||
#define WOW_CAP_HALMAC_ACCESS_PATTERN_IN_TXFIFO BIT1
|
||||
|
||||
#define RTW_CAC_STOPPED 0
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
#define IS_CAC_STOPPED(rfctl) ((rfctl)->cac_end_time == RTW_CAC_STOPPED)
|
||||
@@ -1048,6 +1149,13 @@ struct halmac_indicator {
|
||||
|
||||
struct halmacpriv {
|
||||
/* flags */
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
/*
|
||||
* Indirect Access for SDIO,
|
||||
* 0:default, 1:enable, 2:disable
|
||||
*/
|
||||
u8 sdio_io_indir;
|
||||
#endif /* CONFIG_SDIO_HCI */
|
||||
|
||||
/* For asynchronous functions */
|
||||
struct halmac_indicator *indicator;
|
||||
@@ -1133,6 +1241,14 @@ struct dvobj_priv {
|
||||
unsigned char oper_ch_offset;/* PRIME_CHNL_OFFSET */
|
||||
systime on_oper_ch_time;
|
||||
|
||||
u8 union_ch;
|
||||
u8 union_bw;
|
||||
u8 union_offset;
|
||||
/* backup values when union_ch is set to 0 */
|
||||
u8 union_ch_bak;
|
||||
u8 union_bw_bak;
|
||||
u8 union_offset_bak;
|
||||
|
||||
_adapter *padapters[CONFIG_IFACE_NUMBER];/*IFACE_ID_MAX*/
|
||||
u8 iface_nums; /* total number of ifaces used runtime */
|
||||
struct mi_state iface_state;
|
||||
@@ -1164,6 +1280,8 @@ struct dvobj_priv {
|
||||
|
||||
struct cam_ctl_t cam_ctl;
|
||||
struct sec_cam_ent cam_cache[SEC_CAM_ENT_NUM_SW_LIMIT];
|
||||
|
||||
struct wow_ctl_t wow_ctl;
|
||||
|
||||
#ifdef CONFIG_MBSSID_CAM
|
||||
struct mbid_cam_ctl_t mbid_cam_ctl;
|
||||
@@ -1235,6 +1353,11 @@ struct dvobj_priv {
|
||||
INTF_OPS intf_ops;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SDIO_TX_ENABLE_AVAL_INT
|
||||
u8 tx_aval_int_thr_mode;/* if 0=>threhold set by reques(default) ;if 1=>fixed by proc; if 2: fixed by sdio_tx_max_len */
|
||||
u8 tx_aval_int_thr_value;
|
||||
#endif/*CONFIG_SDIO_TX_ENABLE_AVAL_INT*/
|
||||
|
||||
/*-------- below is for USB INTERFACE --------*/
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
@@ -1284,7 +1407,7 @@ struct dvobj_priv {
|
||||
/* PCI IO map */
|
||||
unsigned long pci_base_addr; /* device I/O address */
|
||||
|
||||
#ifdef RTK_129X_PLATFORM
|
||||
#ifdef CONFIG_PLATFORM_RTK129X
|
||||
unsigned long ctrl_start;
|
||||
/* PCI MASK addr */
|
||||
unsigned long mask_addr;
|
||||
@@ -1331,6 +1454,17 @@ struct dvobj_priv {
|
||||
#ifdef CONFIG_PROTSEL_MACSLEEP
|
||||
struct protsel protsel_macsleep;
|
||||
#endif
|
||||
#ifdef CONFIG_WOWLAN
|
||||
u8 bcn_ctrl_clint3_bf_suspend;
|
||||
u16 rxfltmap2_bf_suspend;
|
||||
u8 lifetime_en;
|
||||
u32 pkt_lifetime;
|
||||
u32 rcr_bf_suspend;
|
||||
u32 cr_ext_bf_suspend;
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
#if defined (CONFIG_CONCURRENT_MODE) && defined (CONFIG_TSF_SYNC)
|
||||
u16 sync_tsfr_counter;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define DEV_STA_NUM(_dvobj) MSTATE_STA_NUM(&((_dvobj)->iface_state))
|
||||
@@ -1351,9 +1485,10 @@ struct dvobj_priv {
|
||||
#define DEV_WPS_NUM(_dvobj) MSTATE_WPS_NUM(&((_dvobj)->iface_state))
|
||||
#define DEV_ROCH_NUM(_dvobj) MSTATE_ROCH_NUM(&((_dvobj)->iface_state))
|
||||
#define DEV_MGMT_TX_NUM(_dvobj) MSTATE_MGMT_TX_NUM(&((_dvobj)->iface_state))
|
||||
#define DEV_U_CH(_dvobj) MSTATE_U_CH(&((_dvobj)->iface_state))
|
||||
#define DEV_U_BW(_dvobj) MSTATE_U_BW(&((_dvobj)->iface_state))
|
||||
#define DEV_U_OFFSET(_dvobj) MSTATE_U_OFFSET(&((_dvobj)->iface_state))
|
||||
|
||||
#define DEV_U_CH(_dvobj) ((_dvobj)->union_ch)
|
||||
#define DEV_U_BW(_dvobj) ((_dvobj)->union_bw)
|
||||
#define DEV_U_OFFSET(_dvobj) ((_dvobj)->union_offset)
|
||||
|
||||
#define dvobj_to_pwrctl(dvobj) (&(dvobj->pwrctl_priv))
|
||||
#define pwrctl_to_dvobj(pwrctl) container_of(pwrctl, struct dvobj_priv, pwrctl_priv)
|
||||
@@ -1512,11 +1647,10 @@ struct _ADAPTER {
|
||||
struct hostapd_priv *phostapdpriv;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
#ifdef CONFIG_P2P
|
||||
struct cfg80211_wifidirect_info cfg80211_wdinfo;
|
||||
#endif /* CONFIG_P2P */
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_IOCTL_CFG80211)
|
||||
struct roch_info rochinfo;
|
||||
#endif
|
||||
|
||||
u32 setband;
|
||||
ATOMIC_T bandskip;
|
||||
|
||||
@@ -1584,15 +1718,6 @@ struct _ADAPTER {
|
||||
#ifdef PLATFORM_LINUX
|
||||
_nic_hdl pnetdev;
|
||||
char old_ifname[IFNAMSIZ];
|
||||
|
||||
/* used by rtw_rereg_nd_name related function */
|
||||
struct rereg_nd_name_data {
|
||||
_nic_hdl old_pnetdev;
|
||||
char old_ifname[IFNAMSIZ];
|
||||
u8 old_ips_mode;
|
||||
u8 old_bRegUseLed;
|
||||
} rereg_nd_name_priv;
|
||||
|
||||
u8 ndev_unregistering;
|
||||
int bup;
|
||||
struct net_device_stats stats;
|
||||
@@ -1614,6 +1739,12 @@ struct _ADAPTER {
|
||||
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
#ifdef CONFIG_PLATFORM_CMAP_INTFS
|
||||
void *cmap_bss_status_evt;
|
||||
u32 cmap_bss_status_evt_len;
|
||||
u8 cmap_unassoc_sta_measure_en;
|
||||
#endif
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
@@ -1636,9 +1767,6 @@ struct _ADAPTER {
|
||||
/* The driver will show the current P2P status when the upper application reads it. */
|
||||
u8 bShowGetP2PState;
|
||||
#endif
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
u8 bDisableAutosuspend;
|
||||
#endif
|
||||
|
||||
u8 isprimary; /* is primary adapter or not */
|
||||
/* notes:
|
||||
@@ -1677,6 +1805,10 @@ struct _ADAPTER {
|
||||
#endif
|
||||
#ifdef CONFIG_AP_MODE
|
||||
u8 bmc_tx_rate;
|
||||
#if CONFIG_RTW_AP_DATA_BMC_TO_UC
|
||||
u8 b2u_flags_ap_src;
|
||||
u8 b2u_flags_ap_fwd;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* for debug purpose */
|
||||
@@ -1687,6 +1819,8 @@ struct _ADAPTER {
|
||||
u8 driver_tx_bw_mode;
|
||||
u8 rsvd_page_offset;
|
||||
u8 rsvd_page_num;
|
||||
u8 ch_clm_ratio;
|
||||
u8 ch_nhm_ratio;
|
||||
#ifdef CONFIG_SUPPORT_FIFO_DUMP
|
||||
u8 fifo_sel;
|
||||
u32 fifo_addr;
|
||||
@@ -1722,6 +1856,25 @@ struct _ADAPTER {
|
||||
struct mcc_adapter_priv mcc_adapterpriv;
|
||||
#endif /* CONFIG_MCC_MODE */
|
||||
|
||||
#ifdef CONFIG_RTW_WDS
|
||||
bool use_wds; /* for STA, AP mode */
|
||||
|
||||
/* for STA mode */
|
||||
struct rtw_wds_gptr_table *wds_gpt_records;
|
||||
ATOMIC_T wds_gpt_record_num;
|
||||
|
||||
/* for AP mode */
|
||||
#ifdef CONFIG_AP_MODE
|
||||
struct rtw_wds_table *wds_paths;
|
||||
ATOMIC_T wds_path_num;
|
||||
#endif
|
||||
#endif /* CONFIG_RTW_WDS */
|
||||
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
u8 multi_ap;
|
||||
u8 ch_util_threshold;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
struct rtw_mesh_cfg mesh_cfg;
|
||||
struct rtw_mesh_info mesh_info;
|
||||
@@ -1731,6 +1884,17 @@ struct _ADAPTER {
|
||||
_workitem mesh_work;
|
||||
unsigned long wrkq_flags;
|
||||
#endif /* CONFIG_RTW_MESH */
|
||||
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
ATOMIC_T tbtx_tx_pause;
|
||||
ATOMIC_T tbtx_remove_tx_pause;
|
||||
u8 tbtx_capability;
|
||||
u32 tbtx_duration;
|
||||
#endif /* CONFIG_RTW_TOKEN_BASED_XMIT */
|
||||
|
||||
#ifdef RTW_SIMPLE_CONFIG
|
||||
u8 rtw_simple_config;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define adapter_to_dvobj(adapter) ((adapter)->dvobj)
|
||||
@@ -1746,8 +1910,18 @@ struct _ADAPTER {
|
||||
#define adapter_to_rfctl(adapter) dvobj_to_rfctl(adapter_to_dvobj((adapter)))
|
||||
#define adapter_to_macidctl(adapter) dvobj_to_macidctl(adapter_to_dvobj((adapter)))
|
||||
|
||||
#ifdef CONFIG_RTW_WDS
|
||||
#define adapter_use_wds(adapter) (adapter->use_wds)
|
||||
#define adapter_set_use_wds(adapter, en) do { \
|
||||
(adapter)->use_wds = (en) ? 1 : 0; \
|
||||
RTW_INFO(FUNC_ADPT_FMT" set use_wds=%d\n", FUNC_ADPT_ARG(adapter), (adapter)->use_wds); \
|
||||
} while (0)
|
||||
#else
|
||||
#define adapter_use_wds(adapter) 0
|
||||
#endif
|
||||
|
||||
#define adapter_mac_addr(adapter) (adapter->mac_addr)
|
||||
#ifdef CONFIG_RTW_CFGVENDOR_RANDOM_MAC_OUI
|
||||
#if defined(CONFIG_RTW_CFGVENDOR_RANDOM_MAC_OUI) || defined(CONFIG_RTW_SCAN_RAND)
|
||||
#define adapter_pno_mac_addr(adapter) \
|
||||
((adapter_wdev_data(adapter))->pno_mac_addr)
|
||||
#endif
|
||||
|
||||
@@ -49,6 +49,7 @@ void hal_btcoex_ConnectNotify(PADAPTER padapter, u8 action);
|
||||
void hal_btcoex_MediaStatusNotify(PADAPTER padapter, u8 mediaStatus);
|
||||
void hal_btcoex_SpecialPacketNotify(PADAPTER padapter, u8 pktType);
|
||||
void hal_btcoex_IQKNotify(PADAPTER padapter, u8 state);
|
||||
void hal_btcoex_WLRFKNotify(PADAPTER padapter, u8 path, u8 type, u8 state);
|
||||
void hal_btcoex_BtInfoNotify(PADAPTER padapter, u8 length, u8 *tmpBuf);
|
||||
void hal_btcoex_BtMpRptNotify(PADAPTER padapter, u8 length, u8 *tmpBuf);
|
||||
void hal_btcoex_SuspendNotify(PADAPTER padapter, u8 state);
|
||||
@@ -61,6 +62,7 @@ s32 hal_btcoex_IsBTCoexRejectAMPDU(PADAPTER padapter);
|
||||
s32 hal_btcoex_IsBTCoexCtrlAMPDUSize(PADAPTER padapter);
|
||||
u32 hal_btcoex_GetAMPDUSize(PADAPTER padapter);
|
||||
void hal_btcoex_SetManualControl(PADAPTER padapter, u8 bmanual);
|
||||
void hal_btcoex_set_policy_control(PADAPTER padapter, u8 btc_policy);
|
||||
u8 hal_btcoex_1Ant(PADAPTER padapter);
|
||||
u8 hal_btcoex_IsBtControlLps(PADAPTER);
|
||||
u8 hal_btcoex_IsLpsOn(PADAPTER);
|
||||
|
||||
@@ -19,14 +19,15 @@
|
||||
#include <hal_data.h>
|
||||
|
||||
/* Define the ICs that support wifi only cfg in coex. codes */
|
||||
#if defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822C) || defined(CONFIG_RTL8814B)
|
||||
#if defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822C) || defined(CONFIG_RTL8814B) \
|
||||
|| defined(CONFIG_RTL8723F)
|
||||
#define CONFIG_BTCOEX_SUPPORT_WIFI_ONLY_CFG 1
|
||||
#else
|
||||
#define CONFIG_BTCOEX_SUPPORT_WIFI_ONLY_CFG 0
|
||||
#endif
|
||||
|
||||
/* Define the ICs that support hal btc common file structure */
|
||||
#if defined(CONFIG_RTL8822C) || (defined(CONFIG_RTL8192F) && defined(CONFIG_BT_COEXIST))
|
||||
#if defined(CONFIG_RTL8822C) || (defined(CONFIG_RTL8192F) || defined(CONFIG_RTL8723F)&& defined(CONFIG_BT_COEXIST))
|
||||
#define CONFIG_BTCOEX_SUPPORT_BTC_CMN 1
|
||||
#else
|
||||
#define CONFIG_BTCOEX_SUPPORT_BTC_CMN 0
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
#define DESC_RATEVHTSS4MCS7 0x51
|
||||
#define DESC_RATEVHTSS4MCS8 0x52
|
||||
#define DESC_RATEVHTSS4MCS9 0x53
|
||||
#define DESC_RATE_NUM 0x54
|
||||
|
||||
#define IS_CCK_HRATE(_rate) ((_rate) <= DESC_RATE11M)
|
||||
#define IS_OFDM_HRATE(_rate) ((_rate) >= DESC_RATE6M && (_rate) <= DESC_RATE54M)
|
||||
@@ -142,92 +143,8 @@
|
||||
|
||||
#define HRARE_SS_NUM(_rate) (IS_1SS_HRATE(_rate) ? 1 : (IS_2SS_HRATE(_rate) ? 2 : (IS_3SS_HRATE(_rate) ? 3 : (IS_4SS_HRATE(_rate) ? 4 : 0))))
|
||||
|
||||
#define HDATA_RATE(rate)\
|
||||
(rate == DESC_RATE1M) ? "CCK_1M" :\
|
||||
(rate == DESC_RATE2M) ? "CCK_2M" :\
|
||||
(rate == DESC_RATE5_5M) ? "CCK5_5M" :\
|
||||
(rate == DESC_RATE11M) ? "CCK_11M" :\
|
||||
(rate == DESC_RATE6M) ? "OFDM_6M" :\
|
||||
(rate == DESC_RATE9M) ? "OFDM_9M" :\
|
||||
(rate == DESC_RATE12M) ? "OFDM_12M" :\
|
||||
(rate == DESC_RATE18M) ? "OFDM_18M" :\
|
||||
(rate == DESC_RATE24M) ? "OFDM_24M" :\
|
||||
(rate == DESC_RATE36M) ? "OFDM_36M" :\
|
||||
(rate == DESC_RATE48M) ? "OFDM_48M" :\
|
||||
(rate == DESC_RATE54M) ? "OFDM_54M" :\
|
||||
(rate == DESC_RATEMCS0) ? "MCS0" :\
|
||||
(rate == DESC_RATEMCS1) ? "MCS1" :\
|
||||
(rate == DESC_RATEMCS2) ? "MCS2" :\
|
||||
(rate == DESC_RATEMCS3) ? "MCS3" :\
|
||||
(rate == DESC_RATEMCS4) ? "MCS4" :\
|
||||
(rate == DESC_RATEMCS5) ? "MCS5" :\
|
||||
(rate == DESC_RATEMCS6) ? "MCS6" :\
|
||||
(rate == DESC_RATEMCS7) ? "MCS7" :\
|
||||
(rate == DESC_RATEMCS8) ? "MCS8" :\
|
||||
(rate == DESC_RATEMCS9) ? "MCS9" :\
|
||||
(rate == DESC_RATEMCS10) ? "MCS10" :\
|
||||
(rate == DESC_RATEMCS11) ? "MCS11" :\
|
||||
(rate == DESC_RATEMCS12) ? "MCS12" :\
|
||||
(rate == DESC_RATEMCS13) ? "MCS13" :\
|
||||
(rate == DESC_RATEMCS14) ? "MCS14" :\
|
||||
(rate == DESC_RATEMCS15) ? "MCS15" :\
|
||||
(rate == DESC_RATEMCS16) ? "MCS16" :\
|
||||
(rate == DESC_RATEMCS17) ? "MCS17" :\
|
||||
(rate == DESC_RATEMCS18) ? "MCS18" :\
|
||||
(rate == DESC_RATEMCS19) ? "MCS19" :\
|
||||
(rate == DESC_RATEMCS20) ? "MCS20" :\
|
||||
(rate == DESC_RATEMCS21) ? "MCS21" :\
|
||||
(rate == DESC_RATEMCS22) ? "MCS22" :\
|
||||
(rate == DESC_RATEMCS23) ? "MCS23" :\
|
||||
(rate == DESC_RATEMCS24) ? "MCS24" :\
|
||||
(rate == DESC_RATEMCS25) ? "MCS25" :\
|
||||
(rate == DESC_RATEMCS26) ? "MCS26" :\
|
||||
(rate == DESC_RATEMCS27) ? "MCS27" :\
|
||||
(rate == DESC_RATEMCS28) ? "MCS28" :\
|
||||
(rate == DESC_RATEMCS29) ? "MCS29" :\
|
||||
(rate == DESC_RATEMCS30) ? "MCS30" :\
|
||||
(rate == DESC_RATEMCS31) ? "MCS31" :\
|
||||
(rate == DESC_RATEVHTSS1MCS0) ? "VHTSS1MCS0" :\
|
||||
(rate == DESC_RATEVHTSS1MCS1) ? "VHTSS1MCS1" :\
|
||||
(rate == DESC_RATEVHTSS1MCS2) ? "VHTSS1MCS2" :\
|
||||
(rate == DESC_RATEVHTSS1MCS3) ? "VHTSS1MCS3" :\
|
||||
(rate == DESC_RATEVHTSS1MCS4) ? "VHTSS1MCS4" :\
|
||||
(rate == DESC_RATEVHTSS1MCS5) ? "VHTSS1MCS5" :\
|
||||
(rate == DESC_RATEVHTSS1MCS6) ? "VHTSS1MCS6" :\
|
||||
(rate == DESC_RATEVHTSS1MCS7) ? "VHTSS1MCS7" :\
|
||||
(rate == DESC_RATEVHTSS1MCS8) ? "VHTSS1MCS8" :\
|
||||
(rate == DESC_RATEVHTSS1MCS9) ? "VHTSS1MCS9" :\
|
||||
(rate == DESC_RATEVHTSS2MCS0) ? "VHTSS2MCS0" :\
|
||||
(rate == DESC_RATEVHTSS2MCS1) ? "VHTSS2MCS1" :\
|
||||
(rate == DESC_RATEVHTSS2MCS2) ? "VHTSS2MCS2" :\
|
||||
(rate == DESC_RATEVHTSS2MCS3) ? "VHTSS2MCS3" :\
|
||||
(rate == DESC_RATEVHTSS2MCS4) ? "VHTSS2MCS4" :\
|
||||
(rate == DESC_RATEVHTSS2MCS5) ? "VHTSS2MCS5" :\
|
||||
(rate == DESC_RATEVHTSS2MCS6) ? "VHTSS2MCS6" :\
|
||||
(rate == DESC_RATEVHTSS2MCS7) ? "VHTSS2MCS7" :\
|
||||
(rate == DESC_RATEVHTSS2MCS8) ? "VHTSS2MCS8" :\
|
||||
(rate == DESC_RATEVHTSS2MCS9) ? "VHTSS2MCS9" :\
|
||||
(rate == DESC_RATEVHTSS3MCS0) ? "VHTSS3MCS0" :\
|
||||
(rate == DESC_RATEVHTSS3MCS1) ? "VHTSS3MCS1" :\
|
||||
(rate == DESC_RATEVHTSS3MCS2) ? "VHTSS3MCS2" :\
|
||||
(rate == DESC_RATEVHTSS3MCS3) ? "VHTSS3MCS3" :\
|
||||
(rate == DESC_RATEVHTSS3MCS4) ? "VHTSS3MCS4" :\
|
||||
(rate == DESC_RATEVHTSS3MCS5) ? "VHTSS3MCS5" :\
|
||||
(rate == DESC_RATEVHTSS3MCS6) ? "VHTSS3MCS6" :\
|
||||
(rate == DESC_RATEVHTSS3MCS7) ? "VHTSS3MCS7" :\
|
||||
(rate == DESC_RATEVHTSS3MCS8) ? "VHTSS3MCS8" :\
|
||||
(rate == DESC_RATEVHTSS3MCS9) ? "VHTSS3MCS9" :\
|
||||
(rate == DESC_RATEVHTSS4MCS0) ? "VHTSS4MCS0" :\
|
||||
(rate == DESC_RATEVHTSS4MCS1) ? "VHTSS4MCS1" :\
|
||||
(rate == DESC_RATEVHTSS4MCS2) ? "VHTSS4MCS2" :\
|
||||
(rate == DESC_RATEVHTSS4MCS3) ? "VHTSS4MCS3" :\
|
||||
(rate == DESC_RATEVHTSS4MCS4) ? "VHTSS4MCS4" :\
|
||||
(rate == DESC_RATEVHTSS4MCS5) ? "VHTSS4MCS5" :\
|
||||
(rate == DESC_RATEVHTSS4MCS6) ? "VHTSS4MCS6" :\
|
||||
(rate == DESC_RATEVHTSS4MCS7) ? "VHTSS4MCS7" :\
|
||||
(rate == DESC_RATEVHTSS4MCS8) ? "VHTSS4MCS8" :\
|
||||
(rate == DESC_RATEVHTSS4MCS9) ? "VHTSS4MCS9" :\
|
||||
"UNKNOWN"
|
||||
extern const char * const _HDATA_RATE[];
|
||||
#define HDATA_RATE(rate) ((rate) >= DESC_RATE_NUM ? _HDATA_RATE[DESC_RATE_NUM] : _HDATA_RATE[rate])
|
||||
|
||||
enum {
|
||||
UP_LINK,
|
||||
@@ -268,11 +185,20 @@ typedef enum _WAKEUP_REASON{
|
||||
RTIME_FAIL_DMA_IDLE = 0x42,
|
||||
RTIME_FAIL_DMA_PAUSE = 0x43,
|
||||
RX_PNO = 0x55,
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
WOW_KEEPALIVE_ACK_TIMEOUT = 0x60,
|
||||
WOW_KEEPALIVE_WAKE = 0x61,
|
||||
#endif/*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
AP_OFFLOAD_WAKEUP = 0x66,
|
||||
CLK_32K_UNLOCK = 0xFD,
|
||||
CLK_32K_LOCK = 0xFE
|
||||
}WAKEUP_REASON;
|
||||
|
||||
typedef enum _BCN_EARLY_INT_CASE{
|
||||
TDLS_BCN_ERLY_ON,
|
||||
TDLS_BCN_ERLY_OFF
|
||||
}BCN_EARLY_INT_CASE;
|
||||
|
||||
/*
|
||||
* Queue Select Value in TxDesc
|
||||
* */
|
||||
@@ -310,7 +236,7 @@ struct dbg_rx_counter {
|
||||
u8 rtw_hal_get_port(_adapter *adapter);
|
||||
|
||||
#ifdef CONFIG_MBSSID_CAM
|
||||
#define DBG_MBID_CAM_DUMP
|
||||
/*#define DBG_MBID_CAM_DUMP*/
|
||||
|
||||
void rtw_mbid_cam_init(struct dvobj_priv *dvobj);
|
||||
void rtw_mbid_cam_deinit(struct dvobj_priv *dvobj);
|
||||
@@ -416,9 +342,12 @@ HAL_IsLegalChannel(
|
||||
u32 Channel
|
||||
);
|
||||
|
||||
u8 MRateToHwRate(u8 rate);
|
||||
u8 MRateToHwRate(enum MGN_RATE rate);
|
||||
|
||||
u8 hw_rate_to_m_rate(u8 rate);
|
||||
u8 hw_rate_to_m_rate(u8 hw_rate);
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
void dump_hw_rate_map_test(void *sel);
|
||||
#endif
|
||||
|
||||
void HalSetBrateCfg(
|
||||
PADAPTER Adapter,
|
||||
@@ -468,6 +397,7 @@ u8 rtw_hal_rcr_check(_adapter *adapter, u32 check_bit);
|
||||
u8 rtw_hal_rcr_add(_adapter *adapter, u32 add);
|
||||
u8 rtw_hal_rcr_clear(_adapter *adapter, u32 clear);
|
||||
void rtw_hal_rcr_set_chk_bssid(_adapter *adapter, u8 self_action);
|
||||
void rtw_hal_rcr_set_chk_bssid_act_non(_adapter *adapter);
|
||||
|
||||
void rtw_iface_enable_tsf_update(_adapter *adapter);
|
||||
void rtw_iface_disable_tsf_update(_adapter *adapter);
|
||||
@@ -506,13 +436,6 @@ void rtw_hal_reqtxrpt(_adapter *padapter, u8 macid);
|
||||
u8 SetHalDefVar(_adapter *adapter, HAL_DEF_VARIABLE variable, void *value);
|
||||
u8 GetHalDefVar(_adapter *adapter, HAL_DEF_VARIABLE variable, void *value);
|
||||
|
||||
BOOLEAN
|
||||
eqNByte(
|
||||
u8 *str1,
|
||||
u8 *str2,
|
||||
u32 num
|
||||
);
|
||||
|
||||
u32
|
||||
MapCharToHexDigit(
|
||||
char chTmp
|
||||
@@ -624,9 +547,11 @@ void rtw_hal_ch_sw_iqk_info_backup(_adapter *adapter);
|
||||
void rtw_hal_ch_sw_iqk_info_restore(_adapter *padapter, u8 ch_sw_use_case);
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
void rtw_hal_switch_gpio_wl_ctrl(_adapter *padapter, u8 index, u8 enable);
|
||||
void rtw_hal_set_output_gpio(_adapter *padapter, u8 index, u8 outputval);
|
||||
void rtw_hal_set_input_gpio(_adapter *padapter, u8 index);
|
||||
void rtw_hal_switch_gpio_wl_ctrl(_adapter *padapter, u8 index, u8 enable);
|
||||
void rtw_hal_set_output_gpio(_adapter *padapter, u8 index, u8 outputval);
|
||||
void rtw_hal_set_input_gpio(_adapter *padapter, u8 index);
|
||||
#define GPIO_OUTPUT_LOW 0
|
||||
#define GPIO_OUTPUT_HIGH 1
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
@@ -675,6 +600,7 @@ enum lps_pg_hdl_id {
|
||||
LPS_PG_PHYDM_EN,
|
||||
};
|
||||
|
||||
u8 rtw_hal_set_lps_pg_info_cmd(_adapter *adapter);
|
||||
u8 rtw_hal_set_lps_pg_info(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
@@ -683,6 +609,7 @@ void rtw_hal_construct_beacon(_adapter *padapter, u8 *pframe, u32 *pLength);
|
||||
void rtw_hal_construct_NullFunctionData(PADAPTER, u8 *pframe, u32 *pLength,
|
||||
u8 bQoS, u8 AC, u8 bEosp, u8 bForcePowerSave);
|
||||
|
||||
bool _rtw_wow_chk_cap(_adapter *adapter, u8 cap);
|
||||
#ifdef CONFIG_WOWLAN
|
||||
struct rtl_wow_pattern {
|
||||
u16 crc;
|
||||
@@ -691,9 +618,9 @@ struct rtl_wow_pattern {
|
||||
};
|
||||
void rtw_wow_pattern_cam_dump(_adapter *adapter);
|
||||
|
||||
void rtw_dump_wow_pattern(void *sel, struct rtl_wow_pattern *pwow_pattern, u8 idx);
|
||||
#ifdef CONFIG_WOW_PATTERN_HW_CAM
|
||||
void rtw_wow_pattern_read_cam_ent(_adapter *adapter, u8 id, struct rtl_wow_pattern *context);
|
||||
void rtw_dump_wow_pattern(void *sel, struct rtl_wow_pattern *pwow_pattern, u8 idx);
|
||||
#endif
|
||||
|
||||
struct rtw_ndp_info {
|
||||
@@ -715,7 +642,9 @@ struct rtw_ndp_info {
|
||||
SET_BITS_TO_LE_4BYTE(target + 2, 0, 8, _value)
|
||||
#endif /*CONFIG_WOWLAN*/
|
||||
|
||||
#ifdef CONFIG_PROC_DEBUG
|
||||
void rtw_dump_phy_cap(void *sel, _adapter *adapter);
|
||||
#endif
|
||||
void rtw_dump_rsvd_page(void *sel, _adapter *adapter, u8 page_offset, u8 page_num);
|
||||
#ifdef CONFIG_SUPPORT_FIFO_DUMP
|
||||
void rtw_dump_fifo(void *sel, _adapter *adapter, u8 fifo_sel, u32 fifo_addr, u32 fifo_size);
|
||||
@@ -770,7 +699,8 @@ void rtw_hal_beamforming_config_csirate(PADAPTER adapter);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
u8 phy_get_current_tx_num(PADAPTER pAdapter, u8 Rate);
|
||||
u8 phy_get_capable_tx_num(_adapter *adapter, enum MGN_RATE rate);
|
||||
u8 phy_get_current_tx_num(_adapter *adapter, enum MGN_RATE rate);
|
||||
|
||||
#ifdef CONFIG_RTL8812A
|
||||
u8 * rtw_hal_set_8812a_vendor_ie(_adapter *padapter , u8 *pframe ,uint *frlen );
|
||||
|
||||
@@ -28,6 +28,7 @@ enum h2c_cmd {
|
||||
H2C_DISCON_DECISION = 0x04,
|
||||
H2C_PSD_OFFLOAD = 0x05,
|
||||
H2C_CUSTOMER_STR_REQ = 0x06,
|
||||
H2C_TXPWR_IDX_OFFLOAD = 0x07,
|
||||
H2C_AP_OFFLOAD = 0x08,
|
||||
H2C_BCN_RSVDPAGE = 0x09,
|
||||
H2C_PROBERSP_RSVDPAGE = 0x0A,
|
||||
@@ -108,10 +109,19 @@ enum h2c_cmd {
|
||||
H2C_D0_SCAN_OFFLOAD_INFO = 0x86,
|
||||
H2C_CHNL_SWITCH_OFFLOAD = 0x87,
|
||||
H2C_AOAC_RSVDPAGE3 = 0x88,
|
||||
H2C_GPIO_CUSTOM = 0x89,
|
||||
H2C_P2P_OFFLOAD_RSVD_PAGE = 0x8A,
|
||||
H2C_P2P_OFFLOAD = 0x8B,
|
||||
H2C_WAR_OFFLOAD = 0x8D,
|
||||
H2C_WAROFLD_RSVDPAGE1 = 0x8E,
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
H2C_UDP_KEEPALIVE = 0x90,
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
#ifdef CONFIG_FW_HANDLE_TXBCN
|
||||
H2C_FW_BCN_OFFLOAD = 0xBA,
|
||||
#endif
|
||||
#ifdef CONFIG_SUPPORT_DYNAMIC_TXPWR
|
||||
H2C_FW_CRC5_SEARCH = 0xBB,
|
||||
#endif
|
||||
H2C_RESET_TSF = 0xC0,
|
||||
#ifdef CONFIG_FW_CORRECT_BCN
|
||||
@@ -135,7 +145,11 @@ enum h2c_cmd {
|
||||
#else
|
||||
#define H2C_MEDIA_STATUS_RPT_LEN 3
|
||||
#endif
|
||||
#define H2C_GPIO_CUSTOM_LEN 3
|
||||
#define H2C_KEEP_ALIVE_CTRL_LEN 2
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
#define H2C_KEEP_ALIVE_PATTERN_LEN 7
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
#define H2C_DISCON_DECISION_LEN 3
|
||||
#define H2C_AP_OFFLOAD_LEN 3
|
||||
#define H2C_AP_WOW_GPIO_CTRL_LEN 4
|
||||
@@ -186,16 +200,27 @@ enum h2c_cmd {
|
||||
#define H2C_BTC_WL_PORT_ID_LEN 1
|
||||
#endif
|
||||
|
||||
#define H2C_BT_UNKNOWN_DEVICE_WA_LEN 1
|
||||
#ifdef DBG_FW_DEBUG_MSG_PKT
|
||||
#define H2C_FW_DBG_MSG_PKT_LEN 2
|
||||
#endif /*DBG_FW_DEBUG_MSG_PKT*/
|
||||
|
||||
#define H2C_SINGLE_CHANNELSWITCH_V2_LEN 2
|
||||
#define H2C_SINGLE_CHANNELSWITCH_V2_LEN 3
|
||||
#define H2C_BT_UNKNOWN_DEVICE_WA_LEN 1
|
||||
|
||||
#ifdef CONFIG_SUPPORT_DYNAMIC_TXPWR
|
||||
#define H2C_FW_CRC5_SEARCH_LEN 7
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
#define H2C_WAR_OFFLOAD_LEN 3
|
||||
#define H2C_WAROFLD_RSVDPAGE1_LEN 6
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
|
||||
#define eq_mac_addr(a, b) (((a)[0] == (b)[0] && (a)[1] == (b)[1] && (a)[2] == (b)[2] && (a)[3] == (b)[3] && (a)[4] == (b)[4] && (a)[5] == (b)[5]) ? 1 : 0)
|
||||
#define cp_mac_addr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], (des)[2] = (src)[2], (des)[3] = (src)[3], (des)[4] = (src)[4], (des)[5] = (src)[5])
|
||||
#define cpIpAddr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], (des)[2] = (src)[2], (des)[3] = (src)[3])
|
||||
#define cpIpv6Addr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], (des)[2] = (src)[2], (des)[3] = (src)[3], (des)[4] = (src)[4], (des)[5] = (src)[5], (des)[6] = (src)[6], (des)[7] = (src)[7], (des)[8] = (src)[8], (des)[9] = (src)[9], (des)[10] = (src)[10], (des)[11] = (src)[11], (des)[12] = (src)[12], (des)[13] = (src)[13], (des)[14] = (src)[14], (des)[15] = (src)[15])
|
||||
|
||||
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
@@ -250,6 +275,40 @@ enum h2c_cmd {
|
||||
#define GET_H2CCMD_MSRRPT_PARM_MIRACAST_SINK(__pH2CCmd) LE_BITS_TO_1BYTE(((u8 *)(__pH2CCmd)), 3, 1)
|
||||
#define GET_H2CCMD_MSRRPT_PARM_ROLE(__pH2CCmd) LE_BITS_TO_1BYTE(((u8 *)(__pH2CCmd)), 4, 4)
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
#define SET_IPHDR_VERSION(__pHeader, __Value) WriteLE1Byte(((u8 *)(__pHeader)) + 0, __Value)
|
||||
#define SET_IPHDR_DSCP(__pHeader, __Value) WriteLE1Byte(((u8 *)(__pHeader)) + 1, __Value)
|
||||
#define SET_IPHDR_TOTAL_LEN(__pHeader, __Value) WriteLE2Byte(((u8 *)(__pHeader)) + 2, __Value)
|
||||
#define SET_IPHDR_IDENTIFIER(__pHeader, __Value) WriteLE2Byte(((u8 *)(__pHeader)) + 4, __Value)
|
||||
#define SET_IPHDR_FLAGS(__pHeader, __Value) WriteLE1Byte(((u8 *)(__pHeader)) + 6, __Value)
|
||||
#define SET_IPHDR_FRAG_OFFSET(__pHeader, __Value) WriteLE1Byte(((u8 *)(__pHeader)) + 7, __Value)
|
||||
#define SET_IPHDR_TTL(__pHeader, __Value) WriteLE1Byte(((u8 *)(__pHeader)) + 8, __Value)
|
||||
#define SET_IPHDR_PROTOCOL(__pHeader, __Value) WriteLE1Byte(((u8 *)(__pHeader)) + 9, __Value)
|
||||
#define SET_IPHDR_HDR_CHECKSUM(__pHeader, __Value) WriteLE2Byte(((u8 *)(__pHeader)) + 10, __Value)
|
||||
#define SET_IPHDR_SRC_IP_ADDR(__pHeader, __Value) cpIpAddr(((u8 *)(__pHeader))+12, (u8 *)(__Value))
|
||||
#define SET_IPHDR_DST_IP_ADDR(__pHeader, __Value) cpIpAddr(((u8 *)(__pHeader))+16, (u8 *)(__Value))
|
||||
#define SET_UDP_SRC_PORT(__pHeader, __Value) WriteLE2Byte(((u8 *)(__pHeader)) + 0, __Value)
|
||||
#define SET_UDP_DST_PORT(__pHeader, __Value) WriteLE2Byte(((u8 *)(__pHeader)) + 2, __Value)
|
||||
#define SET_UDP_LEN(__pHeader, __Value) WriteLE2Byte(((u8 *)(__pHeader)) + 4, __Value)
|
||||
#define SET_UDP_CHECKSUM(__pHeader, __Value) WriteLE2Byte(((u8 *)(__pHeader)) + 6, __Value)
|
||||
|
||||
#define SET_MDNS_HDR_FLAG(__pHeader, __Value) WriteLE1Byte(((u8 *)(__pHeader)) + 2, __Value)
|
||||
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
#ifdef CONFIG_OFFLOAD_MDNS_V6
|
||||
#define SET_IPHDRV6_VERSION(__pHeader, __Value) SET_BITS_TO_LE_1BYTE(__pHeader, 4, 4, __Value)
|
||||
#define SET_IPHDRV6_TRAFFIC_CLASS(__pHeader, __Value) SET_BITS_TO_LE_2BYTE(__pHeader, 4, 8, __Value)
|
||||
#define SET_IPHDRV6_FLOW_LABEL(__pHeader, __Value) SET_BITS_TO_LE_4BYTE(__pHeader, 12, 20, __Value)
|
||||
#define SET_IPHDRV6_PAYLOAD_LENGTH(__pHeader, __Value) SET_BITS_TO_LE_2BYTE(((u8 *)(__pHeader)) + 4, 0, 16, __Value)
|
||||
#define SET_IPHDRV6_NEXT_HEADER(__pHeader, __Value) SET_BITS_TO_LE_1BYTE((__pHeader) + 6, 0, 8, __Value)
|
||||
#define SET_IPHDRV6_HOP_LIMIT(__pHeader, __Value) SET_BITS_TO_LE_1BYTE((__pHeader) + 7, 0, 8, __Value)
|
||||
#define SET_IPHDRV6_SRC_IP_ADDR(__pHeader, __Value) cpIpv6Addr((u8 *)(__pHeader) + 8, (u8 *)(__Value))
|
||||
#define SET_IPHDRV6_DST_IP_ADDR(__pHeader, __Value) cpIpv6Addr((u8 *)(__pHeader) + 24, (u8 *)(__Value))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define H2C_MSR_ROLE_RSVD 0
|
||||
#define H2C_MSR_ROLE_STA 1
|
||||
#define H2C_MSR_ROLE_AP 2
|
||||
@@ -290,6 +349,26 @@ s32 rtw_hal_set_FwMediaStatusRpt_range_cmd(_adapter *adapter, bool opmode, bool
|
||||
#define SET_H2CCMD_DISCONDECISION_PARM_TRY_PKT_NUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+2, 0, 8, __Value)
|
||||
#define SET_H2CCMD_DISCONDECISION_PARM_TRY_OK_BCN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+3, 0, 8, __Value)
|
||||
|
||||
/*UDP_KEEP_ALIVE 0x90*/
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
/*data 0*/
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value);
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_PACKET_LOC(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 7, __Value);
|
||||
/*data 1*/
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_ACK_PATTERN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+1, 7, 1, __Value);
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_ACK_PATTERN_idx(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+1, 0, 7, __Value);
|
||||
/*data 2*/
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_WAKE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+2, 7, 1, __Value);
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_WAKE_PATTERN_idx(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+2, 0, 7, __Value);
|
||||
/*data3*/
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_PERIOD_LOW_BIT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+3, 0, 8, __Value);
|
||||
/*data4*/
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_PERIOD_HI_BIT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+4, 0, 8, __Value);
|
||||
/*data5*/
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_RETRY_INTERVAL(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+5, 0, 8, __Value);
|
||||
/*data6*/
|
||||
#define SET_H2CCMD_UDP_KEEP_ALIVE_RETRY_LIMIT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+6, 0, 8, __Value);
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
#ifdef CONFIG_RTW_CUSTOMER_STR
|
||||
#define RTW_CUSTOMER_STR_LEN 16
|
||||
#define RTW_CUSTOMER_STR_FMT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x"
|
||||
@@ -321,6 +400,14 @@ s32 rtw_hal_h2c_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
#endif /* CONFIG_RTW_CUSTOMER_STR */
|
||||
|
||||
#ifdef CONFIG_FW_OFFLOAD_SET_TXPWR_IDX
|
||||
#define H2C_TXPWR_IDX_OFFLOAD_LEN 4
|
||||
#define SET_H2CCMD_TXPWR_IDX_CCK(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
#define SET_H2CCMD_TXPWR_IDX_OFDM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd + 1, 0, 8, __Value)
|
||||
#define SET_H2CCMD_TXPWR_IDX_HT1SS(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd + 2, 0, 8, __Value)
|
||||
#define SET_H2CCMD_TXPWR_IDX_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd + 3, 0, 1, __Value)
|
||||
#endif
|
||||
|
||||
/* _AP_Offload 0x08 */
|
||||
#define SET_H2CCMD_AP_WOWLAN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
/* _BCN_RsvdPage 0x09 */
|
||||
@@ -328,6 +415,18 @@ s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
/* _Probersp_RsvdPage 0x0a */
|
||||
#define SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_ProbeRsp(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
/* _Probersp_RsvdPage 0x13 */
|
||||
|
||||
#define SET_H2CCMD_PWRMODE_PARM_MODE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
#define SET_H2CCMD_PWRMODE_PARM_RLBM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 4, __Value)
|
||||
#define SET_H2CCMD_PWRMODE_PARM_SMART_PS(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 4, 4, __Value)
|
||||
#define SET_H2CCMD_PWRMODE_PARM_BCN_PASS_TIME(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 8, __Value)
|
||||
#define SET_H2CCMD_PWRMODE_PARM_ALL_QUEUE_UAPSD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 8, __Value)
|
||||
#define SET_H2CCMD_PWRMODE_PARM_BCN_EARLY_C2H_RPT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 2, 1, __Value)
|
||||
#define SET_H2CCMD_PWRMODE_PARM_PWR_STATE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+4, 0, 8, __Value)
|
||||
|
||||
#define GET_H2CCMD_PWRMODE_PARM_MODE(__pH2CCmd) LE_BITS_TO_1BYTE(__pH2CCmd, 0, 8)
|
||||
/* _PWR_MOD_CMD_0x20 */
|
||||
|
||||
#define SET_H2CCMD_AP_WOW_GPIO_CTRL_INDEX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 4, __Value)
|
||||
#define SET_H2CCMD_AP_WOW_GPIO_CTRL_C2H_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
|
||||
#define SET_H2CCMD_AP_WOW_GPIO_CTRL_PLUS(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
|
||||
@@ -350,6 +449,8 @@ s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
|
||||
#define SET_H2CCMD_INACTIVE_DISBBRF(__pH2CCmd, __Value) \
|
||||
SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
|
||||
#define SET_H2CCMD_INACTIVE_PORT_NUM(__pH2CCmd, __Value) \
|
||||
SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 3, __Value)
|
||||
#define SET_H2CCMD_INACTIVE_PS_FREQ(__pH2CCmd, __Value) \
|
||||
SET_BITS_TO_LE_1BYTE(__pH2CCmd + 1, 0, 8, __Value)
|
||||
#define SET_H2CCMD_INACTIVE_PS_DURATION(__pH2CCmd, __Value) \
|
||||
@@ -467,7 +568,9 @@ s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
#define SET_H2CCMD_SINGLE_CH_SWITCH_V2_CENTRAL_CH_NUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
#define SET_H2CCMD_SINGLE_CH_SWITCH_V2_PRIMARY_CH_IDX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd) + 1, 0, 4, __Value)
|
||||
#define SET_H2CCMD_SINGLE_CH_SWITCH_V2_BW(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd) + 1, 4, 4, __Value)
|
||||
|
||||
#define SET_H2CCMD_SINGLE_CH_SWITCH_V2_PWR_IDX_UPDATE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd) + 2, 0, 1, __Value)
|
||||
#define SET_H2CCMD_SINGLE_CH_SWITCH_V2_IQK_UPDATE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd) + 2, 1, 1, __Value)
|
||||
#define SET_H2CCMD_SINGLE_CH_SWITCH_V2_CH_IDX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd) + 2, 4, 4, __Value)
|
||||
|
||||
#if defined(CONFIG_BT_COEXIST) && defined(CONFIG_FW_MULTI_PORT_SUPPORT)
|
||||
#define SET_H2CCMD_BTC_WL_PORT_ID(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 4, __Value)
|
||||
@@ -547,6 +650,11 @@ s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_SSID_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 8, __Value)
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
|
||||
/* _GPIO_CUSTOM_CMD_0x89 */
|
||||
#define SET_H2CCMD_CUSTOMERID(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
#define SET_H2CCMD_SPECIAL_WAKE_REASON(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
|
||||
#define SET_H2CCMD_CUSTOM_WAKE_REASON(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 1, __Value)
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
/* P2P_RsvdPage_0x8a */
|
||||
#define SET_H2CCMD_RSVDPAGE_LOC_P2P_BCN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
@@ -568,6 +676,33 @@ s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
#define SET_H2CCMD_LPSPG_IQK_INFO_LOC(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd) + 3, 0, 8, __Value)/*Loc_IQK_result*/
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RTL8822C) && defined(CONFIG_SUPPORT_DYNAMIC_TXPWR)
|
||||
#define SET_H2CCMD_FW_CRC5_SEARCH_EN(cmd, v) \
|
||||
SET_BITS_TO_LE_1BYTE((cmd), 0, 1, (v));
|
||||
#define SET_H2CCMD_FW_CRC5_SEARCH_MACID(cmd, v) \
|
||||
SET_BITS_TO_LE_1BYTE((cmd), 1, 7, (v));
|
||||
#define SET_H2CCMD_FW_CRC5_SEARCH_MAC(cmd, mac) \
|
||||
do { \
|
||||
int __offset = 0; \
|
||||
for (__offset = 0; __offset < ETH_ALEN; __offset++) \
|
||||
SET_BITS_TO_LE_1BYTE((u8 *)(cmd + __offset), 0, 8, *((u8 *)(mac + __offset))); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
/* WarOffload_Info_0x8D */
|
||||
#define SET_H2CCMD_WAR_CFG_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
|
||||
#define SET_H2CCMD_WAR_CFG_ARP_RSP_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
|
||||
#define SET_H2CCMD_WAR_CFG_MDNSV4_RSP_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 2, 1, __Value)
|
||||
#define SET_H2CCMD_WAR_CFG_MDNSV6_RSP_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 3, 1, __Value)
|
||||
#define SET_H2CCMD_WAR_CFG_MDNSV4_WAKE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 6, 1, __Value)
|
||||
#define SET_H2CCMD_WAR_CFG_MDNSV6_WAKE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 7, 1, __Value)
|
||||
|
||||
/* H2C_WAROFLD_RSVDPAGE1 */
|
||||
#define SET_H2CCMD_WAROFLD_RSVDPAGE1_LOC_PARM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 0, 8, __Value)
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
|
||||
/* BT_UNKNOWN_DEVICE_WA_0xD1 */
|
||||
#define SET_H2CCMD_BT_UNKNOWN_DEVICE_WA_HANG_CHK_EN(__pH2CCmd, __Value) \
|
||||
SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
|
||||
@@ -619,6 +754,18 @@ typedef struct _RSVDPAGE_LOC {
|
||||
u8 LocSSIDInfo;
|
||||
u8 LocProbePacket;
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
u8 LocKeepAlive;
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
u8 LocIpParm;
|
||||
#if defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6)
|
||||
u8 LocMdnsPara;
|
||||
u8 LocMdnsv4;
|
||||
u8 LocMdnsv6;
|
||||
#endif /* defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6) */
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
u8 LocApOffloadBCN;
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
@@ -649,7 +796,9 @@ void rsvd_page_cache_free_data(struct rsvd_page_cache_t *cache);
|
||||
void rsvd_page_cache_free(struct rsvd_page_cache_t *cache);
|
||||
|
||||
#endif
|
||||
#ifdef CONFIG_WOWLAN
|
||||
void dump_TX_FIFO(PADAPTER padapter, u8 page_num, u16 page_size);
|
||||
#endif
|
||||
u8 rtw_hal_set_fw_media_status_cmd(_adapter *adapter, u8 mstatus, u8 macid);
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
/* WOW command function */
|
||||
|
||||
@@ -87,10 +87,7 @@ PHY_GetRateValuesOfTxPowerByRate(
|
||||
u8 *RateNum
|
||||
);
|
||||
|
||||
u8
|
||||
PHY_GetRateIndexOfTxPowerByRate(
|
||||
u8 Rate
|
||||
);
|
||||
u8 phy_get_rate_idx_of_txpwr_by_rate(enum MGN_RATE rate);
|
||||
|
||||
void
|
||||
phy_set_tx_power_index_by_rate_section(
|
||||
@@ -100,31 +97,16 @@ phy_set_tx_power_index_by_rate_section(
|
||||
u8 RateSection
|
||||
);
|
||||
|
||||
s8
|
||||
_PHY_GetTxPowerByRate(
|
||||
PADAPTER pAdapter,
|
||||
u8 Band,
|
||||
enum rf_path RFPath,
|
||||
u8 RateIndex
|
||||
);
|
||||
s8 phy_get_txpwr_by_rate(_adapter *adapter
|
||||
, BAND_TYPE band, enum rf_path rfpath, RATE_SECTION rs, enum MGN_RATE rate);
|
||||
|
||||
s8
|
||||
PHY_GetTxPowerByRate(
|
||||
PADAPTER pAdapter,
|
||||
u8 Band,
|
||||
enum rf_path RFPath,
|
||||
RATE_SECTION rs,
|
||||
enum MGN_RATE rate
|
||||
);
|
||||
s16 phy_get_txpwr_by_rate_single_mbm(_adapter *adapter
|
||||
, BAND_TYPE band, enum rf_path rfpath, RATE_SECTION rs, enum MGN_RATE rate, bool eirp);
|
||||
s16 phy_get_txpwr_by_rate_total_mbm(_adapter *adapter
|
||||
, BAND_TYPE band, RATE_SECTION rs, enum MGN_RATE rate, bool cap, bool eirp);
|
||||
|
||||
void
|
||||
PHY_SetTxPowerByRate(
|
||||
PADAPTER pAdapter,
|
||||
u8 Band,
|
||||
enum rf_path RFPath,
|
||||
u8 Rate,
|
||||
s8 Value
|
||||
);
|
||||
s16 phy_get_txpwr_by_rate_single_max_mbm(_adapter *adapter, BAND_TYPE band, enum rf_path rfpath, bool eirp);
|
||||
s16 phy_get_txpwr_by_rate_total_max_mbm(_adapter *adapter, BAND_TYPE band, bool cap, bool eirp);
|
||||
|
||||
void
|
||||
phy_set_tx_power_level_by_path(
|
||||
@@ -178,16 +160,19 @@ s8 phy_get_txpwr_lmt_diff(_adapter *adapter
|
||||
s8 phy_get_txpwr_lmt_sub_chs(_adapter *adapter
|
||||
, const char *regd_name
|
||||
, BAND_TYPE band, enum channel_width bw
|
||||
, u8 rfpath, u8 rate, u8 ntx_idx, u8 cch, u8 opch
|
||||
, u8 rfpath, u8 rate, u8 ntx_idx, u8 cch, u8 opch, bool reg_max
|
||||
);
|
||||
#else
|
||||
#define phy_get_txpwr_lmt(adapter, regd_name, band, bw, tlrs, ntx_idx, cch, lock) (GET_HAL_SPEC(adapter)->txgi_max)
|
||||
#define phy_get_txpwr_lmt_diff(adapter, regd_name, band, bw, rfpath, rs, tlrs, ntx_idx, cch, lock) (GET_HAL_SPEC(adapter)->txgi_max)
|
||||
#define phy_get_txpwr_lmt_sub_chs(adapter, regd_name, band, bw, rfpath, rate, ntx_idx, cch, opch) (GET_HAL_SPEC(adapter)->txgi_max)
|
||||
#define phy_get_txpwr_lmt_sub_chs(adapter, regd_name, band, bw, rfpath, rate, ntx_idx, cch, opch, reg_max) (GET_HAL_SPEC(adapter)->txgi_max)
|
||||
#endif /* CONFIG_TXPWR_LIMIT */
|
||||
|
||||
void dump_txpwr_tpc_settings(void *sel, _adapter *adapter);
|
||||
void dump_txpwr_antenna_gain(void *sel, _adapter *adapter);
|
||||
|
||||
s8 phy_get_txpwr_target(_adapter *adapter, u8 rfpath, RATE_SECTION rs, u8 rate, u8 ntx_idx
|
||||
, enum channel_width bw, BAND_TYPE band, u8 cch, u8 opch, struct txpwr_idx_comp *tic);
|
||||
, enum channel_width bw, BAND_TYPE band, u8 cch, u8 opch, bool reg_max, struct txpwr_idx_comp *tic);
|
||||
s8 phy_get_txpwr_amends(_adapter *adapter, u8 rfpath, RATE_SECTION rs, u8 rate, u8 ntx_idx
|
||||
, enum channel_width bw, BAND_TYPE band, u8 cch, struct txpwr_idx_comp *tic);
|
||||
#ifdef CONFIG_TXPWR_PG_WITH_TSSI_OFFSET
|
||||
@@ -199,14 +184,14 @@ u8 hal_com_get_txpwr_idx(_adapter *adapter, enum rf_path rfpath
|
||||
, struct txpwr_idx_comp *tic);
|
||||
|
||||
s16 phy_get_txpwr_single_mbm(_adapter *adapter, u8 rfpath, RATE_SECTION rs, u8 rate
|
||||
, enum channel_width bw, u8 cch, u8 opch, struct txpwr_idx_comp *tic);
|
||||
, enum channel_width bw, u8 cch, u8 opch, bool reg_max, bool eirp, struct txpwr_idx_comp *tic);
|
||||
s16 phy_get_txpwr_total_mbm(_adapter *adapter, RATE_SECTION rs, u8 rate
|
||||
, enum channel_width bw, u8 cch, u8 opch, struct txpwr_idx_comp *tic);
|
||||
, enum channel_width bw, u8 cch, u8 opch, bool reg_max, bool eirp, struct txpwr_idx_comp *tic);
|
||||
|
||||
s16 phy_get_txpwr_single_max_mbm(_adapter *adapter, u8 rfpath
|
||||
, enum channel_width bw, u8 cch, u8 opch, u16 bmp_cck_ofdm, u32 bmp_ht, u64 bmp_vht);
|
||||
, enum channel_width bw, u8 cch, u8 opch, u16 bmp_cck_ofdm, u32 bmp_ht, u64 bmp_vht, bool reg_max, bool eirp);
|
||||
s16 phy_get_txpwr_total_max_mbm(_adapter *adapter
|
||||
, enum channel_width bw, u8 cch, u8 opch, u16 bmp_cck_ofdm, u32 bmp_ht, u64 bmp_vht);
|
||||
, enum channel_width bw, u8 cch, u8 opch, u16 bmp_cck_ofdm, u32 bmp_ht, u64 bmp_vht, bool reg_max, bool eirp);
|
||||
|
||||
s8
|
||||
phy_get_tx_power_final_absolute_value(_adapter *adapter, u8 rfpath, u8 rate,
|
||||
@@ -229,8 +214,10 @@ struct txpwr_idx_comp {
|
||||
s8 btc;
|
||||
s8 extra;
|
||||
s8 utarget;
|
||||
s8 limit;
|
||||
s8 ulimit;
|
||||
s8 rlimit; /* regulatory limit w/o HAL consideration */
|
||||
s8 limit; /* limit from RTK private (regulatory limit w/ HAL consideration) */
|
||||
s8 ulimit; /* user limit */
|
||||
s8 tpc;
|
||||
|
||||
/* for amends */
|
||||
s8 tpt;
|
||||
@@ -263,6 +250,7 @@ bool phy_is_txpwr_user_target_specified(_adapter *adapter);
|
||||
|
||||
void dump_tx_power_index_inline(void *sel, _adapter *adapter, u8 rfpath
|
||||
, enum channel_width bw, u8 cch, enum MGN_RATE rate, u8 pwr_idx, struct txpwr_idx_comp *tic);
|
||||
#ifdef CONFIG_PROC_DEBUG
|
||||
void dump_tx_power_idx_title(void *sel, _adapter *adapter
|
||||
, enum channel_width bw, u8 cch, u8 opch);
|
||||
void dump_tx_power_idx_by_path_rs(void *sel, _adapter *adapter, u8 rfpath
|
||||
@@ -275,6 +263,7 @@ void dump_txpwr_total_dbm_by_rs(void *sel, _adapter *adapter, u8 rs
|
||||
, enum channel_width bw, u8 cch, u8 opch);
|
||||
void dump_txpwr_total_dbm(void *sel, _adapter *adapter
|
||||
, enum channel_width bw, u8 cch, u8 opch);
|
||||
#endif
|
||||
|
||||
bool phy_is_tx_power_limit_needed(_adapter *adapter);
|
||||
bool phy_is_tx_power_by_rate_needed(_adapter *adapter);
|
||||
@@ -299,9 +288,11 @@ void dump_hal_txpwr_info_5g(void *sel, _adapter *adapter, u8 rfpath_num, u8 max_
|
||||
void hal_load_txpwr_info(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROC_DEBUG
|
||||
void dump_tx_power_ext_info(void *sel, _adapter *adapter);
|
||||
void dump_target_tx_power(void *sel, _adapter *adapter);
|
||||
void dump_tx_power_by_rate(void *sel, _adapter *adapter);
|
||||
#endif
|
||||
|
||||
int rtw_get_phy_file_path(_adapter *adapter, const char *file_name);
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
/* 8188E PKT_BUFF_ACCESS_CTRL value */
|
||||
#define TXPKT_BUF_SELECT 0x69
|
||||
#define TXREPORT_BUF_SELECT 0x7F
|
||||
#define RXPKT_BUF_SELECT 0xA5
|
||||
#define TXREPORT_BUF_SELECT 0x7F
|
||||
#define DISABLE_TRXPKT_BUF_ACCESS 0x0
|
||||
|
||||
#ifndef RTW_HALMAC
|
||||
@@ -511,9 +511,12 @@
|
||||
#define REG_WLAN_ACT_MASK_CTRL_1 0x076C
|
||||
|
||||
/* GPIO Control */
|
||||
#define REG_SW_GPIO_SHARE_CTRL 0x1038
|
||||
#define REG_SW_GPIO_SHARE_CTRL_0 0x1038
|
||||
#define REG_SW_GPIO_SHARE_CTRL_1 0x103C
|
||||
#define REG_SW_GPIO_A_OUT 0x1040
|
||||
#define REG_SW_GPIO_A_OEN 0x1044
|
||||
#define REG_SW_GPIO_B_OEN 0x1058
|
||||
#define REG_SW_GPIO_B_OUT 0x105C
|
||||
|
||||
/* Hardware Port 2 */
|
||||
#define REG_MACID2 0x1620
|
||||
@@ -1253,10 +1256,14 @@ Current IOREG MAP
|
||||
/* 2 REG_LED_CFG (Offset 0x004C) */
|
||||
#define BIT_SW_SPDT_SEL BIT(22)
|
||||
|
||||
/* 2 REG_SW_GPIO_SHARE_CTRL (Offset 0x1038) */
|
||||
/* 2 REG_SW_GPIO_SHARE_CTRL_0 (Offset 0x1038) */
|
||||
#define BIT_BTGP_WAKE_LOC (BIT(10) | BIT(11))
|
||||
#define BIT_SW_GPIO_FUNC BIT(0)
|
||||
|
||||
/* 2 REG_SW_GPIO_SHARE_CTRL_1 (Offset 0x103C) */
|
||||
#define BIT_WLMAC_DBG_LOC (BIT(9) | BIT(10))
|
||||
#define BIT_WL_GPIO_SEL (BIT(30) | BIT(31))
|
||||
|
||||
/* 2 8051FWDL
|
||||
* 2 MCUFWDL */
|
||||
#define MCUFWDL_EN BIT(0)
|
||||
@@ -1865,6 +1872,7 @@ Current IOREG MAP
|
||||
#define LAST_ENTRY_OF_TX_PKT_BUFFER_8723D 255
|
||||
#define LAST_ENTRY_OF_TX_PKT_BUFFER_8710B 255
|
||||
#define LAST_ENTRY_OF_TX_PKT_BUFFER_8192F 255
|
||||
#define LAST_ENTRY_OF_TX_PKT_BUFFER_8723F 255
|
||||
#define POLLING_LLT_THRESHOLD 20
|
||||
#if defined(CONFIG_RTL8723B) && defined(CONFIG_PCI_HCI)
|
||||
#define POLLING_READY_TIMEOUT_COUNT 6000
|
||||
|
||||
26
include/hal_data.h
Executable file → Normal file
26
include/hal_data.h
Executable file → Normal file
@@ -224,6 +224,7 @@ struct hal_spec_t {
|
||||
|
||||
u8 sec_cam_ent_num;
|
||||
u8 sec_cap;
|
||||
u8 wow_cap;
|
||||
u8 macid_cap;
|
||||
u16 macid_txrpt;
|
||||
u8 macid_txrpt_pgsz;
|
||||
@@ -231,6 +232,8 @@ struct hal_spec_t {
|
||||
u8 rfpath_num_2g:4; /* used for tx power index path */
|
||||
u8 rfpath_num_5g:4; /* used for tx power index path */
|
||||
u8 rf_reg_path_num;
|
||||
u8 rf_reg_path_avail_num;
|
||||
u8 rf_reg_trx_path_bmp; /* [7:4]TX path bmp, [0:3]RX path bmp */
|
||||
u8 max_tx_cnt;
|
||||
|
||||
u8 tx_nss_num:4;
|
||||
@@ -246,9 +249,7 @@ struct hal_spec_t {
|
||||
|
||||
u8 wl_func; /* value of WL_FUNC_XXX */
|
||||
|
||||
#if CONFIG_TX_AC_LIFETIME
|
||||
u8 tx_aclt_unit_factor; /* how many 32us */
|
||||
#endif
|
||||
|
||||
u8 rx_tsf_filter:1;
|
||||
|
||||
@@ -370,7 +371,6 @@ typedef struct hal_com_data {
|
||||
WIRELESS_MODE CurrentWirelessMode;
|
||||
enum channel_width current_channel_bw;
|
||||
BAND_TYPE current_band_type; /* 0:2.4G, 1:5G */
|
||||
BAND_TYPE BandSet;
|
||||
u8 current_channel;
|
||||
u8 cch_20;
|
||||
u8 cch_40;
|
||||
@@ -382,7 +382,9 @@ typedef struct hal_com_data {
|
||||
u8 bDisableSWChannelPlan; /* flag of disable software change channel plan */
|
||||
u16 BasicRateSet;
|
||||
u32 ReceiveConfig;
|
||||
u32 rcr_backup; /* used for switching back from monitor mode */
|
||||
#ifdef CONFIG_WIFI_MONITOR
|
||||
struct mon_reg_backup mon_backup; /* used for switching back from monitor mode */
|
||||
#endif /* CONFIG_WIFI_MONITOR */
|
||||
u8 rx_tsf_addr_filter_config; /* for 8822B/8821C USE */
|
||||
BOOLEAN bSwChnl;
|
||||
BOOLEAN bSetChnlBW;
|
||||
@@ -406,6 +408,7 @@ typedef struct hal_com_data {
|
||||
u8 max_tx_cnt;
|
||||
u8 tx_nss; /*tx Spatial Streams - GET_HAL_TX_NSS*/
|
||||
u8 rx_nss; /*rx Spatial Streams - GET_HAL_RX_NSS*/
|
||||
u8 txpath_cap_num_nss[4]; /* capable path num for NSS TX, [0] for 1SS, [3] for 4SS */
|
||||
|
||||
u8 PackageType;
|
||||
u8 antenna_test;
|
||||
@@ -522,10 +525,18 @@ typedef struct hal_com_data {
|
||||
u8 target_txpwr_5g[TX_PWR_BY_RATE_NUM_RF]
|
||||
[NUM_OF_TARGET_TXPWR_5G];
|
||||
|
||||
#if defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8822C) || defined(CONFIG_RTL8814B)
|
||||
bool set_entire_txpwr;
|
||||
|
||||
#if defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8822C) || defined(CONFIG_RTL8814B) \
|
||||
|| defined(CONFIG_RTL8723F)
|
||||
u32 txagc_set_buf;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FW_OFFLOAD_SET_TXPWR_IDX
|
||||
u8 txpwr_idx_offload_buf[3]; /* for CCK, OFDM, HT1SS */
|
||||
struct submit_ctx txpwr_idx_offload_sctx;
|
||||
#endif
|
||||
|
||||
u8 txpwr_by_rate_loaded:1;
|
||||
u8 txpwr_by_rate_from_file:1;
|
||||
u8 txpwr_limit_loaded:1;
|
||||
@@ -585,6 +596,7 @@ typedef struct hal_com_data {
|
||||
u8 neediqk_24g;
|
||||
u8 IQK_MP_Switch;
|
||||
u8 bScanInProcess;
|
||||
u8 phydm_init_result; /*BB and RF para match or not*/
|
||||
/******** PHY DM & DM Section **********/
|
||||
|
||||
|
||||
@@ -621,6 +633,8 @@ typedef struct hal_com_data {
|
||||
u8 rxagg_dma_timeout;
|
||||
#endif /* RTW_RX_AGGREGATION */
|
||||
|
||||
bool intf_start;
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
/* */
|
||||
/* For SDIO Interface HAL related */
|
||||
@@ -658,7 +672,7 @@ typedef struct hal_com_data {
|
||||
/* SDIO Rx FIFO related. */
|
||||
/* */
|
||||
u8 SdioRxFIFOCnt;
|
||||
#ifdef CONFIG_RTL8822C
|
||||
#if defined (CONFIG_RTL8822C) || defined (CONFIG_RTL8192F)
|
||||
u32 SdioRxFIFOSize;
|
||||
#else
|
||||
u16 SdioRxFIFOSize;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define RTL8821A_SUPPORT 0
|
||||
#define RTL8723B_SUPPORT 0
|
||||
#define RTL8723D_SUPPORT 0
|
||||
#define RTL8723F_SUPPORT 0
|
||||
#define RTL8192E_SUPPORT 0
|
||||
#define RTL8192F_SUPPORT 0
|
||||
#define RTL8814A_SUPPORT 0
|
||||
@@ -138,6 +139,8 @@
|
||||
#ifndef CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#define CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#endif
|
||||
#define CONFIG_STOP_RESUME_BCN_BY_TXPAUSE /*to fixed no bcn issue*/
|
||||
#define CONFIG_TSF_SYNC
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8723B
|
||||
@@ -242,6 +245,10 @@
|
||||
#ifndef CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#define CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_HCI) && !defined(CONFIG_FW_OFFLOAD_SET_TXPWR_IDX)
|
||||
#define CONFIG_FW_OFFLOAD_SET_TXPWR_IDX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8822B
|
||||
@@ -367,9 +374,15 @@
|
||||
#define RTW_BEAMFORMING_VERSION_2
|
||||
#endif /* CONFIG_BEAMFORMING */
|
||||
|
||||
#ifndef CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#define CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#endif /* CONFIG_RTW_MAC_HIDDEN_RPT */
|
||||
#ifdef CONFIG_NO_FW
|
||||
#ifdef CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#undef CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#endif
|
||||
#else
|
||||
#ifndef CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#define CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DBG_RX_DFRAME_RAW_DATA
|
||||
#define DBG_RX_DFRAME_RAW_DATA
|
||||
@@ -382,6 +395,7 @@
|
||||
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
#define CONFIG_MCC_MODE_V2
|
||||
#define CONFIG_MCC_PHYDM_OFFLOAD
|
||||
#endif /* CONFIG_MCC_MODE */
|
||||
|
||||
#if defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)
|
||||
@@ -426,6 +440,10 @@
|
||||
#ifndef CONFIG_TXPWR_PG_WITH_TSSI_OFFSET
|
||||
#define CONFIG_TXPWR_PG_WITH_TSSI_OFFSET
|
||||
#endif
|
||||
|
||||
#define CONFIG_RTL8822C_XCAP_NEW_POLICY
|
||||
|
||||
#define CONFIG_SUPPORT_DYNAMIC_TXPWR
|
||||
#endif /* CONFIG_RTL8822C */
|
||||
|
||||
#ifdef CONFIG_RTL8821C
|
||||
@@ -475,6 +493,8 @@
|
||||
#ifndef CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#define CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#endif
|
||||
|
||||
#define CONFIG_BT_EFUSE_MASK
|
||||
#endif /*CONFIG_RTL8821C*/
|
||||
|
||||
#ifdef CONFIG_RTL8710B
|
||||
@@ -513,7 +533,6 @@
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
/*#define CONFIG_AP_PORT_SWAP*/
|
||||
#define CONFIG_FW_MULTI_PORT_SUPPORT
|
||||
#define CONFIG_SUPPORT_AP_PORT1
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
/*
|
||||
@@ -579,7 +598,7 @@
|
||||
#define CONFIG_RTW_TX_NPATH_EN /* 8814B is always 4TX */
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
/* #define CONFIG_LPS_ACK */ /* Supported after FW v04 */
|
||||
#define CONFIG_LPS_ACK /* Supported after FW v04 */
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
@@ -589,5 +608,106 @@
|
||||
#define CONFIG_TXPWR_PG_WITH_TSSI_OFFSET
|
||||
#endif
|
||||
#endif /* CONFIG_RTL8814B */
|
||||
#ifdef CONFIG_RTL8723F
|
||||
#undef RTL8723F_SUPPORT
|
||||
#define RTL8723F_SUPPORT 1
|
||||
|
||||
/* Use HALMAC architecture, necessary for 8723F */
|
||||
#define RTW_HALMAC
|
||||
|
||||
/*#define DBG_LA_MODE*/
|
||||
|
||||
#ifndef CONFIG_FW_C2H_PKT
|
||||
#define CONFIG_FW_C2H_PKT
|
||||
#endif /* CONFIG_FW_C2H_PKT */
|
||||
|
||||
#define RTW_TX_PA_BIAS /* Adjust TX PA Bias from eFuse */
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
#define CONFIG_WOW_PATTERN_IN_TXFIFO
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
#define CONFIG_GTK_OL
|
||||
/*#define CONFIG_ARP_KEEP_ALIVE*/
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
#ifndef WAKEUP_GPIO_IDX
|
||||
#define WAKEUP_GPIO_IDX 12 /* WIFI Chip Side */
|
||||
#endif /* !WAKEUP_GPIO_IDX */
|
||||
#endif /* CONFIG_GPIO_WAKEUP */
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#define CONFIG_AP_PORT_SWAP
|
||||
#define CONFIG_FW_MULTI_PORT_SUPPORT
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
#ifdef CONFIG_NO_FW
|
||||
#ifdef CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#undef CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#endif
|
||||
#else
|
||||
#ifndef CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#define CONFIG_RTW_MAC_HIDDEN_RPT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DBG_RX_DFRAME_RAW_DATA
|
||||
#define DBG_RX_DFRAME_RAW_DATA
|
||||
#endif /* DBG_RX_DFRAME_RAW_DATA */
|
||||
|
||||
/*#define RTW_IQK_FW_OFFLOAD*/
|
||||
#define CONFIG_ADVANCE_OTA
|
||||
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
#define CONFIG_MCC_MODE_V2
|
||||
#define CONFIG_MCC_PHYDM_OFFLOAD
|
||||
#endif /* CONFIG_MCC_MODE */
|
||||
|
||||
#if defined(CONFIG_TDLS) && defined(CONFIG_TDLS_CH_SW)
|
||||
#define CONFIG_TDLS_CH_SW_V2
|
||||
#endif
|
||||
|
||||
#ifndef RTW_CHANNEL_SWITCH_OFFLOAD
|
||||
#ifdef CONFIG_TDLS_CH_SW_V2
|
||||
#define RTW_CHANNEL_SWITCH_OFFLOAD
|
||||
#endif
|
||||
#endif /* RTW_CHANNEL_SWITCH_OFFLOAD */
|
||||
|
||||
#if defined(CONFIG_RTW_MESH) && !defined(RTW_PER_CMD_SUPPORT_FW)
|
||||
/* Supported since fw v22.1 */
|
||||
#define RTW_PER_CMD_SUPPORT_FW
|
||||
#endif /* RTW_PER_CMD_SUPPORT_FW */
|
||||
#define CONFIG_SUPPORT_FIFO_DUMP
|
||||
#define CONFIG_HW_P0_TSF_SYNC
|
||||
#define CONFIG_BCN_RECV_TIME
|
||||
|
||||
/*#define CONFIG_TCP_CSUM_OFFLOAD_TX*/
|
||||
#if defined(CONFIG_TCP_CSUM_OFFLOAD_TX) && !defined(CONFIG_RTW_NETIF_SG)
|
||||
#define CONFIG_RTW_NETIF_SG
|
||||
#endif
|
||||
#define CONFIG_TCP_CSUM_OFFLOAD_RX
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
#define CONFIG_P2P_PS_NOA_USE_MACID_SLEEP
|
||||
#endif
|
||||
|
||||
#define CONFIG_RTS_FULL_BW
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
#define CONFIG_LPS_ACK
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#define CONFIG_TXPWR_PG_WITH_PWR_IDX
|
||||
#endif
|
||||
#ifndef CONFIG_TXPWR_PG_WITH_TSSI_OFFSET
|
||||
#define CONFIG_TXPWR_PG_WITH_TSSI_OFFSET
|
||||
#endif
|
||||
|
||||
#define CONFIG_BT_EFUSE_MASK
|
||||
|
||||
#define CONFIG_WRITE_BCN_LEN_TO_FW
|
||||
#endif /* CONFIG_RTL8723F */
|
||||
#endif /*__HAL_IC_CFG_H__*/
|
||||
|
||||
@@ -42,6 +42,7 @@ enum _CHIP_TYPE {
|
||||
RTL8192F,
|
||||
RTL8822C,
|
||||
RTL8814B,
|
||||
RTL8723F,
|
||||
MAX_CHIP_TYPE
|
||||
};
|
||||
|
||||
@@ -108,6 +109,7 @@ typedef enum _HW_VARIABLES {
|
||||
HW_VAR_SET_RPWM,
|
||||
HW_VAR_CPWM,
|
||||
HW_VAR_H2C_FW_PWRMODE,
|
||||
HW_VAR_H2C_FW_PWRMODE_RFON_CTRL,
|
||||
HW_VAR_H2C_INACTIVE_IPS,
|
||||
HW_VAR_H2C_PS_TUNE_PARAM,
|
||||
HW_VAR_H2C_FW_JOINBSSRPT,
|
||||
@@ -197,11 +199,8 @@ typedef enum _HW_VARIABLES {
|
||||
HW_VAR_MDIO,
|
||||
HW_VAR_L1OFF_CAPABILITY,
|
||||
HW_VAR_L1OFF_NIC_SUPPORT,
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
HW_VAR_TDLS_BCN_EARLY_C2H_RPT,
|
||||
#endif
|
||||
#endif
|
||||
HW_VAR_BCN_EARLY_C2H_RPT,
|
||||
HW_VAR_SET_DRV_ERLY_INT,
|
||||
HW_VAR_DUMP_MAC_TXFIFO,
|
||||
HW_VAR_PWR_CMD,
|
||||
#ifdef CONFIG_FW_HANDLE_TXBCN
|
||||
@@ -211,12 +210,16 @@ typedef enum _HW_VARIABLES {
|
||||
HW_VAR_ENABLE_RX_BAR,
|
||||
HW_VAR_TSF_AUTO_SYNC,
|
||||
HW_VAR_LPS_STATE_CHK,
|
||||
HW_VAR_LPS_RFON_CHK,
|
||||
#ifdef CONFIG_RTS_FULL_BW
|
||||
HW_VAR_SET_RTS_BW,
|
||||
#endif
|
||||
#if defined(CONFIG_PCI_HCI)
|
||||
HW_VAR_ENSWBCN,
|
||||
#endif
|
||||
#ifdef CONFIG_WOWLAN
|
||||
HW_VAR_VENDOR_WOW_MODE,
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
} HW_VARIABLES;
|
||||
|
||||
typedef enum _HAL_DEF_VARIABLE {
|
||||
@@ -300,7 +303,13 @@ struct hal_ops {
|
||||
* mgnt_xmit should be implemented to run in interrupt context
|
||||
*/
|
||||
s32(*mgnt_xmit)(_adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32(*hal_mgmt_xmitframe_enqueue)(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32(*hal_xmitframe_enqueue)(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#if defined (CONFIG_CONCURRENT_MODE) && defined (CONFIG_TSF_SYNC)
|
||||
void(*tsf_sync)(_adapter *Adapter);
|
||||
#endif
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
s32(*xmit_thread_handler)(_adapter *padapter);
|
||||
#endif
|
||||
@@ -518,6 +527,8 @@ typedef enum _HARDWARE_TYPE {
|
||||
HARDWARE_TYPE_RTL8814BE,
|
||||
HARDWARE_TYPE_RTL8814BU,
|
||||
HARDWARE_TYPE_RTL8814BS,
|
||||
HARDWARE_TYPE_RTL8723FU,
|
||||
HARDWARE_TYPE_RTL8723FS,
|
||||
HARDWARE_TYPE_MAX,
|
||||
} HARDWARE_TYPE;
|
||||
|
||||
@@ -650,6 +661,11 @@ typedef enum _HARDWARE_TYPE {
|
||||
#define IS_HARDWARE_TYPE_8814B(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_8814BE(_Adapter) || IS_HARDWARE_TYPE_8814BU(_Adapter) || IS_HARDWARE_TYPE_8814BS(_Adapter))
|
||||
|
||||
#define IS_HARDWARE_TYPE_8723FU(_Adapter) (rtw_get_hw_type(_Adapter) == HARDWARE_TYPE_RTL8723FU)
|
||||
#define IS_HARDWARE_TYPE_8723FS(_Adapter) (rtw_get_hw_type(_Adapter) == HARDWARE_TYPE_RTL8723FS)
|
||||
#define IS_HARDWARE_TYPE_8723F(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_8723FU(_Adapter) || IS_HARDWARE_TYPE_8723FS(_Adapter))
|
||||
|
||||
#define IS_HARDWARE_TYPE_JAGUAR2(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_8814A(_Adapter) || IS_HARDWARE_TYPE_8821B(_Adapter) || IS_HARDWARE_TYPE_8822B(_Adapter) || IS_HARDWARE_TYPE_8821C(_Adapter))
|
||||
|
||||
@@ -659,6 +675,8 @@ typedef enum _HARDWARE_TYPE {
|
||||
#define IS_HARDWARE_TYPE_JAGUAR3(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_8814B(_Adapter) || IS_HARDWARE_TYPE_8822C(_Adapter))
|
||||
|
||||
#define IS_HARDWARE_TYPE_JAGUAR3_11N(_Adapter) IS_HARDWARE_TYPE_8723F(_Adapter)
|
||||
|
||||
#define IS_HARDWARE_TYPE_JAGUAR_ALL(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_JAGUAR_AND_JAGUAR2(_Adapter) || IS_HARDWARE_TYPE_JAGUAR3(_Adapter))
|
||||
|
||||
@@ -741,6 +759,9 @@ u8 rtw_hal_pci_l1off_capability(_adapter *padapter);
|
||||
|
||||
u8 rtw_hal_intf_ps_func(_adapter *padapter, HAL_INTF_PS_FUNC efunc_id, u8 *val);
|
||||
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtw_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtw_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtw_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
@@ -841,6 +862,7 @@ s32 rtw_hal_macid_sleep(_adapter *adapter, u8 macid);
|
||||
s32 rtw_hal_macid_wakeup(_adapter *adapter, u8 macid);
|
||||
s32 rtw_hal_macid_sleep_all_used(_adapter *adapter);
|
||||
s32 rtw_hal_macid_wakeup_all_used(_adapter *adapter);
|
||||
|
||||
s32 rtw_hal_macid_drop(_adapter *adapter, u8 macid);
|
||||
s32 rtw_hal_macid_undrop(_adapter *adapter, u8 macid);
|
||||
|
||||
|
||||
65
include/hal_pg.h
Executable file → Normal file
65
include/hal_pg.h
Executable file → Normal file
@@ -588,7 +588,7 @@
|
||||
*/
|
||||
#define EEPROM_TX_PWR_INX_8822C 0x10
|
||||
#define EEPROM_ChannelPlan_8822C 0xB8
|
||||
#define EEPROM_XTAL_8822C 0xB9
|
||||
#define EEPROM_XTAL_B9_8822C 0xB9
|
||||
#define EEPROM_IQK_LCK_8822C 0xBB
|
||||
#define EEPROM_2G_5G_PA_TYPE_8822C 0xBC
|
||||
/* PATH A & PATH B */
|
||||
@@ -612,6 +612,10 @@
|
||||
#define EEPROM_COUNTRY_CODE_8822C 0xCB
|
||||
#define EEPROM_THERMAL_METER_A_8822C 0xD0
|
||||
#define EEPROM_THERMAL_METER_B_8822C 0xD1
|
||||
|
||||
#define EEPROM_XTAL_110_8822C 0x110
|
||||
#define EEPROM_XTAL_111_8822C 0x111
|
||||
|
||||
/* RTL8822CU */
|
||||
#define EEPROM_MAC_ADDR_8822CU 0x157
|
||||
#define EEPROM_VID_8822CU 0x100
|
||||
@@ -705,14 +709,8 @@
|
||||
#define EEPROM_TX_PWR_INX_8814B 0x10
|
||||
#define EEPROM_ChannelPlan_8814B 0xB8
|
||||
#define EEPROM_XTAL_8814B 0xB9
|
||||
#define EEPROM_THERMAL_METER_8814B 0xBA
|
||||
#define EEPROM_IQK_LCK_8814B 0xBB
|
||||
|
||||
#define EEPROM_PA_TYPE_8814B 0xBC
|
||||
#define EEPROM_LNA_TYPE_AB_2G_8814B 0xBD
|
||||
#define EEPROM_LNA_TYPE_CD_2G_8814B 0xBE
|
||||
#define EEPROM_LNA_TYPE_AB_5G_8814B 0xBF
|
||||
#define EEPROM_LNA_TYPE_CD_5G_8814B 0xC0
|
||||
#define EEPROM_RF_BOARD_OPTION_8814B 0xC1
|
||||
#define EEPROM_RF_FEATURE_OPTION_8814B 0xC2
|
||||
#define EEPROM_RF_BT_SETTING_8814B 0xC3
|
||||
@@ -725,6 +723,11 @@
|
||||
#define EEPROM_RFE_OPTION_8814B 0xCA
|
||||
#define EEPROM_COUNTRY_CODE_8814B 0xCB
|
||||
|
||||
#define EEPROM_THERMAL_METER_A_8814B 0xD0
|
||||
#define EEPROM_THERMAL_METER_B_8814B 0xD1
|
||||
#define EEPROM_THERMAL_METER_C_8814B 0xD2
|
||||
#define EEPROM_THERMAL_METER_D_8814B 0xD3
|
||||
|
||||
#define EEPROM_MAC_ADDR_8814BE 0x120
|
||||
#define EEPROM_VID_8814B 0x126
|
||||
#define EEPROM_DID_8814B 0x128
|
||||
@@ -737,6 +740,47 @@
|
||||
#define EEPROM_PID_8814BU 0x152
|
||||
#define EEPROM_USB_OPTIONAL_FUNCTION0_8814BU 0x154
|
||||
|
||||
/*
|
||||
* ====================================================
|
||||
* EEPROM/Efuse PG Offset for 8723F
|
||||
* ====================================================
|
||||
*/
|
||||
#define EEPROM_TX_PWR_INX_8723F 0x10
|
||||
#define EEPROM_ChannelPlan_8723F 0xB8
|
||||
#define EEPROM_XTAL_B9_8723F 0xB9
|
||||
#define EEPROM_THERMAL_METER_8723F 0xBA
|
||||
#define EEPROM_IQK_LCK_8723F 0xBB
|
||||
#define EEPROM_2G_5G_PA_TYPE_8723F 0xBC
|
||||
/* PATH A & PATH B */
|
||||
#define EEPROM_2G_LNA_TYPE_GAIN_SEL_AB_8723F 0xBD
|
||||
/* PATH C & PATH D */
|
||||
#define EEPROM_2G_LNA_TYPE_GAIN_SEL_CD_8723F 0xBE
|
||||
/* PATH A & PATH B */
|
||||
#define EEPROM_5G_LNA_TYPE_GAIN_SEL_AB_8723F 0xBF
|
||||
/* PATH C & PATH D */
|
||||
#define EEPROM_5G_LNA_TYPE_GAIN_SEL_CD_8723F 0xC0
|
||||
|
||||
#define EEPROM_RF_BOARD_OPTION_8723F 0xC1
|
||||
#define EEPROM_FEATURE_OPTION_8723F 0xC2
|
||||
#define EEPROM_RF_BT_SETTING_8723F 0xC3
|
||||
#define EEPROM_VERSION_8723F 0xC4
|
||||
#define EEPROM_CustomID_8723F 0xC5
|
||||
#define EEPROM_TX_BBSWING_2G_8723F 0xC6
|
||||
#define EEPROM_TX_PWR_CALIBRATE_RATE_8723F 0xC8
|
||||
#define EEPROM_RF_ANTENNA_OPT_8723F 0xC9
|
||||
#define EEPROM_RFE_OPTION_8723F 0xCA
|
||||
#define EEPROM_COUNTRY_CODE_8723F 0xCB
|
||||
|
||||
/* RTL8723FU */
|
||||
#define EEPROM_MAC_ADDR_8723FU 0x108
|
||||
#define EEPROM_VID_8723FU 0x100
|
||||
#define EEPROM_PID_8723FU 0x102
|
||||
#define EEPROM_USB_OPTIONAL_FUNCTION0_8723FU 0x104
|
||||
#define EEPROM_USB_MODE_8723FU 0x03
|
||||
|
||||
/* RTL8723FS */
|
||||
#define EEPROM_MAC_ADDR_8723FS 0x11A
|
||||
|
||||
/* ****************************************************
|
||||
* EEPROM/Efuse Value Type
|
||||
* **************************************************** */
|
||||
@@ -792,6 +836,7 @@
|
||||
#define EEPROM_Default_ThermalMeter_8188GTV 0x18
|
||||
#define EEPROM_Default_ThermalMeter_8814A 0x18
|
||||
#define EEPROM_Default_ThermalMeter_8192F 0x1A
|
||||
#define EEPROM_Default_ThermalMeter_8814B 0x20
|
||||
|
||||
#define EEPROM_Default_CrystalCap 0x0
|
||||
#define EEPROM_Default_CrystalCap_8723A 0x20
|
||||
@@ -802,10 +847,13 @@
|
||||
#define EEPROM_Default_CrystalCap_8723B 0x20
|
||||
#define EEPROM_Default_CrystalCap_8703B 0x20
|
||||
#define EEPROM_Default_CrystalCap_8723D 0x20
|
||||
#define EEPROM_Default_CrystalCap_8723F 0x3F
|
||||
#define EEPROM_Default_CrystalCap_8188F 0x20
|
||||
#define EEPROM_Default_CrystalCap_8188GTV 0x20
|
||||
#define EEPROM_Default_CrystalCap_8192F 0x20
|
||||
#define EEPROM_Default_CrystalCap_8822C 0x3F
|
||||
#define EEPROM_Default_CrystalCap_B9_8822C 0x3F
|
||||
#define EEPROM_Default_CrystalCap_110_8822C 0x40
|
||||
#define EEPROM_Default_CrystalCap_111_8822C 0x40
|
||||
#define EEPROM_Default_CrystalCap_8814B 0x40
|
||||
#define EEPROM_Default_CrystalFreq 0x0
|
||||
#define EEPROM_Default_TxPowerLevel_92C 0x22
|
||||
@@ -937,6 +985,7 @@ typedef enum _BT_CoType {
|
||||
BT_RTL8192F = 16,
|
||||
BT_RTL8822C = 17,
|
||||
BT_RTL8814B = 18,
|
||||
BT_RTL8723F = 19,
|
||||
} BT_CoType, *PBT_CoType;
|
||||
|
||||
typedef enum _BT_RadioShared {
|
||||
|
||||
@@ -30,9 +30,9 @@ u32 rtw_hal_get_sdio_tx_max_length(PADAPTER padapter, u8 queue_idx);
|
||||
bool sdio_power_on_check(PADAPTER padapter);
|
||||
|
||||
#ifdef CONFIG_SDIO_TX_ENABLE_AVAL_INT
|
||||
#if defined(CONFIG_RTL8188F) || defined(CONFIG_RTL8821A)
|
||||
#if defined(CONFIG_RTL8188F) || defined(CONFIG_RTL8188GTV) ||defined(CONFIG_RTL8188E) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8192F) || defined(CONFIG_RTL8723D)
|
||||
void rtw_hal_sdio_avail_page_threshold_init(_adapter *adapter);
|
||||
void rtw_hal_sdio_avail_page_threshold_en(_adapter *adapter, u8 qidx);
|
||||
void rtw_hal_sdio_avail_page_threshold_en(_adapter *adapter, u8 qidx, u8 pg_num);
|
||||
#endif
|
||||
#endif /* CONFIG_SDIO_TX_ENABLE_AVAL_INT */
|
||||
|
||||
@@ -40,7 +40,7 @@ void rtw_hal_sdio_avail_page_threshold_en(_adapter *adapter, u8 qidx);
|
||||
void sd_c2h_hisr_hdl(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RTL8188F) || defined (CONFIG_RTL8188GTV) || defined (CONFIG_RTL8192F)
|
||||
#if defined(CONFIG_RTL8188F) || defined (CONFIG_RTL8188GTV) || defined (CONFIG_RTL8192F) || defined(CONFIG_RTL8723D)
|
||||
#define SDIO_LOCAL_CMD_ADDR(addr) ((SDIO_LOCAL_DEVICE_ID << 13) | ((addr) & SDIO_LOCAL_MSK))
|
||||
#endif
|
||||
|
||||
@@ -81,4 +81,15 @@ void dbg_rtw_sdio_free_xmitbuf_sema_down(struct xmit_priv *xmit, const char *cal
|
||||
#endif /* SDIO_FREE_XMIT_BUF_SEMA */
|
||||
#endif /* !CONFIG_SDIO_TX_TASKLET */
|
||||
|
||||
s32 sdio_initrecvbuf(struct recv_buf *recvbuf, _adapter *adapter);
|
||||
void sdio_freerecvbuf(struct recv_buf *recvbuf);
|
||||
|
||||
#ifdef CONFIG_SDIO_RECVBUF_PWAIT
|
||||
void dump_recvbuf_pwait_conf(void *sel, struct recv_priv *recvpriv);
|
||||
#ifdef CONFIG_SDIO_RECVBUF_PWAIT_RUNTIME_ADJUST
|
||||
int recvbuf_pwait_config_req(struct recv_priv *recvpriv, enum rtw_pwait_type type, s32 time, s32 cnt_lmt);
|
||||
int recvbuf_pwait_config_hdl(struct recv_priv *recvpriv, struct recv_buf *rbuf);
|
||||
#endif /* CONFIG_SDIO_RECVBUF_PWAIT_RUNTIME_ADJUST */
|
||||
#endif /* CONFIG_SDIO_RECVBUF_PWAIT */
|
||||
|
||||
#endif /* __HAL_SDIO_H_ */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
#define RTL_IOCTL_HOSTAPD (SIOCIWFIRSTPRIV + 28)
|
||||
#define RTL_IOCTL_HOSTAPD (SIOCDEVPRIVATE + 2)
|
||||
|
||||
/* RTL871X_IOCTL_HOSTAPD ioctl() cmd: */
|
||||
enum {
|
||||
@@ -55,6 +55,7 @@ enum {
|
||||
RTL871X_HOSTAPD_ACL_ADD_STA = 22,
|
||||
RTL871X_HOSTAPD_ACL_REMOVE_STA = 23,
|
||||
};
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
|
||||
/* STA flags */
|
||||
#define WLAN_STA_AUTH BIT(0)
|
||||
@@ -72,10 +73,11 @@ enum {
|
||||
#define WLAN_STA_WPS BIT(12)
|
||||
#define WLAN_STA_MAYBE_WPS BIT(13)
|
||||
#define WLAN_STA_VHT BIT(14)
|
||||
#define WLAN_STA_WDS BIT(15)
|
||||
#define WLAN_STA_MULTI_AP BIT(16)
|
||||
#define WLAN_STA_AMSDU_DISABLE BIT(17)
|
||||
#define WLAN_STA_NONERP BIT(31)
|
||||
|
||||
#endif
|
||||
|
||||
#define IEEE_CMD_SET_WPA_PARAM 1
|
||||
#define IEEE_CMD_SET_WPA_IE 2
|
||||
#define IEEE_CMD_SET_ENCRYPTION 3
|
||||
@@ -111,7 +113,13 @@ enum {
|
||||
#define WPA_CIPHER_WEP104 BIT(2)
|
||||
#define WPA_CIPHER_TKIP BIT(3)
|
||||
#define WPA_CIPHER_CCMP BIT(4)
|
||||
|
||||
#define WPA_CIPHER_GCMP BIT(5)
|
||||
#define WPA_CIPHER_GCMP_256 BIT(6)
|
||||
#define WPA_CIPHER_CCMP_256 BIT(7)
|
||||
#define WPA_CIPHER_BIP_CMAC_128 BIT(8)
|
||||
#define WPA_CIPHER_BIP_GMAC_128 BIT(9)
|
||||
#define WPA_CIPHER_BIP_GMAC_256 BIT(10)
|
||||
#define WPA_CIPHER_BIP_CMAC_256 BIT(11)
|
||||
|
||||
|
||||
#define WPA_SELECTOR_LEN 4
|
||||
@@ -125,6 +133,9 @@ extern u8 WPA_CIPHER_SUITE_WEP40[];
|
||||
extern u8 WPA_CIPHER_SUITE_TKIP[];
|
||||
extern u8 WPA_CIPHER_SUITE_WRAP[];
|
||||
extern u8 WPA_CIPHER_SUITE_CCMP[];
|
||||
extern u8 RSN_CIPHER_SUITE_GCMP[];
|
||||
extern u8 RSN_CIPHER_SUITE_GCMP_256[];
|
||||
extern u8 RSN_CIPHER_SUITE_CCMP_256[];
|
||||
extern u8 WPA_CIPHER_SUITE_WEP104[];
|
||||
|
||||
|
||||
@@ -490,12 +501,21 @@ struct rtw_ieee80211s_hdr {
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/* Some IEEE 802.11x packet types are corresponding to parsing_eapol_packet() */
|
||||
enum eap_type {
|
||||
EAP_PACKET = 0,
|
||||
NON_EAPOL,
|
||||
EAPOL_START,
|
||||
EAPOL_LOGOFF,
|
||||
EAPOL_KEY,
|
||||
EAPOL_ENCAP_ASF_ALERT
|
||||
EAPOL_ENCAP_ASF_ALERT,
|
||||
EAPOL_PACKET,
|
||||
EAPOL_WPA_GROUP_KEY_1_2,
|
||||
EAPOL_WPA_GROUP_KEY_2_2,
|
||||
EAPOL_1_4,
|
||||
EAPOL_2_4,
|
||||
EAPOL_3_4,
|
||||
EAPOL_4_4,
|
||||
};
|
||||
|
||||
#define IEEE80211_3ADDR_LEN 24
|
||||
@@ -665,6 +685,7 @@ struct ieee80211_snap_hdr {
|
||||
#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
|
||||
#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
|
||||
#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
|
||||
#define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23
|
||||
#define WLAN_REASON_MESH_PEER_CANCELED 52
|
||||
#define WLAN_REASON_MESH_MAX_PEERS 53
|
||||
#define WLAN_REASON_MESH_CONFIG 54
|
||||
@@ -740,6 +761,8 @@ struct ieee80211_snap_hdr {
|
||||
#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC)
|
||||
#define WLAN_EID_VHT_CAPABILITY 191
|
||||
#define WLAN_EID_VHT_OPERATION 192
|
||||
#define WLAN_EID_WIDE_BANDWIDTH_CHANNEL_SWITCH 194
|
||||
#define WLAN_EID_CHANNEL_SWITCH_WRAPPER 196
|
||||
#define WLAN_EID_VHT_OP_MODE_NOTIFY 199
|
||||
#define WLAN_EID_EXTENSION 255
|
||||
#define WLAN_EID_EXT_OWE_DH_PARAM 32
|
||||
@@ -766,18 +789,19 @@ struct ieee80211_snap_hdr {
|
||||
#define IEEE80211_NUM_OFDM_RATESLEN 8
|
||||
|
||||
|
||||
#define IEEE80211_CCK_RATE_1MB 0x02
|
||||
#define IEEE80211_CCK_RATE_2MB 0x04
|
||||
#define IEEE80211_CCK_RATE_5MB 0x0B
|
||||
#define IEEE80211_CCK_RATE_11MB 0x16
|
||||
#define IEEE80211_OFDM_RATE_LEN 8
|
||||
#define IEEE80211_OFDM_RATE_6MB 0x0C
|
||||
#define IEEE80211_OFDM_RATE_9MB 0x12
|
||||
|
||||
#define IEEE80211_CCK_RATE_1MB 0x02
|
||||
#define IEEE80211_CCK_RATE_2MB 0x04
|
||||
#define IEEE80211_CCK_RATE_5MB 0x0B
|
||||
#define IEEE80211_CCK_RATE_11MB 0x16
|
||||
#define IEEE80211_OFDM_RATE_LEN 8
|
||||
#define IEEE80211_OFDM_RATE_6MB 0x0C
|
||||
#define IEEE80211_OFDM_RATE_9MB 0x12
|
||||
#define IEEE80211_OFDM_RATE_12MB 0x18
|
||||
#define IEEE80211_OFDM_RATE_18MB 0x24
|
||||
#define IEEE80211_PBCC_RATE_22MB 0x2C
|
||||
#define IEEE80211_OFDM_RATE_24MB 0x30
|
||||
#define IEEE80211_PBCC_RATE_33MB 0x42
|
||||
#define IEEE80211_PBCC_RATE_22MB 0x2C
|
||||
#define IEEE80211_FREAK_RATE_22_5MB 0x2D
|
||||
#define IEEE80211_OFDM_RATE_36MB 0x48
|
||||
#define IEEE80211_OFDM_RATE_48MB 0x60
|
||||
#define IEEE80211_OFDM_RATE_54MB 0x6C
|
||||
@@ -930,92 +954,7 @@ enum MGN_RATE {
|
||||
#define IS_3T_RATE(_rate) (IS_HT3SS_RATE((_rate)) || IS_VHT3SS_RATE((_rate)))
|
||||
#define IS_4T_RATE(_rate) (IS_HT4SS_RATE((_rate)) || IS_VHT4SS_RATE((_rate)))
|
||||
|
||||
#define MGN_RATE_STR(_rate) \
|
||||
(_rate == MGN_1M) ? "CCK_1M" : \
|
||||
(_rate == MGN_2M) ? "CCK_2M" : \
|
||||
(_rate == MGN_5_5M) ? "CCK_5.5M" : \
|
||||
(_rate == MGN_11M) ? "CCK_11M" : \
|
||||
(_rate == MGN_6M) ? "OFDM_6M" : \
|
||||
(_rate == MGN_9M) ? "OFDM_9M" : \
|
||||
(_rate == MGN_12M) ? "OFDM_12M" : \
|
||||
(_rate == MGN_18M) ? "OFDM_18M" : \
|
||||
(_rate == MGN_24M) ? "OFDM_24M" : \
|
||||
(_rate == MGN_36M) ? "OFDM_36M" : \
|
||||
(_rate == MGN_48M) ? "OFDM_48M" : \
|
||||
(_rate == MGN_54M) ? "OFDM_54M" : \
|
||||
(_rate == MGN_MCS32) ? "MCS32" : \
|
||||
(_rate == MGN_MCS0) ? "MCS0" : \
|
||||
(_rate == MGN_MCS1) ? "MCS1" : \
|
||||
(_rate == MGN_MCS2) ? "MCS2" : \
|
||||
(_rate == MGN_MCS3) ? "MCS3" : \
|
||||
(_rate == MGN_MCS4) ? "MCS4" : \
|
||||
(_rate == MGN_MCS5) ? "MCS5" : \
|
||||
(_rate == MGN_MCS6) ? "MCS6" : \
|
||||
(_rate == MGN_MCS7) ? "MCS7" : \
|
||||
(_rate == MGN_MCS8) ? "MCS8" : \
|
||||
(_rate == MGN_MCS9) ? "MCS9" : \
|
||||
(_rate == MGN_MCS10) ? "MCS10" : \
|
||||
(_rate == MGN_MCS11) ? "MCS11" : \
|
||||
(_rate == MGN_MCS12) ? "MCS12" : \
|
||||
(_rate == MGN_MCS13) ? "MCS13" : \
|
||||
(_rate == MGN_MCS14) ? "MCS14" : \
|
||||
(_rate == MGN_MCS15) ? "MCS15" : \
|
||||
(_rate == MGN_MCS16) ? "MCS16" : \
|
||||
(_rate == MGN_MCS17) ? "MCS17" : \
|
||||
(_rate == MGN_MCS18) ? "MCS18" : \
|
||||
(_rate == MGN_MCS19) ? "MCS19" : \
|
||||
(_rate == MGN_MCS20) ? "MCS20" : \
|
||||
(_rate == MGN_MCS21) ? "MCS21" : \
|
||||
(_rate == MGN_MCS22) ? "MCS22" : \
|
||||
(_rate == MGN_MCS23) ? "MCS23" : \
|
||||
(_rate == MGN_MCS24) ? "MCS24" : \
|
||||
(_rate == MGN_MCS25) ? "MCS25" : \
|
||||
(_rate == MGN_MCS26) ? "MCS26" : \
|
||||
(_rate == MGN_MCS27) ? "MCS27" : \
|
||||
(_rate == MGN_MCS28) ? "MCS28" : \
|
||||
(_rate == MGN_MCS29) ? "MCS29" : \
|
||||
(_rate == MGN_MCS30) ? "MCS30" : \
|
||||
(_rate == MGN_MCS31) ? "MCS31" : \
|
||||
(_rate == MGN_VHT1SS_MCS0) ? "VHT1SMCS0" : \
|
||||
(_rate == MGN_VHT1SS_MCS1) ? "VHT1SMCS1" : \
|
||||
(_rate == MGN_VHT1SS_MCS2) ? "VHT1SMCS2" : \
|
||||
(_rate == MGN_VHT1SS_MCS3) ? "VHT1SMCS3" : \
|
||||
(_rate == MGN_VHT1SS_MCS4) ? "VHT1SMCS4" : \
|
||||
(_rate == MGN_VHT1SS_MCS5) ? "VHT1SMCS5" : \
|
||||
(_rate == MGN_VHT1SS_MCS6) ? "VHT1SMCS6" : \
|
||||
(_rate == MGN_VHT1SS_MCS7) ? "VHT1SMCS7" : \
|
||||
(_rate == MGN_VHT1SS_MCS8) ? "VHT1SMCS8" : \
|
||||
(_rate == MGN_VHT1SS_MCS9) ? "VHT1SMCS9" : \
|
||||
(_rate == MGN_VHT2SS_MCS0) ? "VHT2SMCS0" : \
|
||||
(_rate == MGN_VHT2SS_MCS1) ? "VHT2SMCS1" : \
|
||||
(_rate == MGN_VHT2SS_MCS2) ? "VHT2SMCS2" : \
|
||||
(_rate == MGN_VHT2SS_MCS3) ? "VHT2SMCS3" : \
|
||||
(_rate == MGN_VHT2SS_MCS4) ? "VHT2SMCS4" : \
|
||||
(_rate == MGN_VHT2SS_MCS5) ? "VHT2SMCS5" : \
|
||||
(_rate == MGN_VHT2SS_MCS6) ? "VHT2SMCS6" : \
|
||||
(_rate == MGN_VHT2SS_MCS7) ? "VHT2SMCS7" : \
|
||||
(_rate == MGN_VHT2SS_MCS8) ? "VHT2SMCS8" : \
|
||||
(_rate == MGN_VHT2SS_MCS9) ? "VHT2SMCS9" : \
|
||||
(_rate == MGN_VHT3SS_MCS0) ? "VHT3SMCS0" : \
|
||||
(_rate == MGN_VHT3SS_MCS1) ? "VHT3SMCS1" : \
|
||||
(_rate == MGN_VHT3SS_MCS2) ? "VHT3SMCS2" : \
|
||||
(_rate == MGN_VHT3SS_MCS3) ? "VHT3SMCS3" : \
|
||||
(_rate == MGN_VHT3SS_MCS4) ? "VHT3SMCS4" : \
|
||||
(_rate == MGN_VHT3SS_MCS5) ? "VHT3SMCS5" : \
|
||||
(_rate == MGN_VHT3SS_MCS6) ? "VHT3SMCS6" : \
|
||||
(_rate == MGN_VHT3SS_MCS7) ? "VHT3SMCS7" : \
|
||||
(_rate == MGN_VHT3SS_MCS8) ? "VHT3SMCS8" : \
|
||||
(_rate == MGN_VHT3SS_MCS9) ? "VHT3SMCS9" : \
|
||||
(_rate == MGN_VHT4SS_MCS0) ? "VHT4SMCS0" : \
|
||||
(_rate == MGN_VHT4SS_MCS1) ? "VHT4SMCS1" : \
|
||||
(_rate == MGN_VHT4SS_MCS2) ? "VHT4SMCS2" : \
|
||||
(_rate == MGN_VHT4SS_MCS3) ? "VHT4SMCS3" : \
|
||||
(_rate == MGN_VHT4SS_MCS4) ? "VHT4SMCS4" : \
|
||||
(_rate == MGN_VHT4SS_MCS5) ? "VHT4SMCS5" : \
|
||||
(_rate == MGN_VHT4SS_MCS6) ? "VHT4SMCS6" : \
|
||||
(_rate == MGN_VHT4SS_MCS7) ? "VHT4SMCS7" : \
|
||||
(_rate == MGN_VHT4SS_MCS8) ? "VHT4SMCS8" : \
|
||||
(_rate == MGN_VHT4SS_MCS9) ? "VHT4SMCS9" : "UNKNOWN"
|
||||
const char *MGN_RATE_STR(enum MGN_RATE rate);
|
||||
|
||||
typedef enum _RATE_SECTION {
|
||||
CCK = 0,
|
||||
@@ -1513,6 +1452,9 @@ enum rtw_ieee80211_category {
|
||||
RTW_WLAN_CATEGORY_SELF_PROTECTED = 15,
|
||||
RTW_WLAN_CATEGORY_WMM = 17,
|
||||
RTW_WLAN_CATEGORY_VHT = 21,
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
RTW_WLAN_CATEGORY_TBTX = 25,
|
||||
#endif
|
||||
RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */
|
||||
};
|
||||
|
||||
@@ -1582,6 +1524,24 @@ enum _PUBLIC_ACTION {
|
||||
ACT_PUBLIC_GAS_COMEBACK_RSP = 13,
|
||||
ACT_PUBLIC_TDLS_DISCOVERY_RSP = 14,
|
||||
ACT_PUBLIC_LOCATION_TRACK = 15,
|
||||
ACT_PUBLIC_QAB_REQ,
|
||||
ACT_PUBLIC_QAB_RSP,
|
||||
ACT_PUBLIC_QMF_POLICY,
|
||||
ACT_PUBLIC_QMF_POLICY_CHANGE,
|
||||
ACT_PUBLIC_QLOAD_REQ,
|
||||
ACT_PUBLIC_QLOAD_REPORT,
|
||||
ACT_PUBLIC_HCCA_TXOP_ADV,
|
||||
ACT_PUBLIC_HCCA_TXOP_RSP,
|
||||
ACT_PUBLIC_PUBLIC_KEY,
|
||||
ACT_PUBLIC_CH_AVAILABILITY_QUERY,
|
||||
ACT_PUBLIC_CH_SCHEDULE_MGMT,
|
||||
ACT_PUBLIC_CONTACT_VERI_SIGNAL,
|
||||
ACT_PUBLIC_GDD_ENABLE_REQ,
|
||||
ACT_PUBLIC_GDD_ENABLE_RSP,
|
||||
ACT_PUBLIC_NETWORK_CH_CONTROL,
|
||||
ACT_PUBLIC_WHITE_SPACE_MAP_ANN,
|
||||
ACT_PUBLIC_FTM_REQ,
|
||||
ACT_PUBLIC_FTM,
|
||||
ACT_PUBLIC_MAX
|
||||
};
|
||||
|
||||
@@ -1645,26 +1605,6 @@ enum rtw_ieee80211_vht_actioncode {
|
||||
RTW_WLAN_ACTION_VHT_OPMODE_NOTIFICATION = 2,
|
||||
};
|
||||
|
||||
/*IEEE 802.11r action code*/
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
enum rtw_ieee80211_ft_actioncode {
|
||||
RTW_WLAN_ACTION_FT_RESV,
|
||||
RTW_WLAN_ACTION_FT_REQ,
|
||||
RTW_WLAN_ACTION_FT_RSP,
|
||||
RTW_WLAN_ACTION_FT_CONF,
|
||||
RTW_WLAN_ACTION_FT_ACK,
|
||||
RTW_WLAN_ACTION_FT_MAX,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_WNM
|
||||
enum rtw_ieee80211_wnm_actioncode {
|
||||
RTW_WLAN_ACTION_WNM_BTM_QUERY = 6,
|
||||
RTW_WLAN_ACTION_WNM_BTM_REQ = 7,
|
||||
RTW_WLAN_ACTION_WNM_BTM_RSP = 8,
|
||||
};
|
||||
#endif
|
||||
|
||||
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
||||
* 00:50:F2 */
|
||||
#ifndef PLATFORM_FREEBSD /* Baron BSD has defined */
|
||||
@@ -1690,6 +1630,9 @@ enum rtw_ieee80211_wnm_actioncode {
|
||||
|
||||
#define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
|
||||
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
#define OUI_REALTEK 0x00e04c /* Realtek */
|
||||
#endif
|
||||
#define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */
|
||||
|
||||
enum rtw_ieee80211_rann_flags {
|
||||
@@ -1875,6 +1818,10 @@ struct rtw_ieee802_11_elems {
|
||||
u8 *rann;
|
||||
u8 rann_len;
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
u8 *tbtx_cap;
|
||||
u8 tbtx_cap_len;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
|
||||
@@ -1912,6 +1859,18 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode) ;
|
||||
#define MFP_OPTIONAL 2
|
||||
#define MFP_REQUIRED 3
|
||||
|
||||
/*For amsdu mode */
|
||||
#define GET_RSN_CAP_SPP_OPT(cap) LE_BITS_TO_2BYTE(((u8 *)(cap)), 10, 2)
|
||||
#define SET_RSN_CAP_SPP(cap, spp) SET_BITS_TO_LE_2BYTE(((u8 *)(cap)), 10, 2, spp)
|
||||
#define SPP_CAP BIT(0)
|
||||
#define SPP_REQ BIT(1)
|
||||
|
||||
enum rtw_amsdu_mode {
|
||||
RTW_AMSDU_MODE_NON_SPP = 0,
|
||||
RTW_AMSDU_MODE_SPP = 1,
|
||||
RTW_AMSDU_MODE_ALL_DROP = 2,
|
||||
};
|
||||
|
||||
struct rsne_info {
|
||||
u8 *gcs;
|
||||
u16 pcs_cnt;
|
||||
@@ -1930,10 +1889,10 @@ int rtw_rsne_info_parse(const u8 *ie, uint ie_len, struct rsne_info *info);
|
||||
unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit);
|
||||
unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit);
|
||||
int rtw_get_wpa_cipher_suite(u8 *s);
|
||||
int rtw_get_wpa2_cipher_suite(u8 *s);
|
||||
int rtw_get_rsn_cipher_suite(u8 *s);
|
||||
int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len);
|
||||
int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, u32 *akm);
|
||||
int rtw_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, u32 *akm, u8 *mfp_opt);
|
||||
int rtw_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *gmcs, u32 *akm, u8 *mfp_opt, u8* spp_opt);
|
||||
|
||||
int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, u16 *wpa_len);
|
||||
|
||||
@@ -1955,6 +1914,7 @@ u8 *rtw_get_owe_ie(const u8 *in_ie, uint in_len, u8 *owe_ie, uint *owe_ielen);
|
||||
for (ie = (void *)buf; (((u8 *)ie) - ((u8 *)buf) + 1) < buf_len; ie = (void *)(((u8 *)ie) + *(((u8 *)ie)+1) + 2))
|
||||
|
||||
void dump_ies(void *sel, const u8 *buf, u32 buf_len);
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
#define HT_SC_OFFSET_MAX 4
|
||||
@@ -1965,6 +1925,7 @@ void dump_ht_cap_ie_content(void *sel, const u8 *buf, u32 buf_len);
|
||||
#endif
|
||||
|
||||
void dump_wps_ie(void *sel, const u8 *ie, u32 ie_len);
|
||||
#endif /* CONFIG_RTW_DEBUG */
|
||||
|
||||
void rtw_ies_get_chbw(u8 *ies, int ies_len, u8 *ch, u8 *bw, u8 *offset, u8 ht, u8 vht);
|
||||
|
||||
@@ -1975,9 +1936,12 @@ bool rtw_is_chbw_grouped(u8 ch_a, u8 bw_a, u8 offset_a
|
||||
void rtw_sync_chbw(u8 *req_ch, u8 *req_bw, u8 *req_offset
|
||||
, u8 *g_ch, u8 *g_bw, u8 *g_offset);
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
u32 rtw_get_p2p_merged_ies_len(u8 *in_ie, u32 in_len);
|
||||
int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie);
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
void dump_p2p_ie(void *sel, const u8 *ie, u32 ie_len);
|
||||
#endif
|
||||
u8 *rtw_get_p2p_ie(const u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
|
||||
u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id, u8 *buf_attr, u32 *len_attr);
|
||||
u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id, u8 *buf_content, uint *len_content);
|
||||
@@ -1987,16 +1951,32 @@ uint rtw_del_p2p_attr(u8 *ie, uint ielen_ori, u8 attr_id);
|
||||
u8 *rtw_bss_ex_get_p2p_ie(WLAN_BSSID_EX *bss_ex, u8 *p2p_ie, uint *p2p_ielen);
|
||||
void rtw_bss_ex_del_p2p_ie(WLAN_BSSID_EX *bss_ex);
|
||||
void rtw_bss_ex_del_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
uint rtw_del_wfd_ie(u8 *ies, uint ies_len_ori, const char *msg);
|
||||
void rtw_bss_ex_del_wfd_ie(WLAN_BSSID_EX *bss_ex);
|
||||
#ifdef CONFIG_WFD
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
void dump_wfd_ie(void *sel, const u8 *ie, u32 ie_len);
|
||||
#endif
|
||||
u8 *rtw_get_wfd_ie(const u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen);
|
||||
u8 *rtw_get_wfd_attr(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *buf_attr, u32 *len_attr);
|
||||
u8 *rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *buf_content, uint *len_content);
|
||||
uint rtw_del_wfd_ie(u8 *ies, uint ies_len_ori, const char *msg);
|
||||
uint rtw_del_wfd_attr(u8 *ie, uint ielen_ori, u8 attr_id);
|
||||
u8 *rtw_bss_ex_get_wfd_ie(WLAN_BSSID_EX *bss_ex, u8 *wfd_ie, uint *wfd_ielen);
|
||||
void rtw_bss_ex_del_wfd_ie(WLAN_BSSID_EX *bss_ex);
|
||||
void rtw_bss_ex_del_wfd_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id);
|
||||
#endif
|
||||
|
||||
#define MULTI_AP_SUB_ELEM_TYPE 0x06
|
||||
#define MULTI_AP_TEAR_DOWN BIT(4)
|
||||
#define MULTI_AP_FRONTHAUL_BSS BIT(5)
|
||||
#define MULTI_AP_BACKHAUL_BSS BIT(6)
|
||||
#define MULTI_AP_BACKHAUL_STA BIT(7)
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
void dump_multi_ap_ie(void *sel, const u8 *ie, u32 ie_len);
|
||||
u8 rtw_get_multi_ap_ie_ext(const u8 *ies, int ies_len);
|
||||
u8 *rtw_set_multi_ap_ie_ext(u8 *pbuf, uint *frlen, u8 val);
|
||||
#endif
|
||||
|
||||
uint rtw_get_rateset_len(u8 *rateset);
|
||||
|
||||
@@ -2017,6 +1997,8 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr);
|
||||
u16 rtw_ht_mcs_rate(u8 bw_40MHz, u8 short_GI, unsigned char *MCS_rate);
|
||||
u8 rtw_ht_mcsset_to_nss(u8 *supp_mcs_set);
|
||||
u32 rtw_ht_mcs_set_to_bitmap(u8 *mcs_set, u8 nss);
|
||||
u8 rtw_ht_cap_get_rx_nss(u8 *ht_cap);
|
||||
u8 rtw_ht_cap_get_tx_nss(u8 *ht_cap);
|
||||
|
||||
int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *action);
|
||||
const char *action_public_str(u8 action);
|
||||
@@ -2027,5 +2009,8 @@ void macstr2num(u8 *dst, u8 *src);
|
||||
u8 convert_ip_addr(u8 hch, u8 mch, u8 lch);
|
||||
int wifirate2_ratetbl_inx(unsigned char rate);
|
||||
|
||||
/* For amsdu mode. */
|
||||
/*void rtw_set_spp_amsdu_mode(u8 mode, u8 *rsn_ie, int rsn_ie_len); */
|
||||
u8 rtw_check_amsdu_disable(u8 mode, u8 spp_opt);
|
||||
|
||||
#endif /* IEEE80211_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2019 Realtek Corporation.
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
@@ -16,7 +16,7 @@
|
||||
#define __MLME_OSDEP_H_
|
||||
|
||||
extern void rtw_os_indicate_disconnect(_adapter *adapter, u16 reason, u8 locally_generated);
|
||||
extern int rtw_os_indicate_connect(_adapter *adapter);
|
||||
extern void rtw_os_indicate_connect(_adapter *adapter);
|
||||
void rtw_os_indicate_scan_done(_adapter *padapter, bool aborted);
|
||||
extern void rtw_report_sec_ie(_adapter *adapter, u8 authmode, u8 *sec_ie);
|
||||
|
||||
|
||||
@@ -90,9 +90,7 @@ void rtw_os_ndevs_unregister(struct dvobj_priv *dvobj);
|
||||
int rtw_os_ndevs_init(struct dvobj_priv *dvobj);
|
||||
void rtw_os_ndevs_deinit(struct dvobj_priv *dvobj);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
|
||||
u16 rtw_recv_select_queue(struct sk_buff *skb);
|
||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) */
|
||||
u16 rtw_os_recv_select_queue(u8 *msdu, enum rtw_rx_llc_hdl llc_hdl);
|
||||
|
||||
int rtw_ndev_notifier_register(void);
|
||||
void rtw_ndev_notifier_unregister(void);
|
||||
@@ -100,6 +98,10 @@ void rtw_inetaddr_notifier_register(void);
|
||||
void rtw_inetaddr_notifier_unregister(void);
|
||||
|
||||
#include "../os_dep/linux/rtw_proc.h"
|
||||
#include "../os_dep/linux/nlrtw.h"
|
||||
#ifdef CONFIG_PLATFORM_CMAP_INTFS
|
||||
#include "../os_dep/linux/custom_multiap_intfs/custom_multiap_intfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
#include "../os_dep/linux/ioctl_cfg80211.h"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define RTW_XBUF_UNAVAIL 11
|
||||
#define RTW_TX_BALANCE 12
|
||||
#define RTW_TX_WAIT_MORE_FRAME 13
|
||||
#define RTW_QUEUE_MGMT 14
|
||||
|
||||
/* #define RTW_STATUS_TIMEDOUT -110 */
|
||||
|
||||
@@ -69,6 +70,9 @@
|
||||
#ifndef BIT
|
||||
#define BIT(x) (1 << (x))
|
||||
#endif
|
||||
#ifndef BIT_ULL
|
||||
#define BIT_ULL(x) (1ULL << (x))
|
||||
#endif
|
||||
|
||||
#define CHECK_BIT(a, b) (!!((a) & (b)))
|
||||
|
||||
@@ -309,6 +313,7 @@ u32 rtw_os_pkt_len(_pkt *pkt);
|
||||
extern void _rtw_memcpy(void *dec, const void *sour, u32 sz);
|
||||
extern void _rtw_memmove(void *dst, const void *src, u32 sz);
|
||||
extern int _rtw_memcmp(const void *dst, const void *src, u32 sz);
|
||||
extern int _rtw_memcmp2(const void *dst, const void *src, u32 sz);
|
||||
extern void _rtw_memset(void *pbuf, int c, u32 sz);
|
||||
|
||||
extern void _rtw_init_listhead(_list *list);
|
||||
@@ -380,6 +385,30 @@ extern bool _rtw_time_after(systime a, systime b);
|
||||
#define rtw_time_before(a,b) _rtw_time_after(b,a)
|
||||
#endif
|
||||
|
||||
sysptime rtw_sptime_get(void);
|
||||
sysptime rtw_sptime_set(s64 secs, const u32 nsecs);
|
||||
sysptime rtw_sptime_zero(void);
|
||||
|
||||
int rtw_sptime_cmp(const sysptime cmp1, const sysptime cmp2);
|
||||
bool rtw_sptime_eql(const sysptime cmp1, const sysptime cmp2);
|
||||
bool rtw_sptime_is_zero(const sysptime sptime);
|
||||
sysptime rtw_sptime_sub(const sysptime lhs, const sysptime rhs);
|
||||
sysptime rtw_sptime_add(const sysptime lhs, const sysptime rhs);
|
||||
|
||||
s64 rtw_sptime_to_ms(const sysptime sptime);
|
||||
sysptime rtw_ms_to_sptime(u64 ms);
|
||||
s64 rtw_sptime_to_us(const sysptime sptime);
|
||||
sysptime rtw_us_to_sptime(u64 us);
|
||||
s64 rtw_sptime_to_ns(const sysptime sptime);
|
||||
sysptime rtw_ns_to_sptime(u64 ns);
|
||||
|
||||
s64 rtw_sptime_diff_ms(const sysptime start, const sysptime end);
|
||||
s64 rtw_sptime_pass_ms(const sysptime start);
|
||||
s64 rtw_sptime_diff_us(const sysptime start, const sysptime end);
|
||||
s64 rtw_sptime_pass_us(const sysptime start);
|
||||
s64 rtw_sptime_diff_ns(const sysptime start, const sysptime end);
|
||||
s64 rtw_sptime_pass_ns(const sysptime start);
|
||||
|
||||
extern void rtw_sleep_schedulable(int ms);
|
||||
|
||||
extern void rtw_msleep_os(int ms);
|
||||
@@ -399,6 +428,39 @@ extern void rtw_udelay_os(int us);
|
||||
|
||||
extern void rtw_yield_os(void);
|
||||
|
||||
enum rtw_pwait_type {
|
||||
RTW_PWAIT_TYPE_MSLEEP,
|
||||
RTW_PWAIT_TYPE_USLEEP,
|
||||
RTW_PWAIT_TYPE_YIELD,
|
||||
RTW_PWAIT_TYPE_MDELAY,
|
||||
RTW_PWAIT_TYPE_UDELAY,
|
||||
|
||||
RTW_PWAIT_TYPE_NUM,
|
||||
};
|
||||
|
||||
#define RTW_PWAIT_TYPE_VALID(type) (type < RTW_PWAIT_TYPE_NUM)
|
||||
|
||||
struct rtw_pwait_conf {
|
||||
enum rtw_pwait_type type;
|
||||
s32 wait_time;
|
||||
s32 wait_cnt_lmt;
|
||||
};
|
||||
|
||||
struct rtw_pwait_ctx {
|
||||
struct rtw_pwait_conf conf;
|
||||
s32 wait_cnt;
|
||||
void (*wait_hdl)(int us);
|
||||
};
|
||||
|
||||
extern const char *_rtw_pwait_type_str[];
|
||||
#define rtw_pwait_type_str(type) (RTW_PWAIT_TYPE_VALID(type) ? _rtw_pwait_type_str[type] : _rtw_pwait_type_str[RTW_PWAIT_TYPE_NUM])
|
||||
|
||||
#define rtw_pwctx_reset(pwctx) (pwctx)->wait_cnt = 0
|
||||
#define rtw_pwctx_wait(pwctx) do { (pwctx)->wait_hdl((pwctx)->conf.wait_time); (pwctx)->wait_cnt++; } while(0)
|
||||
#define rtw_pwctx_waited(pwctx) ((pwctx)->wait_cnt)
|
||||
#define rtw_pwctx_exceed(pwctx) ((pwctx)->conf.wait_cnt_lmt >= 0 && (pwctx)->wait_cnt >= (pwctx)->conf.wait_cnt_lmt)
|
||||
|
||||
int rtw_pwctx_config(struct rtw_pwait_ctx *pwctx, enum rtw_pwait_type type, s32 time, s32 cnt_lmt);
|
||||
|
||||
extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc, void *ctx);
|
||||
|
||||
@@ -596,7 +658,7 @@ static inline int largest_bit_64(u64 bitmask)
|
||||
int i;
|
||||
|
||||
for (i = 63; i >= 0; i--)
|
||||
if (bitmask & BIT(i))
|
||||
if (bitmask & BIT_ULL(i))
|
||||
break;
|
||||
|
||||
return i;
|
||||
@@ -604,6 +666,7 @@ static inline int largest_bit_64(u64 bitmask)
|
||||
|
||||
#define rtw_abs(a) (a < 0 ? -a : a)
|
||||
#define rtw_min(a, b) ((a > b) ? b : a)
|
||||
#define rtw_max(a, b) ((a > b) ? a : b)
|
||||
#define rtw_is_range_a_in_b(hi_a, lo_a, hi_b, lo_b) (((hi_a) <= (hi_b)) && ((lo_a) >= (lo_b)))
|
||||
#define rtw_is_range_overlap(hi_a, lo_a, hi_b, lo_b) (((hi_a) > (lo_b)) && ((lo_a) < (hi_b)))
|
||||
|
||||
@@ -788,11 +851,13 @@ struct blacklist_ent {
|
||||
systime exp_time;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms);
|
||||
int rtw_blacklist_del(_queue *blist, const u8 *addr);
|
||||
int rtw_blacklist_search(_queue *blist, const u8 *addr);
|
||||
void rtw_blacklist_flush(_queue *blist);
|
||||
void dump_blacklist(void *sel, _queue *blist, const char *title);
|
||||
#endif
|
||||
|
||||
/* String handler */
|
||||
|
||||
@@ -808,6 +873,8 @@ int hex2num_i(char c);
|
||||
int hex2byte_i(const char *hex);
|
||||
int hexstr2bin(const char *hex, u8 *buf, size_t len);
|
||||
|
||||
int hwaddr_aton_i(const char *txt, u8 *addr);
|
||||
|
||||
/*
|
||||
* Write formatted output to sized buffer
|
||||
*/
|
||||
|
||||
@@ -96,6 +96,10 @@
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
/* #include <linux/ieee80211.h> */
|
||||
#include <net/cfg80211.h>
|
||||
#else
|
||||
#ifdef CONFIG_REGD_SRC_FROM_OS
|
||||
#error "CONFIG_REGD_SRC_FROM_OS requires CONFIG_IOCTL_CFG80211"
|
||||
#endif
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
|
||||
@@ -126,11 +130,6 @@
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
typedef struct urb *PURB;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22))
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
#define CONFIG_AUTOSUSPEND 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RTW_GRO) && (!defined(CONFIG_RTW_NAPI))
|
||||
@@ -222,6 +221,7 @@ typedef void *timer_hdl_context;
|
||||
#endif
|
||||
|
||||
typedef unsigned long systime;
|
||||
typedef ktime_t sysptime;
|
||||
typedef struct tasklet_struct _tasklet;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22))
|
||||
@@ -351,13 +351,13 @@ __inline static _list *get_list_head(_queue *queue)
|
||||
return &(queue->queue);
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
static inline void timer_hdl(struct timer_list *in_timer)
|
||||
#else
|
||||
static inline void timer_hdl(unsigned long cntx)
|
||||
#endif
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
_timer *ptimer = from_timer(ptimer, in_timer, timer);
|
||||
#else
|
||||
_timer *ptimer = (_timer *)cntx;
|
||||
@@ -370,7 +370,7 @@ __inline static void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc,
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
timer_setup(&ptimer->timer, timer_hdl, 0);
|
||||
#else
|
||||
/* setup_timer(ptimer, pfunc,(u32)cntx); */
|
||||
@@ -390,6 +390,11 @@ __inline static void _cancel_timer(_timer *ptimer, u8 *bcancelled)
|
||||
*bcancelled = del_timer_sync(&ptimer->timer) == 1 ? 1 : 0;
|
||||
}
|
||||
|
||||
__inline static void _cancel_timer_async(_timer *ptimer)
|
||||
{
|
||||
del_timer(&ptimer->timer);
|
||||
}
|
||||
|
||||
static inline void _init_workitem(_workitem *pwork, void *pfunc, void *cntx)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20))
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef __PCI_OSINTF_H
|
||||
#define __PCI_OSINTF_H
|
||||
|
||||
#ifdef RTK_129X_PLATFORM
|
||||
#ifdef CONFIG_PLATFORM_RTK129X
|
||||
#define PCIE_SLOT1_MEM_START 0x9804F000
|
||||
#define PCIE_SLOT1_MEM_LEN 0x1000
|
||||
#define PCIE_SLOT1_CTRL_START 0x9804EC00
|
||||
@@ -38,9 +38,6 @@
|
||||
void PlatformClearPciPMEStatus(PADAPTER Adapter);
|
||||
void rtw_pci_aspm_config(_adapter *padapter);
|
||||
void rtw_pci_aspm_config_l1off_general(_adapter *padapter, u8 eanble);
|
||||
#ifdef CONFIG_64BIT_DMA
|
||||
u8 PlatformEnableDMA64(PADAPTER Adapter);
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_DYNAMIC_ASPM
|
||||
void rtw_pci_set_aspm_lnkctl(_adapter *padapter, u8 mode);
|
||||
void rtw_pci_set_l1_latency(_adapter *padapter, u8 mode);
|
||||
|
||||
@@ -25,7 +25,9 @@ void rtw_rframe_set_os_pkt(union recv_frame *rframe);
|
||||
extern int rtw_recv_indicatepkt(_adapter *adapter, union recv_frame *precv_frame);
|
||||
extern void rtw_recv_returnpacket(_nic_hdl cnxt, _pkt *preturnedpkt);
|
||||
|
||||
#ifdef CONFIG_WIFI_MONITOR
|
||||
extern int rtw_recv_monitor(_adapter *padapter, union recv_frame *precv_frame);
|
||||
#endif /* CONFIG_WIFI_MONITOR */
|
||||
|
||||
#ifdef CONFIG_HOSTAPD_MLME
|
||||
extern void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame);
|
||||
@@ -45,10 +47,11 @@ int rtw_os_recvframe_duplicate_skb(_adapter *padapter, union recv_frame *pclonef
|
||||
void rtw_os_free_recvframe(union recv_frame *precvframe);
|
||||
|
||||
|
||||
int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf);
|
||||
int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf, u32 size);
|
||||
int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf);
|
||||
|
||||
_pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *sa, u8 *msdu ,u16 msdu_len);
|
||||
_pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *sa
|
||||
, u8 *msdu ,u16 msdu_len, enum rtw_rx_llc_hdl llc_hdl);
|
||||
void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *rframe);
|
||||
|
||||
void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf);
|
||||
|
||||
@@ -138,8 +138,13 @@ typedef struct _RT_8188E_FIRMWARE_HDR {
|
||||
|
||||
/* For WoWLan , more reserved page */
|
||||
#ifdef CONFIG_WOWLAN
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
#define WOWLAN_KEEP_ALIVE_PAGE 0x02 /*for keep alive packet*/
|
||||
#else
|
||||
#define WOWLAN_KEEP_ALIVE_PAGE 0x00
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
/* 1 ArpRsp + 2 NbrAdv + 2 NDPInfo + 1 RCI + 1 AOAC = 7 pages */
|
||||
#define WOWLAN_PAGE_NUM_88E 0x07
|
||||
#define WOWLAN_PAGE_NUM_88E (0x07+ WOWLAN_KEEP_ALIVE_PAGE)
|
||||
#else
|
||||
#define WOWLAN_PAGE_NUM_88E 0x00
|
||||
#endif
|
||||
|
||||
@@ -238,15 +238,16 @@ struct txrpt_ccx_88e {
|
||||
void rtl8188e_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen,
|
||||
u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
|
||||
void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc);
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, struct tx_desc *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, struct tx_desc *ptxdesc);
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
s32 rtl8188es_init_xmit_priv(PADAPTER padapter);
|
||||
void rtl8188es_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8188es_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8188es_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8188es_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8188es_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
thread_return rtl8188es_xmit_thread(thread_context context);
|
||||
s32 rtl8188es_xmit_buf_handler(PADAPTER padapter);
|
||||
@@ -261,6 +262,9 @@ void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc);
|
||||
void rtl8188eu_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8188eu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8188eu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8188eu_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8188eu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8188eu_xmit_buf_handler(PADAPTER padapter);
|
||||
void rtl8188eu_xmit_tasklet(void *priv);
|
||||
@@ -273,6 +277,9 @@ void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc);
|
||||
void rtl8188ee_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8188ee_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8188ee_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8188ee_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8188ee_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8188ee_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
@@ -189,12 +189,6 @@ void rtl8188f_download_rsvd_page(PADAPTER padapter, u8 mstatus);
|
||||
void rtl8188f_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8188f_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
void rtl8188f_set_p2p_wowlan_offload_cmd(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#else
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#ifdef CONFIG_PLATFORM_HISILICON
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
@@ -37,7 +35,8 @@
|
||||
#elif defined(CONFIG_PCI_HCI)
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#elif defined(CONFIG_SDIO_HCI)
|
||||
#define MAX_RECVBUF_SZ (RX_DMA_BOUNDARY_8188F + 1)
|
||||
/* minmum 4K, multiple of 8-byte is required, multiple of sdio block size is prefered */
|
||||
#define MAX_RECVBUF_SZ _RND(RX_DMA_BOUNDARY_8188F + 1, 8)
|
||||
#endif /* CONFIG_SDIO_HCI */
|
||||
|
||||
/* Rx smooth factor */
|
||||
|
||||
@@ -287,15 +287,16 @@
|
||||
|
||||
void rtl8188f_update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem);
|
||||
void rtl8188f_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
s32 rtl8188fs_init_xmit_priv(PADAPTER padapter);
|
||||
void rtl8188fs_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8188fs_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8188fs_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8188fs_hal_mgmt_xmitframe_enqueue(PADAPTER, struct xmit_frame *);
|
||||
#endif
|
||||
s32 rtl8188fs_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8188fs_xmit_buf_handler(PADAPTER padapter);
|
||||
thread_return rtl8188fs_xmit_thread(thread_context context);
|
||||
@@ -312,6 +313,9 @@ s32 rtl8188fu_init_xmit_priv(PADAPTER padapter);
|
||||
void rtl8188fu_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8188fu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8188fu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8188fu_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8188fu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
/* s32 rtl8812au_xmit_buf_handler(PADAPTER padapter); */
|
||||
void rtl8188fu_xmit_tasklet(void *priv);
|
||||
|
||||
@@ -126,12 +126,6 @@ s32 c2h_handler_8192e(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload);
|
||||
void rtl8192e_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8192e_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* / TX Feedback Content */
|
||||
#define USEC_UNIT_FOR_8192E_C2H_TX_RPT_QUEUE_TIME 256
|
||||
|
||||
|
||||
@@ -358,6 +358,9 @@ void rtl8192e_cal_txdesc_chksum(u8 *ptxdesc);
|
||||
void rtl8192eu_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8192eu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192eu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8192eu_hal_mgmt_xmitframe_enqueue(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8192eu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192eu_xmit_buf_handler(PADAPTER padapter);
|
||||
#define hal_xmit_handler rtl8192eu_xmit_buf_handler
|
||||
@@ -369,6 +372,9 @@ void rtl8192e_cal_txdesc_chksum(u8 *ptxdesc);
|
||||
s32 rtl8192ee_init_xmit_priv(PADAPTER padapter);
|
||||
void rtl8192ee_free_xmit_priv(PADAPTER padapter);
|
||||
struct xmit_buf *rtl8192ee_dequeue_xmitbuf(struct rtw_tx_ring *ring);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8192ee_hal_mgmt_xmitframe_enqueue(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8192ee_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8192ee_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8192ee_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
@@ -382,6 +388,9 @@ void rtl8192e_cal_txdesc_chksum(u8 *ptxdesc);
|
||||
|
||||
s32 rtl8192es_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192es_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8192es_hal_mgmt_xmitframe_enqueue(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8192es_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
thread_return rtl8192es_xmit_thread(thread_context context);
|
||||
s32 rtl8192es_xmit_buf_handler(PADAPTER padapter);
|
||||
@@ -439,9 +448,7 @@ u8 BWMapping_92E(PADAPTER Adapter, struct pkt_attrib *pattrib);
|
||||
u8 SCMapping_92E(PADAPTER Adapter, struct pkt_attrib *pattrib);
|
||||
void fill_txdesc_phy(PADAPTER padapter, struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_vcs(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
void fill_txdesc_sectype(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
@@ -179,16 +179,35 @@ void rtl8192f_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter);
|
||||
void rtl8192f_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8192f_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
void rtl8192f_set_p2p_wowlan_offload_cmd(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
/* AP_REQ_TXREP_CMD 0x43 */
|
||||
#define SET_8192F_H2CCMD_TXREP_PARM_STA1(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
||||
#define SET_8192F_H2CCMD_TXREP_PARM_STA2(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
|
||||
#define SET_8192F_H2CCMD_TXREP_PARM_RTY(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 2, __Value)
|
||||
|
||||
/* C2H_AP_REQ_TXRPT */
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_MACID1(_Header) LE_BITS_TO_1BYTE((_Header + 0), 0, 8)
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_TXOK1(_Header) LE_BITS_TO_2BYTE((_Header + 1), 0, 16)
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_TXFAIL1(_Header) LE_BITS_TO_2BYTE((_Header + 3), 0, 16)
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_INIRATE1(_Header) LE_BITS_TO_1BYTE((_Header + 5), 0, 8)
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_MACID2(_Header) LE_BITS_TO_1BYTE((_Header + 6), 0, 8)
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_TXOK2(_Header) LE_BITS_TO_2BYTE((_Header + 7), 0, 16)
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_TXFAIL2(_Header) LE_BITS_TO_2BYTE((_Header + 9), 0, 16)
|
||||
#define GET_8192F_C2H_TC2H_APREQ_TXRPT_INIRATE2(_Header) LE_BITS_TO_1BYTE((_Header + 11), 0, 8)
|
||||
|
||||
/* C2H_SPC_STAT */
|
||||
#define GET_8192F_C2H_SPC_STAT_IDX(_Header) LE_BITS_TO_1BYTE((_Header + 0), 0, 8)
|
||||
/* Tip :TYPE_A data3 is msb and data0 is lsb */
|
||||
#define GET_8192F_C2H_SPC_STAT_TYPEA_RETRY(_Header) LE_BITS_TO_4BYTE((_Header + 1), 0, 32)
|
||||
#define GET_8192F_C2H_SPC_STAT_TYPEB_PKT1(_Header) LE_BITS_TO_2BYTE((_Header + 1), 0, 16)
|
||||
#define GET_8192F_C2H_SPC_STAT_TYPEB_RETRY1(_Header) LE_BITS_TO_2BYTE((_Header + 3), 0, 16)
|
||||
#define GET_8192F_C2H_SPC_STAT_TYPEB_PKT2(_Header) LE_BITS_TO_2BYTE((_Header + 5), 0, 16)
|
||||
#define GET_8192F_C2H_SPC_STAT_TYPEB_RETRY2(_Header) LE_BITS_TO_2BYTE((_Header + 7), 0, 16)
|
||||
|
||||
void rtl8192f_req_txrpt_cmd(PADAPTER, u8 macid);
|
||||
s32 FillH2CCmd8192F(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);
|
||||
u8 GetTxBufferRsvdPageNum8192F(_adapter *padapter, bool wowlan);
|
||||
#endif
|
||||
|
||||
@@ -23,5 +23,7 @@ void rtl8192f_HalDmWatchDog(PADAPTER Adapter);
|
||||
/* void rtl8192c_dm_CheckTXPowerTracking(PADAPTER Adapter); */
|
||||
|
||||
/* void rtl8192c_dm_RF_Saving(PADAPTER pAdapter, u8 bForceInNormal); */
|
||||
|
||||
#if defined (CONFIG_CONCURRENT_MODE) && defined (CONFIG_TSF_SYNC)
|
||||
void rtl8192f_sync_tsfr(_adapter *Adapter);
|
||||
#endif/*(CONFIG_CONCURRENT_MODE) && defined (CONFIG_TSF_SYNC)*/
|
||||
#endif
|
||||
|
||||
@@ -117,12 +117,23 @@ typedef struct _RT_8192F_FIRMWARE_HDR {
|
||||
* NS offload: 2 NDP info: 1
|
||||
*/
|
||||
#ifdef CONFIG_WOWLAN
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
#define WOWLAN_KEEP_ALIVE_PAGE 0x02 /*for keep alive packet*/
|
||||
#else
|
||||
#define WOWLAN_KEEP_ALIVE_PAGE 0x00
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
/* 7 pages for wow rsvd page + 2 pages for pattern */
|
||||
#define WOWLAN_PAGE_NUM_8192F 0x09
|
||||
#define WOWLAN_PAGE_NUM_8192F (0x09 + WOWLAN_KEEP_ALIVE_PAGE)
|
||||
#else
|
||||
#define WOWLAN_PAGE_NUM_8192F 0x00
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WOW_PATTERN_IN_TXFIFO
|
||||
/* REG_TXBUF_WKCAM_OFFSET 0x1B1[15:0] */
|
||||
#define WKCAM_OFFSET_BIT_MASK 0xFFFF
|
||||
#define WKCAM_OFFSET_BIT_MASK_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
#undef WOWLAN_PAGE_NUM_8192F
|
||||
#define WOWLAN_PAGE_NUM_8192F 0x15
|
||||
|
||||
@@ -24,6 +24,23 @@
|
||||
* Interface to manipulate LED objects.
|
||||
* ******************************************************************************** */
|
||||
#ifdef CONFIG_USB_HCI
|
||||
/** REG_LED_CFG (0x4C) **/
|
||||
/* LED0 GPIO Enable, 0: disable, 1: enable*/
|
||||
#define LED0_GPIO_ENABLE_8192FU (BIT21)
|
||||
/* LED0 Disabled for analog signal usage, 0:Enable (output mode), 1: disable (input mode) */
|
||||
#define LED0_DISABLE_ANALOGSIGNAL_8192FU (BIT7)
|
||||
/* LED0 software value, 0: turn off, 1:turn on */
|
||||
#define LED0_SW_VALUE_8192FU (BIT3)
|
||||
|
||||
/** REG_GPIO_MUXCFG (0x40) **/
|
||||
/* Enable LED[1:0] for RFE CTRL[7:6], 0: BT, 1: Wi-Fi */
|
||||
#define ENABLE_LED0_AND_LED1_CTRL_BY_WIFI_8192FU (BIT3)
|
||||
|
||||
/** REG_SW_GPIO_SHARE_CTRL_0 (0x1038) **/
|
||||
/* LED Output PIN Location, 0: GPIOA_0, 1:GPIOB_4*/
|
||||
#define LED_OUTPUT_PIN_LOCATION_8192FU (BIT16)
|
||||
|
||||
u8 rtl8192fu_CfgLed0Hw(PADAPTER padapter);
|
||||
void rtl8192fu_InitSwLeds(PADAPTER padapter);
|
||||
void rtl8192fu_DeInitSwLeds(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
@@ -21,13 +21,6 @@
|
||||
#define CONFIG_8192F_TYPE3_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE4_DRV_DIS
|
||||
/*unused*/
|
||||
#define CONFIG_8192F_TYPE13_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE14_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE15_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE16_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE17_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE18_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE19_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE20_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE21_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE22_DRV_DIS
|
||||
@@ -47,6 +40,8 @@
|
||||
#define CONFIG_8192F_TYPE1_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE5_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE10_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE13_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE14_DRV_DIS
|
||||
/*pcie*/
|
||||
#define CONFIG_8192F_TYPE0_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE6_DRV_DIS
|
||||
@@ -54,6 +49,11 @@
|
||||
#define CONFIG_8192F_TYPE8_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE9_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE12_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE15_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE16_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE17_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE18_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE19_DRV_DIS
|
||||
#endif/*CONFIG_SDIO_HCI*/
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
@@ -67,6 +67,11 @@
|
||||
#define CONFIG_8192F_TYPE8_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE9_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE12_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE15_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE16_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE17_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE18_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE19_DRV_DIS
|
||||
#endif/*CONFIG_USB_HCI*/
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
@@ -77,6 +82,8 @@
|
||||
#define CONFIG_8192F_TYPE1_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE5_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE10_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE13_DRV_DIS
|
||||
#define CONFIG_8192F_TYPE14_DRV_DIS
|
||||
#endif/*CONFIG_PCI_HCI*/
|
||||
|
||||
int PHY_RF6052_Config8192F(PADAPTER pdapter);
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
#define REG_RQPN_NPQ_8192F 0x0214
|
||||
#define REG_DWBCN1_CTRL_8192F 0x0228
|
||||
#define REG_RQPN_EXQ1_EXQ2 0x0230
|
||||
#define REG_TQPNT3_V1_8192F 0x0234
|
||||
|
||||
/* -----------------------------------------------------
|
||||
*
|
||||
@@ -397,7 +398,8 @@
|
||||
#define REG_LTR_ACTIVE_LATENCY_V1_8192F 0x079C
|
||||
|
||||
/* GPIO Control */
|
||||
#define REG_SW_GPIO_SHARE_CTRL_8192F 0x1038
|
||||
#define REG_SW_GPIO_SHARE_CTRL_8192F_0 0x1038
|
||||
#define REG_SW_GPIO_SHARE_CTRL_8192F_1 0x103c
|
||||
#define REG_SW_GPIO_A_OUT_8192F 0x1040
|
||||
#define REG_SW_GPIO_A_OEN_8192F 0x1044
|
||||
|
||||
|
||||
@@ -485,9 +485,7 @@ void rtl8192f_fill_txdesc_vcs(PADAPTER padapter, struct pkt_attrib *pattrib, str
|
||||
void rtl8192f_fill_txdesc_phy(PADAPTER padapter, struct pkt_attrib *pattrib, struct tx_desc *ptxdesc);
|
||||
void rtl8192f_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
@@ -495,6 +493,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8192fs_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8192fs_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192fs_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8192fs_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8192fs_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192fs_xmit_buf_handler(PADAPTER padapter);
|
||||
thread_return rtl8192fs_xmit_thread(thread_context context);
|
||||
@@ -506,6 +507,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8192fu_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8192fu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192fu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8192fu_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8192fu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192fu_xmit_buf_handler(PADAPTER padapter);
|
||||
#define hal_xmit_handler rtl8192fu_xmit_buf_handler
|
||||
@@ -521,6 +525,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8192fe_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8192fe_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8192fe_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8192fe_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8192fe_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8192fe_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
@@ -188,12 +188,6 @@ void rtl8703b_download_rsvd_page(PADAPTER padapter, u8 mstatus);
|
||||
void rtl8703b_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8703b_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
void rtl8703b_set_p2p_wowlan_offload_cmd(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
@@ -286,9 +286,7 @@
|
||||
|
||||
void rtl8703b_update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem);
|
||||
void rtl8703b_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
@@ -296,6 +294,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8703bs_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8703bs_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8703bs_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8703bs_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8703bs_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8703bs_xmit_buf_handler(PADAPTER padapter);
|
||||
thread_return rtl8703bs_xmit_thread(thread_context context);
|
||||
@@ -311,6 +312,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8703bu_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8703bu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8703bu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8703bu_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8703bu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
/* s32 rtl8812au_xmit_buf_handler(PADAPTER padapter); */
|
||||
void rtl8703bu_xmit_tasklet(void *priv);
|
||||
@@ -325,6 +329,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8703be_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8703be_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8703be_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8703be_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8703be_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8703be_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
@@ -160,12 +160,6 @@ void rtl8710b_download_rsvd_page(PADAPTER padapter, u8 mstatus);
|
||||
void rtl8710b_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8710b_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
void rtl8710b_set_p2p_wowlan_offload_cmd(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
@@ -476,9 +476,7 @@ void rtl8710b_fill_txdesc_vcs(PADAPTER padapter, struct pkt_attrib *pattrib, str
|
||||
void rtl8710b_fill_txdesc_phy(PADAPTER padapter, struct pkt_attrib *pattrib, struct tx_desc *ptxdesc);
|
||||
void rtl8710b_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
@@ -499,6 +497,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8710bu_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8710bu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8710bu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8710bu_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8710bu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8710bu_xmit_tasklet(void *priv);
|
||||
s32 rtl8710bu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
||||
|
||||
@@ -188,12 +188,6 @@ void rtl8723b_download_rsvd_page(PADAPTER padapter, u8 mstatus);
|
||||
void rtl8723b_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8723b_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
void rtl8723b_set_p2p_wowlan_offload_cmd(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
0
include/rtl8723b_hal.h
Executable file → Normal file
0
include/rtl8723b_hal.h
Executable file → Normal file
0
include/rtl8723b_led.h
Executable file → Normal file
0
include/rtl8723b_led.h
Executable file → Normal file
0
include/rtl8723b_recv.h
Executable file → Normal file
0
include/rtl8723b_recv.h
Executable file → Normal file
0
include/rtl8723b_spec.h
Executable file → Normal file
0
include/rtl8723b_spec.h
Executable file → Normal file
13
include/rtl8723b_xmit.h
Executable file → Normal file
13
include/rtl8723b_xmit.h
Executable file → Normal file
@@ -286,9 +286,7 @@
|
||||
|
||||
void rtl8723b_update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem);
|
||||
void rtl8723b_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
@@ -296,6 +294,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8723bs_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8723bs_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723bs_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8723bs_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8723bs_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723bs_xmit_buf_handler(PADAPTER padapter);
|
||||
thread_return rtl8723bs_xmit_thread(thread_context context);
|
||||
@@ -311,6 +312,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8723bu_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8723bu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723bu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8723bu_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8723bu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
/* s32 rtl8812au_xmit_buf_handler(PADAPTER padapter); */
|
||||
void rtl8723bu_xmit_tasklet(void *priv);
|
||||
@@ -325,6 +329,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8723be_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8723be_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723be_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8723be_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8723be_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8723be_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
@@ -174,12 +174,6 @@ void rtl8723d_download_rsvd_page(PADAPTER padapter, u8 mstatus);
|
||||
void rtl8723d_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8723d_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
void rtl8723d_set_p2p_wowlan_offload_cmd(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
@@ -477,9 +477,7 @@ void rtl8723d_fill_txdesc_vcs(PADAPTER padapter, struct pkt_attrib *pattrib, str
|
||||
void rtl8723d_fill_txdesc_phy(PADAPTER padapter, struct pkt_attrib *pattrib, struct tx_desc *ptxdesc);
|
||||
void rtl8723d_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
@@ -487,6 +485,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8723ds_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8723ds_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723ds_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8723ds_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8723ds_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723ds_xmit_buf_handler(PADAPTER padapter);
|
||||
thread_return rtl8723ds_xmit_thread(thread_context context);
|
||||
@@ -500,6 +501,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8723du_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8723du_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723du_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8723du_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8723du_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8723du_xmit_tasklet(void *priv);
|
||||
s32 rtl8723du_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
||||
@@ -513,6 +517,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8723de_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8723de_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8723de_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8723de_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8723de_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8723de_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
245
include/rtl8723f_hal.h
Normal file
245
include/rtl8723f_hal.h
Normal file
@@ -0,0 +1,245 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2019 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef _RTL8723F_HAL_H_
|
||||
#define _RTL8723F_HAL_H_
|
||||
|
||||
#include <osdep_service.h> /* BIT(x) */
|
||||
#include <drv_types.h> /* PADAPTER */
|
||||
#include "../hal/halmac/halmac_api.h" /* MAC REG definition */
|
||||
|
||||
#define MAX_RECVBUF_SZ 16384 /* 16KB (RX_FIFO_SIZE_8723F), TX: 32KB */
|
||||
|
||||
/*
|
||||
* MAC Register definition
|
||||
*/
|
||||
#define REG_LEDCFG0 REG_LED_CFG_8723F /* rtw_mp.c */
|
||||
#define MSR (REG_CR_8723F + 2) /* rtw_mp.c & hal_com.c */
|
||||
#define MSR1 REG_CR_EXT_8723F /* rtw_mp.c & hal_com.c */
|
||||
#define REG_C2HEVT_MSG_NORMAL 0x1A0 /* hal_com.c */
|
||||
#define REG_C2HEVT_CLEAR 0x1AF /* hal_com.c */
|
||||
#define REG_BCN_CTRL_1 REG_BCN_CTRL_CLINT0_8723F /* hal_com.c */
|
||||
|
||||
#define REG_WOWLAN_WAKE_REASON 0x01C7 /* hal_com.c */
|
||||
#define REG_GPIO_PIN_CTRL_2 REG_GPIO_EXT_CTRL_8723F /* hal_com.c */
|
||||
#define REG_FIFOPAGE REG_FIFOPAGE_INFO_8723F /* hal_com.c */
|
||||
#define REG_RXPKTBUF_CTRL REG_PKTBUF_DBG_CTRL_8723F /* hal_com.c */
|
||||
#define REG_WKFMCAM_NUM REG_WKFMCAM_CMD_8723F /* hal_com.c */
|
||||
#define REG_RSV_CTRL REG_REG_ACCESS_CTRL_8723F /* hal_com.c */
|
||||
#define REG_CAMCMD REG_KEYCAMCMD_8723F /* hal_com.c */
|
||||
#define REG_CAMWRITE REG_KEYCAM_WD_8723F /* hal_com.c */
|
||||
|
||||
#define BIT_AUTO_SYNC_BY_TBTT BIT_EN_TSFAUTO_SYNC_8723F /* hal_com.c */
|
||||
#define BIT_DIS_ATIM_ROOT_8723F 23 /* REG_HIQ_NO_LMT_EN_V2[23], disable ATIM ROOT */
|
||||
#define BIT_SECCAM_POLLING_8723F BIT_KEYCAM_POLLING_8723F /* rtl8723f_ops.c */
|
||||
#define BIT_GET_NETYPE2 BIT_GET_P2_NETSTATE_8723F /* hal_halmac.c */
|
||||
#define BIT_GET_NETYPE3 BIT_GET_P3_NETSTATE_8723F /* hal_halmac.c */
|
||||
#define BIT_GET_NETYPE4 BIT_GET_P4_NETSTATE_8723F /* hal_halmac.c */
|
||||
|
||||
#ifdef CONFIG_WOW_PATTERN_IN_TXFIFO
|
||||
#define WKCAM_OFFSET_BIT_MASK 0xFFF
|
||||
#define WKCAM_OFFSET_BIT_MASK_OFFSET 12
|
||||
#define REG_TXBUF_WKCAM_OFFSET 0x1B4 //BIT_TXBUF_WKCAM_OFFSET [24:12]
|
||||
#define REG_PKT_BUFF_ACCESS_CTRL 0x106 /* hal_com.c */
|
||||
#endif
|
||||
|
||||
/* RXERR_RPT, for rtw_mp.c */
|
||||
#define RXERR_TYPE_OFDM_PPDU 0
|
||||
#define RXERR_TYPE_OFDM_FALSE_ALARM 2
|
||||
#define RXERR_TYPE_OFDM_MPDU_OK 0
|
||||
#define RXERR_TYPE_OFDM_MPDU_FAIL 1
|
||||
#define RXERR_TYPE_CCK_PPDU 3
|
||||
#define RXERR_TYPE_CCK_FALSE_ALARM 5
|
||||
#define RXERR_TYPE_CCK_MPDU_OK 3
|
||||
#define RXERR_TYPE_CCK_MPDU_FAIL 4
|
||||
#define RXERR_TYPE_HT_PPDU 8
|
||||
#define RXERR_TYPE_HT_FALSE_ALARM 9
|
||||
#define RXERR_TYPE_HT_MPDU_TOTAL 6
|
||||
#define RXERR_TYPE_HT_MPDU_OK 6
|
||||
#define RXERR_TYPE_HT_MPDU_FAIL 7
|
||||
#define RXERR_TYPE_RX_FULL_DROP 10
|
||||
|
||||
#define RXERR_COUNTER_MASK BIT_MASK_RPT_COUNTER_8723F
|
||||
#define RXERR_RPT_RST BIT_RXERR_RPT_RST_8723F
|
||||
#define _RXERR_RPT_SEL(type) (BIT_RXERR_RPT_SEL_V1_3_0_8723F(type) \
|
||||
| ((type & 0x10) ? BIT_RXERR_RPT_SEL_V1_4_8723F : 0))
|
||||
|
||||
/*
|
||||
* BB Register definition
|
||||
*/
|
||||
#define rPMAC_Reset 0x100 /* hal_mp.c */
|
||||
|
||||
#define rFPGA0_RFMOD 0x800
|
||||
#define rFPGA0_TxInfo 0x804
|
||||
#define rOFDMCCKEN_Jaguar 0x808 /* hal_mp.c */
|
||||
#define rFPGA0_TxGainStage 0x80C /* phydm only */
|
||||
#define rFPGA0_XA_HSSIParameter1 0x820 /* hal_mp.c */
|
||||
#define rFPGA0_XA_HSSIParameter2 0x824 /* hal_mp.c */
|
||||
#define rFPGA0_XB_HSSIParameter1 0x828 /* hal_mp.c */
|
||||
#define rFPGA0_XB_HSSIParameter2 0x82C /* hal_mp.c */
|
||||
#define rTxAGC_B_Rate18_06 0x830
|
||||
#define rTxAGC_B_Rate54_24 0x834
|
||||
#define rTxAGC_B_CCK1_55_Mcs32 0x838
|
||||
#define rCCAonSec_Jaguar 0x838 /* hal_mp.c */
|
||||
#define rTxAGC_B_Mcs03_Mcs00 0x83C
|
||||
#define rTxAGC_B_Mcs07_Mcs04 0x848
|
||||
#define rTxAGC_B_Mcs11_Mcs08 0x84C
|
||||
#define rFPGA0_XA_RFInterfaceOE 0x860
|
||||
#define rFPGA0_XB_RFInterfaceOE 0x864
|
||||
#define rTxAGC_B_Mcs15_Mcs12 0x868
|
||||
#define rTxAGC_B_CCK11_A_CCK2_11 0x86C
|
||||
#define rFPGA0_XAB_RFInterfaceSW 0x870
|
||||
#define rFPGA0_XAB_RFParameter 0x878
|
||||
#define rFPGA0_AnalogParameter4 0x88C /* hal_mp.c & phydm */
|
||||
#define rFPGA0_XB_LSSIReadBack 0x8A4 /* phydm */
|
||||
#define rHSSIRead_Jaguar 0x8B0 /* RF read addr (rtl8723f_phy.c) */
|
||||
|
||||
#define rC_TxScale_Jaguar2 0x181C /* Pah_C TX scaling factor (hal_mp.c) */
|
||||
#define rC_IGI_Jaguar2 0x1850 /* Initial Gain for path-C (hal_mp.c) */
|
||||
|
||||
#define rFPGA1_TxInfo 0x90C /* hal_mp.c */
|
||||
#define rSingleTone_ContTx_Jaguar 0x914 /* hal_mp.c */
|
||||
/* TX BeamForming */
|
||||
#define REG_BB_TX_PATH_SEL_1_8723F 0x93C /* rtl8723f_phy.c */
|
||||
#define REG_BB_TX_PATH_SEL_2_8723F 0x940 /* rtl8723f_phy.c */
|
||||
|
||||
/* TX BeamForming */
|
||||
#define REG_BB_TXBF_ANT_SET_BF1_8723F 0x19AC /* rtl8723f_phy.c */
|
||||
#define REG_BB_TXBF_ANT_SET_BF0_8723F 0x19B4 /* rtl8723f_phy.c */
|
||||
|
||||
#define rCCK0_System 0xA00
|
||||
#define rCCK0_AFESetting 0xA04
|
||||
|
||||
#define rCCK0_DSPParameter2 0xA1C
|
||||
#define rCCK0_TxFilter1 0xA20
|
||||
#define rCCK0_TxFilter2 0xA24
|
||||
#define rCCK0_DebugPort 0xA28
|
||||
#define rCCK0_FalseAlarmReport 0xA2C
|
||||
|
||||
#define rD_TxScale_Jaguar2 0x1A1C /* Path_D TX scaling factor (hal_mp.c) */
|
||||
#define rD_IGI_Jaguar2 0x1A50 /* Initial Gain for path-D (hal_mp.c) */
|
||||
|
||||
#define rOFDM0_TRxPathEnable 0xC04
|
||||
#define rOFDM0_TRMuxPar 0xC08
|
||||
#define rA_TxScale_Jaguar 0xC1C /* Pah_A TX scaling factor (hal_mp.c) */
|
||||
#define rOFDM0_RxDetector1 0xC30 /* rtw_mp.c */
|
||||
#define rOFDM0_ECCAThreshold 0xC4C /* phydm only */
|
||||
#define rOFDM0_XAAGCCore1 0xC50 /* phydm only */
|
||||
#define rA_IGI_Jaguar 0xC50 /* Initial Gain for path-A (hal_mp.c) */
|
||||
#define rOFDM0_XBAGCCore1 0xC58 /* phydm only */
|
||||
#define rOFDM0_XATxIQImbalance 0xC80 /* phydm only */
|
||||
#define rA_LSSIWrite_Jaguar 0xC90 /* RF write addr, LSSI Parameter (rtl8822b_phy.c) */
|
||||
|
||||
#define rOFDM1_LSTF 0xD00
|
||||
#define rOFDM1_TRxPathEnable 0xD04 /* hal_mp.c */
|
||||
#define rA_PIRead_Jaguar 0xD04 /* RF readback with PI (rtl8723f_phy.c) */
|
||||
#define rA_SIRead_Jaguar 0xD08 /* RF readback with SI (rtl8723f_phy.c) */
|
||||
#define rB_PIRead_Jaguar 0xD44 /* RF readback with PI (rtl8723f_phy.c) */
|
||||
#define rB_SIRead_Jaguar 0xD48 /* RF readback with SI (rtl8723f_phy.c) */
|
||||
|
||||
#define rTxAGC_A_Rate18_06 0xE00
|
||||
#define rTxAGC_A_Rate54_24 0xE04
|
||||
#define rTxAGC_A_CCK1_Mcs32 0xE08
|
||||
#define rTxAGC_A_Mcs03_Mcs00 0xE10
|
||||
#define rTxAGC_A_Mcs07_Mcs04 0xE14
|
||||
#define rTxAGC_A_Mcs11_Mcs08 0xE18
|
||||
#define rTxAGC_A_Mcs15_Mcs12 0xE1C
|
||||
#define rB_TxScale_Jaguar 0xE1C /* Path_B TX scaling factor (hal_mp.c) */
|
||||
#define rB_IGI_Jaguar 0xE50 /* Initial Gain for path-B (hal_mp.c) */
|
||||
#define rB_LSSIWrite_Jaguar 0xE90 /* RF write addr, LSSI Parameter (rtl8822b_phy.c) */
|
||||
/* RFE */
|
||||
#define rA_RFE_Pinmux_Jaguar 0xCB0 /* hal_mp.c */
|
||||
#define rB_RFE_Pinmux_Jaguar 0xEB0 /* Path_B RFE control pinmux */
|
||||
#define rA_RFE_Inv_Jaguar 0xCB4 /* Path_A RFE cotrol */
|
||||
#define rB_RFE_Inv_Jaguar 0xEB4 /* Path_B RFE control */
|
||||
#define rA_RFE_Jaguar 0xCB8 /* Path_A RFE cotrol */
|
||||
#define rB_RFE_Jaguar 0xEB8 /* Path_B RFE control */
|
||||
#define rA_RFE_Inverse_Jaguar 0xCBC /* Path_A RFE control inverse */
|
||||
#define rB_RFE_Inverse_Jaguar 0xEBC /* Path_B RFE control inverse */
|
||||
#define r_ANTSEL_SW_Jaguar 0x900 /* ANTSEL SW Control */
|
||||
#define bMask_RFEInv_Jaguar 0x3FF00000
|
||||
#define bMask_AntselPathFollow_Jaguar 0x00030000
|
||||
|
||||
#define rC_RFE_Pinmux_Jaguar 0x18B4 /* Path_C RFE cotrol pinmux*/
|
||||
#define rD_RFE_Pinmux_Jaguar 0x1AB4 /* Path_D RFE cotrol pinmux*/
|
||||
#define rA_RFE_Sel_Jaguar2 0x1990
|
||||
|
||||
/* Page1(0x100) */
|
||||
#define bBBResetB 0x100
|
||||
|
||||
/* Page8(0x800) */
|
||||
#define bCCKEn 0x1000000
|
||||
#define bOFDMEn 0x2000000
|
||||
/* Reg 0x80C rFPGA0_TxGainStage */
|
||||
#define bXBTxAGC 0xF00
|
||||
#define bXCTxAGC 0xF000
|
||||
#define bXDTxAGC 0xF0000
|
||||
|
||||
/* PageA(0xA00) */
|
||||
#define bCCKBBMode 0x3
|
||||
|
||||
#define bCCKScramble 0x8
|
||||
#define bCCKTxRate 0x3000
|
||||
|
||||
/* General */
|
||||
#define bMaskByte0 0xFF /* mp, rtw_odm.c & phydm */
|
||||
#define bMaskByte1 0xFF00 /* hal_mp.c & phydm */
|
||||
#define bMaskByte2 0xFF0000 /* hal_mp.c & phydm */
|
||||
#define bMaskByte3 0xFF000000 /* hal_mp.c & phydm */
|
||||
#define bMaskHWord 0xFFFF0000 /* hal_com.c, rtw_mp.c */
|
||||
#define bMaskLWord 0x0000FFFF /* mp, hal_com.c & phydm */
|
||||
#define bMaskDWord 0xFFFFFFFF /* mp, hal, rtw_odm.c & phydm */
|
||||
|
||||
#define bEnable 0x1 /* hal_mp.c, rtw_mp.c */
|
||||
#define bDisable 0x0 /* rtw_mp.c */
|
||||
|
||||
#define MAX_STALL_TIME 50 /* unit: us, hal_com_phycfg.c */
|
||||
|
||||
#define Rx_Smooth_Factor 20 /* phydm only */
|
||||
|
||||
/*
|
||||
* RF Register definition
|
||||
*/
|
||||
#define RF_AC 0x00
|
||||
#define RF_AC_Jaguar 0x00 /* hal_mp.c */
|
||||
#define RF_CHNLBW 0x18 /* rtl8723f_phy.c */
|
||||
#define RF_ModeTableAddr 0x30 /* rtl8723f_phy.c */
|
||||
#define RF_ModeTableData0 0x31 /* rtl8723f_phy.c */
|
||||
#define RF_ModeTableData1 0x32 /* rtl8723f_phy.c */
|
||||
#define RF_0x52 0x52
|
||||
#define RF_WeLut_Jaguar 0xEF /* rtl8723f_phy.c */
|
||||
|
||||
/* rtw_lps_state_chk() @hal_com.c */
|
||||
#define BIT_PWRBIT_OW_EN BIT_WMAC_TCR_PWRMGT_CTL_8723F
|
||||
|
||||
/*
|
||||
* General Functions
|
||||
*/
|
||||
void rtl8723f_init_hal_spec(PADAPTER); /* hal/hal_com.c */
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
/* MP Functions */
|
||||
#include <rtw_mp.h> /* struct mp_priv */
|
||||
void rtl8723f_prepare_mp_txdesc(PADAPTER, struct mp_priv *); /* rtw_mp.c */
|
||||
void rtl8723f_mp_config_rfpath(PADAPTER); /* hal_mp.c */
|
||||
#endif
|
||||
void hw_var_set_dl_rsvd_page(PADAPTER adapter, u8 mstatus);
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <rtl8723fu_hal.h>
|
||||
#elif defined(CONFIG_SDIO_HCI)
|
||||
#include <rtl8723fs_hal.h>
|
||||
#endif
|
||||
|
||||
#endif /* _RTL8723F_HAL_H_ */
|
||||
31
include/rtl8723fs_hal.h
Normal file
31
include/rtl8723fs_hal.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2019 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef _RTL8723FS_HAL_H_
|
||||
#define _RTL8723FS_HAL_H_
|
||||
|
||||
#include <drv_types.h> /* PADAPTER */
|
||||
|
||||
/* rtl8723fs_ops.c */
|
||||
void rtl8723fs_set_hal_ops(PADAPTER);
|
||||
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
void rtl8723fs_disable_interrupt_but_cpwm2(PADAPTER adapter);
|
||||
#endif
|
||||
|
||||
/* rtl8723fs_xmit.c */
|
||||
s32 rtl8723fs_dequeue_writeport(PADAPTER);
|
||||
#define _dequeue_writeport(a) rtl8723fs_dequeue_writeport(a)
|
||||
|
||||
#endif /* _RTL8723FS_HAL_H_ */
|
||||
61
include/rtl8723fu_hal.h
Normal file
61
include/rtl8723fu_hal.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2019 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef _RTL8723FU_HAL_H_
|
||||
#define _RTL8723FU_HAL_H_
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <drv_types.h> /* PADAPTER */
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#ifdef USB_PACKET_OFFSET_SZ
|
||||
#define PACKET_OFFSET_SZ (USB_PACKET_OFFSET_SZ)
|
||||
#else
|
||||
#define PACKET_OFFSET_SZ (8)
|
||||
#endif
|
||||
#define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ)
|
||||
#endif
|
||||
|
||||
/* undefine MAX_RECVBUF_SZ from rtl8723f_hal.h */
|
||||
#ifdef MAX_RECVBUF_SZ
|
||||
#undef MAX_RECVBUF_SZ
|
||||
#endif
|
||||
|
||||
/* recv_buffer must be large than usb agg size */
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
/* use 16k to workaround for HISILICON platform */
|
||||
#define MAX_RECVBUF_SZ (16384)
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768)
|
||||
#endif
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000)
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
/* rtl8723fu_ops.c */
|
||||
void rtl8723fu_set_hal_ops(PADAPTER padapter);
|
||||
void rtl8723fu_set_hw_type(struct dvobj_priv *pdvobj);
|
||||
|
||||
/* rtl8723fu_io.c */
|
||||
void rtl8723fu_set_intf_ops(struct _io_ops *pops);
|
||||
|
||||
#endif /* CONFIG_USB_HCI */
|
||||
|
||||
|
||||
#endif /* _RTL8723FU_HAL_H_ */
|
||||
@@ -118,12 +118,6 @@ void rtl8812_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
void rtl8812_set_FwPwrModeInIPS_cmd(PADAPTER padapter, u8 cmd_param);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8812_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ------------------------------------
|
||||
* C2H format
|
||||
* ------------------------------------ */
|
||||
|
||||
@@ -318,9 +318,7 @@ void rtl8812a_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 I
|
||||
void rtl8812a_fill_txdesc_sectype(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8812a_fill_txdesc_vcs(PADAPTER padapter, struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8812a_fill_txdesc_phy(PADAPTER padapter, struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
@@ -328,6 +326,9 @@ s32 rtl8812au_init_xmit_priv(PADAPTER padapter);
|
||||
void rtl8812au_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8812au_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8812au_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8812au_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8812au_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8812au_xmit_buf_handler(PADAPTER padapter);
|
||||
void rtl8812au_xmit_tasklet(void *priv);
|
||||
@@ -341,6 +342,9 @@ struct xmit_buf *rtl8812ae_dequeue_xmitbuf(struct rtw_tx_ring *ring);
|
||||
void rtl8812ae_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8812ae_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8812ae_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8812ae_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8812ae_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8812ae_xmit_tasklet(void *priv);
|
||||
|
||||
|
||||
6
include/rtl8814a_cmd.h
Executable file → Normal file
6
include/rtl8814a_cmd.h
Executable file → Normal file
@@ -141,11 +141,7 @@ void rtl8814_set_FwPwrMode_cmd(PADAPTER padapter, u8 PSMode);
|
||||
u8 GetTxBufferRsvdPageNum8814(_adapter *padapter, bool wowlan);
|
||||
void rtl8814_req_txrpt_cmd(PADAPTER padapter, u8 macid);
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
void rtl8814_set_BcnEarly_C2H_Rpt_cmd(PADAPTER padapter, u8 enable);
|
||||
#endif
|
||||
#endif
|
||||
void rtl8814a_set_FwPwrModeInIPS_cmd(PADAPTER padapter, u8 cmd_param);
|
||||
|
||||
void
|
||||
Set_RA_LDPC_8814(
|
||||
|
||||
1
include/rtl8814a_hal.h
Executable file → Normal file
1
include/rtl8814a_hal.h
Executable file → Normal file
@@ -318,6 +318,7 @@ void rtl8814_stop_thread(PADAPTER padapter);
|
||||
BOOLEAN InterruptRecognized8814AE(PADAPTER Adapter);
|
||||
void UpdateInterruptMask8814AE(PADAPTER Adapter, u32 AddMSR, u32 AddMSR1, u32 RemoveMSR, u32 RemoveMSR1);
|
||||
void InitMAC_TRXBD_8814AE(PADAPTER Adapter);
|
||||
void rtl8814ae_reset_desc_ring(_adapter *padapter);
|
||||
u16 get_txbd_rw_reg(u16 ff_hwaddr);
|
||||
#endif
|
||||
|
||||
|
||||
0
include/rtl8814a_recv.h
Executable file → Normal file
0
include/rtl8814a_recv.h
Executable file → Normal file
5
include/rtl8814a_spec.h
Executable file → Normal file
5
include/rtl8814a_spec.h
Executable file → Normal file
@@ -486,6 +486,11 @@
|
||||
#define REG_MGQ_HIQ_INFO_8814A 0x1410
|
||||
#define REG_CMDQ_BCNQ_INFO_8814A 0x1414
|
||||
|
||||
#define REG_MACID_DROP0_8814A 0x1450
|
||||
#define REG_MACID_DROP1_8814A 0x1454
|
||||
#define REG_MACID_DROP2_8814A 0x1458
|
||||
#define REG_MACID_DROP3_8814A 0x145C
|
||||
|
||||
#define DDMA_LEN_MASK 0x0001FFFF
|
||||
#define FW_CHKSUM_DUMMY_SZ 8
|
||||
#define DDMA_CH_CHKSUM_CNT BIT(24)
|
||||
|
||||
10
include/rtl8814a_xmit.h
Executable file → Normal file
10
include/rtl8814a_xmit.h
Executable file → Normal file
@@ -264,9 +264,7 @@ void rtl8814a_fill_fake_txdesc(PADAPTER padapter, u8 *pDesc, u32 BufferLen, u8 I
|
||||
void rtl8814a_fill_txdesc_sectype(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8814a_fill_txdesc_vcs(PADAPTER padapter, struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8814a_fill_txdesc_phy(PADAPTER padapter, struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
#endif
|
||||
void fill_txdesc_force_bmc_camid(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
@@ -274,6 +272,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8814au_free_xmit_priv(PADAPTER padapter);
|
||||
s32 rtl8814au_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8814au_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8814au_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8814au_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8814au_xmit_buf_handler(PADAPTER padapter);
|
||||
void rtl8814au_xmit_tasklet(void *priv);
|
||||
@@ -287,6 +288,9 @@ void fill_txdesc_bmc_tx_rate(struct pkt_attrib *pattrib, u8 *ptxdesc);
|
||||
void rtl8814ae_xmitframe_resume(_adapter *padapter);
|
||||
s32 rtl8814ae_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtl8814ae_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8814ae_hal_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 rtl8814ae_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtl8814ae_xmit_tasklet(void *priv);
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
|
||||
0
include/rtl8814b_hal.h
Executable file → Normal file
0
include/rtl8814b_hal.h
Executable file → Normal file
0
include/rtl8814bu_hal.h
Executable file → Normal file
0
include/rtl8814bu_hal.h
Executable file → Normal file
@@ -140,6 +140,9 @@ s32 InitXmitPriv8821AS(PADAPTER padapter);
|
||||
void FreeXmitPriv8821AS(PADAPTER padapter);
|
||||
s32 XmitBufHandler8821AS(PADAPTER padapter);
|
||||
s32 MgntXmit8821AS(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
s32 rtl8821as_hal_mgmt_xmit_enqueue(PADAPTER adapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
s32 HalXmitNoLock8821AS(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
s32 HalXmit8821AS(PADAPTER padapter, struct xmit_frame *pxmitframe);
|
||||
#ifndef CONFIG_SDIO_TX_TASKLET
|
||||
|
||||
0
include/rtl8821ce_hal.h
Executable file → Normal file
0
include/rtl8821ce_hal.h
Executable file → Normal file
0
include/rtl8822be_hal.h
Executable file → Normal file
0
include/rtl8822be_hal.h
Executable file → Normal file
4
include/rtl8822c_hal.h
Executable file → Normal file
4
include/rtl8822c_hal.h
Executable file → Normal file
@@ -34,7 +34,11 @@
|
||||
#endif
|
||||
#define MAX_RECVBUF_SZ (DEF_RECVBUF_SZ + RX_FIFO_EXPANDING)
|
||||
#else /* !CONFIG_SUPPORT_TRX_SHARED */
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define MAX_RECVBUF_SZ 12288 /* 12KB */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ 24576 /* 24KB, TX: 256KB */
|
||||
#endif /* !CONFIG_PCI_HCI */
|
||||
#endif /* !CONFIG_SUPPORT_TRX_SHARED */
|
||||
|
||||
/*
|
||||
|
||||
0
include/rtl8822ce_hal.h
Executable file → Normal file
0
include/rtl8822ce_hal.h
Executable file → Normal file
0
include/rtl8822cs_hal.h
Executable file → Normal file
0
include/rtl8822cs_hal.h
Executable file → Normal file
0
include/rtl8822cu_hal.h
Executable file → Normal file
0
include/rtl8822cu_hal.h
Executable file → Normal file
257
include/rtw_ap.h
257
include/rtw_ap.h
@@ -1,114 +1,143 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __RTW_AP_H_
|
||||
#define __RTW_AP_H_
|
||||
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
/* external function */
|
||||
extern void rtw_indicate_sta_assoc_event(_adapter *padapter, struct sta_info *psta);
|
||||
extern void rtw_indicate_sta_disassoc_event(_adapter *padapter, struct sta_info *psta);
|
||||
|
||||
|
||||
void init_mlme_ap_info(_adapter *padapter);
|
||||
void free_mlme_ap_info(_adapter *padapter);
|
||||
u8 rtw_set_tim_ie(u8 dtim_cnt, u8 dtim_period
|
||||
, const u8 *tim_bmp, u8 tim_bmp_len, u8 *tim_ie);
|
||||
/* void update_BCNTIM(_adapter *padapter); */
|
||||
void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len);
|
||||
void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index);
|
||||
void _update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx, u8 flags, const char *tag);
|
||||
#define update_beacon(adapter, ie_id, oui, tx, flags) _update_beacon((adapter), (ie_id), (oui), (tx), (flags), __func__)
|
||||
/*update_beacon - (flags) can set to normal enqueue (0) and RTW_CMDF_WAIT_ACK enqueue.
|
||||
(flags) = RTW_CMDF_DIRECTLY is not currently implemented, it will do normal enqueue.*/
|
||||
|
||||
void rtw_ap_update_sta_ra_info(_adapter *padapter, struct sta_info *psta);
|
||||
|
||||
void expire_timeout_chk(_adapter *padapter);
|
||||
void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta);
|
||||
void rtw_start_bss_hdl_after_chbw_decided(_adapter *adapter);
|
||||
void start_bss_network(_adapter *padapter, struct createbss_parm *parm);
|
||||
int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len);
|
||||
void rtw_ap_restore_network(_adapter *padapter);
|
||||
|
||||
#if CONFIG_RTW_MACADDR_ACL
|
||||
void rtw_macaddr_acl_init(_adapter *adapter, u8 period);
|
||||
void rtw_macaddr_acl_deinit(_adapter *adapter, u8 period);
|
||||
void rtw_macaddr_acl_clear(_adapter *adapter, u8 period);
|
||||
void rtw_set_macaddr_acl(_adapter *adapter, u8 period, int mode);
|
||||
int rtw_acl_add_sta(_adapter *adapter, u8 period, const u8 *addr);
|
||||
int rtw_acl_remove_sta(_adapter *adapter, u8 period, const u8 *addr);
|
||||
#endif /* CONFIG_RTW_MACADDR_ACL */
|
||||
|
||||
u8 rtw_ap_set_sta_key(_adapter *adapter, const u8 *addr, u8 alg, const u8 *key, u8 keyid, u8 gk);
|
||||
u8 rtw_ap_set_pairwise_key(_adapter *padapter, struct sta_info *psta);
|
||||
int rtw_ap_set_group_key(_adapter *padapter, u8 *key, u8 alg, int keyid);
|
||||
int rtw_ap_set_wep_key(_adapter *padapter, u8 *key, u8 keylen, int keyid, u8 set_tx);
|
||||
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
void associated_clients_update(_adapter *padapter, u8 updated, u32 sta_info_type);
|
||||
void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta);
|
||||
u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta);
|
||||
void sta_info_update(_adapter *padapter, struct sta_info *psta);
|
||||
void ap_sta_info_defer_update(_adapter *padapter, struct sta_info *psta);
|
||||
u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reason, bool enqueue);
|
||||
int rtw_sta_flush(_adapter *padapter, bool enqueue);
|
||||
int rtw_ap_inform_ch_switch(_adapter *padapter, u8 new_ch, u8 ch_offset);
|
||||
void start_ap_mode(_adapter *padapter);
|
||||
void stop_ap_mode(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw, u8 offset);
|
||||
u8 rtw_ap_chbw_decision(_adapter *adapter, u8 ifbmp, u8 excl_ifbmp
|
||||
, s16 req_ch, s8 req_bw, s8 req_offset, u8 *ch, u8 *bw, u8 *offset, u8 *chbw_allow);
|
||||
|
||||
#ifdef CONFIG_AUTO_AP_MODE
|
||||
void rtw_auto_ap_rx_msg_dump(_adapter *padapter, union recv_frame *precv_frame, u8 *ehdr_pos);
|
||||
extern void rtw_start_auto_ap(_adapter *adapter);
|
||||
#endif /* CONFIG_AUTO_AP_MODE */
|
||||
|
||||
void rtw_ap_parse_sta_capability(_adapter *adapter, struct sta_info *sta, u8 *cap);
|
||||
u16 rtw_ap_parse_sta_supported_rates(_adapter *adapter, struct sta_info *sta, u8 *tlv_ies, u16 tlv_ies_len);
|
||||
u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct rtw_ieee802_11_elems *elems);
|
||||
void rtw_ap_parse_sta_wmm_ie(_adapter *adapter, struct sta_info *sta, u8 *tlv_ies, u16 tlv_ies_len);
|
||||
void rtw_ap_parse_sta_ht_ie(_adapter *adapter, struct sta_info *sta, struct rtw_ieee802_11_elems *elems);
|
||||
void rtw_ap_parse_sta_vht_ie(_adapter *adapter, struct sta_info *sta, struct rtw_ieee802_11_elems *elems);
|
||||
|
||||
void update_bmc_sta(_adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_BMC_TX_RATE_SELECT
|
||||
void rtw_update_bmc_sta_tx_rate(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
void rtw_process_ht_action_smps(_adapter *padapter, u8 *ta, u8 ctrl_field);
|
||||
void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_len);
|
||||
#ifdef CONFIG_80211N_HT
|
||||
int rtw_ht_operation_update(_adapter *padapter);
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
u8 rtw_ap_sta_states_check(_adapter *adapter);
|
||||
|
||||
#ifdef CONFIG_FW_HANDLE_TXBCN
|
||||
#define rtw_ap_get_nums(adapter) (adapter_to_dvobj(adapter)->nr_ap_if)
|
||||
bool rtw_ap_nums_check(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
void tx_beacon_handlder(struct dvobj_priv *pdvobj);
|
||||
void tx_beacon_timer_handlder(void *ctx);
|
||||
#endif /*CONFIG_SWTIMER_BASED_TXBCN*/
|
||||
|
||||
#endif /* end of CONFIG_AP_MODE */
|
||||
#endif /*__RTW_AP_H_*/
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __RTW_AP_H_
|
||||
#define __RTW_AP_H_
|
||||
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
/* external function */
|
||||
extern void rtw_indicate_sta_assoc_event(_adapter *padapter, struct sta_info *psta);
|
||||
extern void rtw_indicate_sta_disassoc_event(_adapter *padapter, struct sta_info *psta);
|
||||
|
||||
|
||||
void init_mlme_ap_info(_adapter *padapter);
|
||||
void free_mlme_ap_info(_adapter *padapter);
|
||||
u8 rtw_set_tim_ie(u8 dtim_cnt, u8 dtim_period
|
||||
, const u8 *tim_bmp, u8 tim_bmp_len, u8 *tim_ie);
|
||||
/* void update_BCNTIM(_adapter *padapter); */
|
||||
void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *data, u8 len);
|
||||
void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index);
|
||||
void _update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx, u8 flags, const char *tag);
|
||||
#define update_beacon(adapter, ie_id, oui, tx, flags) _update_beacon((adapter), (ie_id), (oui), (tx), (flags), __func__)
|
||||
/*update_beacon - (flags) can set to normal enqueue (0) and RTW_CMDF_WAIT_ACK enqueue.
|
||||
(flags) = RTW_CMDF_DIRECTLY is not currently implemented, it will do normal enqueue.*/
|
||||
|
||||
void rtw_ap_update_sta_ra_info(_adapter *padapter, struct sta_info *psta);
|
||||
|
||||
void expire_timeout_chk(_adapter *padapter);
|
||||
void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta);
|
||||
void rtw_start_bss_hdl_after_chbw_decided(_adapter *adapter);
|
||||
void start_bss_network(_adapter *padapter, struct createbss_parm *parm);
|
||||
int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len);
|
||||
void rtw_ap_restore_network(_adapter *padapter);
|
||||
|
||||
#if CONFIG_RTW_MACADDR_ACL
|
||||
void rtw_macaddr_acl_init(_adapter *adapter, u8 period);
|
||||
void rtw_macaddr_acl_deinit(_adapter *adapter, u8 period);
|
||||
void rtw_macaddr_acl_clear(_adapter *adapter, u8 period);
|
||||
void rtw_set_macaddr_acl(_adapter *adapter, u8 period, int mode);
|
||||
int rtw_acl_add_sta(_adapter *adapter, u8 period, const u8 *addr);
|
||||
int rtw_acl_remove_sta(_adapter *adapter, u8 period, const u8 *addr);
|
||||
#endif /* CONFIG_RTW_MACADDR_ACL */
|
||||
|
||||
u8 rtw_ap_set_sta_key(_adapter *adapter, const u8 *addr, u8 alg, const u8 *key, u8 keyid, u8 gk);
|
||||
u8 rtw_ap_set_pairwise_key(_adapter *padapter, struct sta_info *psta);
|
||||
int rtw_ap_set_group_key(_adapter *padapter, u8 *key, u8 alg, int keyid);
|
||||
int rtw_ap_set_wep_key(_adapter *padapter, u8 *key, u8 keylen, int keyid, u8 set_tx);
|
||||
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
void associated_clients_update(_adapter *padapter, u8 updated, u32 sta_info_type);
|
||||
void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta);
|
||||
u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta);
|
||||
void sta_info_update(_adapter *padapter, struct sta_info *psta);
|
||||
void ap_sta_info_defer_update(_adapter *padapter, struct sta_info *psta);
|
||||
u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reason, bool enqueue);
|
||||
int rtw_sta_flush(_adapter *padapter, bool enqueue);
|
||||
int rtw_ap_inform_ch_switch(_adapter *padapter, u8 new_ch, u8 ch_offset);
|
||||
void start_ap_mode(_adapter *padapter);
|
||||
void stop_ap_mode(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw, u8 offset);
|
||||
u8 rtw_ap_chbw_decision(_adapter *adapter, u8 ifbmp, u8 excl_ifbmp
|
||||
, s16 req_ch, s8 req_bw, s8 req_offset, u8 *ch, u8 *bw, u8 *offset, u8 *chbw_allow, bool *set_u_ch);
|
||||
|
||||
#ifdef CONFIG_AUTO_AP_MODE
|
||||
void rtw_auto_ap_rx_msg_dump(_adapter *padapter, union recv_frame *precv_frame, u8 *ehdr_pos);
|
||||
extern void rtw_start_auto_ap(_adapter *adapter);
|
||||
#endif /* CONFIG_AUTO_AP_MODE */
|
||||
|
||||
void rtw_ap_parse_sta_capability(_adapter *adapter, struct sta_info *sta, u8 *cap);
|
||||
u16 rtw_ap_parse_sta_supported_rates(_adapter *adapter, struct sta_info *sta, u8 *tlv_ies, u16 tlv_ies_len);
|
||||
u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct rtw_ieee802_11_elems *elems);
|
||||
void rtw_ap_parse_sta_wmm_ie(_adapter *adapter, struct sta_info *sta, u8 *tlv_ies, u16 tlv_ies_len);
|
||||
void rtw_ap_parse_sta_ht_ie(_adapter *adapter, struct sta_info *sta, struct rtw_ieee802_11_elems *elems);
|
||||
void rtw_ap_parse_sta_vht_ie(_adapter *adapter, struct sta_info *sta, struct rtw_ieee802_11_elems *elems);
|
||||
void rtw_ap_parse_sta_multi_ap_ie(_adapter *adapter, struct sta_info *sta, u8 *ies, int ies_len);
|
||||
|
||||
/* b2u flags */
|
||||
#define RTW_AP_B2U_ALL BIT0
|
||||
#define RTW_AP_B2U_GA_UCAST BIT1 /* WDS group addressed unicast frame, forward only */
|
||||
#define RTW_AP_B2U_BCAST BIT2
|
||||
#define RTW_AP_B2U_IP_MCAST BIT3
|
||||
|
||||
#define rtw_ap_src_b2u_policy_chk(flags, da) ( \
|
||||
(flags & RTW_AP_B2U_ALL) \
|
||||
|| ((flags & RTW_AP_B2U_BCAST) && is_broadcast_mac_addr(da)) \
|
||||
|| ((flags & RTW_AP_B2U_IP_MCAST) && (IP_MCAST_MAC(da) || ICMPV6_MCAST_MAC(da))) \
|
||||
)
|
||||
|
||||
#define rtw_ap_fwd_b2u_policy_chk(flags, da, gaucst) ( \
|
||||
(flags & RTW_AP_B2U_ALL) \
|
||||
|| ((flags & RTW_AP_B2U_GA_UCAST) && gaucst) \
|
||||
|| ((flags & RTW_AP_B2U_BCAST) && is_broadcast_mac_addr(da)) \
|
||||
|| ((flags & RTW_AP_B2U_IP_MCAST) && (IP_MCAST_MAC(da) || ICMPV6_MCAST_MAC(da))) \
|
||||
)
|
||||
|
||||
void dump_ap_b2u_flags(void *sel, _adapter *adapter);
|
||||
|
||||
int rtw_ap_addr_resolve(_adapter *adapter, u16 os_qid, struct xmit_frame *xframe, _pkt *pkt, _list *b2u_list);
|
||||
int rtw_ap_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, struct sta_info **sta);
|
||||
int rtw_ap_rx_msdu_act_check(union recv_frame *rframe
|
||||
, const u8 *da, const u8 *sa
|
||||
, u8 *msdu, enum rtw_rx_llc_hdl llc_hdl
|
||||
, struct xmit_frame **fwd_frame, _list *b2u_list);
|
||||
|
||||
void update_bmc_sta(_adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_BMC_TX_RATE_SELECT
|
||||
void rtw_update_bmc_sta_tx_rate(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
void rtw_process_ht_action_smps(_adapter *padapter, u8 *ta, u8 ctrl_field);
|
||||
void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_len);
|
||||
#ifdef CONFIG_80211N_HT
|
||||
int rtw_ht_operation_update(_adapter *padapter);
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
u8 rtw_ap_sta_states_check(_adapter *adapter);
|
||||
|
||||
#ifdef CONFIG_FW_HANDLE_TXBCN
|
||||
#define rtw_ap_get_nums(adapter) (adapter_to_dvobj(adapter)->nr_ap_if)
|
||||
bool rtw_ap_nums_check(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
void tx_beacon_handlder(struct dvobj_priv *pdvobj);
|
||||
void tx_beacon_timer_handlder(void *ctx);
|
||||
#endif /*CONFIG_SWTIMER_BASED_TXBCN*/
|
||||
|
||||
#endif /* end of CONFIG_AP_MODE */
|
||||
#endif /*__RTW_AP_H_*/
|
||||
|
||||
@@ -57,6 +57,12 @@ typedef enum _BTCOEX_SUSPEND_STATE {
|
||||
BTCOEX_SUSPEND_STATE_MAX
|
||||
} BTCOEX_SUSPEND_STATE, *PBTCOEX_SUSPEND_STATE;
|
||||
|
||||
typedef enum _BTCOEX_POLICY_CONTROL {
|
||||
BTCOEX_POLICY_CONTROL_AUTO,
|
||||
BTCOEX_POLICY_CONTROL_FORCE_FREERUN,
|
||||
BTCOEX_POLICY_CONTROL_FORCE_TDMA
|
||||
} BTCOEX_POLICY_CONTROL, *PBTCOEX_POLICY_CONTROL;
|
||||
|
||||
#define SET_BT_MP_OPER_RET(OpCode, StatusCode) ((OpCode << 8) | StatusCode)
|
||||
#define GET_OP_CODE_FROM_BT_MP_OPER_RET(RetCode) ((RetCode & 0xF0) >> 8)
|
||||
#define GET_STATUS_CODE_FROM_BT_MP_OPER_RET(RetCode) (RetCode & 0x0F)
|
||||
@@ -376,6 +382,7 @@ void rtw_btcoex_ScanNotify(PADAPTER, u8 type);
|
||||
void rtw_btcoex_MediaStatusNotify(PADAPTER, u8 mediaStatus);
|
||||
void rtw_btcoex_SpecialPacketNotify(PADAPTER, u8 pktType);
|
||||
void rtw_btcoex_IQKNotify(PADAPTER padapter, u8 state);
|
||||
void rtw_btcoex_WLRFKNotify(PADAPTER padapter, u8 path, u8 type, u8 state);
|
||||
void rtw_btcoex_BtInfoNotify(PADAPTER, u8 length, u8 *tmpBuf);
|
||||
void rtw_btcoex_BtMpRptNotify(PADAPTER, u8 length, u8 *tmpBuf);
|
||||
void rtw_btcoex_SuspendNotify(PADAPTER, u8 state);
|
||||
@@ -391,6 +398,7 @@ s32 rtw_btcoex_IsBTCoexRejectAMPDU(PADAPTER padapter);
|
||||
s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(PADAPTER);
|
||||
u32 rtw_btcoex_GetAMPDUSize(PADAPTER);
|
||||
void rtw_btcoex_SetManualControl(PADAPTER, u8 bmanual);
|
||||
void rtw_btcoex_set_policy_control(PADAPTER, u8 btc_policy);
|
||||
u8 rtw_btcoex_1Ant(PADAPTER);
|
||||
u8 rtw_btcoex_IsBtControlLps(PADAPTER);
|
||||
u8 rtw_btcoex_IsLpsOn(PADAPTER);
|
||||
|
||||
@@ -183,9 +183,10 @@ extern void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv);
|
||||
extern void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
|
||||
#ifdef CONFIG_P2P
|
||||
u8 p2p_protocol_wk_cmd(_adapter *padapter, int intCmdType);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
struct p2p_roch_parm {
|
||||
struct rtw_roch_parm {
|
||||
u64 cookie;
|
||||
struct wireless_dev *wdev;
|
||||
struct ieee80211_channel ch;
|
||||
@@ -193,18 +194,15 @@ struct p2p_roch_parm {
|
||||
unsigned int duration;
|
||||
};
|
||||
|
||||
u8 p2p_roch_cmd(_adapter *adapter
|
||||
u8 rtw_roch_cmd(_adapter *adapter
|
||||
, u64 cookie, struct wireless_dev *wdev
|
||||
, struct ieee80211_channel *ch, enum nl80211_channel_type ch_type
|
||||
, unsigned int duration
|
||||
, u8 flags
|
||||
);
|
||||
u8 p2p_cancel_roch_cmd(_adapter *adapter, u64 cookie, struct wireless_dev *wdev, u8 flags);
|
||||
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
#endif /* CONFIG_P2P */
|
||||
u8 rtw_cancel_roch_cmd(_adapter *adapter, u64 cookie, struct wireless_dev *wdev, u8 flags);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
u8 rtw_mgnt_tx_cmd(_adapter *adapter, u8 tx_ch, u8 no_cck, const u8 *buf, size_t len, int wait_ack, u8 flags);
|
||||
struct mgnt_tx_parm {
|
||||
u8 tx_ch;
|
||||
@@ -248,6 +246,7 @@ enum rtw_drvextra_cmd_id {
|
||||
#ifdef CONFIG_RTW_REPEATER_SON
|
||||
RSON_SCAN_WK_CID,
|
||||
#endif
|
||||
ROCH_WK_CID,
|
||||
MGNT_TX_WK_CID,
|
||||
REQ_PER_CMD_WK_CID,
|
||||
SSMPS_WK_CID,
|
||||
@@ -257,6 +256,9 @@ enum rtw_drvextra_cmd_id {
|
||||
AC_PARM_CMD_WK_CID,
|
||||
#ifdef CONFIG_AP_MODE
|
||||
STOP_AP_WK_CID,
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
TBTX_CONTROL_TX_WK_CID,
|
||||
#endif
|
||||
MAX_WK_CID
|
||||
};
|
||||
@@ -288,26 +290,6 @@ enum RFINTFS {
|
||||
HWPI,
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Infra, Ad-HoC(C)
|
||||
|
||||
Notes: To enter USB suspend mode
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct usb_suspend_parm {
|
||||
u32 action;/* 1: sleep, 0:resume */
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Infra, Ad-HoC
|
||||
|
||||
Notes: To join a known BSS.
|
||||
|
||||
Command-Event Mode
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
Caller Mode: Infra, Ad-Hoc
|
||||
@@ -351,20 +333,6 @@ struct createbss_parm {
|
||||
s8 req_offset;
|
||||
};
|
||||
|
||||
#if 0
|
||||
/* Caller Mode: AP, Ad-HoC, Infra */
|
||||
/* Notes: To set the NIC mode of RTL8711 */
|
||||
/* Command Mode */
|
||||
/* The definition of mode: */
|
||||
|
||||
#define IW_MODE_AUTO 0 /* Let the driver decides which AP to join */
|
||||
#define IW_MODE_ADHOC 1 /* Single cell network (Ad-Hoc Clients) */
|
||||
#define IW_MODE_INFRA 2 /* Multi cell network, roaming, .. */
|
||||
#define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
|
||||
#define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */
|
||||
#define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */
|
||||
#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
|
||||
#endif
|
||||
|
||||
struct setopmode_parm {
|
||||
u8 mode;
|
||||
@@ -396,6 +364,7 @@ struct sitesurvey_parm {
|
||||
u8 bw; /* 0: use default */
|
||||
|
||||
bool acs; /* aim to trigger channel selection when scan done */
|
||||
u8 reason;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -428,7 +397,7 @@ struct setkey_parm {
|
||||
u8 algorithm; /* encryption algorithm, could be none, wep40, TKIP, CCMP, wep104 */
|
||||
u8 keyid;
|
||||
u8 set_tx; /* 1: main tx key for wep. 0: other key. */
|
||||
u8 key[16]; /* this could be 40 or 104 */
|
||||
u8 key[32]; /* this could be 40 or 104 */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -444,7 +413,7 @@ struct set_stakey_parm {
|
||||
u8 addr[ETH_ALEN];
|
||||
u8 algorithm;
|
||||
u8 keyid;
|
||||
u8 key[16];
|
||||
u8 key[32];
|
||||
u8 gk;
|
||||
};
|
||||
|
||||
@@ -454,182 +423,6 @@ struct set_stakey_rsp {
|
||||
u8 rsvd;
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Ad-Hoc/AP
|
||||
|
||||
Command -Rsp(AID == CAMID) mode
|
||||
|
||||
This is to force fw to add an sta_data entry per driver's request.
|
||||
|
||||
FW will write an cam entry associated with it.
|
||||
|
||||
*/
|
||||
struct set_assocsta_parm {
|
||||
u8 addr[ETH_ALEN];
|
||||
};
|
||||
|
||||
struct set_assocsta_rsp {
|
||||
u8 cam_id;
|
||||
u8 rsvd[3];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Ad-Hoc/AP
|
||||
Command mode
|
||||
This is to force fw to del an sta_data entry per driver's request
|
||||
FW will invalidate the cam entry associated with it.
|
||||
*/
|
||||
struct del_assocsta_parm {
|
||||
u8 addr[ETH_ALEN];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: AP/Ad-HoC(M)
|
||||
|
||||
Notes: To notify fw that given staid has changed its power state
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct setstapwrstate_parm {
|
||||
u8 staid;
|
||||
u8 status;
|
||||
u8 hwaddr[6];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To setup the basic rate of RTL8711
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct setbasicrate_parm {
|
||||
u8 basicrates[NumRates];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To read the current basic rate
|
||||
|
||||
Command-Rsp Mode
|
||||
|
||||
*/
|
||||
struct getbasicrate_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct getbasicrate_rsp {
|
||||
u8 basicrates[NumRates];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To setup the data rate of RTL8711
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct setdatarate_parm {
|
||||
#ifdef MP_FIRMWARE_OFFLOAD
|
||||
u32 curr_rateidx;
|
||||
#else
|
||||
u8 mac_id;
|
||||
u8 datarates[NumRates];
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To read the current data rate
|
||||
|
||||
Command-Rsp Mode
|
||||
|
||||
*/
|
||||
struct getdatarate_parm {
|
||||
u32 rsvd;
|
||||
|
||||
};
|
||||
struct getdatarate_rsp {
|
||||
u8 datarates[NumRates];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To set the channel/modem/band
|
||||
This command will be used when channel/modem/band is changed.
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct setphy_parm {
|
||||
u8 rfchannel;
|
||||
u8 modem;
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To get the current setting of channel/modem/band
|
||||
|
||||
Command-Rsp Mode
|
||||
|
||||
*/
|
||||
struct getphy_parm {
|
||||
u32 rsvd;
|
||||
|
||||
};
|
||||
struct getphy_rsp {
|
||||
u8 rfchannel;
|
||||
u8 modem;
|
||||
};
|
||||
|
||||
struct readBB_parm {
|
||||
u8 offset;
|
||||
};
|
||||
struct readBB_rsp {
|
||||
u8 value;
|
||||
};
|
||||
|
||||
struct readTSSI_parm {
|
||||
u8 offset;
|
||||
};
|
||||
struct readTSSI_rsp {
|
||||
u8 value;
|
||||
};
|
||||
|
||||
struct readMAC_parm {
|
||||
u8 len;
|
||||
u32 addr;
|
||||
};
|
||||
|
||||
struct writeBB_parm {
|
||||
u8 offset;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
struct readRF_parm {
|
||||
u8 offset;
|
||||
};
|
||||
struct readRF_rsp {
|
||||
u32 value;
|
||||
};
|
||||
|
||||
struct writeRF_parm {
|
||||
u32 offset;
|
||||
u32 value;
|
||||
};
|
||||
|
||||
struct getrfintfs_parm {
|
||||
u8 rfintfs;
|
||||
};
|
||||
|
||||
|
||||
struct Tx_Beacon_param {
|
||||
WLAN_BSSID_EX network;
|
||||
};
|
||||
@@ -727,162 +520,6 @@ struct drvextra_cmd_parm {
|
||||
};
|
||||
|
||||
/*------------------- Below are used for RF/BB tunning ---------------------*/
|
||||
|
||||
struct setantenna_parm {
|
||||
u8 tx_antset;
|
||||
u8 rx_antset;
|
||||
u8 tx_antenna;
|
||||
u8 rx_antenna;
|
||||
};
|
||||
|
||||
struct enrateadaptive_parm {
|
||||
u32 en;
|
||||
};
|
||||
|
||||
struct settxagctbl_parm {
|
||||
u32 txagc[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct gettxagctbl_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
struct gettxagctbl_rsp {
|
||||
u32 txagc[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct setagcctrl_parm {
|
||||
u32 agcctrl; /* 0: pure hw, 1: fw */
|
||||
};
|
||||
|
||||
|
||||
struct setssup_parm {
|
||||
u32 ss_ForceUp[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getssup_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
struct getssup_rsp {
|
||||
u8 ss_ForceUp[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
|
||||
struct setssdlevel_parm {
|
||||
u8 ss_DLevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getssdlevel_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
struct getssdlevel_rsp {
|
||||
u8 ss_DLevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct setssulevel_parm {
|
||||
u8 ss_ULevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getssulevel_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
struct getssulevel_rsp {
|
||||
u8 ss_ULevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
|
||||
struct setcountjudge_parm {
|
||||
u8 count_judge[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getcountjudge_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
struct getcountjudge_rsp {
|
||||
u8 count_judge[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
|
||||
struct setratable_parm {
|
||||
u8 ss_ForceUp[NumRates];
|
||||
u8 ss_ULevel[NumRates];
|
||||
u8 ss_DLevel[NumRates];
|
||||
u8 count_judge[NumRates];
|
||||
};
|
||||
|
||||
struct getratable_parm {
|
||||
uint rsvd;
|
||||
};
|
||||
struct getratable_rsp {
|
||||
u8 ss_ForceUp[NumRates];
|
||||
u8 ss_ULevel[NumRates];
|
||||
u8 ss_DLevel[NumRates];
|
||||
u8 count_judge[NumRates];
|
||||
};
|
||||
|
||||
|
||||
/* to get TX,RX retry count */
|
||||
struct gettxretrycnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
struct gettxretrycnt_rsp {
|
||||
unsigned long tx_retrycnt;
|
||||
};
|
||||
|
||||
struct getrxretrycnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
struct getrxretrycnt_rsp {
|
||||
unsigned long rx_retrycnt;
|
||||
};
|
||||
|
||||
/* to get BCNOK,BCNERR count */
|
||||
struct getbcnokcnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
struct getbcnokcnt_rsp {
|
||||
unsigned long bcnokcnt;
|
||||
};
|
||||
|
||||
struct getbcnerrcnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
struct getbcnerrcnt_rsp {
|
||||
unsigned long bcnerrcnt;
|
||||
};
|
||||
|
||||
/* to get current TX power level */
|
||||
struct getcurtxpwrlevel_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
struct getcurtxpwrlevel_rsp {
|
||||
unsigned short tx_power;
|
||||
};
|
||||
|
||||
struct setprobereqextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
struct setassocreqextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
struct setproberspextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
struct setassocrspextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
|
||||
struct addBaReq_parm {
|
||||
unsigned int tid;
|
||||
u8 addr[ETH_ALEN];
|
||||
@@ -896,86 +533,41 @@ struct addBaRsp_parm {
|
||||
u8 size;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 46 */
|
||||
struct set_ch_parm {
|
||||
u8 ch;
|
||||
u8 bw;
|
||||
u8 ch_offset;
|
||||
};
|
||||
|
||||
#ifdef MP_FIRMWARE_OFFLOAD
|
||||
/*H2C Handler index: 47 */
|
||||
struct SetTxPower_parm {
|
||||
u8 TxPower;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 48 */
|
||||
struct SwitchAntenna_parm {
|
||||
u16 antenna_tx;
|
||||
u16 antenna_rx;
|
||||
/* R_ANTENNA_SELECT_CCK cck_txrx; */
|
||||
u8 cck_txrx;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 49 */
|
||||
struct SetCrystalCap_parm {
|
||||
u32 curr_crystalcap;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 50 */
|
||||
struct SetSingleCarrierTx_parm {
|
||||
u8 bStart;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 51 */
|
||||
struct SetSingleToneTx_parm {
|
||||
u8 bStart;
|
||||
u8 curr_rfpath;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 52 */
|
||||
struct SetCarrierSuppressionTx_parm {
|
||||
u8 bStart;
|
||||
u32 curr_rateidx;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 53 */
|
||||
struct SetContinuousTx_parm {
|
||||
u8 bStart;
|
||||
u8 CCK_flag; /*1:CCK 2:OFDM*/
|
||||
u32 curr_rateidx;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 54 */
|
||||
struct SwitchBandwidth_parm {
|
||||
u8 curr_bandwidth;
|
||||
};
|
||||
|
||||
#endif /* MP_FIRMWARE_OFFLOAD */
|
||||
|
||||
/*H2C Handler index: 59 */
|
||||
struct SetChannelPlan_param {
|
||||
enum regd_src_t regd_src;
|
||||
const struct country_chplan *country_ent;
|
||||
u8 channel_plan;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 60 */
|
||||
struct get_channel_plan_param {
|
||||
struct get_chplan_resp **resp;
|
||||
};
|
||||
|
||||
struct LedBlink_param {
|
||||
void *pLed;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 62 */
|
||||
struct TDLSoption_param {
|
||||
u8 addr[ETH_ALEN];
|
||||
u8 option;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 64 */
|
||||
struct RunInThread_param {
|
||||
void (*func)(void *);
|
||||
void *context;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_WRITE_BCN_LEN_TO_FW
|
||||
struct write_bcnlen_param {
|
||||
u16 bcn_len;
|
||||
};
|
||||
#endif
|
||||
|
||||
#define GEN_CMD_CODE(cmd) cmd ## _CMD_
|
||||
|
||||
@@ -1005,12 +597,12 @@ Result:
|
||||
#define H2C_ENQ_HEAD_FAIL 0x09
|
||||
#define H2C_CMD_FAIL 0x0A
|
||||
|
||||
extern u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr);
|
||||
extern u8 rtw_setstandby_cmd(_adapter *padapter, uint action);
|
||||
void rtw_init_sitesurvey_parm(_adapter *padapter, struct sitesurvey_parm *pparm);
|
||||
u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm);
|
||||
#ifdef CONFIG_AP_MODE
|
||||
u8 rtw_create_ibss_cmd(_adapter *adapter, int flags);
|
||||
u8 rtw_startbss_cmd(_adapter *adapter, int flags);
|
||||
#endif
|
||||
|
||||
#define REQ_CH_NONE -1
|
||||
#define REQ_CH_INT_INFO -2
|
||||
@@ -1018,11 +610,6 @@ u8 rtw_startbss_cmd(_adapter *adapter, int flags);
|
||||
#define REQ_BW_ORI -2
|
||||
#define REQ_OFFSET_NONE -1
|
||||
|
||||
u8 rtw_change_bss_chbw_cmd(_adapter *adapter, int flags
|
||||
, u8 ifbmp, u8 excl_ifbmp, s16 req_ch, s8 req_bw, s8 req_offset);
|
||||
|
||||
extern u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch);
|
||||
|
||||
struct sta_info;
|
||||
extern u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool enqueue);
|
||||
extern u8 rtw_clearstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 enqueue);
|
||||
@@ -1030,24 +617,14 @@ extern u8 rtw_clearstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 enque
|
||||
extern u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork);
|
||||
u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, int flags);
|
||||
#ifdef CONFIG_AP_MODE
|
||||
u8 rtw_change_bss_chbw_cmd(_adapter *adapter, int flags
|
||||
, u8 ifbmp, u8 excl_ifbmp, s16 req_ch, s8 req_bw, s8 req_offset);
|
||||
u8 rtw_stop_ap_cmd(_adapter *adapter, u8 flags);
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
u8 rtw_tx_control_cmd(_adapter *adapter);
|
||||
#endif
|
||||
extern u8 rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype, u8 flags);
|
||||
extern u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset);
|
||||
extern u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset);
|
||||
extern u8 rtw_getmacreg_cmd(_adapter *padapter, u8 len, u32 addr);
|
||||
extern void rtw_usb_catc_trigger_cmd(_adapter *padapter, const char *caller);
|
||||
extern u8 rtw_setbbreg_cmd(_adapter *padapter, u8 offset, u8 val);
|
||||
extern u8 rtw_setrfreg_cmd(_adapter *padapter, u8 offset, u32 val);
|
||||
extern u8 rtw_getbbreg_cmd(_adapter *padapter, u8 offset, u8 *pval);
|
||||
extern u8 rtw_getrfreg_cmd(_adapter *padapter, u8 offset, u8 *pval);
|
||||
extern u8 rtw_setrfintfs_cmd(_adapter *padapter, u8 mode);
|
||||
extern u8 rtw_setrttbl_cmd(_adapter *padapter, struct setratable_parm *prate_table);
|
||||
extern u8 rtw_getrttbl_cmd(_adapter *padapter, struct getratable_rsp *pval);
|
||||
|
||||
extern u8 rtw_gettssi_cmd(_adapter *padapter, u8 offset, u8 *pval);
|
||||
extern u8 rtw_setfwdig_cmd(_adapter *padapter, u8 type);
|
||||
extern u8 rtw_setfwra_cmd(_adapter *padapter, u8 type);
|
||||
|
||||
extern u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr);
|
||||
extern u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u16 start_seq);
|
||||
@@ -1101,9 +678,14 @@ u8 rtw_enable_hw_update_tsf_cmd(_adapter *padapter);
|
||||
u8 rtw_periodic_tsf_update_end_cmd(_adapter *adapter);
|
||||
|
||||
u8 rtw_set_chbw_cmd(_adapter *padapter, u8 ch, u8 bw, u8 ch_offset, u8 flags);
|
||||
u8 rtw_iqk_cmd(_adapter *padapter, u8 flags);
|
||||
|
||||
u8 rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, u8 swconfig);
|
||||
u8 rtw_set_country_cmd(_adapter *adapter, int flags, const char *country_code, u8 swconfig);
|
||||
#ifdef CONFIG_REGD_SRC_FROM_OS
|
||||
u8 rtw_sync_os_regd_cmd(_adapter *adapter, int flags, const char *country_code, u8 dfs_region);
|
||||
#endif
|
||||
u8 rtw_get_chplan_cmd(_adapter *adapter, int flags, struct get_chplan_resp **resp);
|
||||
|
||||
extern u8 rtw_led_blink_cmd(_adapter *padapter, void *pLed);
|
||||
extern u8 rtw_set_csa_cmd(_adapter *adapter);
|
||||
@@ -1147,6 +729,14 @@ u8 set_txq_params_cmd(_adapter *adapter, u32 ac_parm, u8 ac_type);
|
||||
#if defined(CONFIG_RTW_MESH) && defined(RTW_PER_CMD_SUPPORT_FW)
|
||||
u8 rtw_req_per_cmd(_adapter * adapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
u8 rtw_tbtx_chk_cmd(_adapter *adapter);
|
||||
u8 rtw_tbtx_token_dispatch_cmd(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WRITE_BCN_LEN_TO_FW
|
||||
u8 rtw_write_bcnlen_to_fw_cmd(_adapter *padapter, u16 bcn_len);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CTRL_TXSS_BY_TP
|
||||
struct txss_cmd_parm {
|
||||
@@ -1169,192 +759,44 @@ extern void rtw_survey_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
extern void rtw_disassoc_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
extern void rtw_joinbss_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_create_ibss_post_hdl(_adapter *padapter, int status);
|
||||
extern void rtw_getbbrfreg_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
extern void rtw_readtssi_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
|
||||
extern void rtw_setstaKey_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
extern void rtw_setassocsta_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
extern void rtw_getrttbl_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
extern void rtw_getmacreg_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
|
||||
|
||||
|
||||
struct _cmd_callback {
|
||||
u32 cmd_code;
|
||||
void (*callback)(_adapter *padapter, struct cmd_obj *cmd);
|
||||
enum rtw_cmd_id {
|
||||
CMD_JOINBSS, /*0*/
|
||||
CMD_DISCONNECT, /*1*/
|
||||
CMD_CREATE_BSS,/*2*/
|
||||
CMD_SET_OPMODE, /*3*/
|
||||
CMD_SITE_SURVEY, /*4*/
|
||||
CMD_SET_AUTH, /*5*/
|
||||
CMD_SET_KEY, /*6*/
|
||||
CMD_SET_STAKEY, /*7*/
|
||||
CMD_ADD_BAREQ, /*8*/
|
||||
CMD_SET_CHANNEL, /*9*/
|
||||
CMD_TX_BEACON, /*10*/
|
||||
CMD_SET_MLME_EVT, /*11*/
|
||||
CMD_SET_DRV_EXTRA, /*12*/
|
||||
CMD_SET_CHANPLAN, /*13*/
|
||||
CMD_LEDBLINK, /*14*/
|
||||
CMD_SET_CHANSWITCH, /*15*/
|
||||
CMD_TDLS, /*16*/
|
||||
CMD_CHK_BMCSLEEPQ, /*17*/
|
||||
CMD_RUN_INTHREAD, /*18*/
|
||||
CMD_ADD_BARSP, /*19*/
|
||||
CMD_RM_POST_EVENT, /*20*/
|
||||
CMD_SET_MESH_PLINK_STATE, /* 21 */
|
||||
CMD_DO_IQK, /* 22 */
|
||||
CMD_GET_CHANPLAN, /*23*/
|
||||
CMD_WRITE_BCN_LEN, /*24 */
|
||||
CMD_ID_MAX
|
||||
};
|
||||
|
||||
enum rtw_h2c_cmd {
|
||||
GEN_CMD_CODE(_Read_MACREG) , /*0*/
|
||||
GEN_CMD_CODE(_Write_MACREG) ,
|
||||
GEN_CMD_CODE(_Read_BBREG) ,
|
||||
GEN_CMD_CODE(_Write_BBREG) ,
|
||||
GEN_CMD_CODE(_Read_RFREG) ,
|
||||
GEN_CMD_CODE(_Write_RFREG) , /*5*/
|
||||
GEN_CMD_CODE(_Read_EEPROM) ,
|
||||
GEN_CMD_CODE(_Write_EEPROM) ,
|
||||
GEN_CMD_CODE(_Read_EFUSE) ,
|
||||
GEN_CMD_CODE(_Write_EFUSE) ,
|
||||
|
||||
GEN_CMD_CODE(_Read_CAM) , /*10*/
|
||||
GEN_CMD_CODE(_Write_CAM) ,
|
||||
GEN_CMD_CODE(_setBCNITV),
|
||||
GEN_CMD_CODE(_setMBIDCFG),
|
||||
GEN_CMD_CODE(_JoinBss), /*14*/
|
||||
GEN_CMD_CODE(_DisConnect) , /*15*/
|
||||
GEN_CMD_CODE(_CreateBss) ,
|
||||
GEN_CMD_CODE(_SetOpMode) ,
|
||||
GEN_CMD_CODE(_SiteSurvey), /*18*/
|
||||
GEN_CMD_CODE(_SetAuth) ,
|
||||
|
||||
GEN_CMD_CODE(_SetKey) , /*20*/
|
||||
GEN_CMD_CODE(_SetStaKey) ,
|
||||
GEN_CMD_CODE(_SetAssocSta) ,
|
||||
GEN_CMD_CODE(_DelAssocSta) ,
|
||||
GEN_CMD_CODE(_SetStaPwrState) ,
|
||||
GEN_CMD_CODE(_SetBasicRate) , /*25*/
|
||||
GEN_CMD_CODE(_GetBasicRate) ,
|
||||
GEN_CMD_CODE(_SetDataRate) ,
|
||||
GEN_CMD_CODE(_GetDataRate) ,
|
||||
GEN_CMD_CODE(_SetPhyInfo) ,
|
||||
|
||||
GEN_CMD_CODE(_GetPhyInfo) , /*30*/
|
||||
GEN_CMD_CODE(_SetPhy) ,
|
||||
GEN_CMD_CODE(_GetPhy) ,
|
||||
GEN_CMD_CODE(_readRssi) ,
|
||||
GEN_CMD_CODE(_readGain) ,
|
||||
GEN_CMD_CODE(_SetAtim) , /*35*/
|
||||
GEN_CMD_CODE(_SetPwrMode) ,
|
||||
GEN_CMD_CODE(_JoinbssRpt),
|
||||
GEN_CMD_CODE(_SetRaTable) ,
|
||||
GEN_CMD_CODE(_GetRaTable) ,
|
||||
|
||||
GEN_CMD_CODE(_GetCCXReport), /*40*/
|
||||
GEN_CMD_CODE(_GetDTMReport),
|
||||
GEN_CMD_CODE(_GetTXRateStatistics),
|
||||
GEN_CMD_CODE(_SetUsbSuspend),
|
||||
GEN_CMD_CODE(_SetH2cLbk),
|
||||
GEN_CMD_CODE(_AddBAReq) , /*45*/
|
||||
GEN_CMD_CODE(_SetChannel), /*46*/
|
||||
GEN_CMD_CODE(_SetTxPower),
|
||||
GEN_CMD_CODE(_SwitchAntenna),
|
||||
GEN_CMD_CODE(_SetCrystalCap),
|
||||
GEN_CMD_CODE(_SetSingleCarrierTx), /*50*/
|
||||
|
||||
GEN_CMD_CODE(_SetSingleToneTx),/*51*/
|
||||
GEN_CMD_CODE(_SetCarrierSuppressionTx),
|
||||
GEN_CMD_CODE(_SetContinuousTx),
|
||||
GEN_CMD_CODE(_SwitchBandwidth), /*54*/
|
||||
GEN_CMD_CODE(_TX_Beacon), /*55*/
|
||||
|
||||
GEN_CMD_CODE(_Set_MLME_EVT), /*56*/
|
||||
GEN_CMD_CODE(_Set_Drv_Extra), /*57*/
|
||||
GEN_CMD_CODE(_Set_H2C_MSG), /*58*/
|
||||
|
||||
GEN_CMD_CODE(_SetChannelPlan), /*59*/
|
||||
GEN_CMD_CODE(_LedBlink), /*60*/
|
||||
|
||||
GEN_CMD_CODE(_SetChannelSwitch), /*61*/
|
||||
GEN_CMD_CODE(_TDLS), /*62*/
|
||||
GEN_CMD_CODE(_ChkBMCSleepq), /*63*/
|
||||
|
||||
GEN_CMD_CODE(_RunInThreadCMD), /*64*/
|
||||
GEN_CMD_CODE(_AddBARsp) , /*65*/
|
||||
GEN_CMD_CODE(_RM_POST_EVENT), /*66*/
|
||||
|
||||
MAX_H2CCMD
|
||||
};
|
||||
|
||||
#define _GetMACReg_CMD_ _Read_MACREG_CMD_
|
||||
#define _SetMACReg_CMD_ _Write_MACREG_CMD_
|
||||
#define _GetBBReg_CMD_ _Read_BBREG_CMD_
|
||||
#define _SetBBReg_CMD_ _Write_BBREG_CMD_
|
||||
#define _GetRFReg_CMD_ _Read_RFREG_CMD_
|
||||
#define _SetRFReg_CMD_ _Write_RFREG_CMD_
|
||||
|
||||
#ifdef _RTW_CMD_C_
|
||||
struct _cmd_callback rtw_cmd_callback[] = {
|
||||
{GEN_CMD_CODE(_Read_MACREG), &rtw_getmacreg_cmdrsp_callback}, /*0*/
|
||||
{GEN_CMD_CODE(_Write_MACREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Write_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_RFREG), &rtw_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
|
||||
{GEN_CMD_CODE(_Read_EEPROM), NULL},
|
||||
{GEN_CMD_CODE(_Write_EEPROM), NULL},
|
||||
{GEN_CMD_CODE(_Read_EFUSE), NULL},
|
||||
{GEN_CMD_CODE(_Write_EFUSE), NULL},
|
||||
|
||||
{GEN_CMD_CODE(_Read_CAM), NULL}, /*10*/
|
||||
{GEN_CMD_CODE(_Write_CAM), NULL},
|
||||
{GEN_CMD_CODE(_setBCNITV), NULL},
|
||||
{GEN_CMD_CODE(_setMBIDCFG), NULL},
|
||||
{GEN_CMD_CODE(_JoinBss), &rtw_joinbss_cmd_callback}, /*14*/
|
||||
{GEN_CMD_CODE(_DisConnect), &rtw_disassoc_cmd_callback}, /*15*/
|
||||
{GEN_CMD_CODE(_CreateBss), NULL},
|
||||
{GEN_CMD_CODE(_SetOpMode), NULL},
|
||||
{GEN_CMD_CODE(_SiteSurvey), &rtw_survey_cmd_callback}, /*18*/
|
||||
{GEN_CMD_CODE(_SetAuth), NULL},
|
||||
|
||||
{GEN_CMD_CODE(_SetKey), NULL}, /*20*/
|
||||
{GEN_CMD_CODE(_SetStaKey), &rtw_setstaKey_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_SetAssocSta), &rtw_setassocsta_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_DelAssocSta), NULL},
|
||||
{GEN_CMD_CODE(_SetStaPwrState), NULL},
|
||||
{GEN_CMD_CODE(_SetBasicRate), NULL}, /*25*/
|
||||
{GEN_CMD_CODE(_GetBasicRate), NULL},
|
||||
{GEN_CMD_CODE(_SetDataRate), NULL},
|
||||
{GEN_CMD_CODE(_GetDataRate), NULL},
|
||||
{GEN_CMD_CODE(_SetPhyInfo), NULL},
|
||||
|
||||
{GEN_CMD_CODE(_GetPhyInfo), NULL}, /*30*/
|
||||
{GEN_CMD_CODE(_SetPhy), NULL},
|
||||
{GEN_CMD_CODE(_GetPhy), NULL},
|
||||
{GEN_CMD_CODE(_readRssi), NULL},
|
||||
{GEN_CMD_CODE(_readGain), NULL},
|
||||
{GEN_CMD_CODE(_SetAtim), NULL}, /*35*/
|
||||
{GEN_CMD_CODE(_SetPwrMode), NULL},
|
||||
{GEN_CMD_CODE(_JoinbssRpt), NULL},
|
||||
{GEN_CMD_CODE(_SetRaTable), NULL},
|
||||
{GEN_CMD_CODE(_GetRaTable) , NULL},
|
||||
|
||||
{GEN_CMD_CODE(_GetCCXReport), NULL}, /*40*/
|
||||
{GEN_CMD_CODE(_GetDTMReport), NULL},
|
||||
{GEN_CMD_CODE(_GetTXRateStatistics), NULL},
|
||||
{GEN_CMD_CODE(_SetUsbSuspend), NULL},
|
||||
{GEN_CMD_CODE(_SetH2cLbk), NULL},
|
||||
{GEN_CMD_CODE(_AddBAReq), NULL}, /*45*/
|
||||
{GEN_CMD_CODE(_SetChannel), NULL}, /*46*/
|
||||
{GEN_CMD_CODE(_SetTxPower), NULL},
|
||||
{GEN_CMD_CODE(_SwitchAntenna), NULL},
|
||||
{GEN_CMD_CODE(_SetCrystalCap), NULL},
|
||||
{GEN_CMD_CODE(_SetSingleCarrierTx), NULL}, /*50*/
|
||||
|
||||
{GEN_CMD_CODE(_SetSingleToneTx), NULL}, /*51*/
|
||||
{GEN_CMD_CODE(_SetCarrierSuppressionTx), NULL},
|
||||
{GEN_CMD_CODE(_SetContinuousTx), NULL},
|
||||
{GEN_CMD_CODE(_SwitchBandwidth), NULL}, /*54*/
|
||||
{GEN_CMD_CODE(_TX_Beacon), NULL},/*55*/
|
||||
|
||||
{GEN_CMD_CODE(_Set_MLME_EVT), NULL},/*56*/
|
||||
{GEN_CMD_CODE(_Set_Drv_Extra), NULL},/*57*/
|
||||
{GEN_CMD_CODE(_Set_H2C_MSG), NULL},/*58*/
|
||||
{GEN_CMD_CODE(_SetChannelPlan), NULL},/*59*/
|
||||
{GEN_CMD_CODE(_LedBlink), NULL},/*60*/
|
||||
|
||||
{GEN_CMD_CODE(_SetChannelSwitch), NULL},/*61*/
|
||||
{GEN_CMD_CODE(_TDLS), NULL},/*62*/
|
||||
{GEN_CMD_CODE(_ChkBMCSleepq), NULL}, /*63*/
|
||||
|
||||
{GEN_CMD_CODE(_RunInThreadCMD), NULL},/*64*/
|
||||
{GEN_CMD_CODE(_AddBARsp), NULL}, /*65*/
|
||||
{GEN_CMD_CODE(_RM_POST_EVENT), NULL}, /*66*/
|
||||
};
|
||||
#endif
|
||||
|
||||
#define CMD_FMT "cmd=%d,%d,%d"
|
||||
#define CMD_ARG(cmd) \
|
||||
(cmd)->cmdcode, \
|
||||
(cmd)->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra) ? ((struct drvextra_cmd_parm *)(cmd)->parmbuf)->ec_id : ((cmd)->cmdcode == GEN_CMD_CODE(_Set_MLME_EVT) ? ((struct C2HEvent_Header *)(cmd)->parmbuf)->ID : 0), \
|
||||
(cmd)->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra) ? ((struct drvextra_cmd_parm *)(cmd)->parmbuf)->type : 0
|
||||
(cmd)->cmdcode == CMD_SET_DRV_EXTRA ? ((struct drvextra_cmd_parm *)(cmd)->parmbuf)->ec_id : ((cmd)->cmdcode == CMD_SET_MLME_EVT ? ((struct rtw_evt_header *)(cmd)->parmbuf)->id : 0), \
|
||||
(cmd)->cmdcode == CMD_SET_DRV_EXTRA ? ((struct drvextra_cmd_parm *)(cmd)->parmbuf)->type : 0
|
||||
|
||||
#endif /* _CMD_H_ */
|
||||
|
||||
@@ -131,13 +131,15 @@ extern uint rtw_drv_log_level;
|
||||
#define EX_INFO_ARG ""
|
||||
#endif /* !PLATFORM_LINUX */
|
||||
|
||||
#define DBG_PREFIX EX_INFO_FMT DRIVER_PREFIX
|
||||
#define DBG_PREFIX_ARG EX_INFO_ARG
|
||||
|
||||
/* with driver-defined prefix */
|
||||
#undef RTW_PRINT
|
||||
#define RTW_PRINT(fmt, arg...) \
|
||||
do {\
|
||||
if (_DRV_ALWAYS_ <= rtw_drv_log_level) {\
|
||||
_dbgdump(EX_INFO_FMT DRIVER_PREFIX fmt, \
|
||||
EX_INFO_ARG, ##arg);\
|
||||
_dbgdump(DBG_PREFIX fmt, DBG_PREFIX_ARG, ##arg);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -145,8 +147,8 @@ extern uint rtw_drv_log_level;
|
||||
#define RTW_ERR(fmt, arg...) \
|
||||
do {\
|
||||
if (_DRV_ERR_ <= rtw_drv_log_level) {\
|
||||
_dbgdump(EX_INFO_FMT DRIVER_PREFIX "ERROR " fmt, \
|
||||
EX_INFO_ARG, ##arg);\
|
||||
_dbgdump(DBG_PREFIX "ERROR " fmt, \
|
||||
DBG_PREFIX_ARG, ##arg);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -155,8 +157,8 @@ extern uint rtw_drv_log_level;
|
||||
#define RTW_WARN(fmt, arg...) \
|
||||
do {\
|
||||
if (_DRV_WARNING_ <= rtw_drv_log_level) {\
|
||||
_dbgdump(EX_INFO_FMT DRIVER_PREFIX "WARN " fmt, \
|
||||
EX_INFO_ARG, ##arg);\
|
||||
_dbgdump(DBG_PREFIX "WARN " fmt, \
|
||||
DBG_PREFIX_ARG, ##arg);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -164,8 +166,7 @@ extern uint rtw_drv_log_level;
|
||||
#define RTW_INFO(fmt, arg...) \
|
||||
do {\
|
||||
if (_DRV_INFO_ <= rtw_drv_log_level) {\
|
||||
_dbgdump(EX_INFO_FMT DRIVER_PREFIX fmt, \
|
||||
EX_INFO_ARG, ##arg);\
|
||||
_dbgdump(DBG_PREFIX fmt, DBG_PREFIX_ARG, ##arg);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -174,8 +175,7 @@ extern uint rtw_drv_log_level;
|
||||
#define RTW_DBG(fmt, arg...) \
|
||||
do {\
|
||||
if (_DRV_DEBUG_ <= rtw_drv_log_level) {\
|
||||
_dbgdump(EX_INFO_FMT DRIVER_PREFIX fmt, \
|
||||
EX_INFO_ARG, ##arg);\
|
||||
_dbgdump(DBG_PREFIX fmt, DBG_PREFIX_ARG, ##arg);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -284,7 +284,6 @@ extern uint rtw_drv_log_level;
|
||||
|
||||
void dump_drv_version(void *sel);
|
||||
void dump_log_level(void *sel);
|
||||
void dump_drv_cfg(void *sel);
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
void sd_f0_reg_dump(void *sel, _adapter *adapter);
|
||||
@@ -306,8 +305,10 @@ void dump_tx_rate_bmp(void *sel, struct dvobj_priv *dvobj);
|
||||
void dump_adapters_status(void *sel, struct dvobj_priv *dvobj);
|
||||
|
||||
struct sec_cam_ent;
|
||||
#if defined(CONFIG_RTW_DEBUG) || defined(CONFIG_PROC_DEBUG)
|
||||
void dump_sec_cam_ent(void *sel, struct sec_cam_ent *ent, int id);
|
||||
void dump_sec_cam_ent_title(void *sel, u8 has_id);
|
||||
#endif
|
||||
void dump_sec_cam(void *sel, _adapter *adapter);
|
||||
void dump_sec_cam_cache(void *sel, _adapter *adapter);
|
||||
|
||||
@@ -327,7 +328,7 @@ u16 rtw_ap_linking_test_force_asoc_fail(void);
|
||||
ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_read_reg(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_read_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
||||
void dump_drv_cfg(void *sel);
|
||||
int proc_get_fwstate(struct seq_file *m, void *v);
|
||||
int proc_get_sec_info(struct seq_file *m, void *v);
|
||||
int proc_get_mlmext_state(struct seq_file *m, void *v);
|
||||
@@ -338,10 +339,6 @@ int proc_get_roam_param(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_roam_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
ssize_t proc_set_roam_tgt_addr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#endif /* CONFIG_LAYER2_ROAMING */
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
int proc_get_ft_flags(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_ft_flags(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#endif
|
||||
int proc_get_qos_option(struct seq_file *m, void *v);
|
||||
int proc_get_ht_option(struct seq_file *m, void *v);
|
||||
int proc_get_rf_info(struct seq_file *m, void *v);
|
||||
@@ -443,6 +440,10 @@ ssize_t proc_set_ldpc_cap(struct file *file, const char __user *buffer, size_t c
|
||||
int proc_get_txbf_cap(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_txbf_cap(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#endif
|
||||
#ifdef CONFIG_SDIO_TX_ENABLE_AVAL_INT
|
||||
int proc_get_tx_aval_th(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_tx_aval_th(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#endif /*CONFIG_SDIO_TX_ENABLE_AVAL_INT*/
|
||||
int proc_get_rx_ampdu_factor(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_rx_ampdu_factor(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
||||
@@ -455,6 +456,8 @@ ssize_t proc_set_rx_ampdu_density(struct file *file, const char __user *buffer,
|
||||
int proc_get_tx_ampdu_density(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_tx_ampdu_density(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
||||
int proc_get_tx_quick_addba_req(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_tx_quick_addba_req(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#ifdef CONFIG_TX_AMSDU
|
||||
int proc_get_tx_amsdu(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_tx_amsdu(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
@@ -463,6 +466,14 @@ ssize_t proc_set_tx_amsdu_rate(struct file *file, const char __user *buffer, siz
|
||||
#endif
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
int proc_get_vht_24g_enable(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_vht_24g_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#endif
|
||||
|
||||
ssize_t proc_set_dyn_rrsr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_dyn_rrsr(struct seq_file *m, void *v);
|
||||
|
||||
int proc_get_en_fwps(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_en_fwps(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
||||
@@ -514,6 +525,9 @@ ssize_t proc_set_tx_ring_ext(struct file *file, const char __user *buffer, size_
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
int proc_get_wow_enable(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_wow_enable(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *pos, void *data);
|
||||
int proc_get_pattern_info(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_pattern_info(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *pos, void *data);
|
||||
@@ -521,8 +535,29 @@ int proc_get_wakeup_event(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_wakeup_event(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *pos, void *data);
|
||||
int proc_get_wakeup_reason(struct seq_file *m, void *v);
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
int proc_dump_wow_keep_alive_info(struct seq_file *m, void *v);
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
int proc_get_war_offload_enable(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_war_offload_enable(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_war_offload_ipv4_addr(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_war_offload_ipv4_addr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_war_offload_ipv6_addr(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_war_offload_ipv6_addr(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_war_offload_mdns_domain_name(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_war_offload_mdns_domain_name(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_war_offload_mdns_machine_name(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_war_offload_mdns_machine_name(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_war_offload_mdns_txt_rsp(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_war_offload_mdns_txt_rsp(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
int proc_get_war_offload_mdns_service_info(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_war_offload_mdns_service_info(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
int proc_get_wowlan_gpio_info(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_wowlan_gpio_info(struct file *file, const char __user *buffer,
|
||||
@@ -554,6 +589,11 @@ int proc_get_tdls_info(struct seq_file *m, void *v);
|
||||
int proc_get_monitor(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_monitor(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
||||
#ifdef RTW_SIMPLE_CONFIG
|
||||
int proc_get_simple_config(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_simple_config(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
#endif
|
||||
|
||||
#ifdef DBG_XMIT_BLOCK
|
||||
int proc_get_xmit_block(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_xmit_block(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
@@ -636,6 +676,9 @@ ssize_t proc_set_smps(struct file *file, const char __user *buffer, size_t count
|
||||
int proc_get_smps(struct seq_file *m, void *v);
|
||||
#endif
|
||||
|
||||
int proc_get_defs_param(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_defs_param(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
||||
#define _drv_always_ 1
|
||||
#define _drv_emerg_ 2
|
||||
#define _drv_alert_ 3
|
||||
|
||||
@@ -53,17 +53,25 @@ enum _EFUSE_DEF_TYPE {
|
||||
/*RTL8822B 8821C BT EFUSE Define 1 BANK 128 size logical map 1024*/
|
||||
#ifdef RTW_HALMAC
|
||||
#define BANK_NUM 1
|
||||
#define EFUSE_BT_REAL_BANK_CONTENT_LEN 128
|
||||
#if defined(CONFIG_RTL8723F)
|
||||
#define EFUSE_BT_REAL_BANK_CONTENT_LEN 512
|
||||
#else
|
||||
#define EFUSE_BT_REAL_BANK_CONTENT_LEN 128
|
||||
#endif
|
||||
|
||||
#define EFUSE_BT_REAL_CONTENT_LEN (EFUSE_BT_REAL_BANK_CONTENT_LEN * BANK_NUM)
|
||||
#define EFUSE_BT_MAP_LEN 1024 /* 1k bytes */
|
||||
#define EFUSE_BT_MAX_SECTION (EFUSE_BT_MAP_LEN / 8)
|
||||
#ifdef CONFIG_RTL8822C
|
||||
|
||||
#if defined(CONFIG_RTL8822C)
|
||||
#define EFUSE_PROTECT_BYTES_BANK 54
|
||||
#elif defined(CONFIG_RTL8723F)
|
||||
#define EFUSE_PROTECT_BYTES_BANK 40
|
||||
#else
|
||||
#define EFUSE_PROTECT_BYTES_BANK 16
|
||||
#endif
|
||||
#define AVAILABLE_EFUSE_ADDR(addr) (addr < EFUSE_BT_REAL_CONTENT_LEN - EFUSE_PROTECT_BYTES_BANK)
|
||||
#endif
|
||||
#endif /* #ifdef RTW_HALMAC */
|
||||
|
||||
#define EXT_HEADER(header) ((header & 0x1F) == 0x0F)
|
||||
#define ALL_WORDS_DISABLED(wde) ((wde & 0x0F) == 0x0F)
|
||||
@@ -211,7 +219,9 @@ u8 rtw_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_read(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data);
|
||||
|
||||
#ifdef CONFIG_RTL8822C
|
||||
void rtw_pre_bt_efuse(PADAPTER padapter);
|
||||
#endif
|
||||
u16 Efuse_GetCurrentSize(PADAPTER pAdapter, u8 efuseType, BOOLEAN bPseudoTest);
|
||||
u8 Efuse_CalculateWordCnts(u8 word_en);
|
||||
void ReadEFuseByte(PADAPTER Adapter, u16 _offset, u8 *pbuf, BOOLEAN bPseudoTest) ;
|
||||
@@ -264,7 +274,8 @@ extern const u8 _mac_hidden_proto_to_hal_proto_cap[];
|
||||
u8 mac_hidden_wl_func_to_hal_wl_func(u8 func);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len);
|
||||
u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepath, u8 *buf, u32 len);
|
||||
u8 rtw_efuse_file_store(PADAPTER padapter, u8 *filepath, u8 *buf, u32 len);
|
||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
||||
u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size);
|
||||
u32 rtw_read_macaddr_from_file(const char *path, u8 *buf);
|
||||
|
||||
@@ -36,6 +36,7 @@ bss_cnt indicates the number of bss that has been reported.
|
||||
*/
|
||||
struct surveydone_event {
|
||||
unsigned int bss_cnt;
|
||||
u8 activate_ch_cnt;
|
||||
bool acs; /* aim to trigger channel selection */
|
||||
};
|
||||
|
||||
@@ -70,10 +71,6 @@ struct stadel_event {
|
||||
int mac_id;
|
||||
};
|
||||
|
||||
struct addba_event {
|
||||
unsigned int tid;
|
||||
};
|
||||
|
||||
struct wmm_event {
|
||||
unsigned char wmm;
|
||||
};
|
||||
@@ -91,40 +88,8 @@ struct c2hlbk_event {
|
||||
};
|
||||
#endif/* CONFIG_H2CLBK */
|
||||
|
||||
#define GEN_EVT_CODE(event) event ## _EVT_
|
||||
|
||||
|
||||
|
||||
struct fwevent {
|
||||
u32 parmsize;
|
||||
struct rtw_event {
|
||||
u32 parmsize;
|
||||
void (*event_callback)(_adapter *dev, u8 *pbuf);
|
||||
};
|
||||
|
||||
|
||||
#define C2HEVENT_SZ 32
|
||||
|
||||
struct event_node {
|
||||
unsigned char *node;
|
||||
unsigned char evt_code;
|
||||
unsigned short evt_sz;
|
||||
volatile int *caller_ff_tail;
|
||||
int caller_ff_sz;
|
||||
};
|
||||
|
||||
struct c2hevent_queue {
|
||||
volatile int head;
|
||||
volatile int tail;
|
||||
struct event_node nodes[C2HEVENT_SZ];
|
||||
unsigned char seq;
|
||||
};
|
||||
|
||||
#define NETWORK_QUEUE_SZ 4
|
||||
|
||||
struct network_queue {
|
||||
volatile int head;
|
||||
volatile int tail;
|
||||
WLAN_BSSID_EX networks[NETWORK_QUEUE_SZ];
|
||||
};
|
||||
|
||||
|
||||
#endif /* _WLANEVENT_H_ */
|
||||
|
||||
183
include/rtw_ft.h
Normal file
183
include/rtw_ft.h
Normal file
@@ -0,0 +1,183 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __RTW_FT_H_
|
||||
#define __RTW_FT_H_
|
||||
|
||||
enum rtw_ieee80211_ft_actioncode {
|
||||
RTW_WLAN_ACTION_FT_RESV,
|
||||
RTW_WLAN_ACTION_FT_REQ,
|
||||
RTW_WLAN_ACTION_FT_RSP,
|
||||
RTW_WLAN_ACTION_FT_CONF,
|
||||
RTW_WLAN_ACTION_FT_ACK,
|
||||
RTW_WLAN_ACTION_FT_MAX,
|
||||
};
|
||||
|
||||
enum _rtw_ft_sta_status {
|
||||
RTW_FT_UNASSOCIATED_STA = 0,
|
||||
RTW_FT_AUTHENTICATING_STA,
|
||||
RTW_FT_AUTHENTICATED_STA,
|
||||
RTW_FT_ASSOCIATING_STA,
|
||||
RTW_FT_ASSOCIATED_STA,
|
||||
RTW_FT_REQUESTING_STA,
|
||||
RTW_FT_REQUESTED_STA,
|
||||
RTW_FT_CONFIRMED_STA,
|
||||
RTW_FT_UNSPECIFIED_STA
|
||||
};
|
||||
|
||||
#define RTW_FT_ACTION_REQ_LMT 4
|
||||
|
||||
#define RTW_FT_MAX_IE_SZ 256
|
||||
|
||||
#define rtw_ft_chk_status(a, s) \
|
||||
((a)->mlmepriv.ft_roam.ft_status == (s))
|
||||
|
||||
#define rtw_ft_roam_status(a, s) \
|
||||
((rtw_to_roam(a) > 0) && rtw_ft_chk_status(a, s))
|
||||
|
||||
#define rtw_ft_authed_sta(a) \
|
||||
((rtw_ft_chk_status(a, RTW_FT_AUTHENTICATED_STA)) || \
|
||||
(rtw_ft_chk_status(a, RTW_FT_ASSOCIATING_STA)) || \
|
||||
(rtw_ft_chk_status(a, RTW_FT_ASSOCIATED_STA)))
|
||||
|
||||
#define rtw_ft_set_status(a, s) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_status = (s)); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_lock_set_status(a, s, irq) \
|
||||
do { \
|
||||
_enter_critical_bh(&(a)->mlmepriv.lock, ((_irqL *)(irq))); \
|
||||
((a)->mlmepriv.ft_roam.ft_status = (s)); \
|
||||
_exit_critical_bh(&(a)->mlmepriv.lock, ((_irqL *)(irq))); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_reset_status(a) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_status = RTW_FT_UNASSOCIATED_STA); \
|
||||
} while (0)
|
||||
|
||||
enum rtw_ft_capability {
|
||||
RTW_FT_EN = BIT0,
|
||||
RTW_FT_OTD_EN = BIT1,
|
||||
RTW_FT_PEER_EN = BIT2,
|
||||
RTW_FT_PEER_OTD_EN = BIT3,
|
||||
RTW_FT_BTM_ROAM = BIT4,
|
||||
RTW_FT_TEST_RSSI_ROAM = BIT7,
|
||||
};
|
||||
|
||||
#define rtw_ft_chk_flags(a, f) \
|
||||
((a)->mlmepriv.ft_roam.ft_flags & (f))
|
||||
|
||||
#define rtw_ft_set_flags(a, f) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_flags |= (f)); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_clr_flags(a, f) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_flags &= ~(f)); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_roam(a) \
|
||||
((rtw_to_roam(a) > 0) && rtw_ft_chk_flags(a, RTW_FT_PEER_EN))
|
||||
|
||||
#define rtw_ft_valid_akm(a, t) \
|
||||
((rtw_ft_chk_flags(a, RTW_FT_EN)) && \
|
||||
(((t) == 3) || ((t) == 4)))
|
||||
|
||||
#define rtw_ft_roam_expired(a, r) \
|
||||
((rtw_chk_roam_flags(a, RTW_ROAM_ON_EXPIRED)) \
|
||||
&& (r == WLAN_REASON_ACTIVE_ROAM))
|
||||
|
||||
#define rtw_ft_otd_roam_en(a) \
|
||||
((rtw_ft_chk_flags(a, RTW_FT_OTD_EN)) \
|
||||
&& ((a)->mlmepriv.ft_roam.ft_roam_on_expired == _FALSE) \
|
||||
&& ((a)->mlmepriv.ft_roam.ft_cap & 0x01))
|
||||
|
||||
#define rtw_ft_otd_roam(a) \
|
||||
rtw_ft_chk_flags(a, RTW_FT_PEER_OTD_EN)
|
||||
|
||||
#define rtw_ft_valid_otd_candidate(a, p) \
|
||||
((rtw_ft_chk_flags(a, RTW_FT_OTD_EN)) \
|
||||
&& ((rtw_ft_chk_flags(a, RTW_FT_PEER_OTD_EN) \
|
||||
&& ((*((p)+4) & 0x01) == 0)) \
|
||||
|| ((rtw_ft_chk_flags(a, RTW_FT_PEER_OTD_EN) == 0) \
|
||||
&& (*((p)+4) & 0x01))))
|
||||
|
||||
struct ft_roam_info {
|
||||
u16 mdid;
|
||||
u8 ft_cap;
|
||||
/*b0: FT over DS, b1: Resource Req Protocol Cap, b2~b7: Reserved*/
|
||||
u8 updated_ft_ies[RTW_FT_MAX_IE_SZ];
|
||||
u16 updated_ft_ies_len;
|
||||
u8 ft_action[RTW_FT_MAX_IE_SZ];
|
||||
u16 ft_action_len;
|
||||
struct cfg80211_ft_event_params ft_event;
|
||||
u8 ft_roam_on_expired;
|
||||
u8 ft_flags;
|
||||
u32 ft_status;
|
||||
u32 ft_req_retry_cnt;
|
||||
bool ft_updated_bcn;
|
||||
};
|
||||
|
||||
void rtw_ft_info_init(struct ft_roam_info *pft);
|
||||
|
||||
int rtw_ft_proc_flags_get(struct seq_file *m, void *v);
|
||||
|
||||
ssize_t rtw_ft_proc_flags_set(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *pos, void *data);
|
||||
|
||||
u8 rtw_ft_chk_roaming_candidate(
|
||||
_adapter *padapter, struct wlan_network *competitor);
|
||||
|
||||
void rtw_ft_update_stainfo(_adapter *padapter, WLAN_BSSID_EX *pnetwork);
|
||||
|
||||
void rtw_ft_reassoc_event_callback(_adapter *padapter, u8 *pbuf);
|
||||
|
||||
void rtw_ft_validate_akm_type(_adapter *padapter,
|
||||
struct wlan_network *pnetwork);
|
||||
|
||||
void rtw_ft_update_bcn(_adapter *padapter, union recv_frame *precv_frame);
|
||||
|
||||
void rtw_ft_start_clnt_join(_adapter *padapter);
|
||||
|
||||
u8 rtw_ft_update_rsnie(
|
||||
_adapter *padapter, u8 bwrite,
|
||||
struct pkt_attrib *pattrib, u8 **pframe);
|
||||
|
||||
void rtw_ft_build_auth_req_ies(_adapter *padapter,
|
||||
struct pkt_attrib *pattrib, u8 **pframe);
|
||||
|
||||
void rtw_ft_build_assoc_req_ies(_adapter *padapter,
|
||||
u8 is_reassoc, struct pkt_attrib *pattrib, u8 **pframe);
|
||||
|
||||
u8 rtw_ft_update_auth_rsp_ies(_adapter *padapter, u8 *pframe, u32 len);
|
||||
|
||||
void rtw_ft_start_roam(_adapter *padapter, u8 *pTargetAddr);
|
||||
|
||||
void rtw_ft_issue_action_req(_adapter *padapter, u8 *pTargetAddr);
|
||||
|
||||
void rtw_ft_report_evt(_adapter *padapter);
|
||||
|
||||
void rtw_ft_report_reassoc_evt(_adapter *padapter, u8 *pMacAddr);
|
||||
|
||||
void rtw_ft_link_timer_hdl(void *ctx);
|
||||
|
||||
void rtw_ft_roam_timer_hdl(void *ctx);
|
||||
|
||||
void rtw_ft_roam_status_reset(_adapter *padapter);
|
||||
|
||||
#endif /* __RTW_FT_H_ */
|
||||
114
include/rtw_mbo.h
Normal file
114
include/rtw_mbo.h
Normal file
@@ -0,0 +1,114 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __RTW_MBO_H_
|
||||
#define __RTW_MBO_H_
|
||||
|
||||
#define rtw_mbo_wifi_logo_test(a) ((a->registrypriv.wifi_spec) == 1)
|
||||
|
||||
#define rtw_mbo_set_ext_cap_internw(_pEleStart, _val) \
|
||||
SET_BITS_TO_LE_1BYTE(((u8 *)(_pEleStart))+3, 7, 1, _val)
|
||||
|
||||
#define rtw_mbo_wnm_notification_req(c, a) \
|
||||
(((c) == RTW_WLAN_CATEGORY_WNM) && \
|
||||
(((a) == RTW_WLAN_ACTION_WNM_NOTIF_REQ)))
|
||||
|
||||
/* IEEE Std 802.11-2016 Table 9-46 - Status codes */
|
||||
#define RTW_ASSOC_DENIED_NO_MORE_STAS 17
|
||||
#define RTW_ASSOC_REFUSED_TEMPORARILY 30
|
||||
|
||||
/* MBO-OCE Information Element */
|
||||
#define RTW_MBO_EID WLAN_EID_VENDOR_SPECIFIC
|
||||
#define RTW_MBO_OUI 0x506F9A
|
||||
#define RTW_MBO_OUI_TYPE 0x16
|
||||
|
||||
/* Non-preferred Channel Report */
|
||||
#define RTW_MBO_ATTR_NPREF_CH_RPT_ID 0x2
|
||||
/* Cellular Data Capabilities */
|
||||
#define RTW_MBO_ATTR_CELL_DATA_CAP_ID 0x3
|
||||
/* Association Disallowed */
|
||||
#define RTW_MBO_ATTR_ASSOC_DISABLED_ID 0x4
|
||||
/* Transition Reason Code */
|
||||
#define RTW_MBO_ATTR_TRANS_RES_ID 0x6
|
||||
/* Transition Rejection Reason Code */
|
||||
#define RTW_MBO_ATTR_TRANS_REJ_ID 0x7
|
||||
/* Association Retry Delay */
|
||||
#define RTW_MBO_ATTR_TASSOC_RETRY_ID 0x8
|
||||
|
||||
#define RTW_MBO_MAX_CH_LIST_NUM MAX_CHANNEL_NUM
|
||||
|
||||
#define RTW_MBO_MAX_CH_RPT_NUM 32
|
||||
|
||||
struct npref_ch {
|
||||
u8 op_class;
|
||||
u8 chs[RTW_MBO_MAX_CH_LIST_NUM];
|
||||
size_t nm_of_ch;
|
||||
u8 preference;
|
||||
u8 reason;
|
||||
};
|
||||
|
||||
struct npref_ch_rtp {
|
||||
struct npref_ch ch_rpt[RTW_MBO_MAX_CH_RPT_NUM];
|
||||
size_t nm_of_rpt;
|
||||
};
|
||||
|
||||
void rtw_mbo_build_cell_data_cap_attr(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib);
|
||||
|
||||
void rtw_mbo_update_ie_data(
|
||||
_adapter *padapter, u8 *pie, u32 ie_len);
|
||||
|
||||
void rtw_mbo_build_supp_op_class_elem(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib);
|
||||
|
||||
void rtw_mbo_build_npref_ch_rpt_attr(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib);
|
||||
|
||||
void rtw_mbo_build_trans_reject_reason_attr(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib, u8 *pres);
|
||||
|
||||
u8 rtw_mbo_disallowed_network(struct wlan_network *pnetwork);
|
||||
|
||||
void rtw_mbo_build_exented_cap(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib);
|
||||
|
||||
ssize_t rtw_mbo_proc_non_pref_chans_set(
|
||||
struct file *pfile, const char __user *buffer,
|
||||
size_t count, loff_t *pos, void *pdata);
|
||||
|
||||
int rtw_mbo_proc_non_pref_chans_get(
|
||||
struct seq_file *m, void *v);
|
||||
|
||||
ssize_t rtw_mbo_proc_cell_data_set(
|
||||
struct file *pfile, const char __user *buffer,
|
||||
size_t count, loff_t *pos, void *pdata);
|
||||
|
||||
int rtw_mbo_proc_cell_data_get(
|
||||
struct seq_file *m, void *v);
|
||||
|
||||
void rtw_mbo_wnm_notification_parsing(
|
||||
_adapter *padapter, const u8 *pdata, size_t data_len);
|
||||
|
||||
void rtw_mbo_build_wnm_notification(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib);
|
||||
|
||||
void rtw_mbo_build_probe_req_ies(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib);
|
||||
|
||||
void rtw_mbo_build_assoc_req_ies(
|
||||
_adapter *padapter, u8 **pframe, struct pkt_attrib *pattrib);
|
||||
|
||||
#endif /* __RTW_MBO_H_ */
|
||||
|
||||
@@ -54,7 +54,11 @@
|
||||
#define MCC_SINGLE_TX_CRITERIA 5 /* Mbps */
|
||||
|
||||
#define MAX_MCC_NUM 2
|
||||
#ifdef CONFIG_RTL8822C
|
||||
#define DBG_MCC_REG_NUM 3
|
||||
#else
|
||||
#define DBG_MCC_REG_NUM 4
|
||||
#endif
|
||||
#define DBG_MCC_RF_REG_NUM 1
|
||||
|
||||
#define MCC_STOP(adapter) (adapter->mcc_adapterpriv.mcc_tx_stop)
|
||||
|
||||
@@ -19,18 +19,6 @@
|
||||
#include <basic_types.h>
|
||||
#include <osdep_service.h>
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define MAX_RTKM_RECVBUF_SZ MAX_RECVBUF_SZ
|
||||
#define MAX_RTKM_NR_PREALLOC_RECV_SKB NR_RECVBUFF
|
||||
#else /* !CONFIG_SDIO_HCI */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR_HIGH
|
||||
#define MAX_RTKM_RECVBUF_SZ (31744) /* 31k */
|
||||
#else
|
||||
#define MAX_RTKM_RECVBUF_SZ (15360) /* 15k */
|
||||
#endif /* CONFIG_PLATFORM_MSTAR_HIGH */
|
||||
#define MAX_RTKM_NR_PREALLOC_RECV_SKB 16
|
||||
#endif /* !CONFIG_SDIO_HCI */
|
||||
|
||||
u16 rtw_rtkm_get_buff_size(void);
|
||||
u8 rtw_rtkm_get_nr_recv_skb(void);
|
||||
struct u8 *rtw_alloc_revcbuf_premem(void);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
* Copyright(c) 2007 - 2019 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
@@ -25,29 +25,27 @@ int rtw_mi_get_ch_setting_union_no_self(_adapter *adapter, u8 *ch, u8 *bw, u8 *o
|
||||
|
||||
struct mi_state {
|
||||
u8 sta_num; /* WIFI_STATION_STATE */
|
||||
u8 ld_sta_num; /* WIFI_STATION_STATE && _FW_LINKED */
|
||||
u8 lg_sta_num; /* WIFI_STATION_STATE && _FW_UNDER_LINKING */
|
||||
u8 ld_sta_num; /* WIFI_STATION_STATE && WIFI_ASOC_STATE */
|
||||
u8 lg_sta_num; /* WIFI_STATION_STATE && WIFI_UNDER_LINKING */
|
||||
#ifdef CONFIG_TDLS
|
||||
u8 ld_tdls_num; /* adapter.tdlsinfo.link_established */
|
||||
#endif
|
||||
#ifdef CONFIG_AP_MODE
|
||||
u8 ap_num; /* WIFI_AP_STATE && _FW_LINKED */
|
||||
u8 ap_num; /* WIFI_AP_STATE && WIFI_ASOC_STATE */
|
||||
u8 starting_ap_num; /*WIFI_FW_AP_STATE*/
|
||||
u8 ld_ap_num; /* WIFI_AP_STATE && _FW_LINKED && asoc_sta_count > 2 */
|
||||
u8 ld_ap_num; /* WIFI_AP_STATE && WIFI_ASOC_STATE && asoc_sta_count > 2 */
|
||||
#endif
|
||||
u8 adhoc_num; /* (WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) && _FW_LINKED */
|
||||
u8 ld_adhoc_num; /* (WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) && _FW_LINKED && asoc_sta_count > 2 */
|
||||
u8 adhoc_num; /* (WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) && WIFI_ASOC_STATE */
|
||||
u8 ld_adhoc_num; /* (WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE) && WIFI_ASOC_STATE && asoc_sta_count > 2 */
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
u8 mesh_num; /* WIFI_MESH_STATE && _FW_LINKED */
|
||||
u8 ld_mesh_num; /* WIFI_MESH_STATE && _FW_LINKED && asoc_sta_count > 2 */
|
||||
u8 mesh_num; /* WIFI_MESH_STATE && WIFI_ASOC_STATE */
|
||||
u8 ld_mesh_num; /* WIFI_MESH_STATE && WIFI_ASOC_STATE && asoc_sta_count > 2 */
|
||||
#endif
|
||||
u8 scan_num; /* WIFI_SITE_MONITOR */
|
||||
u8 scan_enter_num; /* WIFI_SITE_MONITOR && !SCAN_DISABLE && !SCAN_BACK_OP */
|
||||
u8 scan_num; /* WIFI_UNDER_SURVEY */
|
||||
u8 scan_enter_num; /* WIFI_UNDER_SURVEY && !SCAN_DISABLE && !SCAN_BACK_OP */
|
||||
u8 uwps_num; /* WIFI_UNDER_WPS */
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
#ifdef CONFIG_P2P
|
||||
u8 roch_num;
|
||||
#endif
|
||||
u8 mgmt_tx_num;
|
||||
#endif
|
||||
#ifdef CONFIG_P2P
|
||||
@@ -55,9 +53,6 @@ struct mi_state {
|
||||
u8 p2p_gc;
|
||||
u8 p2p_go;
|
||||
#endif
|
||||
u8 union_ch;
|
||||
u8 union_bw;
|
||||
u8 union_offset;
|
||||
};
|
||||
|
||||
#define MSTATE_STA_NUM(_mstate) ((_mstate)->sta_num)
|
||||
@@ -95,7 +90,7 @@ struct mi_state {
|
||||
#define MSTATE_SCAN_ENTER_NUM(_mstate) ((_mstate)->scan_enter_num)
|
||||
#define MSTATE_WPS_NUM(_mstate) ((_mstate)->uwps_num)
|
||||
|
||||
#if defined(CONFIG_IOCTL_CFG80211) && defined(CONFIG_P2P)
|
||||
#if defined(CONFIG_IOCTL_CFG80211)
|
||||
#define MSTATE_ROCH_NUM(_mstate) ((_mstate)->roch_num)
|
||||
#else
|
||||
#define MSTATE_ROCH_NUM(_mstate) 0
|
||||
@@ -117,13 +112,9 @@ struct mi_state {
|
||||
#define MSTATE_MGMT_TX_NUM(_mstate) 0
|
||||
#endif
|
||||
|
||||
#define MSTATE_U_CH(_mstate) ((_mstate)->union_ch)
|
||||
#define MSTATE_U_BW(_mstate) ((_mstate)->union_bw)
|
||||
#define MSTATE_U_OFFSET(_mstate) ((_mstate)->union_offset)
|
||||
|
||||
#define rtw_mi_get_union_chan(adapter) adapter_to_dvobj(adapter)->iface_state.union_ch
|
||||
#define rtw_mi_get_union_bw(adapter) adapter_to_dvobj(adapter)->iface_state.union_bw
|
||||
#define rtw_mi_get_union_offset(adapter) adapter_to_dvobj(adapter)->iface_state.union_offset
|
||||
#define rtw_mi_get_union_chan(adapter) ((adapter_to_dvobj(adapter)->union_ch) ? (adapter_to_dvobj(adapter)->union_ch) : (adapter_to_dvobj(adapter)->union_ch_bak))
|
||||
#define rtw_mi_get_union_bw(adapter) ((adapter_to_dvobj(adapter)->union_ch) ? (adapter_to_dvobj(adapter)->union_bw) : (adapter_to_dvobj(adapter)->union_bw_bak))
|
||||
#define rtw_mi_get_union_offset(adapter) ((adapter_to_dvobj(adapter)->union_ch) ? (adapter_to_dvobj(adapter)->union_offset) : (adapter_to_dvobj(adapter)->union_offset_bak))
|
||||
|
||||
#define rtw_mi_get_assoced_sta_num(adapter) DEV_STA_LD_NUM(adapter_to_dvobj(adapter))
|
||||
#define rtw_mi_get_ap_num(adapter) DEV_AP_NUM(adapter_to_dvobj(adapter))
|
||||
@@ -195,16 +186,18 @@ u8 rtw_mi_buddy_is_scan_deny(_adapter *adapter);
|
||||
void rtw_mi_beacon_update(_adapter *padapter);
|
||||
void rtw_mi_buddy_beacon_update(_adapter *padapter);
|
||||
|
||||
void rtw_mi_hal_dump_macaddr(_adapter *padapter);
|
||||
void rtw_mi_buddy_hal_dump_macaddr(_adapter *padapter);
|
||||
#ifndef CONFIG_MI_WITH_MBSSID_CAM
|
||||
void rtw_mi_hal_dump_macaddr(void *sel, _adapter *padapter);
|
||||
void rtw_mi_buddy_hal_dump_macaddr(void *sel, _adapter *padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
void rtw_mi_xmit_tasklet_schedule(_adapter *padapter);
|
||||
void rtw_mi_buddy_xmit_tasklet_schedule(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
u8 rtw_mi_busy_traffic_check(_adapter *padapter, bool check_sc_interval);
|
||||
u8 rtw_mi_buddy_busy_traffic_check(_adapter *padapter, bool check_sc_interval);
|
||||
u8 rtw_mi_busy_traffic_check(_adapter *padapter);
|
||||
u8 rtw_mi_buddy_busy_traffic_check(_adapter *padapter);
|
||||
|
||||
u8 rtw_mi_check_mlmeinfo_state(_adapter *padapter, u32 state);
|
||||
u8 rtw_mi_buddy_check_mlmeinfo_state(_adapter *padapter, u32 state);
|
||||
@@ -246,6 +239,8 @@ u8 rtw_mi_buddy_check_pending_xmitbuf(_adapter *padapter);
|
||||
#include <rtl8822b_hal.h>
|
||||
#elif defined(CONFIG_RTL8822C)
|
||||
#include <rtl8822c_hal.h>
|
||||
#elif defined(CONFIG_RTL8723F)
|
||||
#include <rtl8723f_hal.h>
|
||||
#else
|
||||
extern s32 _dequeue_writeport(PADAPTER padapter);
|
||||
#endif
|
||||
@@ -273,15 +268,17 @@ extern void sreset_start_adapter(_adapter *padapter);
|
||||
extern void sreset_stop_adapter(_adapter *padapter);
|
||||
u8 rtw_mi_sreset_adapter_hdl(_adapter *padapter, u8 bstart);
|
||||
u8 rtw_mi_buddy_sreset_adapter_hdl(_adapter *padapter, u8 bstart);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
#if defined(DBG_CONFIG_ERROR_RESET) && defined(CONFIG_CONCURRENT_MODE)
|
||||
void rtw_mi_ap_info_restore(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
u8 rtw_mi_tx_beacon_hdl(_adapter *padapter);
|
||||
u8 rtw_mi_buddy_tx_beacon_hdl(_adapter *padapter);
|
||||
|
||||
u8 rtw_mi_set_tx_beacon_cmd(_adapter *padapter);
|
||||
u8 rtw_mi_buddy_set_tx_beacon_cmd(_adapter *padapter);
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
u8 rtw_mi_p2p_chk_state(_adapter *padapter, enum P2P_STATE p2p_state);
|
||||
|
||||
@@ -23,47 +23,46 @@
|
||||
|
||||
/* Commented by Albert 20101105
|
||||
* Increase the scanning timeout because of increasing the SURVEY_TO value. */
|
||||
|
||||
|
||||
#ifdef PALTFORM_OS_WINCE
|
||||
#define SCANQUEUE_LIFETIME 12000000 /* unit:us */
|
||||
#else
|
||||
#define SCANQUEUE_LIFETIME 20000 /* 20sec, unit:msec */
|
||||
#endif
|
||||
|
||||
#define WIFI_NULL_STATE 0x00000000
|
||||
#define WIFI_ASOC_STATE 0x00000001 /* Linked */
|
||||
#define WIFI_REASOC_STATE 0x00000002
|
||||
#define WIFI_SLEEP_STATE 0x00000004
|
||||
#define WIFI_STATION_STATE 0x00000008
|
||||
#define WIFI_AP_STATE 0x00000010
|
||||
#define WIFI_ADHOC_STATE 0x00000020
|
||||
#define WIFI_ADHOC_MASTER_STATE 0x00000040
|
||||
#define WIFI_UNDER_LINKING 0x00000080
|
||||
#define WIFI_UNDER_WPS 0x00000100
|
||||
#define WIFI_MESH_STATE 0x00000200
|
||||
#define MAX_UNASSOC_STA_CNT 128
|
||||
#define UNASSOC_STA_LIFETIME_MS 60000
|
||||
|
||||
/*pmlmepriv->fw_state*/
|
||||
#define WIFI_NULL_STATE 0x00000000
|
||||
#define WIFI_ASOC_STATE 0x00000001 /* Linked */
|
||||
#define WIFI_REASOC_STATE 0x00000002
|
||||
#define WIFI_SLEEP_STATE 0x00000004
|
||||
#define WIFI_STATION_STATE 0x00000008
|
||||
#define WIFI_AP_STATE 0x00000010
|
||||
#define WIFI_ADHOC_STATE 0x00000020
|
||||
#define WIFI_ADHOC_MASTER_STATE 0x00000040
|
||||
#define WIFI_UNDER_LINKING 0x00000080
|
||||
#define WIFI_UNDER_WPS 0x00000100
|
||||
#define WIFI_MESH_STATE 0x00000200
|
||||
#define WIFI_STA_ALIVE_CHK_STATE 0x00000400
|
||||
#define WIFI_SITE_MONITOR 0x00000800 /* under site surveying */
|
||||
#define WIFI_WDS 0x00001000
|
||||
#define WIFI_WDS_RX_BEACON 0x00002000 /* already rx WDS AP beacon */
|
||||
#define WIFI_AUTOCONF 0x00004000
|
||||
#define WIFI_AUTOCONF_IND 0x00008000
|
||||
#define WIFI_MP_STATE 0x00010000
|
||||
#define WIFI_MP_CTX_BACKGROUND 0x00020000 /* in continuous tx background */
|
||||
#define WIFI_MP_CTX_ST 0x00040000 /* in continuous tx with single-tone */
|
||||
#define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in continuous tx background due to out of skb */
|
||||
#define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continuous tx */
|
||||
#define WIFI_MP_CTX_CCK_CS 0x00200000 /* in continuous tx with carrier suppression */
|
||||
#define WIFI_MP_LPBK_STATE 0x00400000
|
||||
#define WIFI_UNDER_SURVEY 0x00000800 /* under site surveying */
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00001000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00002000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00004000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00008000*/
|
||||
#define WIFI_MP_STATE 0x00010000
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00020000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00040000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00080000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00100000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00200000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x00400000*/
|
||||
#define WIFI_OP_CH_SWITCHING 0x00800000
|
||||
#define WIFI_UNDER_KEY_HANDSHAKE 0x01000000
|
||||
#define WIFI_UNDER_KEY_HANDSHAKE 0x01000000
|
||||
/*#define WIFI_UNDEFINED_STATE 0x02000000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x04000000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x08000000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x10000000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x20000000*/
|
||||
/*#define WIFI_UNDEFINED_STATE 0x40000000*/
|
||||
#define WIFI_MONITOR_STATE 0x80000000
|
||||
#define WIFI_CSA_UPDATE_BEACON 0x40000000
|
||||
#define WIFI_MONITOR_STATE 0x80000000
|
||||
|
||||
|
||||
#define MIRACAST_DISABLED 0
|
||||
#define MIRACAST_SOURCE BIT0
|
||||
@@ -101,13 +100,13 @@ void rtw_wfd_st_switch(struct sta_info *sta, bool on);
|
||||
#define MLME_IS_MSRC(adapter) rtw_chk_miracast_mode((adapter), MIRACAST_SOURCE)
|
||||
#define MLME_IS_MSINK(adapter) rtw_chk_miracast_mode((adapter), MIRACAST_SINK)
|
||||
|
||||
#define MLME_IS_SCAN(adapter) CHK_MLME_STATE(adapter, WIFI_SITE_MONITOR)
|
||||
#define MLME_IS_SCAN(adapter) CHK_MLME_STATE(adapter, WIFI_UNDER_SURVEY)
|
||||
#define MLME_IS_LINKING(adapter) CHK_MLME_STATE(adapter, WIFI_UNDER_LINKING)
|
||||
#define MLME_IS_ASOC(adapter) CHK_MLME_STATE(adapter, WIFI_ASOC_STATE)
|
||||
#define MLME_IS_OPCH_SW(adapter) CHK_MLME_STATE(adapter, WIFI_OP_CH_SWITCHING)
|
||||
#define MLME_IS_WPS(adapter) CHK_MLME_STATE(adapter, WIFI_UNDER_WPS)
|
||||
|
||||
#if defined(CONFIG_IOCTL_CFG80211) && defined(CONFIG_P2P)
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
#define MLME_IS_ROCH(adapter) (rtw_cfg80211_get_is_roch(adapter) == _TRUE)
|
||||
#else
|
||||
#define MLME_IS_ROCH(adapter) 0
|
||||
@@ -143,10 +142,10 @@ void rtw_wfd_st_switch(struct sta_info *sta, bool on);
|
||||
enum {
|
||||
MLME_ACTION_UNKNOWN,
|
||||
MLME_ACTION_NONE,
|
||||
MLME_SCAN_ENABLE, /* WIFI_SITE_MONITOR */
|
||||
MLME_SCAN_ENTER, /* WIFI_SITE_MONITOR && !SCAN_DISABLE && !SCAN_BACK_OP */
|
||||
MLME_SCAN_DONE, /* WIFI_SITE_MONITOR && (SCAN_DISABLE || SCAN_BACK_OP) */
|
||||
MLME_SCAN_DISABLE, /* WIFI_SITE_MONITOR is going to be cleared */
|
||||
MLME_SCAN_ENABLE, /* WIFI_UNDER_SURVEY */
|
||||
MLME_SCAN_ENTER, /* WIFI_UNDER_SURVEY && !SCAN_DISABLE && !SCAN_BACK_OP */
|
||||
MLME_SCAN_DONE, /* WIFI_UNDER_SURVEY && (SCAN_DISABLE || SCAN_BACK_OP) */
|
||||
MLME_SCAN_DISABLE, /* WIFI_UNDER_SURVEY is going to be cleared */
|
||||
MLME_STA_CONNECTING,
|
||||
MLME_STA_CONNECTED,
|
||||
MLME_STA_DISCONNECTED,
|
||||
@@ -160,12 +159,14 @@ enum {
|
||||
MLME_MESH_STOPPED,
|
||||
MLME_OPCH_SWITCH,
|
||||
};
|
||||
|
||||
#define _FW_UNDER_LINKING WIFI_UNDER_LINKING
|
||||
#define _FW_LINKED WIFI_ASOC_STATE
|
||||
#define _FW_UNDER_SURVEY WIFI_SITE_MONITOR
|
||||
|
||||
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
enum MODE_WOW_KEEP_ALIVE_PATTERN {
|
||||
wow_keep_alive_pattern_disable = 0,
|
||||
wow_keep_alive_pattern_tx,
|
||||
wow_keep_alive_pattern_trx,
|
||||
wow_keep_alive_pattern_trx_with_ack
|
||||
};
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
enum dot11AuthAlgrthmNum {
|
||||
dot11AuthAlgrthm_Open = 0,
|
||||
dot11AuthAlgrthm_Shared,
|
||||
@@ -175,6 +176,39 @@ enum dot11AuthAlgrthmNum {
|
||||
dot11AuthAlgrthm_MaxNum
|
||||
};
|
||||
|
||||
/**
|
||||
* enum mlme_auth_type - AuthenticationType
|
||||
*
|
||||
* @MLME_AUTHTYPE_OPEN_SYSTEM: Open System authentication
|
||||
* @MLME_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
|
||||
* @MLME_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
|
||||
* @MLME_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
|
||||
* @MLME_AUTHTYPE_SAE: Simultaneous authentication of equals
|
||||
* @MLME_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key
|
||||
* @MLME_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
|
||||
* @MLME_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
|
||||
* @__MLME_AUTHTYPE_NUM: internal
|
||||
* @MLME_AUTHTYPE_MAX: maximum valid auth algorithm
|
||||
* @MLME_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by trying
|
||||
* multiple times); this is invalid in netlink -- leave out the attribute
|
||||
* for this on CONNECT commands.
|
||||
*/
|
||||
enum mlme_auth_type {
|
||||
MLME_AUTHTYPE_OPEN_SYSTEM,
|
||||
MLME_AUTHTYPE_SHARED_KEY,
|
||||
MLME_AUTHTYPE_FT,
|
||||
MLME_AUTHTYPE_NETWORK_EAP,
|
||||
MLME_AUTHTYPE_SAE,
|
||||
MLME_AUTHTYPE_FILS_SK,
|
||||
MLME_AUTHTYPE_FILS_SK_PFS,
|
||||
MLME_AUTHTYPE_FILS_PK,
|
||||
|
||||
/* keep last */
|
||||
__MLME_AUTHTYPE_NUM,
|
||||
MLME_AUTHTYPE_MAX = __MLME_AUTHTYPE_NUM - 1,
|
||||
MLME_AUTHTYPE_AUTOMATIC
|
||||
};
|
||||
|
||||
/* Scan type including active and passive scan. */
|
||||
typedef enum _RT_SCAN_TYPE {
|
||||
SCAN_PASSIVE,
|
||||
@@ -320,20 +354,6 @@ struct scan_limit_info {
|
||||
#endif /* CONFIG_P2P_OP_CHK_SOCIAL_CH */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
struct cfg80211_wifidirect_info {
|
||||
_timer remain_on_ch_timer;
|
||||
u8 restore_channel;
|
||||
struct ieee80211_channel remain_on_ch_channel;
|
||||
enum nl80211_channel_type remain_on_ch_type;
|
||||
ATOMIC_T ro_ch_cookie_gen;
|
||||
u64 remain_on_ch_cookie;
|
||||
bool is_ro_ch;
|
||||
struct wireless_dev *ro_ch_wdev;
|
||||
systime last_ro_ch_time; /* this will be updated at the beginning and end of ro_ch */
|
||||
};
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
|
||||
enum P2P_WOWLAN_RECV_FRAME_TYPE {
|
||||
@@ -363,10 +383,7 @@ struct wifidirect_info {
|
||||
_timer pre_tx_scan_timer;
|
||||
_timer reset_ch_sitesurvey;
|
||||
_timer reset_ch_sitesurvey2; /* Just for resetting the scan limit function by using p2p nego */
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
/* Used to switch the channel between legacy AP and listen state. */
|
||||
_timer ap_p2p_switch_timer;
|
||||
#endif
|
||||
|
||||
struct tx_provdisc_req_info tx_prov_disc_info;
|
||||
struct rx_provdisc_req_info rx_prov_disc_info;
|
||||
struct tx_invite_req_info invitereq_info;
|
||||
@@ -475,6 +492,7 @@ struct tdls_ch_switch {
|
||||
u8 addr[ETH_ALEN];
|
||||
u8 off_ch_num;
|
||||
u8 ch_offset;
|
||||
u8 bcn_early_reg_bkp;
|
||||
u32 cur_time;
|
||||
u8 delay_switch_back;
|
||||
u8 dump_stack;
|
||||
@@ -526,212 +544,27 @@ enum {
|
||||
RTW_ROAM_ACTIVE = BIT2,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
#define RTW_FT_ACTION_REQ_LMT 4
|
||||
#define RTW_FT_MAX_IE_SZ 256
|
||||
#define UNASOC_STA_SRC_RX_BMC 0
|
||||
#define UNASOC_STA_SRC_RX_NMY_UC 1
|
||||
#define UNASOC_STA_SRC_NUM 2
|
||||
|
||||
enum _rtw_ft_sta_status {
|
||||
RTW_FT_UNASSOCIATED_STA = 0,
|
||||
RTW_FT_AUTHENTICATING_STA,
|
||||
RTW_FT_AUTHENTICATED_STA,
|
||||
RTW_FT_ASSOCIATING_STA,
|
||||
RTW_FT_ASSOCIATED_STA,
|
||||
RTW_FT_REQUESTING_STA,
|
||||
RTW_FT_REQUESTED_STA,
|
||||
RTW_FT_CONFIRMED_STA,
|
||||
RTW_FT_UNSPECIFIED_STA
|
||||
#define UNASOC_STA_MODE_DISABLED 0
|
||||
#define UNASOC_STA_MODE_INTERESTED 1
|
||||
#define UNASOC_STA_MODE_ALL 2
|
||||
#define UNASOC_STA_MODE_NUM 3
|
||||
|
||||
#define UNASOC_STA_DEL_CHK_SKIP 0
|
||||
#define UNASOC_STA_DEL_CHK_ALIVE 1
|
||||
#define UNASOC_STA_DEL_CHK_DELETED 2
|
||||
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
struct unassoc_sta_info {
|
||||
_list list;
|
||||
u8 addr[ETH_ALEN];
|
||||
u8 interested;
|
||||
s8 recv_signal_power;
|
||||
systime time;
|
||||
};
|
||||
|
||||
#define rtw_ft_chk_status(a, s) \
|
||||
((a)->mlmepriv.ft_roam.ft_status == (s))
|
||||
|
||||
#define rtw_ft_roam_status(a, s) \
|
||||
((rtw_to_roam(a) > 0) && rtw_ft_chk_status(a, s))
|
||||
|
||||
#define rtw_ft_authed_sta(a) \
|
||||
((rtw_ft_chk_status(a, RTW_FT_AUTHENTICATED_STA)) || \
|
||||
(rtw_ft_chk_status(a, RTW_FT_ASSOCIATING_STA)) || \
|
||||
(rtw_ft_chk_status(a, RTW_FT_ASSOCIATED_STA)))
|
||||
|
||||
#define rtw_ft_set_status(a, s) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_status = (s)); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_lock_set_status(a, s, irq) \
|
||||
do { \
|
||||
_enter_critical_bh(&(a)->mlmepriv.lock, ((_irqL *)(irq))); \
|
||||
((a)->mlmepriv.ft_roam.ft_status = (s)); \
|
||||
_exit_critical_bh(&(a)->mlmepriv.lock, ((_irqL *)(irq))); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_reset_status(a) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_status = RTW_FT_UNASSOCIATED_STA); \
|
||||
} while (0)
|
||||
|
||||
enum rtw_ft_capability {
|
||||
RTW_FT_EN = BIT0,
|
||||
RTW_FT_OTD_EN = BIT1,
|
||||
RTW_FT_PEER_EN = BIT2,
|
||||
RTW_FT_PEER_OTD_EN = BIT3,
|
||||
RTW_FT_BTM_ROAM = BIT4,
|
||||
};
|
||||
|
||||
#define rtw_ft_chk_flags(a, f) \
|
||||
((a)->mlmepriv.ft_roam.ft_flags & (f))
|
||||
|
||||
#define rtw_ft_set_flags(a, f) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_flags |= (f)); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_clr_flags(a, f) \
|
||||
do { \
|
||||
((a)->mlmepriv.ft_roam.ft_flags &= ~(f)); \
|
||||
} while (0)
|
||||
|
||||
#define rtw_ft_roam(a) \
|
||||
((rtw_to_roam(a) > 0) && rtw_ft_chk_flags(a, RTW_FT_PEER_EN))
|
||||
|
||||
#define rtw_ft_valid_akm(a, t) \
|
||||
((rtw_ft_chk_flags(a, RTW_FT_EN)) && \
|
||||
(((t) == 3) || ((t) == 4)))
|
||||
|
||||
#define rtw_ft_roam_expired(a, r) \
|
||||
((rtw_chk_roam_flags(a, RTW_ROAM_ON_EXPIRED)) \
|
||||
&& (r == WLAN_REASON_ACTIVE_ROAM))
|
||||
|
||||
#define rtw_ft_otd_roam_en(a) \
|
||||
((rtw_ft_chk_flags(a, RTW_FT_OTD_EN)) \
|
||||
&& ((a)->mlmepriv.ft_roam.ft_roam_on_expired == _FALSE) \
|
||||
&& ((a)->mlmepriv.ft_roam.ft_cap & 0x01))
|
||||
|
||||
#define rtw_ft_otd_roam(a) \
|
||||
rtw_ft_chk_flags(a, RTW_FT_PEER_OTD_EN)
|
||||
|
||||
#define rtw_ft_valid_otd_candidate(a, p) \
|
||||
((rtw_ft_chk_flags(a, RTW_FT_OTD_EN)) \
|
||||
&& ((rtw_ft_chk_flags(a, RTW_FT_PEER_OTD_EN) \
|
||||
&& ((*((p)+4) & 0x01) == 0)) \
|
||||
|| ((rtw_ft_chk_flags(a, RTW_FT_PEER_OTD_EN) == 0) \
|
||||
&& (*((p)+4) & 0x01))))
|
||||
|
||||
struct ft_roam_info {
|
||||
u16 mdid;
|
||||
u8 ft_cap;
|
||||
/*b0: FT over DS, b1: Resource Req Protocol Cap, b2~b7: Reserved*/
|
||||
u8 updated_ft_ies[RTW_FT_MAX_IE_SZ];
|
||||
u16 updated_ft_ies_len;
|
||||
u8 ft_action[RTW_FT_MAX_IE_SZ];
|
||||
u16 ft_action_len;
|
||||
struct cfg80211_ft_event_params ft_event;
|
||||
u8 ft_roam_on_expired;
|
||||
u8 ft_flags;
|
||||
u32 ft_status;
|
||||
u32 ft_req_retry_cnt;
|
||||
bool ft_updated_bcn;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
#if defined(CONFIG_RTW_WNM) || defined(CONFIG_RTW_80211K)
|
||||
#define RTW_RRM_NB_RPT_EN BIT(1)
|
||||
#define RTW_MAX_NB_RPT_NUM 8
|
||||
|
||||
#define rtw_roam_busy_scan(a, nb) \
|
||||
(((a)->mlmepriv.LinkDetectInfo.bBusyTraffic == _TRUE) && \
|
||||
(((a)->mlmepriv.ch_cnt) < ((nb)->nb_rpt_ch_list_num)))
|
||||
|
||||
#define rtw_wnm_btm_preference_cap(a) \
|
||||
((a)->mlmepriv.nb_info.preference_en == _TRUE)
|
||||
|
||||
#define rtw_wnm_btm_diff_bss(a) \
|
||||
((rtw_wnm_btm_preference_cap(a)) && \
|
||||
(is_zero_mac_addr((a)->mlmepriv.nb_info.roam_target_addr) == _FALSE) && \
|
||||
(_rtw_memcmp((a)->mlmepriv.nb_info.roam_target_addr,\
|
||||
(a)->mlmepriv.cur_network.network.MacAddress, ETH_ALEN) == _FALSE))
|
||||
|
||||
#define rtw_wnm_btm_roam_candidate(a, c) \
|
||||
((rtw_wnm_btm_preference_cap(a)) && \
|
||||
(is_zero_mac_addr((a)->mlmepriv.nb_info.roam_target_addr) == _FALSE) && \
|
||||
(_rtw_memcmp((a)->mlmepriv.nb_info.roam_target_addr,\
|
||||
(c)->network.MacAddress, ETH_ALEN)))
|
||||
|
||||
#define rtw_wnm_set_ext_cap_btm(_pEleStart, _val) \
|
||||
SET_BITS_TO_LE_1BYTE(((u8 *)(_pEleStart))+2, 3, 1, _val)
|
||||
|
||||
#define wnm_btm_bss_term_inc(p) (*((u8 *)((p)+3)) & BSS_TERMINATION_INCLUDED)
|
||||
|
||||
#define wnm_btm_ess_disassoc_im(p) (*((u8 *)((p)+3)) & ESS_DISASSOC_IMMINENT)
|
||||
|
||||
#define wnm_btm_req_mode(p) (*((u8 *)((p)+3)))
|
||||
|
||||
#define wnm_btm_disassoc_timer(p) (*((u16 *)((p)+4)))
|
||||
|
||||
#define wnm_btm_valid_interval(p) (*((u8 *)((p)+6)))
|
||||
|
||||
#define wnm_btm_term_duration_offset(p) ((p)+7)
|
||||
|
||||
/*IEEE Std 80211k Figure 7-95b Neighbor Report element format*/
|
||||
struct nb_rpt_hdr {
|
||||
u8 id; /*0x34: Neighbor Report Element ID*/
|
||||
u8 len;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u32 bss_info;
|
||||
u8 reg_class;
|
||||
u8 ch_num;
|
||||
u8 phy_type;
|
||||
};
|
||||
|
||||
/*IEEE Std 80211v, Figure 7-95e2<65>XBSS Termination Duration subelement field format */
|
||||
struct btm_term_duration {
|
||||
u8 id;
|
||||
u8 len;
|
||||
u64 tsf;
|
||||
u16 duration;
|
||||
};
|
||||
|
||||
/*IEEE Std 80211v, Figure 7-101n8<6E>XBSS Transition Management Request frame body format */
|
||||
struct btm_req_hdr {
|
||||
u8 req_mode;
|
||||
u16 disassoc_timer;
|
||||
u8 validity_interval;
|
||||
struct btm_term_duration term_duration;
|
||||
};
|
||||
|
||||
/*IEEE Std 80211v, Table 7-43b Optional Subelement IDs for Neighbor Report*/
|
||||
/* BSS Transition Candidate Preference */
|
||||
#define WNM_BTM_CAND_PREF_SUBEID 0x03
|
||||
|
||||
/* BSS Termination Duration */
|
||||
#define WNM_BTM_TERM_DUR_SUBEID 0x04
|
||||
|
||||
struct wnm_btm_cant {
|
||||
struct nb_rpt_hdr nb_rpt;
|
||||
u8 preference; /* BSS Transition Candidate Preference */
|
||||
};
|
||||
|
||||
enum rtw_btm_req_mod {
|
||||
PREFERRED_CANDIDATE_LIST_INCLUDED = BIT0,
|
||||
ABRIDGED = BIT1,
|
||||
DISASSOC_IMMINENT = BIT2,
|
||||
BSS_TERMINATION_INCLUDED = BIT3,
|
||||
ESS_DISASSOC_IMMINENT = BIT4,
|
||||
};
|
||||
|
||||
struct roam_nb_info {
|
||||
struct nb_rpt_hdr nb_rpt[RTW_MAX_NB_RPT_NUM];
|
||||
struct rtw_ieee80211_channel nb_rpt_ch_list[RTW_MAX_NB_RPT_NUM];
|
||||
bool nb_rpt_valid;
|
||||
u8 nb_rpt_ch_list_num;
|
||||
u8 preference_en;
|
||||
u8 roam_target_addr[ETH_ALEN];
|
||||
u32 last_nb_rpt_entries;
|
||||
bool nb_rpt_is_same;
|
||||
_timer roam_scan_timer;
|
||||
};
|
||||
#endif /* defined(CONFIG_RTW_WNM) || defined(CONFIG_RTW_80211K) */
|
||||
#endif
|
||||
|
||||
struct mlme_priv {
|
||||
@@ -753,6 +586,9 @@ struct mlme_priv {
|
||||
bool need_to_roam;
|
||||
#endif
|
||||
|
||||
u32 defs_lmt_sta;
|
||||
u32 defs_lmt_time;
|
||||
|
||||
u8 *nic_hdl;
|
||||
u32 max_bss_cnt; /* The size of scan queue */
|
||||
_list *pscanned;
|
||||
@@ -888,12 +724,14 @@ struct mlme_priv {
|
||||
u8 *auth_rsp;
|
||||
u32 auth_rsp_len;
|
||||
#endif
|
||||
#endif /* CONFIG_AP_MODE and CONFIG_NATIVEAP_MLME */
|
||||
|
||||
u8 *assoc_req;
|
||||
u32 assoc_req_len;
|
||||
|
||||
u8 *assoc_rsp;
|
||||
u32 assoc_rsp_len;
|
||||
|
||||
#if defined(CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME)
|
||||
/* u8 *wps_probe_req_ie; */
|
||||
/* u32 wps_probe_req_ie_len; */
|
||||
|
||||
@@ -957,12 +795,21 @@ struct mlme_priv {
|
||||
u32 wfd_assoc_resp_ie_len;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_MBO
|
||||
u8 *pcell_data_cap_ie;
|
||||
u32 cell_data_cap_len;
|
||||
#endif
|
||||
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
/* DMP kobject_hotplug function signal need in passive level */
|
||||
_workitem Linkup_workitem;
|
||||
_workitem Linkdown_workitem;
|
||||
#endif
|
||||
|
||||
#ifdef RTW_BUSY_DENY_SCAN
|
||||
systime lastscantime;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 scanning_via_buddy_intf;
|
||||
#endif
|
||||
@@ -972,6 +819,19 @@ struct mlme_priv {
|
||||
u8 vendor_ie[WLAN_MAX_VENDOR_IE_NUM][WLAN_MAX_VENDOR_IE_LEN];
|
||||
u32 vendor_ielen[WLAN_MAX_VENDOR_IE_NUM];
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
u8 unassoc_sta_mode_of_stype[UNASOC_STA_SRC_NUM];
|
||||
_queue unassoc_sta_queue;
|
||||
_queue free_unassoc_sta_queue;
|
||||
u8 *free_unassoc_sta_buf;
|
||||
u32 interested_unassoc_sta_cnt;
|
||||
u32 max_unassoc_sta_cnt;
|
||||
#ifdef CONFIG_PLATFORM_CMAP_INTFS
|
||||
struct unassoc_sta_info cmap_unassoc_sta[CMAP_UNASSOC_METRICS_STA_MAX];
|
||||
u8 cmap_unassoc_sta_cnt;
|
||||
_timer cmap_unassoc_sta_timer;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#define mlme_set_scan_to_timer(mlme, ms) \
|
||||
@@ -1010,7 +870,7 @@ extern void hostapd_mode_unload(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
|
||||
extern int rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf, u16 status);
|
||||
extern void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf, u16 status);
|
||||
extern void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_joinbss_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
@@ -1018,23 +878,10 @@ extern void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
void rtw_sta_mstatus_disc_rpt(_adapter *adapter, u8 mac_id);
|
||||
void rtw_sta_mstatus_report(_adapter *adapter);
|
||||
extern void rtw_atimdone_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_cpwm_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
extern void rtw_wmm_event_callback(PADAPTER padapter, u8 *pbuf);
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
void rtw_sta_timeout_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
void rtw_ft_info_init(struct ft_roam_info *pft);
|
||||
u8 rtw_ft_chk_roaming_candidate(_adapter *padapter,
|
||||
struct wlan_network *competitor);
|
||||
void rtw_ft_update_stainfo(_adapter *padapter, WLAN_BSSID_EX *pnetwork);
|
||||
void rtw_ft_reassoc_event_callback(_adapter *padapter, u8 *pbuf);
|
||||
#endif
|
||||
#if defined(CONFIG_RTW_WNM) || defined(CONFIG_RTW_80211K)
|
||||
void rtw_roam_nb_info_init(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
thread_return event_thread(thread_context context);
|
||||
|
||||
extern void rtw_free_network_queue(_adapter *adapter, u8 isfreeall);
|
||||
@@ -1150,7 +997,7 @@ struct wlan_network *rtw_find_same_network(_queue *scanned_queue, struct wlan_ne
|
||||
|
||||
extern void rtw_free_assoc_resources(_adapter *adapter, u8 lock_scanned_queue);
|
||||
extern void rtw_indicate_disconnect(_adapter *adapter, u16 reason, u8 locally_generated);
|
||||
extern int rtw_indicate_connect(_adapter *adapter);
|
||||
extern void rtw_indicate_connect(_adapter *adapter);
|
||||
void rtw_indicate_scan_done(_adapter *padapter, bool aborted);
|
||||
|
||||
void rtw_drv_scan_by_self(_adapter *padapter, u8 reason);
|
||||
@@ -1256,7 +1103,7 @@ void rtw_ht_use_default_setting(_adapter *padapter);
|
||||
void rtw_build_wmm_ie_ht(_adapter *padapter, u8 *out_ie, uint *pout_len);
|
||||
unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len, u8 channel);
|
||||
void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel);
|
||||
void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe, u8 issue_when_busy);
|
||||
void rtw_append_exented_cap(_adapter *padapter, u8 *out_ie, uint *pout_len);
|
||||
#endif
|
||||
|
||||
@@ -1308,6 +1155,19 @@ struct sta_media_status_rpt_cmd_parm {
|
||||
bool connected;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
void rtw_unassoc_sta_set_mode(_adapter *adapter, u8 stype, u8 mode);
|
||||
bool rtw_unassoc_sta_src_chk(_adapter *adapter, u8 stype);
|
||||
void dump_unassoc_sta(void *sel, _adapter *adapter);
|
||||
void rtw_del_unassoc_sta_queue(_adapter *adapter);
|
||||
void rtw_del_unassoc_sta(_adapter *adapter, u8 *addr);
|
||||
void rtw_rx_add_unassoc_sta(_adapter *adapter, u8 stype, u8 *addr, s8 recv_signal_power);
|
||||
void rtw_add_interested_unassoc_sta(_adapter *adapter, u8 *addr);
|
||||
void rtw_undo_interested_unassoc_sta(_adapter *adapter, u8 *addr);
|
||||
void rtw_undo_all_interested_unassoc_sta(_adapter *adapter);
|
||||
u8 rtw_search_unassoc_sta(_adapter *adapter, u8 *addr, struct unassoc_sta_info *ret_sta);
|
||||
#endif
|
||||
|
||||
void rtw_sta_media_status_rpt(_adapter *adapter, struct sta_info *sta, bool connected);
|
||||
u8 rtw_sta_media_status_rpt_cmd(_adapter *adapter, struct sta_info *sta, bool connected);
|
||||
void rtw_sta_media_status_rpt_cmd_hdl(_adapter *adapter, struct sta_media_status_rpt_cmd_parm *parm);
|
||||
|
||||
@@ -28,38 +28,39 @@
|
||||
/* #define DISCONNECT_TO (3000) */
|
||||
#define ADDBA_TO (2000)
|
||||
|
||||
#ifndef SURVEY_TO_ACTIVE
|
||||
#define SURVEY_TO_ACTIVE SURVEY_TO
|
||||
#endif
|
||||
|
||||
#define LINKED_TO (1) /* unit:2 sec, 1x2 = 2 sec */
|
||||
|
||||
#define REAUTH_LIMIT (4)
|
||||
#define REASSOC_LIMIT (4)
|
||||
#define READDBA_LIMIT (2)
|
||||
|
||||
#define DEAUTH_DENY_TO 500 /* unit: ms */
|
||||
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#define ROAMING_LIMIT 5
|
||||
#else
|
||||
#define ROAMING_LIMIT 8
|
||||
#endif
|
||||
/* #define IOCMD_REG0 0x10250370 */
|
||||
/* #define IOCMD_REG1 0x10250374 */
|
||||
/* #define IOCMD_REG2 0x10250378 */
|
||||
|
||||
/* #define FW_DYNAMIC_FUN_SWITCH 0x10250364 */
|
||||
|
||||
/* #define WRITE_BB_CMD 0xF0000001 */
|
||||
/* #define SET_CHANNEL_CMD 0xF3000000 */
|
||||
/* #define UPDATE_RA_CMD 0xFD0000A2 */
|
||||
|
||||
#define _HW_STATE_NOLINK_ 0x00
|
||||
#define _HW_STATE_ADHOC_ 0x01
|
||||
/*net_type, pmlmeinfo->state*/
|
||||
#define _HW_STATE_NOLINK_ 0x00
|
||||
#define _HW_STATE_ADHOC_ 0x01
|
||||
#define _HW_STATE_STATION_ 0x02
|
||||
#define _HW_STATE_AP_ 0x03
|
||||
#define _HW_STATE_MONITOR_ 0x04
|
||||
#define _HW_STATE_AP_ 0x03
|
||||
#define _HW_STATE_MONITOR_ 0x04
|
||||
|
||||
#define WIFI_FW_NULL_STATE _HW_STATE_NOLINK_
|
||||
#define WIFI_FW_STATION_STATE _HW_STATE_STATION_
|
||||
#define WIFI_FW_AP_STATE _HW_STATE_AP_
|
||||
#define WIFI_FW_ADHOC_STATE _HW_STATE_ADHOC_
|
||||
|
||||
#define WIFI_FW_PRE_LINK 0x00000800
|
||||
#define WIFI_FW_AUTH_NULL 0x00000100
|
||||
#define WIFI_FW_AUTH_STATE 0x00000200
|
||||
#define WIFI_FW_AUTH_SUCCESS 0x00000400
|
||||
|
||||
#define WIFI_FW_ASSOC_STATE 0x00002000
|
||||
#define WIFI_FW_ASSOC_SUCCESS 0x00004000
|
||||
|
||||
#define WIFI_FW_LINKING_STATE (WIFI_FW_AUTH_NULL | WIFI_FW_AUTH_STATE | WIFI_FW_AUTH_SUCCESS | WIFI_FW_ASSOC_STATE)
|
||||
|
||||
|
||||
#define _1M_RATE_ 0
|
||||
@@ -90,6 +91,7 @@ extern unsigned char WMM_OUI[];
|
||||
extern unsigned char WPS_OUI[];
|
||||
extern unsigned char WFD_OUI[];
|
||||
extern unsigned char P2P_OUI[];
|
||||
extern unsigned char MULTI_AP_OUI[];
|
||||
|
||||
extern unsigned char WMM_INFO_OUI[];
|
||||
extern unsigned char WMM_PARA_OUI[];
|
||||
@@ -99,18 +101,6 @@ typedef struct _RT_CHANNEL_PLAN {
|
||||
unsigned char Len;
|
||||
} RT_CHANNEL_PLAN, *PRT_CHANNEL_PLAN;
|
||||
|
||||
enum Associated_AP {
|
||||
atherosAP = 0,
|
||||
broadcomAP = 1,
|
||||
ciscoAP = 2,
|
||||
marvellAP = 3,
|
||||
ralinkAP = 4,
|
||||
realtekAP = 5,
|
||||
airgocapAP = 6,
|
||||
unknownAP = 7,
|
||||
maxAP,
|
||||
};
|
||||
|
||||
typedef enum _HT_IOT_PEER {
|
||||
HT_IOT_PEER_UNKNOWN = 0,
|
||||
HT_IOT_PEER_REALTEK = 1,
|
||||
@@ -201,6 +191,7 @@ struct ss_res {
|
||||
u8 state;
|
||||
u8 next_state; /* will set to state on next cmd hdl */
|
||||
int bss_cnt;
|
||||
u8 activate_ch_cnt;
|
||||
int channel_idx;
|
||||
u8 force_ssid_scan;
|
||||
int scan_mode;
|
||||
@@ -240,26 +231,6 @@ struct ss_res {
|
||||
bool acs; /* aim to trigger channel selection when scan done */
|
||||
};
|
||||
|
||||
/* #define AP_MODE 0x0C */
|
||||
/* #define STATION_MODE 0x08 */
|
||||
/* #define AD_HOC_MODE 0x04 */
|
||||
/* #define NO_LINK_MODE 0x00 */
|
||||
|
||||
#define WIFI_FW_NULL_STATE _HW_STATE_NOLINK_
|
||||
#define WIFI_FW_STATION_STATE _HW_STATE_STATION_
|
||||
#define WIFI_FW_AP_STATE _HW_STATE_AP_
|
||||
#define WIFI_FW_ADHOC_STATE _HW_STATE_ADHOC_
|
||||
|
||||
#define WIFI_FW_PRE_LINK 0x00000800
|
||||
#define WIFI_FW_AUTH_NULL 0x00000100
|
||||
#define WIFI_FW_AUTH_STATE 0x00000200
|
||||
#define WIFI_FW_AUTH_SUCCESS 0x00000400
|
||||
|
||||
#define WIFI_FW_ASSOC_STATE 0x00002000
|
||||
#define WIFI_FW_ASSOC_SUCCESS 0x00004000
|
||||
|
||||
#define WIFI_FW_LINKING_STATE (WIFI_FW_AUTH_NULL | WIFI_FW_AUTH_STATE | WIFI_FW_AUTH_SUCCESS | WIFI_FW_ASSOC_STATE)
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
enum TDLS_option {
|
||||
TDLS_ESTABLISHED = 1,
|
||||
@@ -282,10 +253,6 @@ enum TDLS_option {
|
||||
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
#if (KERNEL_VERSION(3, 8, 0) > LINUX_VERSION_CODE)
|
||||
#define NL80211_AUTHTYPE_SAE (__NL80211_AUTHTYPE_NUM + 1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
* When one iface acted as AP mode and the other iface is STA mode and scanning,
|
||||
@@ -307,6 +274,9 @@ enum TDLS_option {
|
||||
#if defined(CONFIG_ATMEL_RC_PATCH)
|
||||
#define RTW_SCAN_NUM_OF_CH 2
|
||||
#define RTW_BACK_OP_CH_MS 200
|
||||
#elseif defined(CONFIG_CUSTOMER_EZVIZ_CHIME2)
|
||||
#define RTW_SCAN_NUM_OF_CH 1
|
||||
#define RTW_BACK_OP_CH_MS 200
|
||||
#else
|
||||
#define RTW_SCAN_NUM_OF_CH 3
|
||||
#define RTW_BACK_OP_CH_MS 400
|
||||
@@ -370,13 +340,34 @@ struct mlme_ext_info {
|
||||
NDIS_802_11_RATES_EX SupportedRates_infra_ap;
|
||||
u8 ht_vht_received;/*ht_vht_received used to show debug msg BIT(0):HT BIT(1):VHT */
|
||||
#endif /* ROKU_PRIVATE */
|
||||
|
||||
#ifdef CONFIG_WRITE_BCN_LEN_TO_FW
|
||||
u16 last_bcn_len;
|
||||
#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
RTW_CHF_NO_IR = BIT0,
|
||||
RTW_CHF_DFS = BIT1,
|
||||
RTW_CHF_LONG_CAC = BIT2,
|
||||
RTW_CHF_NON_OCP = BIT3,
|
||||
RTW_CHF_NO_HT40U = BIT4,
|
||||
RTW_CHF_NO_HT40L = BIT5,
|
||||
RTW_CHF_NO_80MHZ = BIT6,
|
||||
RTW_CHF_NO_160MHZ = BIT7,
|
||||
};
|
||||
|
||||
/* The channel information about this channel including joining, scanning, and power constraints. */
|
||||
typedef struct _RT_CHANNEL_INFO {
|
||||
u8 ChannelNum; /* The channel number. */
|
||||
RT_SCAN_TYPE ScanType; /* Scan type such as passive or active scan. */
|
||||
bool dfs;
|
||||
|
||||
/*
|
||||
* Bitmap and its usage:
|
||||
* RTW_CHF_NO_IR, RTW_CHF_DFS: is used to check for status
|
||||
* RTW_CHF_NO_HT40U, RTW_CHF_NO_HT40L, RTW_CHF_NO_80MHZ, RTW_CHF_NO_160MHZ: extra bandwidth limitation (ex: from regulatory)
|
||||
* RTW_CHF_NON_OCP: is only used to record if event is reported, status check is still done using non_ocp_end_time
|
||||
*/
|
||||
u8 flags;
|
||||
/* u16 ScanPeriod; */ /* Listen time in millisecond in this channel. */
|
||||
/* s32 MaxTxPwrDbm; */ /* Max allowed tx power. */
|
||||
/* u32 ExInfo; */ /* Extended Information for this channel. */
|
||||
@@ -389,6 +380,10 @@ typedef struct _RT_CHANNEL_INFO {
|
||||
#endif
|
||||
#endif
|
||||
u8 hidden_bss_cnt; /* per scan count */
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
void *os_chan;
|
||||
#endif
|
||||
} RT_CHANNEL_INFO, *PRT_CHANNEL_INFO;
|
||||
|
||||
#define CAC_TIME_MS (60*1000)
|
||||
@@ -398,8 +393,10 @@ typedef struct _RT_CHANNEL_INFO {
|
||||
#if CONFIG_TXPWR_LIMIT
|
||||
void rtw_txpwr_init_regd(struct rf_ctl_t *rfctl);
|
||||
#endif
|
||||
void rtw_rfctl_init(_adapter *adapter);
|
||||
int rtw_rfctl_init(_adapter *adapter);
|
||||
void rtw_rfctl_deinit(_adapter *adapter);
|
||||
void rtw_rfctl_chplan_init(_adapter *adapter);
|
||||
void rtw_rfctl_update_op_mode(struct rf_ctl_t *rfctl, u8 ifbmp_mod, u8 if_op);
|
||||
|
||||
u8 rtw_rfctl_get_dfs_domain(struct rf_ctl_t *rfctl);
|
||||
u8 rtw_rfctl_dfs_domain_unknown(struct rf_ctl_t *rfctl);
|
||||
@@ -413,8 +410,9 @@ bool rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl);
|
||||
bool rtw_rfctl_is_tx_blocked_by_ch_waiting(struct rf_ctl_t *rfctl);
|
||||
bool rtw_chset_is_chbw_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset);
|
||||
bool rtw_chset_is_ch_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch);
|
||||
void rtw_chset_update_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset);
|
||||
void rtw_chset_update_non_ocp_ms(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset, int ms);
|
||||
bool rtw_chset_update_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset);
|
||||
bool rtw_chset_update_non_ocp_ms(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset, int ms);
|
||||
void rtw_chset_chk_non_ocp_finish(struct rf_ctl_t *rfctl);
|
||||
u32 rtw_get_ch_waiting_ms(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset, u32 *r_non_ocp_ms, u32 *r_cac_ms);
|
||||
void rtw_reset_cac(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset);
|
||||
u32 rtw_force_stop_cac(struct rf_ctl_t *rfctl, u32 timeout_ms);
|
||||
@@ -425,22 +423,29 @@ u32 rtw_force_stop_cac(struct rf_ctl_t *rfctl, u32 timeout_ms);
|
||||
#define rtw_rfctl_is_tx_blocked_by_ch_waiting(rfctl) _FALSE
|
||||
#endif
|
||||
|
||||
enum {
|
||||
RTW_CHF_2G = BIT0,
|
||||
RTW_CHF_5G = BIT1,
|
||||
RTW_CHF_DFS = BIT2,
|
||||
RTW_CHF_LONG_CAC = BIT3,
|
||||
RTW_CHF_NON_DFS = BIT4,
|
||||
RTW_CHF_NON_LONG_CAC = BIT5,
|
||||
RTW_CHF_NON_OCP = BIT6,
|
||||
};
|
||||
|
||||
bool rtw_choose_shortest_waiting_ch(struct rf_ctl_t *rfctl, u8 sel_ch, u8 max_bw
|
||||
, u8 *dec_ch, u8 *dec_bw, u8 *dec_offset
|
||||
, u8 d_flags, u8 cur_ch, bool by_int_info, u8 mesh_only);
|
||||
, u8 e_flags, u8 d_flags, u8 cur_ch, bool by_int_info, u8 mesh_only);
|
||||
|
||||
void dump_chset(void *sel, RT_CHANNEL_INFO *ch_set);
|
||||
struct get_chplan_resp {
|
||||
enum regd_src_t regd_src;
|
||||
bool has_country;
|
||||
struct country_chplan country_ent;
|
||||
u8 channel_plan;
|
||||
#if CONFIG_TXPWR_LIMIT
|
||||
const char *regd_name;
|
||||
#endif
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
u8 dfs_domain;
|
||||
#endif
|
||||
u8 chset_num;
|
||||
RT_CHANNEL_INFO chset[0];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PROC_DEBUG
|
||||
void dump_chset(void *sel, RT_CHANNEL_INFO *ch_set, u8 chset_num);
|
||||
void dump_cur_chset(void *sel, struct rf_ctl_t *rfctl);
|
||||
#endif
|
||||
|
||||
int rtw_chset_search_ch(RT_CHANNEL_INFO *ch_set, const u32 ch);
|
||||
u8 rtw_chset_is_chbw_valid(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset
|
||||
@@ -516,6 +521,11 @@ struct mlme_ext_priv {
|
||||
#endif
|
||||
|
||||
struct ss_res sitesurvey_res;
|
||||
#ifdef CONFIG_RTW_ROAM_QUICKSCAN
|
||||
u8 quickscan_next;
|
||||
u8 roam_ch_num;
|
||||
struct rtw_ieee80211_channel roam_ch[RTW_CHANNEL_SCAN_AMOUNT];
|
||||
#endif
|
||||
struct mlme_ext_info mlmext_info;/* for sta/adhoc mode, including current scanning/connecting/connected related info.
|
||||
* for ap mode, network includes ap's cap_info */
|
||||
_timer survey_timer;
|
||||
@@ -528,6 +538,10 @@ struct mlme_ext_priv {
|
||||
_timer ft_link_timer;
|
||||
_timer ft_roam_timer;
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
_timer tbtx_xmit_timer;
|
||||
_timer tbtx_token_dispatch_timer;
|
||||
#endif
|
||||
|
||||
systime last_scan_time;
|
||||
u8 scan_abort;
|
||||
@@ -536,10 +550,6 @@ struct mlme_ext_priv {
|
||||
|
||||
u32 retry; /* retry for issue probereq */
|
||||
|
||||
/* Don't handle deauth in DEAUTH_DENY_TO ms after sending deauth */
|
||||
/* value 0 means always handle deauth packet */
|
||||
systime last_deauth_time;
|
||||
|
||||
u64 TSFValue;
|
||||
u32 bcn_cnt;
|
||||
u32 last_bcn_cnt;
|
||||
@@ -590,6 +600,9 @@ struct mlme_ext_priv {
|
||||
bool txss_1ss;
|
||||
u8 txss_momi_type_bk;
|
||||
#endif
|
||||
#ifdef CONFIG_DFS
|
||||
_timer csa_timer;
|
||||
#endif /* CONFIG_DFS */
|
||||
};
|
||||
|
||||
struct support_rate_handler {
|
||||
@@ -698,6 +711,7 @@ void change_band_update_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 ch);
|
||||
|
||||
void Set_MSR(_adapter *padapter, u8 type);
|
||||
|
||||
|
||||
void rtw_set_external_auth_status(_adapter *padapter, const void *data, int len);
|
||||
|
||||
u8 rtw_get_oper_ch(_adapter *adapter);
|
||||
@@ -706,14 +720,13 @@ u8 rtw_get_oper_bw(_adapter *adapter);
|
||||
void rtw_set_oper_bw(_adapter *adapter, u8 bw);
|
||||
u8 rtw_get_oper_choffset(_adapter *adapter);
|
||||
void rtw_set_oper_choffset(_adapter *adapter, u8 offset);
|
||||
u8 rtw_get_center_ch(u8 channel, u8 chnl_bw, u8 chnl_offset);
|
||||
systime rtw_get_on_oper_ch_time(_adapter *adapter);
|
||||
systime rtw_get_on_cur_ch_time(_adapter *adapter);
|
||||
|
||||
u8 rtw_get_offset_by_chbw(u8 ch, u8 bw, u8 *r_offset);
|
||||
|
||||
void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char channel_offset, unsigned short bwmode);
|
||||
|
||||
void csa_timer_hdl(void *FunctionContext);
|
||||
|
||||
unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval);
|
||||
|
||||
void _clear_cam_entry(_adapter *padapter, u8 entry);
|
||||
@@ -762,6 +775,9 @@ void rtw_process_wfd_ie(_adapter *adapter, u8 *ie, u8 ie_len, const char *tag);
|
||||
void rtw_process_wfd_ies(_adapter *adapter, u8 *ies, u8 ies_len, const char *tag);
|
||||
#endif
|
||||
void WMMOnAssocRsp(_adapter *padapter);
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
u8 rtw_is_tbtx_capabilty(u8 *p, u8 len);
|
||||
#endif
|
||||
|
||||
void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
||||
#ifdef ROKU_PRIVATE
|
||||
@@ -779,7 +795,10 @@ void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
|
||||
void VCS_update(_adapter *padapter, struct sta_info *psta);
|
||||
void update_ldpc_stbc_cap(struct sta_info *psta);
|
||||
|
||||
#ifdef CONFIG_CHECK_SPECIFIC_IE_CONTENT
|
||||
bool rtw_validate_value(u16 EID, u8 *p, u16 len);
|
||||
#endif /* CONFIG_CHECK_SPECIFIC_IE_CONTENT */
|
||||
|
||||
bool is_hidden_ssid(char *ssid, int len);
|
||||
bool hidden_ssid_ap(WLAN_BSSID_EX *snetwork);
|
||||
void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe);
|
||||
@@ -790,6 +809,7 @@ int rtw_update_bcn_keys_of_network(struct wlan_network *network);
|
||||
|
||||
int validate_beacon_len(u8 *pframe, uint len);
|
||||
void rtw_dump_bcn_keys(void *sel, struct beacon_keys *recv_beacon);
|
||||
void rtw_bcn_key_err_fix(struct beacon_keys *cur, struct beacon_keys *recv);
|
||||
bool rtw_bcn_key_compare(struct beacon_keys *cur, struct beacon_keys *recv);
|
||||
int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len);
|
||||
void update_beacon_info(_adapter *padapter, u8 *pframe, uint len, struct sta_info *psta);
|
||||
@@ -820,7 +840,7 @@ unsigned int is_ap_in_tkip(_adapter *padapter);
|
||||
unsigned int is_ap_in_wep(_adapter *padapter);
|
||||
unsigned int should_forbid_n_rate(_adapter *padapter);
|
||||
|
||||
void parsing_eapol_packet(_adapter *padapter, u8 *key_payload, struct sta_info *psta, u8 trx_type);
|
||||
enum eap_type parsing_eapol_packet(_adapter *padapter, u8 *key_payload, struct sta_info *psta, u8 trx_type);
|
||||
|
||||
bool _rtw_camctl_chk_cap(_adapter *adapter, u8 cap);
|
||||
void _rtw_camctl_set_flags(_adapter *adapter, u32 flags);
|
||||
@@ -831,12 +851,13 @@ bool _rtw_camctl_chk_flags(_adapter *adapter, u32 flags);
|
||||
|
||||
struct sec_cam_bmp;
|
||||
void dump_sec_cam_map(void *sel, struct sec_cam_bmp *map, u8 max_num);
|
||||
void rtw_sec_cam_map_set(struct sec_cam_bmp *map, u8 id);
|
||||
void rtw_sec_cam_map_clr_all(struct sec_cam_bmp *map);
|
||||
|
||||
bool _rtw_camid_is_gk(_adapter *adapter, u8 cam_id);
|
||||
bool rtw_camid_is_gk(_adapter *adapter, u8 cam_id);
|
||||
s16 rtw_camid_search(_adapter *adapter, u8 *addr, s16 kid, s8 gk);
|
||||
s16 rtw_camid_alloc(_adapter *adapter, struct sta_info *sta, u8 kid, u8 gk, bool *used);
|
||||
s16 rtw_camid_alloc(_adapter *adapter, struct sta_info *sta, u8 kid, u8 gk, bool ext_sec, bool *used);
|
||||
void rtw_camid_free(_adapter *adapter, u8 cam_id);
|
||||
u8 rtw_get_sec_camid(_adapter *adapter, u8 max_bk_key_num, u8 *sec_key_id);
|
||||
|
||||
@@ -902,6 +923,9 @@ extern u8 set_tx_beacon_cmd(_adapter *padapter, u8 flags);
|
||||
unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame);
|
||||
void update_mgnt_tx_rate(_adapter *padapter, u8 rate);
|
||||
void update_monitor_frame_attrib(_adapter *padapter, struct pkt_attrib *pattrib);
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
void update_mgntframe_subtype(_adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
#endif
|
||||
void update_mgntframe_attrib(_adapter *padapter, struct pkt_attrib *pattrib);
|
||||
void update_mgntframe_attrib_addr(_adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
void dump_mgntframe(_adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
@@ -951,8 +975,9 @@ unsigned int send_delba_sta_tid(_adapter *adapter, u8 initiator, struct sta_info
|
||||
unsigned int send_delba_sta_tid_wait_ack(_adapter *adapter, u8 initiator, struct sta_info *sta, u8 tid, u8 force);
|
||||
|
||||
unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr);
|
||||
#ifdef CONFIG_AP_MODE
|
||||
unsigned int send_beacon(_adapter *padapter);
|
||||
|
||||
#endif
|
||||
void start_clnt_assoc(_adapter *padapter);
|
||||
void start_clnt_auth(_adapter *padapter);
|
||||
void start_clnt_join(_adapter *padapter);
|
||||
@@ -1006,35 +1031,15 @@ unsigned int on_action_rm(_adapter *padapter, union recv_frame *precv_frame);
|
||||
unsigned int OnAction_wmm(_adapter *padapter, union recv_frame *precv_frame);
|
||||
unsigned int OnAction_vht(_adapter *padapter, union recv_frame *precv_frame);
|
||||
unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame);
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
unsigned int OnAction_tbtx_token(_adapter *padapter, union recv_frame *precv_frame);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
void rtw_ft_update_bcn(_adapter *padapter, union recv_frame *precv_frame);
|
||||
void rtw_ft_start_clnt_join(_adapter *padapter);
|
||||
u8 rtw_ft_update_rsnie(_adapter *padapter, u8 bwrite,
|
||||
struct pkt_attrib *pattrib, u8 **pframe);
|
||||
void rtw_ft_build_auth_req_ies(_adapter *padapter,
|
||||
struct pkt_attrib *pattrib, u8 **pframe);
|
||||
void rtw_ft_build_assoc_req_ies(_adapter *padapter,
|
||||
u8 is_reassoc, struct pkt_attrib *pattrib, u8 **pframe);
|
||||
u8 rtw_ft_update_auth_rsp_ies(_adapter *padapter, u8 *pframe, u32 len);
|
||||
void rtw_ft_start_roam(_adapter *padapter, u8 *pTargetAddr);
|
||||
void rtw_ft_issue_action_req(_adapter *padapter, u8 *pTargetAddr);
|
||||
void rtw_ft_report_evt(_adapter *padapter);
|
||||
void rtw_ft_report_reassoc_evt(_adapter *padapter, u8 *pMacAddr);
|
||||
void rtw_ft_link_timer_hdl(void *ctx);
|
||||
void rtw_ft_roam_timer_hdl(void *ctx);
|
||||
void rtw_ft_roam_status_reset(_adapter *padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_WNM
|
||||
void rtw_wnm_roam_scan_hdl(void *ctx);
|
||||
void rtw_wnm_process_btm_req(_adapter *padapter, u8* pframe, u32 frame_len);
|
||||
void rtw_wnm_reset_btm_candidate(struct roam_nb_info *pnb);
|
||||
void rtw_wnm_reset_btm_state(_adapter *padapter);
|
||||
void rtw_wnm_issue_action(_adapter *padapter, u8 action, u8 reason);
|
||||
#endif
|
||||
#if defined(CONFIG_RTW_WNM) || defined(CONFIG_RTW_80211K)
|
||||
u32 rtw_wnm_btm_candidates_survey(_adapter *padapter, u8* pframe, u32 elem_len, u8 is_preference);
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
void rtw_issue_action_token_req(_adapter *padapter, struct sta_info *pstat);
|
||||
void rtw_issue_action_token_rel(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res);
|
||||
void mlmeext_sta_del_event_callback(_adapter *padapter);
|
||||
void mlmeext_sta_add_event_callback(_adapter *padapter, struct sta_info *psta);
|
||||
@@ -1055,6 +1060,10 @@ void rson_timer_hdl(void *ctx);
|
||||
#endif
|
||||
void link_timer_hdl(void *ctx);
|
||||
void addba_timer_hdl(void *ctx);
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
void rtw_tbtx_xmit_timer_hdl(void *ctx);
|
||||
void rtw_tbtx_token_dispatch_timer_hdl(void *ctx);
|
||||
#endif
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
void sa_query_timer_hdl(void *ctx);
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
@@ -1098,35 +1107,32 @@ void rtw_join_done_chk_ch(_adapter *padapter, int join_res);
|
||||
|
||||
int rtw_chk_start_clnt_join(_adapter *padapter, u8 *ch, u8 *bw, u8 *offset);
|
||||
|
||||
#ifdef RTW_BUSY_DENY_SCAN
|
||||
#ifndef BUSY_TRAFFIC_SCAN_DENY_PERIOD
|
||||
#ifdef CONFIG_RTW_ANDROID
|
||||
#ifdef CONFIG_PLATFORM_ARM_SUN8I
|
||||
#define BUSY_TRAFFIC_SCAN_DENY_PERIOD 8000
|
||||
#else
|
||||
#define BUSY_TRAFFIC_SCAN_DENY_PERIOD 12000
|
||||
#endif
|
||||
|
||||
struct cmd_hdl {
|
||||
uint parmsize;
|
||||
u8(*h2cfuns)(struct _ADAPTER *padapter, u8 *pbuf);
|
||||
};
|
||||
#else /* !CONFIG_ANDROID */
|
||||
#define BUSY_TRAFFIC_SCAN_DENY_PERIOD 16000
|
||||
#endif /* !CONFIG_ANDROID */
|
||||
#endif /* !BUSY_TRAFFIC_SCAN_DENY_PERIOD */
|
||||
#endif /* RTW_BUSY_DENY_SCAN */
|
||||
|
||||
void rtw_leave_opch(_adapter *adapter);
|
||||
void rtw_back_opch(_adapter *adapter);
|
||||
|
||||
u8 read_macreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 write_macreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 read_bbreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 write_bbreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 read_rfreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 write_rfreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
|
||||
|
||||
u8 NULL_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 disconnect_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 createbss_hdl(_adapter *padapter, u8 *pbuf);
|
||||
#ifdef CONFIG_AP_MODE
|
||||
u8 stop_ap_hdl(_adapter *adapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
u8 tx_control_hdl(_adapter *adapter);
|
||||
#endif
|
||||
u8 setopmode_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 sitesurvey_cmd_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 setauth_hdl(_adapter *padapter, u8 *pbuf);
|
||||
@@ -1140,202 +1146,105 @@ u8 add_ba_rsp_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
void rtw_ap_wep_pk_setting(_adapter *adapter, struct sta_info *psta);
|
||||
|
||||
u8 mlme_evt_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 h2c_msg_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 tx_beacon_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 rtw_set_chbw_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 rtw_iqk_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 rtw_set_chplan_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 rtw_get_chplan_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 led_blink_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 set_csa_hdl(_adapter *padapter, unsigned char *pbuf); /* Kurt: Handling DFS channel switch announcement ie. */
|
||||
u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 run_in_thread_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 rtw_getmacreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 rtw_write_bcnlen_hdl(_adapter *padapter, u8 *pbuf);
|
||||
|
||||
int rtw_sae_preprocess(_adapter *adapter, const u8 *buf, u32 len, u8 tx);
|
||||
|
||||
#define GEN_DRV_CMD_HANDLER(size, cmd) {size, &cmd ## _hdl},
|
||||
#define GEN_MLME_EXT_HANDLER(size, cmd) {size, cmd},
|
||||
u32 rtw_desc_rate_to_bitrate(u8 bw, u8 rate_idx, u8 sgi);
|
||||
|
||||
#ifdef CONFIG_RTW_MULTI_AP
|
||||
u8 rtw_get_ch_utilization(_adapter *adapter);
|
||||
void rtw_ch_util_rpt(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
#define GEN_MLME_EXT_HANDLER(cmd, callback_func) {.cmd_hdl = cmd, .callback = callback_func},
|
||||
|
||||
struct rtw_cmd {
|
||||
u8(*cmd_hdl)(_adapter *padapter, u8 *pbuf);
|
||||
void (*callback)(_adapter *padapter, struct cmd_obj *cmd);
|
||||
};
|
||||
|
||||
#ifdef _RTW_CMD_C_
|
||||
|
||||
struct cmd_hdl wlancmds[] = {
|
||||
GEN_DRV_CMD_HANDLER(sizeof(struct readMAC_parm), rtw_getmacreg) /*0*/
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL) /*10*/
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct joinbss_parm), join_cmd_hdl) /*14*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct disconnect_parm), disconnect_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct createbss_parm), createbss_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setopmode_parm), setopmode_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct sitesurvey_parm), sitesurvey_cmd_hdl) /*18*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setauth_parm), setauth_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setkey_parm), setkey_hdl) /*20*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct set_stakey_parm), set_stakey_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct set_assocsta_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct del_assocsta_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setstapwrstate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setbasicrate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct getbasicrate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setdatarate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct getdatarate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL) /*30*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setphy_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct getphy_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL) /*40*/
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct addBaReq_parm), add_ba_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct set_ch_parm), rtw_set_chbw_hdl) /* 46 */
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL) /*50*/
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct Tx_Beacon_param), tx_beacon_hdl) /*55*/
|
||||
|
||||
GEN_MLME_EXT_HANDLER(0, mlme_evt_hdl) /*56*/
|
||||
GEN_MLME_EXT_HANDLER(0, rtw_drvextra_cmd_hdl) /*57*/
|
||||
|
||||
GEN_MLME_EXT_HANDLER(0, h2c_msg_hdl) /*58*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct SetChannelPlan_param), set_chplan_hdl) /*59*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct LedBlink_param), led_blink_hdl) /*60*/
|
||||
|
||||
GEN_MLME_EXT_HANDLER(0, set_csa_hdl) /*61*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct TDLSoption_param), tdls_hdl) /*62*/
|
||||
GEN_MLME_EXT_HANDLER(0, chk_bmc_sleepq_hdl) /*63*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct RunInThread_param), run_in_thread_hdl) /*64*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct addBaRsp_parm), add_ba_rsp_hdl) /* 65 */
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct rm_event), rm_post_event_hdl) /* 66 */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct C2HEvent_Header {
|
||||
|
||||
#ifdef CONFIG_LITTLE_ENDIAN
|
||||
|
||||
unsigned int len:16;
|
||||
unsigned int ID:8;
|
||||
unsigned int seq:8;
|
||||
|
||||
#elif defined(CONFIG_BIG_ENDIAN)
|
||||
|
||||
unsigned int seq:8;
|
||||
unsigned int ID:8;
|
||||
unsigned int len:16;
|
||||
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
extern u8 rtw_mesh_set_plink_state_cmd_hdl(_adapter *adapter, u8 *parmbuf);
|
||||
#else
|
||||
|
||||
# error "Must be LITTLE or BIG Endian"
|
||||
|
||||
u8 rtw_mesh_set_plink_state_cmd_hdl(_adapter *adapter, u8 *parmbuf) { return H2C_CMD_FAIL; };
|
||||
#endif
|
||||
|
||||
unsigned int rsvd;
|
||||
struct rtw_cmd wlancmds[] = {
|
||||
GEN_MLME_EXT_HANDLER(join_cmd_hdl, rtw_joinbss_cmd_callback) /*CMD_JOINBSS*/
|
||||
GEN_MLME_EXT_HANDLER(disconnect_hdl, rtw_disassoc_cmd_callback) /*CMD_DISCONNECT*/
|
||||
GEN_MLME_EXT_HANDLER(createbss_hdl, NULL) /*CMD_CREATE_BSS*/
|
||||
GEN_MLME_EXT_HANDLER(setopmode_hdl, NULL) /*CMD_SET_OPMODE*/
|
||||
GEN_MLME_EXT_HANDLER(sitesurvey_cmd_hdl, rtw_survey_cmd_callback) /*CMD_SITE_SURVEY*/
|
||||
GEN_MLME_EXT_HANDLER(setauth_hdl, NULL) /*CMD_SET_AUTH*/
|
||||
GEN_MLME_EXT_HANDLER(setkey_hdl, NULL) /*CMD_SET_KEY*/
|
||||
GEN_MLME_EXT_HANDLER(set_stakey_hdl, rtw_setstaKey_cmdrsp_callback) /*CMD_SET_STAKEY*/
|
||||
GEN_MLME_EXT_HANDLER(add_ba_hdl, NULL) /*CMD_ADD_BAREQ*/
|
||||
GEN_MLME_EXT_HANDLER(rtw_set_chbw_hdl, NULL) /*CMD_SET_CHANNEL*/
|
||||
GEN_MLME_EXT_HANDLER(tx_beacon_hdl, NULL) /*CMD_TX_BEACON*/
|
||||
GEN_MLME_EXT_HANDLER(mlme_evt_hdl, NULL) /*CMD_SET_MLME_EVT*/
|
||||
GEN_MLME_EXT_HANDLER(rtw_drvextra_cmd_hdl, NULL) /*CMD_SET_DRV_EXTRA*/
|
||||
GEN_MLME_EXT_HANDLER(rtw_set_chplan_hdl, NULL) /*CMD_SET_CHANPLAN*/
|
||||
GEN_MLME_EXT_HANDLER(led_blink_hdl, NULL) /*CMD_LEDBLINK*/
|
||||
GEN_MLME_EXT_HANDLER(set_csa_hdl, NULL) /*CMD_SET_CHANSWITCH*/
|
||||
GEN_MLME_EXT_HANDLER(tdls_hdl, NULL) /*CMD_TDLS*/
|
||||
GEN_MLME_EXT_HANDLER(chk_bmc_sleepq_hdl, NULL) /*CMD_CHK_BMCSLEEPQ*/
|
||||
GEN_MLME_EXT_HANDLER(run_in_thread_hdl, NULL) /*CMD_RUN_INTHREAD*/
|
||||
GEN_MLME_EXT_HANDLER(add_ba_rsp_hdl, NULL) /*CMD_ADD_BARSP*/
|
||||
GEN_MLME_EXT_HANDLER(rm_post_event_hdl, NULL) /*CMD_RM_POST_EVENT*/
|
||||
GEN_MLME_EXT_HANDLER(rtw_mesh_set_plink_state_cmd_hdl, NULL) /*CMD_SET_MESH_PLINK_STATE*/
|
||||
GEN_MLME_EXT_HANDLER(rtw_iqk_hdl, NULL) /*CMD_DO_IQK*/
|
||||
GEN_MLME_EXT_HANDLER(rtw_get_chplan_hdl, NULL) /* CMD_GET_CHANPLAN */
|
||||
GEN_MLME_EXT_HANDLER(rtw_write_bcnlen_hdl, NULL) /* CMD_WRITE_BCN_LEN */
|
||||
};
|
||||
#endif
|
||||
|
||||
struct rtw_evt_header {
|
||||
u8 id;
|
||||
u8 seq;
|
||||
u16 len;
|
||||
};
|
||||
|
||||
void rtw_dummy_event_callback(_adapter *adapter , u8 *pbuf);
|
||||
void rtw_fwdbg_event_callback(_adapter *adapter , u8 *pbuf);
|
||||
|
||||
enum rtw_c2h_event {
|
||||
GEN_EVT_CODE(_Read_MACREG) = 0, /*0*/
|
||||
GEN_EVT_CODE(_Read_BBREG),
|
||||
GEN_EVT_CODE(_Read_RFREG),
|
||||
GEN_EVT_CODE(_Read_EEPROM),
|
||||
GEN_EVT_CODE(_Read_EFUSE),
|
||||
GEN_EVT_CODE(_Read_CAM), /*5*/
|
||||
GEN_EVT_CODE(_Get_BasicRate),
|
||||
GEN_EVT_CODE(_Get_DataRate),
|
||||
GEN_EVT_CODE(_Survey), /*8*/
|
||||
GEN_EVT_CODE(_SurveyDone), /*9*/
|
||||
|
||||
GEN_EVT_CODE(_JoinBss) , /*10*/
|
||||
GEN_EVT_CODE(_AddSTA),
|
||||
GEN_EVT_CODE(_DelSTA),
|
||||
GEN_EVT_CODE(_AtimDone) ,
|
||||
GEN_EVT_CODE(_TX_Report),
|
||||
GEN_EVT_CODE(_CCX_Report), /*15*/
|
||||
GEN_EVT_CODE(_DTM_Report),
|
||||
GEN_EVT_CODE(_TX_Rate_Statistics),
|
||||
GEN_EVT_CODE(_C2HLBK),
|
||||
GEN_EVT_CODE(_FWDBG),
|
||||
GEN_EVT_CODE(_C2HFEEDBACK), /*20*/
|
||||
GEN_EVT_CODE(_ADDBA),
|
||||
GEN_EVT_CODE(_C2HBCN),
|
||||
GEN_EVT_CODE(_ReportPwrState), /* filen: only for PCIE, USB */
|
||||
GEN_EVT_CODE(_CloseRF), /* filen: only for PCIE, work around ASPM */
|
||||
GEN_EVT_CODE(_WMM), /*25*/
|
||||
enum rtw_event_id {
|
||||
EVT_SURVEY, /*0*/
|
||||
EVT_SURVEY_DONE, /*1*/
|
||||
EVT_JOINBSS, /*2*/
|
||||
EVT_ADD_STA, /*3*/
|
||||
EVT_DEL_STA, /*4*/
|
||||
EVT_WMM_UPDATE, /*5*/
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
GEN_EVT_CODE(_TimeoutSTA),
|
||||
EVT_TIMEOUT_STA, /*6*/
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
GEN_EVT_CODE(_FT_REASSOC),
|
||||
EVT_FT_REASSOC, /*7*/
|
||||
#endif
|
||||
MAX_C2HEVT
|
||||
EVT_ID_MAX
|
||||
};
|
||||
|
||||
|
||||
#ifdef _RTW_MLME_EXT_C_
|
||||
|
||||
static struct fwevent wlanevents[] = {
|
||||
{0, rtw_dummy_event_callback}, /*0*/
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, &rtw_survey_event_callback}, /*8*/
|
||||
{sizeof(struct surveydone_event), &rtw_surveydone_event_callback}, /*9*/
|
||||
|
||||
{0, &rtw_joinbss_event_callback}, /*10*/
|
||||
{sizeof(struct stassoc_event), &rtw_stassoc_event_callback},
|
||||
{sizeof(struct stadel_event), &rtw_stadel_event_callback},
|
||||
{0, &rtw_atimdone_event_callback},
|
||||
{0, rtw_dummy_event_callback},
|
||||
{0, NULL}, /*15*/
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, rtw_fwdbg_event_callback},
|
||||
{0, NULL}, /*20*/
|
||||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, &rtw_cpwm_event_callback},
|
||||
{0, NULL},
|
||||
{0, &rtw_wmm_event_callback}, /*25*/
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
{sizeof(struct stadel_event), &rtw_sta_timeout_event_callback},
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
{sizeof(struct stassoc_event), &rtw_ft_reassoc_event_callback},
|
||||
#endif
|
||||
static struct rtw_event wlanevents[] = {
|
||||
{sizeof(struct survey_event), &rtw_survey_event_callback}, /*EVT_SURVEY*/
|
||||
{sizeof(struct surveydone_event), &rtw_surveydone_event_callback}, /*EVT_SURVEY_DONE*/
|
||||
{sizeof(struct joinbss_event), &rtw_joinbss_event_callback}, /*EVT_JOINBSS*/
|
||||
{sizeof(struct stassoc_event), &rtw_stassoc_event_callback}, /*EVT_ADD_STA*/
|
||||
{sizeof(struct stadel_event), &rtw_stadel_event_callback}, /*EVT_DEL_STA*/
|
||||
{sizeof(struct wmm_event), &rtw_wmm_event_callback}, /*EVT_WMM_UPDATE*/
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
{sizeof(struct stadel_event), &rtw_sta_timeout_event_callback}, /*EVT_TIMEOUT_STA*/
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
{sizeof(struct stassoc_event), &rtw_ft_reassoc_event_callback}, /*EVT_FT_REASSOC*/
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif/* _RTW_MLME_EXT_C_ */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -274,6 +274,7 @@ enum {
|
||||
EFUSE_BT_MASK,
|
||||
EFUSE_MASK,
|
||||
EFUSE_FILE,
|
||||
EFUSE_FILE_STORE,
|
||||
MP_TX,
|
||||
MP_RX,
|
||||
MP_IQK,
|
||||
@@ -289,6 +290,8 @@ enum {
|
||||
MP_LINK,
|
||||
MP_DPK_TRK,
|
||||
MP_DPK,
|
||||
MP_GET_TSSIDE,
|
||||
MP_SET_TSSIDE,
|
||||
MP_NULL,
|
||||
#ifdef CONFIG_APPEND_VENDOR_IE_ENABLE
|
||||
VENDOR_IE_SET ,
|
||||
@@ -297,6 +300,10 @@ enum {
|
||||
#ifdef CONFIG_WOWLAN
|
||||
MP_WOW_ENABLE,
|
||||
MP_WOW_SET_PATTERN,
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
MP_WOW_SET_KEEP_ALIVE_PATTERN,
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
|
||||
#endif
|
||||
#ifdef CONFIG_AP_WOWLAN
|
||||
MP_AP_WOW_ENABLE,
|
||||
@@ -385,6 +392,8 @@ struct mp_priv {
|
||||
BOOLEAN mplink_btx;
|
||||
|
||||
bool tssitrk_on;
|
||||
bool efuse_update_file;
|
||||
char efuse_file_path[128];
|
||||
};
|
||||
|
||||
typedef struct _IOCMD_STRUCT_ {
|
||||
@@ -725,17 +734,19 @@ void hal_mpt_SetContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
void hal_mpt_SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart);
|
||||
void hal_mpt_SetSingleToneTx(PADAPTER pAdapter, u8 bStart);
|
||||
void hal_mpt_SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
|
||||
void mpt_ProSetPMacTx(PADAPTER Adapter);
|
||||
u8 mpt_ProSetPMacTx(PADAPTER Adapter);
|
||||
void MP_PHY_SetRFPathSwitch(PADAPTER pAdapter , BOOLEAN bMain);
|
||||
void mp_phy_switch_rf_path_set(PADAPTER pAdapter , u8 *pstate);
|
||||
u8 MP_PHY_QueryRFPathSwitch(PADAPTER pAdapter);
|
||||
u32 mpt_ProQueryCalTxPower(PADAPTER pAdapter, u8 RfPath);
|
||||
void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart);
|
||||
void MPT_PwrCtlDM(PADAPTER padapter, u32 trk_type);
|
||||
u8 mpt_to_mgnt_rate(u32 MptRateIdx);
|
||||
u8 rtw_mpRateParseFunc(PADAPTER pAdapter, u8 *targetStr);
|
||||
u32 mp_join(PADAPTER padapter, u8 mode);
|
||||
u32 hal_mpt_query_phytxok(PADAPTER pAdapter);
|
||||
u32 mpt_get_tx_power_finalabs_val(PADAPTER padapter, u8 rf_path);
|
||||
void mpt_trigger_tssi_tracking(PADAPTER pAdapter, u8 rf_path);
|
||||
|
||||
|
||||
void
|
||||
PMAC_Get_Pkt_Param(
|
||||
@@ -897,6 +908,9 @@ int rtw_bt_efuse_mask_file(struct net_device *dev,
|
||||
int rtw_efuse_file_map(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra);
|
||||
int rtw_efuse_file_map_store(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra);
|
||||
int rtw_bt_efuse_file_map(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra);
|
||||
@@ -920,4 +934,10 @@ int rtw_mp_iqk(struct net_device *dev,
|
||||
int rtw_mp_lck(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
struct iw_point *wrqu, char *extra);
|
||||
int rtw_mp_get_tsside(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
struct iw_point *wrqu, char *extra);
|
||||
int rtw_mp_set_tsside(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
struct iw_point *wrqu, char *extra);
|
||||
#endif /* _RTW_MP_H_ */
|
||||
|
||||
@@ -82,11 +82,15 @@ void rtw_odm_get_perpkt_rssi(void *sel, _adapter *adapter);
|
||||
void rtw_odm_acquirespinlock(_adapter *adapter, enum rt_spinlock_type type);
|
||||
void rtw_odm_releasespinlock(_adapter *adapter, enum rt_spinlock_type type);
|
||||
|
||||
struct dm_struct;
|
||||
s16 rtw_odm_get_tx_power_mbm(struct dm_struct *dm, u8 rfpath, u8 rate, u8 bw, u8 cch);
|
||||
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
void rtw_odm_radar_detect_reset(_adapter *adapter);
|
||||
void rtw_odm_radar_detect_disable(_adapter *adapter);
|
||||
void rtw_odm_radar_detect_enable(_adapter *adapter);
|
||||
BOOLEAN rtw_odm_radar_detect(_adapter *adapter);
|
||||
void rtw_odm_update_dfs_region(struct dvobj_priv *dvobj);
|
||||
u8 rtw_odm_radar_detect_polling_int_ms(struct dvobj_priv *dvobj);
|
||||
#endif /* CONFIG_DFS_MASTER */
|
||||
|
||||
|
||||
@@ -70,8 +70,6 @@ u8 p2p_ps_wk_cmd(_adapter *padapter, u8 p2p_ps_state, u8 enqueue);
|
||||
#endif /* CONFIG_P2P_PS */
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
u8 roch_stay_in_cur_chan(_adapter *padapter);
|
||||
void rtw_init_cfg80211_wifidirect_info(_adapter *padapter);
|
||||
int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx);
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
#define BTCOEX_ALIVE BIT(4)
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
#define LPS_ALIVE BIT(5)
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
#ifdef CONFIG_PLATFORM_ANDROID_INTEL_X86
|
||||
@@ -51,11 +52,12 @@
|
||||
#ifdef CONFIG_WOW_PATTERN_HW_CAM /* Frame Mask Cam number for pattern match */
|
||||
#define MAX_WKFM_CAM_NUM 12
|
||||
#else
|
||||
#define MAX_WKFM_CAM_NUM 16
|
||||
#define MAX_WKFM_CAM_NUM 10
|
||||
#endif
|
||||
|
||||
#define MAX_WKFM_SIZE 16 /* (16 bytes for WKFM bit mask, 16*8 = 128 bits) */
|
||||
#define MAX_WKFM_PATTERN_SIZE 128
|
||||
#define MAX_IN_PATTERN_SIZE 512
|
||||
|
||||
/*
|
||||
* MAX_WKFM_PATTERN_STR_LEN : the max. length of wow pattern string
|
||||
@@ -233,6 +235,38 @@ typedef enum _PS_DENY_REASON {
|
||||
PS_DENY_OTHERS = 31
|
||||
} PS_DENY_REASON;
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
/* only support mDNS V4/V6 rsp now */
|
||||
enum {
|
||||
WAR_ARP_RSP_EN = 0x0000001,
|
||||
WAR_ICMPV6_NS_RSP_EN = 0x00000002,
|
||||
WAR_ICMPV4_ECHO_RSP_EN = 0x00000004,
|
||||
WAR_ICMPV6_ECHO_RSP_EN = 0x00000008,
|
||||
WAR_NETBIOS_RSP_EN = 0x00000010,
|
||||
WAR_LLMNR_V4_RSP_EN = 0x00000020,
|
||||
WAR_LLMNR_V6_RSP_EN = 0x00000040,
|
||||
WAR_SNMP_V4_RSP_EN = 0x00000080,
|
||||
WAR_SNMP_V6_RSP_EN = 0x00000100,
|
||||
WAR_SNMP_V4_WAKEUP_EN = 0x00000200,
|
||||
WAR_SNMP_V6_WAKEUP_EN = 0x00000400,
|
||||
WAR_SSDP_V4_WAKEUP_EN = 0x00000800,
|
||||
WAR_SSDP_V6_WAKEUP_EN = 0x00001000,
|
||||
WAR_WSD_V4_WAKEUP_EN = 0x00002000,
|
||||
WAR_WSD_V6_WAKEUP_EN = 0x00004000,
|
||||
WAR_SLP_V4_WAKEUP_EN = 0x00008000,
|
||||
WAR_SLP_V6_WAKEUP_EN = 0x00010000,
|
||||
WAR_MDNS_V4_RSP_EN = 0x00020000,
|
||||
WAR_MDNS_V6_RSP_EN = 0x00040000,
|
||||
WAR_DESIGNATED_MAC_EN = 0x00080000,
|
||||
WAR_LLTD_WAKEUP_EN = 0x00100000,
|
||||
WAR_ARP_WAKEUP_EN = 0x00200000,
|
||||
WAR_MAGIC_WAKEUP_EN = 0x00400000,
|
||||
WAR_MDNS_V4_WAKEUP_EN = 0x000800000,
|
||||
WAR_MDNS_V6_WAKEUP_EN = 0x001000000
|
||||
};
|
||||
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
typedef struct pno_nlo_info {
|
||||
u32 fast_scan_period; /* Fast scan period */
|
||||
@@ -308,6 +342,72 @@ struct aoac_report {
|
||||
u8 rxgtk_iv[4][8];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
|
||||
struct war_ipv4_fmt {
|
||||
u32 ip_addr[4];
|
||||
u32 ip_subnet[4];
|
||||
u32 ip_gateway[4];
|
||||
};
|
||||
|
||||
struct war_ipv6_fmt {
|
||||
u8 ipv6_addr[8][16];
|
||||
};
|
||||
|
||||
#if defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6)
|
||||
/* limitation of mDNS parameter : length and number */
|
||||
#define MAX_MDNS_SERVICE_NAME_LEN 15
|
||||
#define MAX_MDNS_TRANS_LEN 4 /* _tcp or _udp */
|
||||
#define MAX_MDNS_DOMAIN_LEN 5 /* local only for mdns */
|
||||
#define MAX_MDNS_MACHINE_NAME_LEN (63+1) /* +1 for the length byte used by the DNS format */
|
||||
#define MAX_MDNS_TARGET_LEN 63
|
||||
#define MAX_MDNS_DOMAIN_NAME_LEN 63
|
||||
#define MAX_MDNS_TXT_LEN 1536
|
||||
#define MAX_MDNS_TXT_SINGLE_LEN 255
|
||||
|
||||
|
||||
#define MAX_MDNS_SERVICE_NUM 10
|
||||
#define MAX_MDNS_TXT_NUM 8
|
||||
#define MAX_MDNS_MACHINE_NAME_NUM 3
|
||||
|
||||
/* for monitor rsvd page using */
|
||||
#define MAX_MDNS_PARA_SIZE 1700 // 14*128 = 1792
|
||||
#define MAX_MDNS_TXT_TOTAL_SIZE 10*MAX_MDNS_TXT_LEN
|
||||
#define MAX_MDNS_RSP_PKT_SIZE 760 // 6*128 = 768
|
||||
|
||||
#define RTW_MDNS_SRV_INFO(sname, sname_len, tname, tname_len, dname, dname_len, port0, port1, ttlv, tar, tar_len, idx) \
|
||||
{ .service=sname, .service_len=sname_len, .transport=tname, .transport_len=tname_len, \
|
||||
.domain=dname , .domain_len=dname_len , .port[0]=port0, .port[1]=port1, .ttl=ttlv, \
|
||||
.target=tar, .target_len=tar_len, .txt_rsp_idx=idx }
|
||||
|
||||
|
||||
struct war_mdns_service_info {
|
||||
u8 service[MAX_MDNS_SERVICE_NAME_LEN+1];
|
||||
u8 service_len;
|
||||
u8 transport[MAX_MDNS_TRANS_LEN+1];
|
||||
u8 transport_len;
|
||||
u8 domain[MAX_MDNS_DOMAIN_LEN+1];
|
||||
u8 domain_len;
|
||||
u8 port[2];
|
||||
u32 ttl;
|
||||
u8 target[MAX_MDNS_TARGET_LEN+1];
|
||||
u8 target_len;
|
||||
s8 txt_rsp_idx;
|
||||
};
|
||||
|
||||
struct war_mdns_machine_name {
|
||||
u8 name[MAX_MDNS_MACHINE_NAME_LEN];
|
||||
u8 name_len;
|
||||
};
|
||||
|
||||
struct war_mdns_txt_rsp {
|
||||
u8 txt[MAX_MDNS_TXT_LEN];
|
||||
u16 txt_len;
|
||||
};
|
||||
#endif
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
|
||||
struct rsvd_page_cache_t;
|
||||
|
||||
struct pwrctrl_priv {
|
||||
@@ -383,11 +483,6 @@ struct pwrctrl_priv {
|
||||
systime lps_deny_time; /* will deny LPS when system time is smaller than this */
|
||||
s32 pnp_current_pwr_state;
|
||||
u8 pnp_bstop_trx;
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
int ps_flag; /* used by autosuspend */
|
||||
u8 bInternalAutoSuspend;
|
||||
#endif
|
||||
u8 bInSuspend;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
u8 bAutoResume;
|
||||
@@ -404,6 +499,8 @@ struct pwrctrl_priv {
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
u8 is_high_active;
|
||||
u8 wowlan_gpio_index;
|
||||
u8 wowlan_gpio_output_state;
|
||||
#endif /* CONFIG_GPIO_WAKEUP */
|
||||
u8 hst2dev_high_active;
|
||||
#ifdef CONFIG_WOWLAN
|
||||
@@ -415,6 +512,9 @@ struct pwrctrl_priv {
|
||||
u8 wowlan_pattern_idx;
|
||||
u64 wowlan_fw_iv;
|
||||
struct rtl_priv_pattern patterns[MAX_WKFM_CAM_NUM];
|
||||
#ifdef CONFIG_WOW_PATTERN_IN_TXFIFO
|
||||
u8 pattern_rsvd_page_loc;
|
||||
#endif
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
u8 pno_inited;
|
||||
pno_nlo_info_t *pnlo_info;
|
||||
@@ -431,6 +531,45 @@ struct pwrctrl_priv {
|
||||
#ifdef CONFIG_LPS_1T1R
|
||||
u8 wowlan_lps_1t1r;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WOW_KEEP_ALIVE_PATTERN
|
||||
/*data 0,rsv page location*/
|
||||
u8 wowlan_keep_alive_mode;
|
||||
u8 keep_alive_pattern_loc;
|
||||
/*data 1 ,cam id, rx udp packet*/
|
||||
u8 wowlan_keep_alive_ack_index;
|
||||
/*data 2 ,cam id, pattern match packet*/
|
||||
u8 wowlan_wake_pattern_index;
|
||||
/*data3,unit: TBTT*/
|
||||
u16 wowlan_keep_alive_period;
|
||||
/*data4,unit: TBTT*/
|
||||
u8 wowlan_keep_alive_retry_interval;
|
||||
/*data5*/
|
||||
u8 wowlan_keep_alive_retry_counter;
|
||||
/*from echo*/
|
||||
u8 keep_alive_pattern[WLAN_MAX_KEEP_ALIVE_IE_LEN];
|
||||
u32 keep_alive_pattern_len;
|
||||
#endif /*CONFIG_WOW_KEEP_ALIVE_PATTERN*/
|
||||
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
u8 wowlan_war_offload_mode;
|
||||
u32 wowlan_war_offload_ctrl;
|
||||
struct war_ipv4_fmt wowlan_war_offload_ipv4;
|
||||
struct war_ipv6_fmt wowlan_war_offload_ipv6;
|
||||
u8 wowlan_war_offload_mac[6];
|
||||
#if defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6)
|
||||
struct war_mdns_machine_name wowlan_war_offload_mdns_mnane[MAX_MDNS_MACHINE_NAME_NUM];
|
||||
struct war_mdns_service_info wowlan_war_offload_mdns_service[MAX_MDNS_SERVICE_NUM];
|
||||
struct war_mdns_txt_rsp wowlan_war_offload_mdns_txt_rsp[MAX_MDNS_TXT_NUM];
|
||||
u8 wowlan_war_offload_mdns_mnane_num;
|
||||
u8 wowlan_war_offload_mdns_service_info_num;
|
||||
u8 wowlan_war_offload_mdns_txt_rsp_num;
|
||||
u8 wowlan_war_offload_mdns_domain_name[MAX_MDNS_DOMAIN_NAME_LEN+1];
|
||||
u8 wowlan_war_offload_mdns_domain_name_len;
|
||||
u32 wowlan_war_offload_mdns_para_cur_size;
|
||||
u32 wowlan_war_offload_mdns_rsp_cur_size;
|
||||
#endif /* CONFIG_OFFLOAD_MDNS_V4 || CONFIG_OFFLOAD_MDNS_V6 */
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
_timer pwr_state_check_timer;
|
||||
int pwr_state_check_interval;
|
||||
@@ -480,14 +619,14 @@ struct pwrctrl_priv {
|
||||
#endif
|
||||
u8 current_lps_hw_port_id;
|
||||
|
||||
#ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS
|
||||
#ifdef CONFIG_RTW_CFGVENDOR_LLSTATS
|
||||
systime radio_on_start_time;
|
||||
systime pwr_saving_start_time;
|
||||
u32 pwr_saving_time;
|
||||
u32 on_time;
|
||||
u32 tx_time;
|
||||
u32 rx_time;
|
||||
#endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */
|
||||
#endif /* CONFIG_RTW_CFGVENDOR_LLSTATS */
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
struct submit_ctx lps_ack_sctx;
|
||||
@@ -542,9 +681,6 @@ int ips_leave(_adapter *padapter);
|
||||
|
||||
void rtw_ps_processor(_adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
int autoresume_enter(_adapter *padapter);
|
||||
#endif
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
rt_rf_power_state RfOnOffDetect(PADAPTER pAdapter);
|
||||
#endif
|
||||
@@ -558,7 +694,8 @@ int rtw_fw_ps_state(PADAPTER padapter);
|
||||
extern const char * const LPS_CTRL_PHYDM;
|
||||
void LPS_Enter(PADAPTER padapter, const char *msg);
|
||||
void LPS_Leave(PADAPTER padapter, const char *msg);
|
||||
void rtw_leave_lps_and_chk(_adapter *padapter, u8 ps_mode);
|
||||
void rtw_exec_lps(_adapter *padapter, u8 ps_mode);
|
||||
void rtw_lps_rfon_ctrl(_adapter *padapter, u8 rfon_ctrl);
|
||||
#ifdef CONFIG_CHECK_LEAVE_LPS
|
||||
#ifdef CONFIG_LPS_CHK_BY_TP
|
||||
void traffic_check_for_leave_lps_by_tp(PADAPTER padapter, u8 tx, struct sta_info *sta);
|
||||
@@ -623,6 +760,15 @@ bool rtw_wowlan_parser_pattern_cmd(u8 *input, char *pattern,
|
||||
void rtw_wow_pattern_sw_reset(_adapter *adapter);
|
||||
u8 rtw_set_default_pattern(_adapter *adapter);
|
||||
void rtw_wow_pattern_sw_dump(_adapter *adapter);
|
||||
#ifdef CONFIG_WAR_OFFLOAD
|
||||
#if defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6)
|
||||
void rtw_wow_war_mdns_dump_buf(struct seq_file *m, u8 *title, u8 *buf, u32 len);
|
||||
void rtw_wow_war_mdns_dump_txt(struct seq_file *m, u8 *title, u8 *buf, u32 len);
|
||||
bool rtw_wow_war_mdns_parser_pattern(u8 *input, char *target, u32 *target_len, u32 max_len);
|
||||
void rtw_wow_war_mdns_parms_reset(_adapter *adapter, u8 is_set_default);
|
||||
#endif /* defined(CONFIG_OFFLOAD_MDNS_V4) || defined(CONFIG_OFFLOAD_MDNS_V6) */
|
||||
#endif /* CONFIG_WAR_OFFLOAD */
|
||||
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
void rtw_ssmps_enter(_adapter *adapter, struct sta_info *sta);
|
||||
void rtw_ssmps_leave(_adapter *adapter, struct sta_info *sta);
|
||||
|
||||
@@ -172,8 +172,6 @@ struct rx_pkt_attrib {
|
||||
u8 crc_err;
|
||||
u8 icv_err;
|
||||
|
||||
u16 eth_type;
|
||||
|
||||
u8 dst[ETH_ALEN];
|
||||
u8 src[ETH_ALEN];
|
||||
u8 ta[ETH_ALEN];
|
||||
@@ -197,11 +195,15 @@ struct rx_pkt_attrib {
|
||||
u8 ldpc;
|
||||
u8 sgi;
|
||||
u8 pkt_rpt_type;
|
||||
u32 tsfl;
|
||||
u32 MacIDValidEntry[2]; /* 64 bits present 64 entry. */
|
||||
u8 ampdu;
|
||||
u8 ppdu_cnt;
|
||||
u8 ampdu_eof;
|
||||
u32 free_cnt; /* free run counter */
|
||||
struct phydm_phyinfo_struct phy_info;
|
||||
#ifdef CONFIG_WIFI_MONITOR
|
||||
u8 moif[16];
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TCP_CSUM_OFFLOAD_RX
|
||||
/* checksum offload realted varaiables */
|
||||
@@ -402,6 +404,15 @@ struct recv_priv {
|
||||
_queue recv_buf_pending_queue;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI)
|
||||
#ifdef CONFIG_SDIO_RECVBUF_PWAIT
|
||||
struct rtw_pwait_ctx recvbuf_pwait;
|
||||
#endif
|
||||
#ifdef CONFIG_SDIO_RECVBUF_AGGREGATION
|
||||
bool recvbuf_agg;
|
||||
#endif
|
||||
#endif /* CONFIG_SDIO_HCI */
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
/* Rx */
|
||||
struct rtw_rx_ring rx_ring[PCI_MAX_RX_QUEUE];
|
||||
@@ -438,6 +449,15 @@ struct recv_priv {
|
||||
BOOLEAN store_law_data_flag;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SDIO_RECVBUF_AGGREGATION
|
||||
#define recv_buf_agg(recvpriv) recvpriv->recvbuf_agg
|
||||
#ifndef CONFIG_SDIO_RECVBUF_AGGREGATION_EN
|
||||
#define CONFIG_SDIO_RECVBUF_AGGREGATION_EN 1
|
||||
#endif
|
||||
#else
|
||||
#define recv_buf_agg(recvpriv) 0
|
||||
#endif
|
||||
|
||||
#define RX_BH_STG_UNKNOWN 0
|
||||
#define RX_BH_STG_HDL_ENTER 1
|
||||
#define RX_BH_STG_HDL_EXIT 2
|
||||
@@ -486,10 +506,20 @@ struct sta_recv_priv {
|
||||
};
|
||||
|
||||
|
||||
#define RBUF_TYPE_PREALLOC 0
|
||||
#define RBUF_TYPE_TMP 1
|
||||
#define RBUF_TYPE_PWAIT_ADJ 2
|
||||
|
||||
struct recv_buf {
|
||||
_list list;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_lock recvbuf_lock;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SDIO_RECVBUF_PWAIT_RUNTIME_ADJUST
|
||||
u8 type;
|
||||
#endif
|
||||
|
||||
u32 ref_cnt;
|
||||
|
||||
@@ -520,6 +550,11 @@ struct recv_buf {
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SDIO_RECVBUF_PWAIT_RUNTIME_ADJUST
|
||||
#define RBUF_IS_PREALLOC(rbuf) ((rbuf)->type == RBUF_TYPE_PREALLOC)
|
||||
#else
|
||||
#define RBUF_IS_PREALLOC(rbuf) 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
head ----->
|
||||
@@ -545,7 +580,7 @@ struct recv_frame_hdr {
|
||||
u8 fragcnt;
|
||||
|
||||
int frame_tag;
|
||||
|
||||
int keytrack;
|
||||
struct rx_pkt_attrib attrib;
|
||||
|
||||
uint len;
|
||||
@@ -586,6 +621,12 @@ union recv_frame {
|
||||
|
||||
};
|
||||
|
||||
enum rtw_rx_llc_hdl {
|
||||
RTW_RX_LLC_KEEP = 0,
|
||||
RTW_RX_LLC_REMOVE = 1,
|
||||
RTW_RX_LLC_VLAN = 2,
|
||||
};
|
||||
|
||||
bool rtw_rframe_del_wfd_ie(union recv_frame *rframe, u8 ies_offset);
|
||||
|
||||
typedef enum _RX_PACKET_TYPE {
|
||||
@@ -612,6 +653,9 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue);
|
||||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue);
|
||||
struct recv_buf *rtw_dequeue_recvbuf(_queue *queue);
|
||||
|
||||
void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_frame, struct sta_info *psta);
|
||||
void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame, struct sta_info *psta);
|
||||
|
||||
#if defined(CONFIG_80211N_HT) && defined(CONFIG_RECV_REORDERING_CTRL)
|
||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
||||
#endif
|
||||
@@ -768,7 +812,7 @@ __inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||
__inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
|
||||
{
|
||||
|
||||
u8 *buf_star = NULL;
|
||||
u8 *buf_star;
|
||||
union recv_frame *precv_frame;
|
||||
precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define MAX_CHANNEL_NUM_2G CENTER_CH_2G_NUM
|
||||
#define MAX_CHANNEL_NUM_5G CENTER_CH_5G_20M_NUM
|
||||
#define MAX_CHANNEL_NUM (MAX_CHANNEL_NUM_2G + MAX_CHANNEL_NUM_5G)
|
||||
#define MAX_CHANNEL_NUM_OF_BAND rtw_max(MAX_CHANNEL_NUM_2G, MAX_CHANNEL_NUM_5G)
|
||||
|
||||
extern u8 center_ch_2g[CENTER_CH_2G_NUM];
|
||||
extern u8 center_ch_2g_40m[CENTER_CH_2G_40M_NUM];
|
||||
@@ -55,6 +56,9 @@ u8 rtw_get_scch_by_cch_opch(u8 cch, u8 bw, u8 opch);
|
||||
|
||||
u8 rtw_get_op_chs_by_cch_bw(u8 cch, u8 bw, u8 **op_chs, u8 *op_ch_num);
|
||||
|
||||
u8 rtw_get_offset_by_chbw(u8 ch, u8 bw, u8 *r_offset);
|
||||
u8 rtw_get_center_ch(u8 ch, u8 bw, u8 offset);
|
||||
|
||||
u8 rtw_get_ch_group(u8 ch, u8 *group, u8 *cck_group);
|
||||
|
||||
typedef enum _CAPABILITY {
|
||||
@@ -116,6 +120,60 @@ extern const char *const _ch_width_str[];
|
||||
extern const u8 _ch_width_to_bw_cap[];
|
||||
#define ch_width_to_bw_cap(bw) (((bw) < CHANNEL_WIDTH_MAX) ? _ch_width_to_bw_cap[(bw)] : 0)
|
||||
|
||||
enum opc_bw {
|
||||
OPC_BW20 = 0,
|
||||
OPC_BW40PLUS = 1,
|
||||
OPC_BW40MINUS = 2,
|
||||
OPC_BW80 = 3,
|
||||
OPC_BW160 = 4,
|
||||
OPC_BW80P80 = 5,
|
||||
OPC_BW_NUM,
|
||||
};
|
||||
|
||||
extern const char *const _opc_bw_str[OPC_BW_NUM];
|
||||
#define opc_bw_str(bw) (((bw) < OPC_BW_NUM) ? _opc_bw_str[(bw)] : "N/A")
|
||||
|
||||
extern const u8 _opc_bw_to_ch_width[OPC_BW_NUM];
|
||||
#define opc_bw_to_ch_width(bw) (((bw) < OPC_BW_NUM) ? _opc_bw_to_ch_width[(bw)] : CHANNEL_WIDTH_MAX)
|
||||
|
||||
/* global op class APIs */
|
||||
bool is_valid_global_op_class_id(u8 gid);
|
||||
s16 get_sub_op_class(u8 gid, u8 ch);
|
||||
void dump_global_op_class(void *sel);
|
||||
u8 rtw_get_op_class_by_chbw(u8 ch, u8 bw, u8 offset);
|
||||
u8 rtw_get_bw_offset_by_op_class_ch(u8 gid, u8 ch, u8 *bw, u8 *offset);
|
||||
|
||||
struct op_ch_t {
|
||||
u8 ch;
|
||||
u8 static_non_op:1; /* not in channel list */
|
||||
u8 no_ir:1;
|
||||
s16 max_txpwr; /* mBm */
|
||||
};
|
||||
|
||||
struct op_class_pref_t {
|
||||
u8 class_id;
|
||||
BAND_TYPE band;
|
||||
enum opc_bw bw;
|
||||
u8 ch_num; /* number of chs */
|
||||
u8 op_ch_num; /* channel number which is not static non operable */
|
||||
u8 ir_ch_num; /* channel number which can init radiation */
|
||||
struct op_ch_t chs[MAX_CHANNEL_NUM_OF_BAND]; /* zero(ch) terminated array */
|
||||
};
|
||||
|
||||
int op_class_pref_init(_adapter *adapter);
|
||||
void op_class_pref_deinit(_adapter *adapter);
|
||||
|
||||
#define REG_BEACON_HINT 0
|
||||
#define REG_TXPWR_CHANGE 1
|
||||
#define REG_CHANGE 2
|
||||
|
||||
void op_class_pref_apply_regulatory(_adapter *adapter, u8 reason);
|
||||
|
||||
struct rf_ctl_t;
|
||||
void dump_cap_spt_op_class_ch(void *sel, struct rf_ctl_t *rfctl, bool detail);
|
||||
void dump_reg_spt_op_class_ch(void *sel, struct rf_ctl_t *rfctl, bool detail);
|
||||
void dump_cur_spt_op_class_ch(void *sel, struct rf_ctl_t *rfctl, bool detail);
|
||||
|
||||
/*
|
||||
* Represent Extention Channel Offset in HT Capabilities
|
||||
* This is available only in 40Mhz mode.
|
||||
@@ -163,6 +221,7 @@ void rf_type_to_default_trx_bmp(enum rf_type rf, enum bb_path *tx, enum bb_path
|
||||
enum rf_type trx_num_to_rf_type(u8 tx_num, u8 rx_num);
|
||||
enum rf_type trx_bmp_to_rf_type(u8 tx_bmp, u8 rx_bmp);
|
||||
bool rf_type_is_a_in_b(enum rf_type a, enum rf_type b);
|
||||
u8 rtw_restrict_trx_path_bmp_by_trx_num_lmt(u8 trx_path_bmp, u8 tx_num_lmt, u8 rx_num_lmt, u8 *tx_num, u8 *rx_num);
|
||||
u8 rtw_restrict_trx_path_bmp_by_rftype(u8 trx_path_bmp, enum rf_type type, u8 *tx_num, u8 *rx_num);
|
||||
void tx_path_nss_set_default(enum bb_path txpath_nss[], u8 txpath_num_nss[], u8 txpath);
|
||||
void tx_path_nss_set_full_tx(enum bb_path txpath_nss[], u8 txpath_num_nss[], u8 txpath);
|
||||
@@ -180,10 +239,13 @@ typedef enum _REGULATION_TXPWR_LMT {
|
||||
TXPWR_LMT_ETSI = 3,
|
||||
TXPWR_LMT_IC = 4,
|
||||
TXPWR_LMT_KCC = 5,
|
||||
TXPWR_LMT_ACMA = 6,
|
||||
TXPWR_LMT_CHILE = 7,
|
||||
TXPWR_LMT_MEXICO = 8,
|
||||
TXPWR_LMT_WW = 9, /* smallest of all available limit, keep last */
|
||||
TXPWR_LMT_NCC = 6,
|
||||
TXPWR_LMT_ACMA = 7,
|
||||
TXPWR_LMT_CHILE = 8,
|
||||
TXPWR_LMT_UKRAINE = 9,
|
||||
TXPWR_LMT_MEXICO = 10,
|
||||
TXPWR_LMT_CN = 11,
|
||||
TXPWR_LMT_WW, /* smallest of all available limit, keep last */
|
||||
} REGULATION_TXPWR_LMT;
|
||||
|
||||
extern const char *const _regd_str[];
|
||||
|
||||
@@ -67,10 +67,18 @@ struct rm_priv {
|
||||
u8 rm_en_cap_def[5];
|
||||
u8 rm_en_cap_assoc[5];
|
||||
|
||||
u8 meas_token;
|
||||
/* rm debug */
|
||||
void *prm_sel;
|
||||
};
|
||||
|
||||
#define MAX_CH_NUM_IN_OP_CLASS 11
|
||||
typedef struct _RT_OPERATING_CLASS {
|
||||
int global_op_class;
|
||||
int Len;
|
||||
u8 Channel[MAX_CH_NUM_IN_OP_CLASS];
|
||||
} RT_OPERATING_CLASS, *PRT_OPERATING_CLASS;
|
||||
|
||||
int rtw_init_rm(_adapter *padapter);
|
||||
int rtw_free_rm_priv(_adapter *padapter);
|
||||
|
||||
@@ -84,5 +92,14 @@ void rm_handler(_adapter *padapter, struct rm_event *pev);
|
||||
|
||||
u8 rm_add_nb_req(_adapter *padapter, struct sta_info *psta);
|
||||
|
||||
/* from ioctl */
|
||||
int rm_send_bcn_reqs(_adapter *padapter, u8 *sta_addr, u8 op_class, u8 ch,
|
||||
u16 measure_duration, u8 measure_mode, u8 *bssid, u8 *ssid,
|
||||
u8 reporting_detail,
|
||||
u8 n_ap_ch_rpt, struct _RT_OPERATING_CLASS *rpt,
|
||||
u8 n_elem_id, u8 *elem_id_list);
|
||||
void indicate_beacon_report(u8 *sta_addr,
|
||||
u8 n_measure_rpt, u32 elem_len, u8 *elem);
|
||||
|
||||
#endif /*CONFIG_RTW_80211K */
|
||||
#endif /* __RTW_RM_H_ */
|
||||
|
||||
@@ -55,13 +55,6 @@
|
||||
#define RM_GET_AID(rmid) ((rmid&0xffff0000)>>16)
|
||||
#define RM_IS_ID_FOR_ALL(rmid) (rmid&RM_ALL_MEAS)
|
||||
|
||||
#define MAX_OP_CHANNEL_SET_NUM 11
|
||||
typedef struct _RT_OPERATING_CLASS {
|
||||
int global_op_class;
|
||||
int Len;
|
||||
u16 Channel[MAX_OP_CHANNEL_SET_NUM];
|
||||
} RT_OPERATING_CLASS, *PRT_OPERATING_CLASS;
|
||||
|
||||
/* IEEE 802.11-2012 Table 8-59 Measurement Type definitions
|
||||
* for measurement request
|
||||
* modify rm_meas_type_req_name() when adding new type
|
||||
@@ -112,7 +105,7 @@ enum bcn_req_opt_sub_id{
|
||||
bcn_req_rep_info = 1, /* len 2 */
|
||||
bcn_req_rep_detail = 2, /* len 1 */
|
||||
bcn_req_req = 10, /* len 0-237 */
|
||||
bcn_req_ac_ch_rep = 51 /* len 1-237 */
|
||||
bcn_req_ap_ch_rep = 51 /* len 1-237 */
|
||||
};
|
||||
|
||||
/* IEEE 802.11-2012 Table 8-66 Reporting condition of Beacon Report */
|
||||
@@ -131,16 +124,23 @@ struct opt_rep_info {
|
||||
};
|
||||
|
||||
#define BCN_REQ_OPT_MAX_NUM 16
|
||||
#define BCN_REQ_REQ_OPT_MAX_NUM 16
|
||||
#define BCN_REQ_OPT_AP_CH_RPT_MAX_NUM 12
|
||||
struct bcn_req_opt {
|
||||
/* all req cmd id */
|
||||
u8 opt_id[BCN_REQ_OPT_MAX_NUM];
|
||||
u8 opt_id_num;
|
||||
u8 req_id_num;
|
||||
u8 req_id[BCN_REQ_REQ_OPT_MAX_NUM];
|
||||
u8 rep_detail;
|
||||
NDIS_802_11_SSID ssid;
|
||||
|
||||
/* bcn report condition */
|
||||
struct opt_rep_info rep_cond;
|
||||
|
||||
u8 ap_ch_rpt_num;
|
||||
struct _RT_OPERATING_CLASS *ap_ch_rpt[BCN_REQ_OPT_AP_CH_RPT_MAX_NUM];
|
||||
|
||||
/* 0:default(Report to be issued after each measurement) */
|
||||
u8 *req_start; /*id : 10 request;start */
|
||||
u8 req_len; /*id : 10 request;length */
|
||||
@@ -230,7 +230,7 @@ struct rm_meas_req {
|
||||
struct meas_req_opt nhm;
|
||||
}opt;
|
||||
|
||||
struct rtw_ieee80211_channel ch_set[MAX_OP_CHANNEL_SET_NUM];
|
||||
struct rtw_ieee80211_channel ch_set[RTW_CHANNEL_SCAN_AMOUNT];
|
||||
u8 ch_set_ch_amount;
|
||||
s8 rx_pwr; /* in dBm */
|
||||
u8 rx_bw;
|
||||
@@ -284,8 +284,10 @@ struct rm_obj {
|
||||
u64 meas_end_time;
|
||||
int wait_busy;
|
||||
u8 poll_mode;
|
||||
u8 free_run_counter_valid; /* valid:_SUCCESS/invalid:_FAIL */
|
||||
|
||||
struct data_buf buf[MAX_BUF_NUM];
|
||||
bool from_ioctl;
|
||||
|
||||
_list list;
|
||||
};
|
||||
|
||||
@@ -28,11 +28,16 @@
|
||||
|
||||
u8 rm_get_oper_class_via_ch(u8 ch);
|
||||
u8 rm_get_ch_set( struct rtw_ieee80211_channel *pch_set, u8 op_class, u8 ch_num);
|
||||
u8 rm_get_ch_set_from_bcn_req_opt(
|
||||
struct rtw_ieee80211_channel *pch_set, struct bcn_req_opt *opt);
|
||||
u8 rm_get_bcn_rsni(struct rm_obj *prm, struct wlan_network *pnetwork);
|
||||
u8 rm_get_bcn_rcpi(struct rm_obj *prm, struct wlan_network *pnetwork);
|
||||
u8 rm_get_frame_rsni(struct rm_obj *prm, union recv_frame *pframe);
|
||||
u8 translate_percentage_to_rcpi(u32 SignalStrengthIndex);
|
||||
u8 translate_dbm_to_rcpi(s8 SignalPower);
|
||||
u8 rm_gen_dialog_token(_adapter *padapter);
|
||||
u8 rm_gen_meas_token(_adapter *padapter);
|
||||
u32 rm_gen_rmid(_adapter *padapter, struct rm_obj *prm, u8 role);
|
||||
int is_wildcard_bssid(u8 *bssid);
|
||||
|
||||
int rm_get_path_a_max_tx_power(_adapter *adapter, s8 *path_a);
|
||||
|
||||
61
include/rtw_roch.h
Normal file
61
include/rtw_roch.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2020 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __RTW_ROCH_H__
|
||||
#define __RTW_ROCH_H__
|
||||
|
||||
#include <drv_types.h>
|
||||
|
||||
struct rtw_roch_parm;
|
||||
|
||||
#if (defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE)) || defined(CONFIG_IOCTL_CFG80211)
|
||||
struct roch_info {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_timer ap_roch_ch_switch_timer; /* Used to switch the channel between legacy AP and listen state. */
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
u32 min_home_dur; /* min duration for traffic, home_time */
|
||||
u32 max_away_dur; /* max acceptable away duration, home_away_time */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
_timer remain_on_ch_timer;
|
||||
u8 restore_channel;
|
||||
struct ieee80211_channel remain_on_ch_channel;
|
||||
enum nl80211_channel_type remain_on_ch_type;
|
||||
ATOMIC_T ro_ch_cookie_gen;
|
||||
u64 remain_on_ch_cookie;
|
||||
bool is_ro_ch;
|
||||
struct wireless_dev *ro_ch_wdev;
|
||||
systime last_ro_ch_time; /* this will be updated at the beginning and end of ro_ch */
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
u8 rtw_roch_stay_in_cur_chan(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
#if (defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE)) || defined(CONFIG_IOCTL_CFG80211)
|
||||
s32 rtw_roch_wk_hdl(_adapter *padapter, int intCmdType, u8 *buf);
|
||||
u8 rtw_roch_wk_cmd(_adapter *padapter, int intCmdType, struct rtw_roch_parm *roch_parm, u8 flags);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void rtw_concurrent_handler(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
void rtw_init_roch_info(_adapter *padapter);
|
||||
#endif /* (defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE)) || defined(CONFIG_IOCTL_CFG80211) */
|
||||
|
||||
#endif
|
||||
@@ -15,16 +15,34 @@
|
||||
#ifndef __RTW_SECURITY_H_
|
||||
#define __RTW_SECURITY_H_
|
||||
|
||||
enum security_type {
|
||||
/* TYPE */
|
||||
_NO_PRIVACY_ = 0x00,
|
||||
_WEP40_ = 0x01,
|
||||
_TKIP_ = 0x02,
|
||||
_TKIP_WTMIC_ = 0x03,
|
||||
_AES_ = 0x04,
|
||||
_WEP104_ = 0x05,
|
||||
_SMS4_ = 0x06,
|
||||
_GCMP_ = 0x07,
|
||||
_SEC_TYPE_MAX_,
|
||||
|
||||
#define _NO_PRIVACY_ 0x0
|
||||
#define _WEP40_ 0x1
|
||||
#define _TKIP_ 0x2
|
||||
#define _TKIP_WTMIC_ 0x3
|
||||
#define _AES_ 0x4
|
||||
#define _WEP104_ 0x5
|
||||
#define _SMS4_ 0x06
|
||||
#define _WEP_WPA_MIXED_ 0x07 /* WEP + WPA */
|
||||
#define _BIP_ 0x8
|
||||
/* EXT_SECTYPE=1 */
|
||||
_SEC_TYPE_256_ = 0x10,
|
||||
_CCMP_256_ = (_AES_ | _SEC_TYPE_256_),
|
||||
_GCMP_256_ = (_GCMP_ | _SEC_TYPE_256_),
|
||||
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
/* EXT_SECTYPE=0, MGNT=1, GK=0/1, KEYID=00/01 */
|
||||
_SEC_TYPE_BIT_ = 0x20,
|
||||
_BIP_CMAC_128_ = (_SEC_TYPE_BIT_),
|
||||
_BIP_GMAC_128_ = (_SEC_TYPE_BIT_ + 1),
|
||||
_BIP_GMAC_256_ = (_SEC_TYPE_BIT_ + 2),
|
||||
/* EXT_SECTYPE=1, MGNT=1, GK=1, KEYID=00/01 */
|
||||
_BIP_CMAC_256_ = (_SEC_TYPE_BIT_ + 3),
|
||||
_BIP_MAX_,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* 802.11W use wrong key */
|
||||
#define IEEE80211W_RIGHT_KEY 0x0
|
||||
@@ -37,14 +55,13 @@
|
||||
#define is_wep_enc(alg) (((alg) == _WEP40_) || ((alg) == _WEP104_))
|
||||
|
||||
const char *security_type_str(u8 value);
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
u32 security_type_bip_to_gmcs(enum security_type type);
|
||||
#endif
|
||||
|
||||
#define _WPA_IE_ID_ 0xdd
|
||||
#define _WPA2_IE_ID_ 0x30
|
||||
|
||||
#define SHA256_MAC_LEN 32
|
||||
#define AES_BLOCK_SIZE 16
|
||||
#define AES_PRIV_SIZE (4 * 44)
|
||||
|
||||
#define RTW_KEK_LEN 16
|
||||
#define RTW_KCK_LEN 16
|
||||
#define RTW_TKIP_MIC_LEN 8
|
||||
@@ -105,11 +122,9 @@ struct {
|
||||
};
|
||||
|
||||
union Keytype {
|
||||
u8 skey[16];
|
||||
u32 lkey[4];
|
||||
u8 skey[32];
|
||||
};
|
||||
|
||||
|
||||
typedef struct _RT_PMKID_LIST {
|
||||
u8 bUsed;
|
||||
u8 Bssid[6];
|
||||
@@ -140,6 +155,7 @@ struct security_priv {
|
||||
union pn48 dot11Grprxpn; /* PN48 used for Grp Key recv. */
|
||||
u8 iv_seq[4][8];
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
enum security_type dot11wCipher;
|
||||
u32 dot11wBIPKeyid; /* key id used for BIP Key ( tx key index) */
|
||||
union Keytype dot11wBIPKey[6]; /* BIP Key, for index4 and index5 */
|
||||
union pn48 dot11wBIPtxpn; /* PN48 used for BIP xmit. */
|
||||
@@ -153,11 +169,10 @@ struct security_priv {
|
||||
unsigned int wpa2_group_cipher;
|
||||
unsigned int wpa_pairwise_cipher;
|
||||
unsigned int wpa2_pairwise_cipher;
|
||||
unsigned int akmp; /* An authentication and key management protocol */
|
||||
#endif
|
||||
u8 mfp_opt;
|
||||
#endif
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 dot118021x_bmc_cam_id;
|
||||
#endif
|
||||
/*IEEE802.11-2012 Std. Table 8-101 AKM Suite Selectors*/
|
||||
u32 rsn_akm_suite_type;
|
||||
|
||||
@@ -242,6 +257,13 @@ struct security_priv {
|
||||
u64 aes_sw_dec_cnt_bc;
|
||||
u64 aes_sw_dec_cnt_mc;
|
||||
u64 aes_sw_dec_cnt_uc;
|
||||
|
||||
u64 gcmp_sw_enc_cnt_bc;
|
||||
u64 gcmp_sw_enc_cnt_mc;
|
||||
u64 gcmp_sw_enc_cnt_uc;
|
||||
u64 gcmp_sw_dec_cnt_bc;
|
||||
u64 gcmp_sw_dec_cnt_mc;
|
||||
u64 gcmp_sw_dec_cnt_uc;
|
||||
#endif /* DBG_SW_SEC_CNT */
|
||||
};
|
||||
|
||||
@@ -251,12 +273,6 @@ struct security_priv {
|
||||
#define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE
|
||||
#endif
|
||||
|
||||
struct _sha256_state {
|
||||
u64 length;
|
||||
u32 state[8], curlen;
|
||||
u8 buf[64];
|
||||
};
|
||||
|
||||
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
|
||||
do {\
|
||||
switch (psecuritypriv->dot11AuthAlgrthm) {\
|
||||
@@ -295,6 +311,15 @@ struct _sha256_state {
|
||||
iv_len = 8;\
|
||||
icv_len = 8;\
|
||||
break;\
|
||||
case _GCMP_:\
|
||||
case _GCMP_256_:\
|
||||
iv_len = 8;\
|
||||
icv_len = 16;\
|
||||
break;\
|
||||
case _CCMP_256_:\
|
||||
iv_len = 8;\
|
||||
icv_len = 16;\
|
||||
break;\
|
||||
case _SMS4_:\
|
||||
iv_len = 18;\
|
||||
icv_len = 16;\
|
||||
@@ -328,132 +353,6 @@ struct mic_data {
|
||||
u32 nBytesInM; /* # bytes in M */
|
||||
};
|
||||
|
||||
extern const u32 Te0[256];
|
||||
extern const u32 Te1[256];
|
||||
extern const u32 Te2[256];
|
||||
extern const u32 Te3[256];
|
||||
extern const u32 Te4[256];
|
||||
extern const u32 Td0[256];
|
||||
extern const u32 Td1[256];
|
||||
extern const u32 Td2[256];
|
||||
extern const u32 Td3[256];
|
||||
extern const u32 Td4[256];
|
||||
extern const u32 rcon[10];
|
||||
extern const u8 Td4s[256];
|
||||
extern const u8 rcons[10];
|
||||
|
||||
#define RCON(i) (rcons[(i)] << 24)
|
||||
|
||||
static inline u32 rotr(u32 val, int bits)
|
||||
{
|
||||
return (val >> bits) | (val << (32 - bits));
|
||||
}
|
||||
|
||||
#define TE0(i) Te0[((i) >> 24) & 0xff]
|
||||
#define TE1(i) rotr(Te0[((i) >> 16) & 0xff], 8)
|
||||
#define TE2(i) rotr(Te0[((i) >> 8) & 0xff], 16)
|
||||
#define TE3(i) rotr(Te0[(i) & 0xff], 24)
|
||||
#define TE41(i) ((Te0[((i) >> 24) & 0xff] << 8) & 0xff000000)
|
||||
#define TE42(i) (Te0[((i) >> 16) & 0xff] & 0x00ff0000)
|
||||
#define TE43(i) (Te0[((i) >> 8) & 0xff] & 0x0000ff00)
|
||||
#define TE44(i) ((Te0[(i) & 0xff] >> 8) & 0x000000ff)
|
||||
#define TE421(i) ((Te0[((i) >> 16) & 0xff] << 8) & 0xff000000)
|
||||
#define TE432(i) (Te0[((i) >> 8) & 0xff] & 0x00ff0000)
|
||||
#define TE443(i) (Te0[(i) & 0xff] & 0x0000ff00)
|
||||
#define TE414(i) ((Te0[((i) >> 24) & 0xff] >> 8) & 0x000000ff)
|
||||
#define TE4(i) ((Te0[(i)] >> 8) & 0x000000ff)
|
||||
|
||||
#define TD0(i) Td0[((i) >> 24) & 0xff]
|
||||
#define TD1(i) rotr(Td0[((i) >> 16) & 0xff], 8)
|
||||
#define TD2(i) rotr(Td0[((i) >> 8) & 0xff], 16)
|
||||
#define TD3(i) rotr(Td0[(i) & 0xff], 24)
|
||||
#define TD41(i) (Td4s[((i) >> 24) & 0xff] << 24)
|
||||
#define TD42(i) (Td4s[((i) >> 16) & 0xff] << 16)
|
||||
#define TD43(i) (Td4s[((i) >> 8) & 0xff] << 8)
|
||||
#define TD44(i) (Td4s[(i) & 0xff])
|
||||
#define TD0_(i) Td0[(i) & 0xff]
|
||||
#define TD1_(i) rotr(Td0[(i) & 0xff], 8)
|
||||
#define TD2_(i) rotr(Td0[(i) & 0xff], 16)
|
||||
#define TD3_(i) rotr(Td0[(i) & 0xff], 24)
|
||||
|
||||
#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ \
|
||||
((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
|
||||
|
||||
#define PUTU32(ct, st) { \
|
||||
(ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); \
|
||||
(ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); }
|
||||
|
||||
#define WPA_GET_BE32(a) ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \
|
||||
(((u32) (a)[2]) << 8) | ((u32) (a)[3]))
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
(a)[0] = ((u16) (val)) & 0xff; \
|
||||
} while (0)
|
||||
|
||||
#define WPA_PUT_BE32(a, val) \
|
||||
do { \
|
||||
(a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
||||
(a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[3] = (u8) (((u32) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
#define WPA_PUT_BE64(a, val) \
|
||||
do { \
|
||||
(a)[0] = (u8) (((u64) (val)) >> 56); \
|
||||
(a)[1] = (u8) (((u64) (val)) >> 48); \
|
||||
(a)[2] = (u8) (((u64) (val)) >> 40); \
|
||||
(a)[3] = (u8) (((u64) (val)) >> 32); \
|
||||
(a)[4] = (u8) (((u64) (val)) >> 24); \
|
||||
(a)[5] = (u8) (((u64) (val)) >> 16); \
|
||||
(a)[6] = (u8) (((u64) (val)) >> 8); \
|
||||
(a)[7] = (u8) (((u64) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
/* the K array */
|
||||
static const unsigned long K[64] = {
|
||||
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, 0x3956c25bUL,
|
||||
0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, 0xd807aa98UL, 0x12835b01UL,
|
||||
0x243185beUL, 0x550c7dc3UL, 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL,
|
||||
0xc19bf174UL, 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
|
||||
0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, 0x983e5152UL,
|
||||
0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, 0xc6e00bf3UL, 0xd5a79147UL,
|
||||
0x06ca6351UL, 0x14292967UL, 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL,
|
||||
0x53380d13UL, 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
|
||||
0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, 0xd192e819UL,
|
||||
0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, 0x19a4c116UL, 0x1e376c08UL,
|
||||
0x2748774cUL, 0x34b0bcb5UL, 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL,
|
||||
0x682e6ff3UL, 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
|
||||
0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
|
||||
};
|
||||
|
||||
|
||||
/* Various logical functions */
|
||||
#define RORc(x, y) \
|
||||
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
|
||||
((unsigned long) (x) << (unsigned long) (32 - ((y) & 31)))) & 0xFFFFFFFFUL)
|
||||
#define Ch(x, y, z) (z ^ (x & (y ^ z)))
|
||||
#define Maj(x, y, z) (((x | y) & z) | (x & y))
|
||||
#define S(x, n) RORc((x), (n))
|
||||
#define R(x, n) (((x) & 0xFFFFFFFFUL)>>(n))
|
||||
#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))
|
||||
#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25))
|
||||
#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3))
|
||||
#define Gamma1(x) (S(x, 17) ^ S(x, 19) ^ R(x, 10))
|
||||
#ifndef MIN
|
||||
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#endif
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
int omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac);
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#ifdef CONFIG_RTW_MESH_AEK
|
||||
int aes_siv_encrypt(const u8 *key, const u8 *pw, size_t pwlen
|
||||
, size_t num_elem, const u8 *addr[], const size_t *len, u8 *out);
|
||||
int aes_siv_decrypt(const u8 *key, const u8 *iv_crypt, size_t iv_c_len
|
||||
, size_t num_elem, const u8 *addr[], const size_t *len, u8 *out);
|
||||
#endif
|
||||
void rtw_secmicsetkey(struct mic_data *pmicdata, u8 *key);
|
||||
void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b);
|
||||
void rtw_secmicappend(struct mic_data *pmicdata, u8 *src, u32 nBytes);
|
||||
@@ -474,9 +373,24 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe);
|
||||
u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe);
|
||||
u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe);
|
||||
void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe);
|
||||
|
||||
u32 rtw_gcmp_encrypt(_adapter *padapter, u8 *pxmitframe);
|
||||
u32 rtw_gcmp_decrypt(_adapter *padapter, u8 *precvframe);
|
||||
|
||||
#ifdef CONFIG_RTW_MESH_AEK
|
||||
int rtw_aes_siv_encrypt(const u8 *key, size_t key_len,
|
||||
const u8 *pw, size_t pwlen, size_t num_elem,
|
||||
const u8 *addr[], const size_t *len, u8 *out);
|
||||
int rtw_aes_siv_decrypt(const u8 *key, size_t key_len,
|
||||
const u8 *iv_crypt, size_t iv_c_len, size_t num_elem,
|
||||
const u8 *addr[], const size_t *len, u8 *out);
|
||||
#endif /* CONFIG_RTW_MESH_AEK */
|
||||
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
|
||||
, const u8 *key, u16 id, u64* ipn);
|
||||
u8 rtw_calculate_bip_mic(enum security_type gmcs, u8 *whdr_pos, s32 len,
|
||||
const u8 *key, const u8 *data, size_t data_len, u8 *mic);
|
||||
u32 rtw_bip_verify(enum security_type gmcs, u16 pkt_len,
|
||||
u8 *whdr_pos, sint flen, const u8 *key, u16 keyid, u64 *ipn);
|
||||
#endif
|
||||
#ifdef CONFIG_TDLS
|
||||
void wpa_tdls_generate_tpk(_adapter *padapter, void *sta);
|
||||
@@ -503,3 +417,5 @@ u16 rtw_calc_crc(u8 *pdata, int length);
|
||||
((a)->securitypriv.auth_type == (s))
|
||||
|
||||
#endif /* __RTL871X_SECURITY_H_ */
|
||||
|
||||
u32 rtw_calc_crc32(u8 *data, size_t len);
|
||||
|
||||
49
include/rtw_swcrypto.h
Normal file
49
include/rtw_swcrypto.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __RTW_SWCRYPTO_H_
|
||||
#define __RTW_SWCRYPTO_H_
|
||||
|
||||
#define NEW_CRYPTO 1
|
||||
|
||||
int _rtw_ccmp_encrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen);
|
||||
int _rtw_ccmp_decrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen);
|
||||
|
||||
int _rtw_gcmp_encrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen);
|
||||
int _rtw_gcmp_decrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen);
|
||||
|
||||
#ifdef CONFIG_RTW_MESH_AEK
|
||||
int _aes_siv_encrypt(const u8 *key, size_t key_len,
|
||||
const u8 *pw, size_t pwlen,
|
||||
size_t num_elem, const u8 *addr[], const size_t *len, u8 *out);
|
||||
int _aes_siv_decrypt(const u8 *key, size_t key_len,
|
||||
const u8 *iv_crypt, size_t iv_c_len,
|
||||
size_t num_elem, const u8 *addr[], const size_t *len, u8 *out);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_IEEE80211W) | defined(CONFIG_TDLS)
|
||||
u8 _bip_ccmp_protect(const u8 *key, size_t key_len,
|
||||
const u8 *data, size_t data_len, u8 *mic);
|
||||
u8 _bip_gcmp_protect(u8 *whdr_pos, size_t len,
|
||||
const u8 *key, size_t key_len,
|
||||
const u8 *data, size_t data_len, u8 *mic);
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
void _tdls_generate_tpk(void *sta, const u8 *own_addr, const u8 *bssid);
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
#endif /* __RTW_SWCRYPTO_H_ */
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#define DRIVERVERSION "v5.8.7.4_37264.20200922_COEX20191120-7777"
|
||||
#define BTCOEXVERSION "COEX20191120-7777"
|
||||
#define DRIVERVERSION "v5.13.1-20-gbd7c7eb9d.20210702_COEX20210316-18317b7b"
|
||||
#define BTCOEXVERSION "COEX20210316-18317b7b"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#define SET_VHT_CAPABILITY_ELE_TXOP_PS(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart)+2, 5, 1, _val)
|
||||
#define SET_VHT_CAPABILITY_ELE_HTC_VHT(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart)+2, 6, 1, _val)
|
||||
#define SET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+2, 7, 3, _val) /* B23~B25 */
|
||||
#define SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart)+2, 2, 2, _val)
|
||||
#define SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart)+3, 2, 2, _val)
|
||||
#define SET_VHT_CAPABILITY_ELE_MCS_RX_MAP(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+4, 0, 16, _val) /* B0~B15 indicate Rx MCS MAP, we write 0 to indicate MCS0~7. by page */
|
||||
#define SET_VHT_CAPABILITY_ELE_MCS_RX_HIGHEST_RATE(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+6, 0, 13, _val)
|
||||
#define SET_VHT_CAPABILITY_ELE_MCS_TX_MAP(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+8, 0, 16, _val) /* B0~B15 indicate Tx MCS MAP, we write 0 to indicate MCS0~7. by page */
|
||||
@@ -103,10 +103,12 @@ extern const u16 _vht_max_mpdu_len[];
|
||||
#define VHT_SUP_CH_WIDTH_SET_MAX 3
|
||||
extern const u8 _vht_sup_ch_width_set_to_bw_cap[];
|
||||
#define vht_sup_ch_width_set_to_bw_cap(set) (((set) >= VHT_SUP_CH_WIDTH_SET_MAX) ? _vht_sup_ch_width_set_to_bw_cap[VHT_SUP_CH_WIDTH_SET_MAX] : _vht_sup_ch_width_set_to_bw_cap[(set)])
|
||||
#define VHT_MAX_AMPDU_LEN(f) ((1 << (13 + f)) - 1)
|
||||
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
extern const char *const _vht_sup_ch_width_set_str[];
|
||||
#define vht_sup_ch_width_set_str(set) (((set) >= VHT_SUP_CH_WIDTH_SET_MAX) ? _vht_sup_ch_width_set_str[VHT_SUP_CH_WIDTH_SET_MAX] : _vht_sup_ch_width_set_str[(set)])
|
||||
|
||||
#define VHT_MAX_AMPDU_LEN(f) ((1 << (13 + f)) - 1)
|
||||
void dump_vht_cap_ie(void *sel, const u8 *ie, u32 ie_len);
|
||||
|
||||
#define VHT_OP_CH_WIDTH_MAX 4
|
||||
@@ -114,6 +116,7 @@ extern const char *const _vht_op_ch_width_str[];
|
||||
#define vht_op_ch_width_str(ch_width) (((ch_width) >= VHT_OP_CH_WIDTH_MAX) ? _vht_op_ch_width_str[VHT_OP_CH_WIDTH_MAX] : _vht_op_ch_width_str[(ch_width)])
|
||||
|
||||
void dump_vht_op_ie(void *sel, const u8 *ie, u32 ie_len);
|
||||
#endif
|
||||
|
||||
struct vht_bf_cap {
|
||||
u8 is_mu_bfer;
|
||||
|
||||
209
include/rtw_wnm.h
Normal file
209
include/rtw_wnm.h
Normal file
@@ -0,0 +1,209 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __RTW_WNM_H_
|
||||
#define __RTW_WNM_H_
|
||||
|
||||
#define RTW_RRM_NB_RPT_EN BIT(1)
|
||||
#define RTW_MAX_NB_RPT_NUM 8
|
||||
|
||||
#define RTW_WNM_FEATURE_BTM_REQ_EN BIT(0)
|
||||
|
||||
#define rtw_roam_busy_scan(a, nb) \
|
||||
(((a)->mlmepriv.LinkDetectInfo.bBusyTraffic == _TRUE) && \
|
||||
(((a)->mlmepriv.ch_cnt) < ((nb)->nb_rpt_ch_list_num)))
|
||||
|
||||
#define rtw_wnm_btm_preference_cap(a) \
|
||||
((a)->mlmepriv.nb_info.preference_en == _TRUE)
|
||||
|
||||
#define rtw_wnm_btm_roam_triggered(a) \
|
||||
(((a)->mlmepriv.nb_info.preference_en == _TRUE) \
|
||||
&& (rtw_ft_chk_flags((a), RTW_FT_BTM_ROAM)) \
|
||||
)
|
||||
|
||||
#define rtw_wnm_btm_diff_bss(a) \
|
||||
((rtw_wnm_btm_preference_cap(a)) && \
|
||||
(is_zero_mac_addr((a)->mlmepriv.nb_info.roam_target_addr) == _FALSE) && \
|
||||
(_rtw_memcmp((a)->mlmepriv.nb_info.roam_target_addr,\
|
||||
(a)->mlmepriv.cur_network.network.MacAddress, ETH_ALEN) == _FALSE))
|
||||
|
||||
#define rtw_wnm_btm_roam_candidate(a, c) \
|
||||
((rtw_wnm_btm_preference_cap(a)) && \
|
||||
(is_zero_mac_addr((a)->mlmepriv.nb_info.roam_target_addr) == _FALSE) && \
|
||||
(_rtw_memcmp((a)->mlmepriv.nb_info.roam_target_addr,\
|
||||
(c)->network.MacAddress, ETH_ALEN)))
|
||||
|
||||
#define rtw_wnm_set_ext_cap_btm(_pEleStart, _val) \
|
||||
SET_BITS_TO_LE_1BYTE(((u8 *)(_pEleStart))+2, 3, 1, _val)
|
||||
|
||||
#define wnm_btm_bss_term_inc(p) (*((u8 *)((p)+3)) & BSS_TERMINATION_INCLUDED)
|
||||
|
||||
#define wnm_btm_ess_disassoc_im(p) (*((u8 *)((p)+3)) & ESS_DISASSOC_IMMINENT)
|
||||
|
||||
#define wnm_btm_dialog_token(p) (*((u8 *)((p)+2)))
|
||||
|
||||
#define wnm_btm_req_mode(p) (*((u8 *)((p)+3)))
|
||||
|
||||
#define wnm_btm_disassoc_timer(p) (*((u16 *)((p)+4)))
|
||||
|
||||
#define wnm_btm_valid_interval(p) (*((u8 *)((p)+6)))
|
||||
|
||||
#define wnm_btm_term_duration_offset(p) ((p)+7)
|
||||
|
||||
#define wnm_btm_rsp_status(p) (*((u8 *)((p)+3)))
|
||||
|
||||
#define wnm_btm_rsp_term_delay(p) (*((u8 *)((p)+4)))
|
||||
|
||||
#define RTW_WLAN_ACTION_WNM_NB_RPT_ELEM 0x34
|
||||
|
||||
enum rtw_ieee80211_wnm_actioncode {
|
||||
RTW_WLAN_ACTION_WNM_BTM_QUERY = 6,
|
||||
RTW_WLAN_ACTION_WNM_BTM_REQ = 7,
|
||||
RTW_WLAN_ACTION_WNM_BTM_RSP = 8,
|
||||
RTW_WLAN_ACTION_WNM_NOTIF_REQ = 26,
|
||||
RTW_WLAN_ACTION_WNM_NOTIF_RSP = 27,
|
||||
};
|
||||
|
||||
/*IEEE Std 80211k Figure 7-95b Neighbor Report element format*/
|
||||
struct nb_rpt_hdr {
|
||||
u8 id; /*0x34: Neighbor Report Element ID*/
|
||||
u8 len;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u32 bss_info;
|
||||
u8 reg_class;
|
||||
u8 ch_num;
|
||||
u8 phy_type;
|
||||
};
|
||||
|
||||
/*IEEE Std 80211v, Figure 7-9 BSS Termination Duration subelement field format */
|
||||
struct btm_term_duration {
|
||||
u8 id;
|
||||
u8 len;
|
||||
u64 tsf; /* value of the TSF counter when BSS termination will occur in the future */
|
||||
u16 duration; /* number of minutes for which the BSS is not present*/
|
||||
};
|
||||
|
||||
/*IEEE Std 80211v, Figure 7-10 BSS Transition Management Request frame body format */
|
||||
struct btm_req_hdr {
|
||||
u8 dialog_token;
|
||||
u8 req_mode;
|
||||
/* number of TBTTs until the AP sends a Disassociation frame to this STA */
|
||||
u16 disassoc_timer;
|
||||
/* number of TBTTs until the BSS transition candidate list is no longer valid */
|
||||
u8 validity_interval;
|
||||
struct btm_term_duration term_duration;
|
||||
};
|
||||
|
||||
struct btm_rsp_hdr {
|
||||
u8 dialog_token;
|
||||
u8 status;
|
||||
/* the number of minutes that
|
||||
the responding STA requests the BSS to delay termination */
|
||||
u8 termination_delay;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 *pcandidates;
|
||||
u32 candidates_num;
|
||||
};
|
||||
|
||||
struct btm_rpt_cache {
|
||||
u8 dialog_token;
|
||||
u8 req_mode;
|
||||
u16 disassoc_timer;
|
||||
u8 validity_interval;
|
||||
struct btm_term_duration term_duration;
|
||||
|
||||
/* from BTM req */
|
||||
u32 validity_time;
|
||||
u32 disassoc_time;
|
||||
|
||||
systime req_stime;
|
||||
};
|
||||
|
||||
/*IEEE Std 80211v, Table 7-43b Optional Subelement IDs for Neighbor Report*/
|
||||
/* BSS Transition Candidate Preference */
|
||||
#define WNM_BTM_CAND_PREF_SUBEID 0x03
|
||||
|
||||
/* BSS Termination Duration */
|
||||
#define WNM_BTM_TERM_DUR_SUBEID 0x04
|
||||
|
||||
struct wnm_btm_cant {
|
||||
struct nb_rpt_hdr nb_rpt;
|
||||
u8 preference; /* BSS Transition Candidate Preference */
|
||||
};
|
||||
|
||||
enum rtw_btm_req_mod {
|
||||
PREFERRED_CANDIDATE_LIST_INCLUDED = BIT0,
|
||||
ABRIDGED = BIT1,
|
||||
DISASSOC_IMMINENT = BIT2,
|
||||
BSS_TERMINATION_INCLUDED = BIT3,
|
||||
ESS_DISASSOC_IMMINENT = BIT4,
|
||||
};
|
||||
|
||||
struct roam_nb_info {
|
||||
struct nb_rpt_hdr nb_rpt[RTW_MAX_NB_RPT_NUM];
|
||||
struct rtw_ieee80211_channel nb_rpt_ch_list[RTW_MAX_NB_RPT_NUM];
|
||||
struct btm_rpt_cache btm_cache;
|
||||
bool nb_rpt_valid;
|
||||
u8 nb_rpt_ch_list_num;
|
||||
u8 preference_en;
|
||||
u8 roam_target_addr[ETH_ALEN];
|
||||
u32 last_nb_rpt_entries;
|
||||
u8 nb_rpt_is_same;
|
||||
s8 disassoc_waiting;
|
||||
_timer roam_scan_timer;
|
||||
_timer disassoc_chk_timer;
|
||||
|
||||
u32 features;
|
||||
};
|
||||
|
||||
u8 rtw_wnm_btm_reassoc_req(_adapter *padapter);
|
||||
|
||||
void rtw_wnm_roam_scan_hdl(void *ctx);
|
||||
|
||||
void rtw_wnm_disassoc_chk_hdl(void *ctx);
|
||||
|
||||
u8 rtw_wnm_try_btm_roam_imnt(_adapter *padapter);
|
||||
|
||||
void rtw_wnm_process_btm_req(_adapter *padapter, u8* pframe, u32 frame_len);
|
||||
|
||||
void rtw_wnm_reset_btm_candidate(struct roam_nb_info *pnb);
|
||||
|
||||
void rtw_wnm_reset_btm_state(_adapter *padapter);
|
||||
|
||||
u32 rtw_wnm_btm_rsp_candidates_sz_get(
|
||||
_adapter *padapter, u8* pframe, u32 frame_len);
|
||||
|
||||
void rtw_wnm_process_btm_rsp(_adapter *padapter,
|
||||
u8* pframe, u32 frame_len, struct btm_rsp_hdr *prsp);
|
||||
|
||||
void rtw_wnm_issue_btm_req(_adapter *padapter,
|
||||
u8 *pmac, struct btm_req_hdr *phdr, u8 *purl, u32 url_len,
|
||||
u8 *pcandidates, u8 candidate_cnt);
|
||||
|
||||
void rtw_wnm_reset_btm_cache(_adapter *padapter);
|
||||
|
||||
void rtw_wnm_issue_action(_adapter *padapter, u8 action, u8 reason, u8 dialog);
|
||||
|
||||
void rtw_wnm_update_reassoc_req_ie(_adapter *padapter);
|
||||
|
||||
void rtw_roam_nb_info_init(_adapter *padapter);
|
||||
|
||||
u8 rtw_roam_nb_scan_list_set(_adapter *padapter,
|
||||
struct sitesurvey_parm *pparm);
|
||||
|
||||
u32 rtw_wnm_btm_candidates_survey(_adapter *padapter,
|
||||
u8* pframe, u32 elem_len, u8 is_preference);
|
||||
#endif /* __RTW_WNM_H_ */
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#else
|
||||
#define MAX_XMITBUF_SZ (32764)
|
||||
#endif
|
||||
#elif defined(CONFIG_RTL8822B)
|
||||
#define MAX_XMITBUF_SZ (31744) /* ~32k */
|
||||
#else
|
||||
#define MAX_XMITBUF_SZ (20480) /* 20k */
|
||||
#endif
|
||||
@@ -100,6 +98,8 @@
|
||||
#define MAX_CMDBUF_SZ (512 * 18)
|
||||
#elif defined(CONFIG_RTL8723D) && defined(CONFIG_LPS_POFF)
|
||||
#define MAX_CMDBUF_SZ (128*70) /*(8960)*/
|
||||
#elif defined(CONFIG_RTL8822C) && defined(CONFIG_WAR_OFFLOAD)
|
||||
#define MAX_CMDBUF_SZ (128*128) /*(16k) */
|
||||
#else
|
||||
#define MAX_CMDBUF_SZ (5120) /* (4096) */
|
||||
#endif
|
||||
@@ -119,10 +119,16 @@
|
||||
#define BK_QUEUE_INX 3
|
||||
#define BCN_QUEUE_INX 4
|
||||
#define MGT_QUEUE_INX 5
|
||||
#define HIGH_QUEUE_INX 6
|
||||
#define TXCMD_QUEUE_INX 7
|
||||
#define TXCMD_QUEUE_INX 6
|
||||
#define HIGH_QUEUE_INX 7
|
||||
/* keep high queue to be the last one, so we can extend HIQ to port 1, 2, ... */
|
||||
|
||||
#ifndef CONFIG_PORT_BASED_HIQ
|
||||
#define HW_QUEUE_ENTRY 8
|
||||
#else
|
||||
#define HI_QUEUE_INX(n) (HIGH_QUEUE_INX + (n))
|
||||
#define HW_QUEUE_ENTRY (8 + CONFIG_IFACE_NUMBER - 1)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#ifdef CONFIG_TRX_BD_ARCH
|
||||
@@ -168,6 +174,8 @@
|
||||
pattrib_iv[7] = dot11txpn._byte_.TSC5;\
|
||||
} while (0)
|
||||
|
||||
#define GCMP_IV(a, b, c) AES_IV(a, b, c)
|
||||
|
||||
/* Check if AMPDU Tx is supported or not. If it is supported,
|
||||
* it need to check "amsdu in ampdu" is supported or not.
|
||||
* (ampdu_en, amsdu_ampdu_en) =
|
||||
@@ -181,7 +189,11 @@
|
||||
#define IS_AMSDU_AMPDU_VALID(pattrib)\
|
||||
!((pattrib->ampdu_en == _TRUE) && (pattrib->amsdu_ampdu_en == _FALSE))
|
||||
|
||||
#define HWXMIT_ENTRY 4
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
#define HWXMIT_ENTRY 5
|
||||
#else
|
||||
#define HWXMIT_ENTRY 4
|
||||
#endif
|
||||
|
||||
/* For Buffer Descriptor ring architecture */
|
||||
#if defined(BUF_DESC_ARCH) || defined(CONFIG_TRX_BD_ARCH)
|
||||
@@ -198,7 +210,8 @@
|
||||
defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8192E) ||\
|
||||
defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8703B) ||\
|
||||
defined(CONFIG_RTL8188F) || defined(CONFIG_RTL8188GTV) || defined(CONFIG_RTL8723D) ||\
|
||||
defined(CONFIG_RTL8710B) || defined(CONFIG_RTL8192F)
|
||||
defined(CONFIG_RTL8710B) || defined(CONFIG_RTL8192F) ||\
|
||||
defined(CONFIG_RTL8723F)
|
||||
#define TXDESC_SIZE 40
|
||||
#elif defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8822C)
|
||||
#define TXDESC_SIZE 48 /* HALMAC_TX_DESC_SIZE_8822B */
|
||||
@@ -255,7 +268,7 @@ enum TXDESC_SC {
|
||||
#endif
|
||||
#elif defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) || defined(CONFIG_RTL8723B) \
|
||||
|| defined(CONFIG_RTL8188F) || defined(CONFIG_RTL8188GTV) || defined(CONFIG_RTL8723D) \
|
||||
|| defined(CONFIG_RTL8192F)
|
||||
|| defined(CONFIG_RTL8192F) || defined(CONFIG_RTL8723F)
|
||||
#define TXDESC_40_BYTES
|
||||
#endif
|
||||
|
||||
@@ -320,7 +333,7 @@ union txdesc {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define PCI_MAX_TX_QUEUE_COUNT 8 /* == HW_QUEUE_ENTRY */
|
||||
#define PCI_MAX_TX_QUEUE_COUNT HW_QUEUE_ENTRY
|
||||
|
||||
struct rtw_tx_ring {
|
||||
unsigned char qid;
|
||||
@@ -364,54 +377,6 @@ struct hw_xmit {
|
||||
int accnt;
|
||||
};
|
||||
|
||||
#if 0
|
||||
struct pkt_attrib {
|
||||
u8 type;
|
||||
u8 subtype;
|
||||
u8 bswenc;
|
||||
u8 dhcp_pkt;
|
||||
u16 ether_type;
|
||||
int pktlen; /* the original 802.3 pkt raw_data len (not include ether_hdr data) */
|
||||
int pkt_hdrlen; /* the original 802.3 pkt header len */
|
||||
int hdrlen; /* the WLAN Header Len */
|
||||
int nr_frags;
|
||||
int last_txcmdsz;
|
||||
int encrypt; /* when 0 indicate no encrypt. when non-zero, indicate the encrypt algorith */
|
||||
u8 iv[8];
|
||||
int iv_len;
|
||||
u8 icv[8];
|
||||
int icv_len;
|
||||
int priority;
|
||||
int ack_policy;
|
||||
int mac_id;
|
||||
int vcs_mode; /* virtual carrier sense method */
|
||||
|
||||
u8 dst[ETH_ALEN];
|
||||
u8 src[ETH_ALEN];
|
||||
u8 ta[ETH_ALEN];
|
||||
u8 ra[ETH_ALEN];
|
||||
|
||||
u8 key_idx;
|
||||
|
||||
u8 qos_en;
|
||||
u8 ht_en;
|
||||
u8 raid;/* rate adpative id */
|
||||
u8 bwmode;
|
||||
u8 ch_offset;/* PRIME_CHNL_OFFSET */
|
||||
u8 sgi;/* short GI */
|
||||
u8 ampdu_en;/* tx ampdu enable */
|
||||
u8 mdata;/* more data bit */
|
||||
u8 eosp;
|
||||
|
||||
u8 triggered;/* for ap mode handling Power Saving sta */
|
||||
|
||||
u32 qsel;
|
||||
u16 seqnum;
|
||||
|
||||
struct sta_info *psta;
|
||||
};
|
||||
#else
|
||||
/* reduce size */
|
||||
struct pkt_attrib {
|
||||
u8 type;
|
||||
u8 subtype;
|
||||
@@ -426,9 +391,7 @@ struct pkt_attrib {
|
||||
u32 last_txcmdsz;
|
||||
u8 nr_frags;
|
||||
u8 encrypt; /* when 0 indicate no encrypt. when non-zero, indicate the encrypt algorith */
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
u8 bmc_camid;
|
||||
#endif
|
||||
u8 iv_len;
|
||||
u8 icv_len;
|
||||
u8 iv[18];
|
||||
@@ -441,6 +404,9 @@ struct pkt_attrib {
|
||||
u8 src[ETH_ALEN];
|
||||
u8 ta[ETH_ALEN];
|
||||
u8 ra[ETH_ALEN];
|
||||
#ifdef CONFIG_RTW_WDS
|
||||
u8 wds;
|
||||
#endif
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
u8 mda[ETH_ALEN]; /* mesh da */
|
||||
u8 msa[ETH_ALEN]; /* mesh sa */
|
||||
@@ -512,7 +478,15 @@ struct pkt_attrib {
|
||||
u8 bf_pkt_type;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
u8 ps_dontq; /* 1: this frame can't be queued at PS state */
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RTW_WDS
|
||||
#define XATTRIB_GET_WDS(xattrib) ((xattrib)->wds)
|
||||
#else
|
||||
#define XATTRIB_GET_WDS(xattrib) 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
@@ -651,6 +625,7 @@ struct xmit_frame {
|
||||
|
||||
struct pkt_attrib attrib;
|
||||
|
||||
u16 os_qid;
|
||||
_pkt *pkt;
|
||||
|
||||
int frame_tag;
|
||||
@@ -700,6 +675,10 @@ struct sta_xmit_priv {
|
||||
struct tx_servq bk_q; /* priority == 1,2 */
|
||||
struct tx_servq vi_q; /* priority == 4,5 */
|
||||
struct tx_servq vo_q; /* priority == 6,7 */
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
struct tx_servq mgmt_q;
|
||||
#endif
|
||||
|
||||
_list legacy_dz;
|
||||
_list apsd;
|
||||
|
||||
@@ -748,7 +727,7 @@ struct xmit_priv {
|
||||
_queue bk_pending;
|
||||
_queue vi_pending;
|
||||
_queue vo_pending;
|
||||
_queue bm_pending;
|
||||
_queue mgmt_pending;
|
||||
|
||||
/* _queue legacy_dz_queue; */
|
||||
/* _queue apsd_queue; */
|
||||
@@ -855,6 +834,9 @@ struct xmit_priv {
|
||||
_mutex ack_tx_mutex;
|
||||
struct submit_ctx ack_tx_ops;
|
||||
u8 seq_no;
|
||||
#ifdef CONFIG_REMOVE_DUP_TX_STATE
|
||||
u8 retry_count;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_AMSDU
|
||||
@@ -881,6 +863,9 @@ struct xmit_priv {
|
||||
#endif
|
||||
#ifdef CONFIG_PCI_TX_POLLING
|
||||
_timer tx_poll_timer;
|
||||
#endif
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
_queue rpkt_queue;
|
||||
#endif
|
||||
_lock lock_sctx;
|
||||
|
||||
@@ -945,13 +930,20 @@ extern void rtw_update_protection(_adapter *padapter, u8 *ie, uint ie_len);
|
||||
extern s32 rtw_make_wlanhdr(_adapter *padapter, u8 *hdr, struct pkt_attrib *pattrib);
|
||||
extern s32 rtw_put_snap(u8 *data, u16 h_proto);
|
||||
|
||||
extern struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv);
|
||||
extern struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv, u16 os_qid);
|
||||
struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv);
|
||||
struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv);
|
||||
extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe);
|
||||
extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue);
|
||||
struct tx_servq *rtw_get_sta_pending(_adapter *padapter, struct sta_info *psta, sint up, u8 *ac);
|
||||
extern s32 rtw_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
void rtw_free_mgmt_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *mgmt_queue);
|
||||
u8 rtw_mgmt_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
struct xmit_frame *rtw_dequeue_mgmt_xframe(struct xmit_priv *pxmitpriv);
|
||||
#endif /* CONFIG_RTW_MGMT_QUEUE */
|
||||
|
||||
extern struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry);
|
||||
|
||||
extern s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
@@ -988,9 +980,12 @@ void rtw_xmit_dequeue_callback(_workitem *work);
|
||||
void rtw_xmit_queue_set(struct sta_info *sta);
|
||||
void rtw_xmit_queue_clear(struct sta_info *sta);
|
||||
s32 rtw_xmit_posthandle(_adapter *padapter, struct xmit_frame *pxmitframe, _pkt *pkt);
|
||||
s32 rtw_xmit(_adapter *padapter, _pkt **pkt);
|
||||
s32 rtw_xmit(_adapter *padapter, _pkt **pkt, u16 os_qid);
|
||||
bool xmitframe_hiq_filter(struct xmit_frame *xmitframe);
|
||||
#if defined(CONFIG_AP_MODE) || defined(CONFIG_TDLS)
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
u8 mgmt_xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
#endif
|
||||
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void stop_sta_xmit(_adapter *padapter, struct sta_info *psta);
|
||||
void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta);
|
||||
@@ -1002,8 +997,10 @@ u8 rtw_get_tx_bw_mode(_adapter *adapter, struct sta_info *sta);
|
||||
void rtw_update_tx_rate_bmp(struct dvobj_priv *dvobj);
|
||||
u8 rtw_get_tx_bw_bmp_of_ht_rate(struct dvobj_priv *dvobj, u8 rate, u8 max_bw);
|
||||
u8 rtw_get_tx_bw_bmp_of_vht_rate(struct dvobj_priv *dvobj, u8 rate, u8 max_bw);
|
||||
s16 rtw_adapter_get_oper_txpwr_max_mbm(_adapter *adapter);
|
||||
s16 rtw_get_oper_txpwr_max_mbm(struct dvobj_priv *dvobj);
|
||||
s16 rtw_adapter_get_oper_txpwr_max_mbm(_adapter *adapter, bool eirp);
|
||||
s16 rtw_rfctl_get_oper_txpwr_max_mbm(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset, u8 ifbmp_mod, u8 if_op, bool eirp);
|
||||
s16 rtw_get_oper_txpwr_max_mbm(struct dvobj_priv *dvobj, bool erip);
|
||||
s16 rtw_rfctl_get_reg_max_txpwr_mbm(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset, bool eirp);
|
||||
|
||||
u8 query_ra_short_GI(struct sta_info *psta, u8 bw);
|
||||
|
||||
|
||||
@@ -73,7 +73,8 @@ void ClearInterrupt8821AS(PADAPTER padapter);
|
||||
#endif /* CONFIG_RTL8821A */
|
||||
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
#if defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8822C)
|
||||
#if defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8822C) \
|
||||
|| defined(CONFIG_RTL8723F)
|
||||
u8 rtw_hal_enable_cpwm2(_adapter *adapter);
|
||||
#endif
|
||||
extern u8 RecvOnePkt(PADAPTER padapter);
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
#define NUM_STA MACID_NUM_SW_LIMIT
|
||||
|
||||
#ifndef CONFIG_RTW_MACADDR_ACL
|
||||
#ifdef CONFIG_AP_MODE
|
||||
#define CONFIG_RTW_MACADDR_ACL 1
|
||||
#else
|
||||
#define CONFIG_RTW_MACADDR_ACL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_RTW_PRE_LINK_STA
|
||||
@@ -278,6 +282,10 @@ struct sta_info {
|
||||
#endif
|
||||
_queue sleep_q;
|
||||
unsigned int sleepq_len;
|
||||
#ifdef CONFIG_RTW_MGMT_QUEUE
|
||||
_queue mgmt_sleep_q;
|
||||
unsigned int mgmt_sleepq_len;
|
||||
#endif
|
||||
|
||||
uint state;
|
||||
uint qos_option;
|
||||
@@ -288,6 +296,7 @@ struct sta_info {
|
||||
u8 rm_diag_token;
|
||||
#endif /* CONFIG_RTW_80211K */
|
||||
|
||||
systime resp_nonenc_eapol_key_starttime;
|
||||
uint ieee8021x_blocked; /* 0: allowed, 1:blocked */
|
||||
uint dot118021XPrivacy; /* aes, tkip... */
|
||||
union Keytype dot11tkiptxmickey;
|
||||
@@ -295,6 +304,7 @@ struct sta_info {
|
||||
union Keytype dot118021x_UncstKey;
|
||||
union pn48 dot11txpn; /* PN48 used for Unicast xmit */
|
||||
union pn48 dot11rxpn; /* PN48 used for Unicast recv. */
|
||||
ATOMIC_T keytrack;
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
/* peer's GTK, RX only */
|
||||
u8 group_privacy;
|
||||
@@ -303,6 +313,7 @@ struct sta_info {
|
||||
union pn48 gtk_pn;
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
/* peer's IGTK, RX only */
|
||||
enum security_type dot11wCipher;
|
||||
u8 igtk_bmp;
|
||||
u8 igtk_id;
|
||||
union Keytype igtk;
|
||||
@@ -382,6 +393,10 @@ struct sta_info {
|
||||
|
||||
unsigned int expire_to;
|
||||
|
||||
int flags;
|
||||
|
||||
u8 bpairwise_key_installed;
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
_list asoc_list;
|
||||
@@ -392,7 +407,6 @@ struct sta_info {
|
||||
unsigned char chg_txt[128];
|
||||
|
||||
u16 capability;
|
||||
int flags;
|
||||
|
||||
int dot8021xalg;/* 0:disable, 1:psk, 2:802.1x */
|
||||
int wpa_psk;/* 0:disable, bit(0): WPA, bit(1):WPA2 */
|
||||
@@ -403,7 +417,6 @@ struct sta_info {
|
||||
|
||||
u32 akm_suite_type;
|
||||
|
||||
u8 bpairwise_key_installed;
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
u8 ft_pairwise_key_installed;
|
||||
#endif
|
||||
@@ -456,9 +469,9 @@ struct sta_info {
|
||||
u8 op_wfd_mode;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
#if !defined(CONFIG_ACTIVE_KEEP_ALIVE_CHECK) && defined(CONFIG_80211N_HT)
|
||||
u8 under_exist_checking;
|
||||
#endif /* CONFIG_TX_MCAST2UNI */
|
||||
#endif
|
||||
|
||||
u8 keep_alive_trycnt;
|
||||
|
||||
@@ -504,6 +517,11 @@ struct sta_info {
|
||||
bool vendor_8812;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
u8 tbtx_enable; /* Does this sta_info support & enable TBTX function? */
|
||||
// u8 tbtx_timeslot; /* This sta_info belong to which time slot. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Vaiables for queuing TX pkt a short period of time
|
||||
* to wait something ready.
|
||||
@@ -693,7 +711,12 @@ struct sta_priv {
|
||||
#if CONFIG_RTW_PRE_LINK_STA
|
||||
struct pre_link_sta_ctl_t pre_link_sta_ctl;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_TOKEN_BASED_XMIT
|
||||
u8 tbtx_asoc_list_cnt;
|
||||
struct sta_info *token_holder[NR_MAXSTA_INSLOT];
|
||||
struct sta_info *last_token_holder;
|
||||
ATOMIC_T nr_token_keeper;
|
||||
#endif
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
|
||||
#ifdef CONFIG_ATMEL_RC_PATCH
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user