mirror of
https://github.com/MiSTer-devel/Linux-Kernel_MiSTer.git
synced 2026-05-17 03:03:57 +00:00
rtl8188fu Driver update
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
|
||||
EXTRA_CFLAGS += -O1 -Wno-vla
|
||||
EXTRA_CFLAGS += -O1
|
||||
#EXTRA_CFLAGS += -O3
|
||||
#EXTRA_CFLAGS += -Wall
|
||||
#EXTRA_CFLAGS += -Wextra
|
||||
EXTRA_CFLAGS += -Wno-error
|
||||
#EXTRA_CFLAGS += -Werror
|
||||
#EXTRA_CFLAGS += -pedantic
|
||||
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
|
||||
|
||||
@@ -17,8 +17,8 @@ EXTRA_CFLAGS += -Wno-unused
|
||||
#EXTRA_CFLAGS += -Wno-uninitialized
|
||||
#EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later
|
||||
|
||||
EXTRA_CFLAGS += -I$(srctree)/$(src)/include
|
||||
EXTRA_CFLAGS += -I$(srctree)/$(src)/hal/phydm
|
||||
EXTRA_CFLAGS += -I$(src)/include
|
||||
EXTRA_CFLAGS += -I$(src)/hal/phydm
|
||||
|
||||
EXTRA_LDFLAGS += --strip-debug
|
||||
|
||||
@@ -41,13 +41,11 @@ CONFIG_POWER_SAVING = y
|
||||
CONFIG_USB_AUTOSUSPEND = n
|
||||
CONFIG_HW_PWRP_DETECTION = n
|
||||
CONFIG_WIFI_TEST = n
|
||||
CONFIG_BT_COEXIST = n
|
||||
CONFIG_INTEL_WIDI = n
|
||||
CONFIG_WAPI_SUPPORT = n
|
||||
CONFIG_EFUSE_CONFIG_FILE = n
|
||||
CONFIG_EXT_CLK = n
|
||||
CONFIG_TRAFFIC_PROTECT = y
|
||||
CONFIG_LOAD_PHY_PARA_FROM_FILE = y
|
||||
CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY = n
|
||||
CONFIG_CALIBRATE_TX_POWER_TO_MAX = y
|
||||
CONFIG_RTW_ADAPTIVITY_EN = disable
|
||||
@@ -132,19 +130,13 @@ _OS_INTFS_FILES := os_dep/osdep_service.o \
|
||||
os_dep/linux/mlme_linux.o \
|
||||
os_dep/linux/recv_linux.o \
|
||||
os_dep/linux/ioctl_cfg80211.o \
|
||||
os_dep/linux/wifi_regd.o \
|
||||
os_dep/linux/rtw_proc.o
|
||||
|
||||
ifeq ($(CONFIG_MP_INCLUDED), y)
|
||||
_OS_INTFS_FILES += os_dep/linux/ioctl_mp.o
|
||||
endif
|
||||
os_dep/linux/wifi_regd.o
|
||||
|
||||
_HAL_INTFS_FILES := hal/hal_intf.o \
|
||||
hal/hal_com.o \
|
||||
hal/hal_com_phycfg.o \
|
||||
hal/hal_phy.o \
|
||||
hal/hal_dm.o \
|
||||
hal/hal_btcoex.o \
|
||||
hal/hal_mp.o \
|
||||
hal/hal_hci/hal_usb.o \
|
||||
hal/led/hal_usb_led.o
|
||||
@@ -172,21 +164,6 @@ _OUTSRC_FILES := hal/phydm/phydm_debug.o \
|
||||
hal/phydm/txbf/halcomtxbf.o\
|
||||
hal/phydm/txbf/haltxbfinterface.o
|
||||
|
||||
ifeq ($(CONFIG_BT_COEXIST), y)
|
||||
EXTRA_CFLAGS += -I$(srctree)/$(src)/hal/btc
|
||||
_OUTSRC_FILES += hal/btc/HalBtc8192e1Ant.o \
|
||||
hal/btc/HalBtc8192e2Ant.o \
|
||||
hal/btc/HalBtc8723b1Ant.o \
|
||||
hal/btc/HalBtc8723b2Ant.o \
|
||||
hal/btc/HalBtc8812a1Ant.o \
|
||||
hal/btc/HalBtc8812a2Ant.o \
|
||||
hal/btc/HalBtc8821a1Ant.o \
|
||||
hal/btc/HalBtc8821a2Ant.o \
|
||||
hal/btc/HalBtc8821aCsr2Ant.o \
|
||||
hal/btc/HalBtc8703b1Ant.o \
|
||||
hal/btc/HalBtc8703b2Ant.o
|
||||
endif
|
||||
|
||||
########### HAL_RTL8188F #################################
|
||||
ifeq ($(CONFIG_RTL8188F), y)
|
||||
|
||||
@@ -256,10 +233,6 @@ ifeq ($(CONFIG_WIFI_TEST), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_WIFI_TEST
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BT_COEXIST), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INTEL_WIDI), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
|
||||
endif
|
||||
@@ -302,13 +275,6 @@ ifeq ($(CONFIG_TRAFFIC_PROTECT), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LOAD_PHY_PARA_FROM_FILE), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
#EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH_WITH_IC_NAME_FOLDER
|
||||
#EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"/lib/firmware/\"
|
||||
EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"\"
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_CALIBRATE_TX_POWER_BY_REGULATORY
|
||||
endif
|
||||
@@ -395,13 +361,13 @@ else
|
||||
EXTRA_CFLAGS += -mfloat-abi=hard
|
||||
endif
|
||||
endif
|
||||
|
||||
## ULLI set DM_ODM_SUPPORT_TYPE to ODM_CE
|
||||
EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/armv6l/arm/)
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
|
||||
ARCH ?= $(SUBARCH)
|
||||
CROSS_COMPILE ?=
|
||||
KVER := $(shell uname -r)
|
||||
@@ -434,7 +400,6 @@ rtk_core := core/rtw_cmd.o \
|
||||
core/rtw_br_ext.o \
|
||||
core/rtw_iol.o \
|
||||
core/rtw_sreset.o \
|
||||
core/rtw_btcoex.o \
|
||||
core/rtw_beamforming.o \
|
||||
core/rtw_odm.o \
|
||||
core/efuse/rtw_efuse.o
|
||||
@@ -506,3 +471,4 @@ clean:
|
||||
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
|
||||
rm -fr .tmp_versions
|
||||
endif
|
||||
|
||||
|
||||
@@ -1481,11 +1481,7 @@ EFUSE_ShadowWrite(
|
||||
IN u16 Offset,
|
||||
IN OUT u32 Value)
|
||||
{
|
||||
#if (MP_DRIVER == 0)
|
||||
return;
|
||||
#endif
|
||||
if ( pAdapter->registrypriv.mp_mode == 0)
|
||||
return;
|
||||
|
||||
|
||||
if (Type == 1)
|
||||
@@ -1590,9 +1586,7 @@ int storeAdaptorInfoFile(char *path, u8* efuse_data)
|
||||
int retriveAdaptorInfoFile(char *path, u8* efuse_data)
|
||||
{
|
||||
int ret = _SUCCESS;
|
||||
#ifdef set_fs
|
||||
mm_segment_t oldfs;
|
||||
#endif
|
||||
struct file *fp;
|
||||
|
||||
if(path && efuse_data) {
|
||||
@@ -1628,9 +1622,7 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf)
|
||||
u32 ret = _FAIL;
|
||||
|
||||
struct file *fp;
|
||||
#ifdef set_fs
|
||||
mm_segment_t fs;
|
||||
#endif
|
||||
loff_t pos = 0;
|
||||
|
||||
fp = filp_open(path, O_RDONLY, 0);
|
||||
@@ -1647,10 +1639,8 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf)
|
||||
|
||||
temp[2] = 0; /* add end of string '\0' */
|
||||
|
||||
#ifdef set_fs
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
|
||||
for (i = 0 ; i < HWSET_MAX_SIZE ; i++) {
|
||||
vfs_read(fp, temp, 2, &pos);
|
||||
@@ -1696,9 +1686,7 @@ exit:
|
||||
u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
|
||||
{
|
||||
struct file *fp;
|
||||
#ifdef set_fs
|
||||
mm_segment_t fs;
|
||||
#endif
|
||||
loff_t pos = 0;
|
||||
|
||||
u8 source_addr[18];
|
||||
@@ -1720,10 +1708,8 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef set_fs
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
|
||||
vfs_read(fp, source_addr, 18, &pos);
|
||||
source_addr[17] = ':';
|
||||
|
||||
@@ -3894,10 +3894,6 @@ void stop_ap_mode(_adapter *padapter)
|
||||
|
||||
rtw_free_mlme_priv_ie_data(pmlmepriv);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_MediaStatusNotify(padapter, 0); //disconnect
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif //CONFIG_NATIVEAP_MLME
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/if_arp.h>
|
||||
#include <net/ip.h>
|
||||
#include <linux/atalk.h>
|
||||
#include <linux/udp.h>
|
||||
#include <linux/if_pppox.h>
|
||||
#endif
|
||||
@@ -72,29 +71,6 @@
|
||||
#define MAGIC_CODE_LEN 2
|
||||
#define WAIT_TIME_PPPOE 5 // waiting time for pppoe server in sec
|
||||
|
||||
#define IPX_NODE_LEN 6
|
||||
struct ipx_address {
|
||||
__be32 net;
|
||||
__u8 node[IPX_NODE_LEN];
|
||||
__be16 sock;
|
||||
};
|
||||
|
||||
struct ipxhdr {
|
||||
__be16 ipx_checksum __packed;
|
||||
#define IPX_NO_CHECKSUM cpu_to_be16(0xFFFF)
|
||||
__be16 ipx_pktsize __packed;
|
||||
__u8 ipx_tctrl;
|
||||
__u8 ipx_type;
|
||||
#define IPX_TYPE_UNKNOWN 0x00
|
||||
#define IPX_TYPE_RIP 0x01 /* may also be 0 */
|
||||
#define IPX_TYPE_SAP 0x04 /* may also be 0 */
|
||||
#define IPX_TYPE_SPX 0x05 /* SPX protocol */
|
||||
#define IPX_TYPE_NCP 0x11 /* $lots for docs on this (SPIT) */
|
||||
#define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast */
|
||||
struct ipx_address ipx_dest __packed;
|
||||
struct ipx_address ipx_source __packed;
|
||||
};
|
||||
|
||||
/*-----------------------------------------------------------------
|
||||
How database records network address:
|
||||
0 1 2 3 4 5 6 7 8 9 10
|
||||
@@ -953,267 +929,6 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
/* Handle IPX and Apple Talk frame */
|
||||
/*---------------------------------------------------*/
|
||||
else if((protocol == __constant_htons(ETH_P_IPX)) ||
|
||||
(protocol == __constant_htons(ETH_P_ATALK)) ||
|
||||
(protocol == __constant_htons(ETH_P_AARP)))
|
||||
{
|
||||
unsigned char ipx_header[2] = {0xFF, 0xFF};
|
||||
struct ipxhdr *ipx = NULL;
|
||||
struct elapaarp *ea = NULL;
|
||||
struct ddpehdr *ddp = NULL;
|
||||
unsigned char *framePtr = skb->data + ETH_HLEN;
|
||||
|
||||
if(protocol == __constant_htons(ETH_P_IPX))
|
||||
{
|
||||
DBG_871X("NAT25: Protocol=IPX (Ethernet II)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else //if(protocol <= __constant_htons(ETH_FRAME_LEN))
|
||||
{
|
||||
if(!memcmp(ipx_header, framePtr, 2))
|
||||
{
|
||||
DBG_871X("NAT25: Protocol=IPX (Ethernet 802.3)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned char ipx_8022_type = 0xE0;
|
||||
unsigned char snap_8022_type = 0xAA;
|
||||
|
||||
if(*framePtr == snap_8022_type)
|
||||
{
|
||||
unsigned char ipx_snap_id[5] = {0x0, 0x0, 0x0, 0x81, 0x37}; // IPX SNAP ID
|
||||
unsigned char aarp_snap_id[5] = {0x00, 0x00, 0x00, 0x80, 0xF3}; // Apple Talk AARP SNAP ID
|
||||
unsigned char ddp_snap_id[5] = {0x08, 0x00, 0x07, 0x80, 0x9B}; // Apple Talk DDP SNAP ID
|
||||
|
||||
framePtr += 3; // eliminate the 802.2 header
|
||||
|
||||
if(!memcmp(ipx_snap_id, framePtr, 5))
|
||||
{
|
||||
framePtr += 5; // eliminate the SNAP header
|
||||
|
||||
DBG_871X("NAT25: Protocol=IPX (Ethernet SNAP)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else if(!memcmp(aarp_snap_id, framePtr, 5))
|
||||
{
|
||||
framePtr += 5; // eliminate the SNAP header
|
||||
|
||||
ea = (struct elapaarp *)framePtr;
|
||||
}
|
||||
else if(!memcmp(ddp_snap_id, framePtr, 5))
|
||||
{
|
||||
framePtr += 5; // eliminate the SNAP header
|
||||
|
||||
ddp = (struct ddpehdr *)framePtr;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_WARN("NAT25: Protocol=Ethernet SNAP %02x%02x%02x%02x%02x\n", framePtr[0],
|
||||
framePtr[1], framePtr[2], framePtr[3], framePtr[4]);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if(*framePtr == ipx_8022_type)
|
||||
{
|
||||
framePtr += 3; // eliminate the 802.2 header
|
||||
|
||||
if(!memcmp(ipx_header, framePtr, 2))
|
||||
{
|
||||
DBG_871X("NAT25: Protocol=IPX (Ethernet 802.2)\n");
|
||||
ipx = (struct ipxhdr *)framePtr;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* IPX */
|
||||
if(ipx != NULL)
|
||||
{
|
||||
switch(method)
|
||||
{
|
||||
case NAT25_CHECK:
|
||||
if(!memcmp(skb->data+ETH_ALEN, ipx->ipx_source.node, ETH_ALEN))
|
||||
{
|
||||
DBG_871X("NAT25: Check IPX skb_copy\n");
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
DBG_871X("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
|
||||
ipx->ipx_dest.net,
|
||||
ipx->ipx_dest.node[0],
|
||||
ipx->ipx_dest.node[1],
|
||||
ipx->ipx_dest.node[2],
|
||||
ipx->ipx_dest.node[3],
|
||||
ipx->ipx_dest.node[4],
|
||||
ipx->ipx_dest.node[5],
|
||||
ipx->ipx_dest.sock,
|
||||
ipx->ipx_source.net,
|
||||
ipx->ipx_source.node[0],
|
||||
ipx->ipx_source.node[1],
|
||||
ipx->ipx_source.node[2],
|
||||
ipx->ipx_source.node[3],
|
||||
ipx->ipx_source.node[4],
|
||||
ipx->ipx_source.node[5],
|
||||
ipx->ipx_source.sock);
|
||||
|
||||
if(!memcmp(skb->data+ETH_ALEN, ipx->ipx_source.node, ETH_ALEN))
|
||||
{
|
||||
DBG_871X("NAT25: Use IPX Net, and Socket as network addr\n");
|
||||
|
||||
__nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
|
||||
|
||||
// change IPX source node addr to wlan STA address
|
||||
memcpy(ipx->ipx_source.node, GET_MY_HWADDR(priv), ETH_ALEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
__nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
|
||||
}
|
||||
|
||||
__nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
|
||||
|
||||
__nat25_db_print(priv);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
if(!memcmp(GET_MY_HWADDR(priv), ipx->ipx_dest.node, ETH_ALEN))
|
||||
{
|
||||
DBG_871X("NAT25: Lookup IPX, Modify Destination IPX Node addr\n");
|
||||
|
||||
__nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
|
||||
|
||||
__nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
|
||||
|
||||
// replace IPX destination node addr with Lookup destination MAC addr
|
||||
memcpy(ipx->ipx_dest.node, skb->data, ETH_ALEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
__nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
|
||||
|
||||
__nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* AARP */
|
||||
else if(ea != NULL)
|
||||
{
|
||||
/* Sanity check fields. */
|
||||
if(ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN)
|
||||
{
|
||||
DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch(method)
|
||||
{
|
||||
case NAT25_CHECK:
|
||||
return 0;
|
||||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
// change to AARP source mac address to wlan STA address
|
||||
memcpy(ea->hw_src, GET_MY_HWADDR(priv), ETH_ALEN);
|
||||
|
||||
DBG_871X("NAT25: Insert AARP, Source=%d,%d Destination=%d,%d\n",
|
||||
ea->pa_src_net,
|
||||
ea->pa_src_node,
|
||||
ea->pa_dst_net,
|
||||
ea->pa_dst_node);
|
||||
|
||||
__nat25_generate_apple_network_addr(networkAddr, &ea->pa_src_net, &ea->pa_src_node);
|
||||
|
||||
__nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
|
||||
|
||||
__nat25_db_print(priv);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
DBG_871X("NAT25: Lookup AARP, Source=%d,%d Destination=%d,%d\n",
|
||||
ea->pa_src_net,
|
||||
ea->pa_src_node,
|
||||
ea->pa_dst_net,
|
||||
ea->pa_dst_node);
|
||||
|
||||
__nat25_generate_apple_network_addr(networkAddr, &ea->pa_dst_net, &ea->pa_dst_node);
|
||||
|
||||
__nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
|
||||
|
||||
// change to AARP destination mac address to Lookup result
|
||||
memcpy(ea->hw_dst, skb->data, ETH_ALEN);
|
||||
}
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* DDP */
|
||||
else if(ddp != NULL)
|
||||
{
|
||||
switch(method)
|
||||
{
|
||||
case NAT25_CHECK:
|
||||
return -1;
|
||||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
DBG_871X("NAT25: Insert DDP, Source=%d,%d Destination=%d,%d\n",
|
||||
ddp->deh_snet,
|
||||
ddp->deh_snode,
|
||||
ddp->deh_dnet,
|
||||
ddp->deh_dnode);
|
||||
|
||||
__nat25_generate_apple_network_addr(networkAddr, &ddp->deh_snet, &ddp->deh_snode);
|
||||
|
||||
__nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
|
||||
|
||||
__nat25_db_print(priv);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
DBG_871X("NAT25: Lookup DDP, Source=%d,%d Destination=%d,%d\n",
|
||||
ddp->deh_snet,
|
||||
ddp->deh_snode,
|
||||
ddp->deh_dnet,
|
||||
ddp->deh_dnode);
|
||||
|
||||
__nat25_generate_apple_network_addr(networkAddr, &ddp->deh_dnet, &ddp->deh_dnode);
|
||||
|
||||
__nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
|
||||
}
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
/* Handle PPPoE frame */
|
||||
/*---------------------------------------------------*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1287,10 +1287,6 @@ void rtw_getbbrfreg_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd)
|
||||
rtw_mfree((unsigned char*) pcmd->parmbuf, pcmd->cmdsz);
|
||||
rtw_mfree((unsigned char*) pcmd, sizeof(struct cmd_obj));
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted= _TRUE;
|
||||
#endif
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
@@ -1301,10 +1297,6 @@ void rtw_readtssi_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd)
|
||||
rtw_mfree((unsigned char*) pcmd->parmbuf, pcmd->cmdsz);
|
||||
rtw_mfree((unsigned char*) pcmd, sizeof(struct cmd_obj));
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted= _TRUE;
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
}
|
||||
@@ -2545,12 +2537,6 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
||||
|
||||
RT_LINK_DETECT_T * link_detect = &pmlmepriv->LinkDetectInfo;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (padapter->registrypriv.wifi_spec != 1) {
|
||||
BusyThresholdHigh = 25;
|
||||
BusyThresholdLow = 10;
|
||||
} else
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
{
|
||||
BusyThresholdHigh = 100;
|
||||
BusyThresholdLow = 75;
|
||||
@@ -2809,14 +2795,6 @@ void dynamic_chk_wk_hdl(_adapter *padapter)
|
||||
|
||||
//check_hw_pbc(padapter, pdrvextra_cmd->pbuf, pdrvextra_cmd->type);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
//
|
||||
// BT-Coexist
|
||||
//
|
||||
rtw_btcoex_Handler(padapter);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_IPS_CHECK_IN_WD
|
||||
//always call rtw_ps_processor() at last one.
|
||||
if (is_primary_adapter(padapter))
|
||||
@@ -2845,9 +2823,6 @@ _func_enter_;
|
||||
{
|
||||
case LPS_CTRL_SCAN:
|
||||
//DBG_871X("LPS_CTRL_SCAN \n");
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_ScanNotify(padapter, _TRUE);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
{
|
||||
// connect
|
||||
@@ -2864,25 +2839,16 @@ _func_enter_;
|
||||
// Reset LPS Setting
|
||||
pwrpriv->LpsIdleCount = 0;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_JOINBSSRPT, (u8 *)(&mstatus));
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_MediaStatusNotify(padapter, mstatus);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
break;
|
||||
case LPS_CTRL_DISCONNECT:
|
||||
//DBG_871X("LPS_CTRL_DISCONNECT \n");
|
||||
mstatus = 0;//disconnect
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_MediaStatusNotify(padapter, mstatus);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
LPS_Leave(padapter, "LPS_CTRL_DISCONNECT");
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_JOINBSSRPT, (u8 *)(&mstatus));
|
||||
break;
|
||||
case LPS_CTRL_SPECIAL_PACKET:
|
||||
//DBG_871X("LPS_CTRL_SPECIAL_PACKET \n");
|
||||
pwrpriv->DelayLPSLastTimeStamp = rtw_get_current_time();
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_SpecialPacketNotify(padapter, PACKET_DHCP);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
LPS_Leave(padapter, "LPS_CTRL_SPECIAL_PACKET");
|
||||
break;
|
||||
case LPS_CTRL_LEAVE:
|
||||
@@ -3008,10 +2974,6 @@ void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim)
|
||||
if(dtim <=0 || dtim > 16)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
@@ -3683,160 +3645,6 @@ apply:
|
||||
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
struct btinfo {
|
||||
u8 cid;
|
||||
u8 len;
|
||||
|
||||
u8 bConnection:1;
|
||||
u8 bSCOeSCO:1;
|
||||
u8 bInQPage:1;
|
||||
u8 bACLBusy:1;
|
||||
u8 bSCOBusy:1;
|
||||
u8 bHID:1;
|
||||
u8 bA2DP:1;
|
||||
u8 bFTP:1;
|
||||
|
||||
u8 retry_cnt:4;
|
||||
u8 rsvd_34:1;
|
||||
u8 rsvd_35:1;
|
||||
u8 rsvd_36:1;
|
||||
u8 rsvd_37:1;
|
||||
|
||||
u8 rssi;
|
||||
|
||||
u8 rsvd_50:1;
|
||||
u8 rsvd_51:1;
|
||||
u8 rsvd_52:1;
|
||||
u8 rsvd_53:1;
|
||||
u8 rsvd_54:1;
|
||||
u8 rsvd_55:1;
|
||||
u8 eSCO_SCO:1;
|
||||
u8 Master_Slave:1;
|
||||
|
||||
u8 rsvd_6;
|
||||
u8 rsvd_7;
|
||||
};
|
||||
|
||||
void btinfo_evt_dump(void *sel, void *buf)
|
||||
{
|
||||
struct btinfo *info = (struct btinfo *)buf;
|
||||
|
||||
DBG_871X_SEL_NL(sel, "cid:0x%02x, len:%u\n", info->cid, info->len);
|
||||
|
||||
if (info->len > 2)
|
||||
DBG_871X_SEL_NL(sel, "byte2:%s%s%s%s%s%s%s%s\n"
|
||||
, info->bConnection?"bConnection ":""
|
||||
, info->bSCOeSCO?"bSCOeSCO ":""
|
||||
, info->bInQPage?"bInQPage ":""
|
||||
, info->bACLBusy?"bACLBusy ":""
|
||||
, info->bSCOBusy?"bSCOBusy ":""
|
||||
, info->bHID?"bHID ":""
|
||||
, info->bA2DP?"bA2DP ":""
|
||||
, info->bFTP?"bFTP":""
|
||||
);
|
||||
|
||||
if (info->len > 3)
|
||||
DBG_871X_SEL_NL(sel, "retry_cnt:%u\n", info->retry_cnt);
|
||||
|
||||
if (info->len > 4)
|
||||
DBG_871X_SEL_NL(sel, "rssi:%u\n", info->rssi);
|
||||
|
||||
if (info->len > 5)
|
||||
DBG_871X_SEL_NL(sel, "byte5:%s%s\n"
|
||||
, info->eSCO_SCO?"eSCO_SCO ":""
|
||||
, info->Master_Slave?"Master_Slave ":""
|
||||
);
|
||||
}
|
||||
|
||||
static void rtw_btinfo_hdl(_adapter *adapter, u8 *buf, u16 buf_len)
|
||||
{
|
||||
#define BTINFO_WIFI_FETCH 0x23
|
||||
#define BTINFO_BT_AUTO_RPT 0x27
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
struct btinfo_8761ATV *info = (struct btinfo_8761ATV *)buf;
|
||||
#else //!CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
struct btinfo *info = (struct btinfo *)buf;
|
||||
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
u8 cmd_idx;
|
||||
u8 len;
|
||||
|
||||
cmd_idx = info->cid;
|
||||
|
||||
if (info->len > buf_len-2) {
|
||||
rtw_warn_on(1);
|
||||
len = buf_len-2;
|
||||
} else {
|
||||
len = info->len;
|
||||
}
|
||||
|
||||
//#define DBG_PROC_SET_BTINFO_EVT
|
||||
#ifdef DBG_PROC_SET_BTINFO_EVT
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
DBG_871X("%s: btinfo[0]=%x,btinfo[1]=%x,btinfo[2]=%x,btinfo[3]=%x btinfo[4]=%x,btinfo[5]=%x,btinfo[6]=%x,btinfo[7]=%x\n"
|
||||
, __func__, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
|
||||
#else//!CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
btinfo_evt_dump(RTW_DBGDUMP, info);
|
||||
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
#endif // DBG_PROC_SET_BTINFO_EVT
|
||||
|
||||
/* transform BT-FW btinfo to WiFI-FW C2H format and notify */
|
||||
if (cmd_idx == BTINFO_WIFI_FETCH)
|
||||
buf[1] = 0;
|
||||
else if (cmd_idx == BTINFO_BT_AUTO_RPT)
|
||||
buf[1] = 2;
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
else if(0x01 == cmd_idx || 0x02 == cmd_idx)
|
||||
buf[1] = buf[0];
|
||||
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
rtw_btcoex_BtInfoNotify(adapter ,len+1, &buf[1]);
|
||||
}
|
||||
|
||||
u8 rtw_btinfo_cmd(_adapter *adapter, u8 *buf, u16 len)
|
||||
{
|
||||
struct cmd_obj *ph2c;
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
|
||||
u8 *btinfo;
|
||||
struct cmd_priv *pcmdpriv = &adapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((u8*)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
btinfo = rtw_zmalloc(len);
|
||||
if (btinfo == NULL) {
|
||||
rtw_mfree((u8*)ph2c, sizeof(struct cmd_obj));
|
||||
rtw_mfree((u8*)pdrvextra_cmd_parm, sizeof(struct drvextra_cmd_parm));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm->ec_id = BTINFO_WK_CID;
|
||||
pdrvextra_cmd_parm->type = 0;
|
||||
pdrvextra_cmd_parm->size = len;
|
||||
pdrvextra_cmd_parm->pbuf = btinfo;
|
||||
|
||||
_rtw_memcpy(btinfo, buf, len);
|
||||
|
||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
|
||||
exit:
|
||||
return res;
|
||||
}
|
||||
#endif //CONFIG_BT_COEXIST
|
||||
|
||||
//#ifdef CONFIG_C2H_PACKET_EN
|
||||
u8 rtw_c2h_packet_wk_cmd(PADAPTER padapter, u8 *pbuf, u16 length)
|
||||
{
|
||||
@@ -3881,149 +3689,6 @@ exit:
|
||||
return res;
|
||||
}
|
||||
|
||||
static s32 rtw_mp_cmd_hdl(_adapter *padapter, u8 mp_cmd_id)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
int ret = H2C_SUCCESS;
|
||||
u8 rfreg0;
|
||||
|
||||
if (mp_cmd_id == MP_START) {
|
||||
if (padapter->registrypriv.mp_mode == 0) {
|
||||
rtw_hal_deinit(padapter);
|
||||
padapter->registrypriv.mp_mode = 1;
|
||||
#ifdef CONFIG_RF_POWER_TRIM
|
||||
if (!IS_HARDWARE_TYPE_8814A(padapter) && !IS_HARDWARE_TYPE_8822B(padapter)) {
|
||||
padapter->registrypriv.RegPwrTrimEnable = 1;
|
||||
rtw_hal_read_chip_info(padapter);
|
||||
}
|
||||
#endif /*CONFIG_RF_POWER_TRIM*/
|
||||
rtw_hal_init(padapter);
|
||||
}
|
||||
|
||||
if (padapter->registrypriv.mp_mode == 0) {
|
||||
ret = H2C_REJECTED;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (padapter->mppriv.mode == MP_OFF) {
|
||||
if (mp_start_test(padapter) == _FAIL) {
|
||||
ret = H2C_REJECTED;
|
||||
goto exit;
|
||||
}
|
||||
padapter->mppriv.mode = MP_ON;
|
||||
MPT_PwrCtlDM(padapter, 0);
|
||||
}
|
||||
padapter->mppriv.bmac_filter = _FALSE;
|
||||
#ifdef CONFIG_RTL8723B
|
||||
#ifdef CONFIG_USB_HCI
|
||||
rtw_write32(padapter, 0x765, 0x0000);
|
||||
rtw_write32(padapter, 0x948, 0x0280);
|
||||
#else
|
||||
rtw_write32(padapter, 0x765, 0x0000);
|
||||
rtw_write32(padapter, 0x948, 0x0000);
|
||||
#endif
|
||||
#ifdef CONFIG_FOR_RTL8723BS_VQ0
|
||||
rtw_write32(padapter, 0x765, 0x0000);
|
||||
rtw_write32(padapter, 0x948, 0x0280);
|
||||
#endif
|
||||
rtw_write8(padapter, 0x66, 0x27); /*Open BT uart Log*/
|
||||
rtw_write8(padapter, 0xc50, 0x20); /*for RX init Gain*/
|
||||
#endif
|
||||
ODM_Write_DIG(&pHalData->odmpriv, 0x20);
|
||||
|
||||
#ifdef CONFIG_RTL8188F
|
||||
DBG_871X("Set reg 0x88c, 0x58, 0x00\n");
|
||||
rfreg0 = PHY_QueryRFReg(padapter, RF_PATH_A, 0x0, 0x1f);
|
||||
PHY_SetBBReg(padapter, 0x88c, BIT21|BIT20, 0x3);
|
||||
PHY_SetRFReg(padapter, RF_PATH_A, 0x58, BIT1, 0x1);
|
||||
PHY_SetRFReg(padapter, RF_PATH_A, 0x0, 0xF001f, 0x2001f);
|
||||
rtw_msleep_os(200);
|
||||
PHY_SetRFReg(padapter, RF_PATH_A, 0x0, 0xF001f, 0x30000 | rfreg0);
|
||||
PHY_SetRFReg(padapter, RF_PATH_A, 0x58, BIT1, 0x0);
|
||||
PHY_SetBBReg(padapter, 0x88c, BIT21|BIT20, 0x0);
|
||||
rtw_msleep_os(1000);
|
||||
#endif
|
||||
|
||||
} else if (mp_cmd_id == MP_STOP) {
|
||||
if (padapter->registrypriv.mp_mode == 1) {
|
||||
MPT_DeInitAdapter(padapter);
|
||||
rtw_hal_deinit(padapter);
|
||||
padapter->registrypriv.mp_mode = 0;
|
||||
rtw_hal_init(padapter);
|
||||
}
|
||||
|
||||
if (padapter->mppriv.mode != MP_OFF) {
|
||||
mp_stop_test(padapter);
|
||||
padapter->mppriv.mode = MP_OFF;
|
||||
}
|
||||
|
||||
} else {
|
||||
DBG_871X(FUNC_ADPT_FMT"invalid id:%d\n", FUNC_ADPT_ARG(padapter), mp_cmd_id);
|
||||
ret = H2C_PARAMETERS_ERROR;
|
||||
rtw_warn_on(1);
|
||||
}
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 rtw_mp_cmd(_adapter *adapter, u8 mp_cmd_id, u8 flags)
|
||||
{
|
||||
struct cmd_obj *cmdobj;
|
||||
struct drvextra_cmd_parm *parm;
|
||||
struct cmd_priv *pcmdpriv = &adapter->cmdpriv;
|
||||
struct submit_ctx sctx;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (parm == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
parm->ec_id = MP_CMD_WK_CID;
|
||||
parm->type = mp_cmd_id;
|
||||
parm->size = 0;
|
||||
parm->pbuf = NULL;
|
||||
|
||||
if (flags & RTW_CMDF_DIRECTLY) {
|
||||
/* no need to enqueue, do the cmd hdl directly and free cmd parameter */
|
||||
if (H2C_SUCCESS != rtw_mp_cmd_hdl(adapter, mp_cmd_id))
|
||||
res = _FAIL;
|
||||
rtw_mfree((u8 *)parm, sizeof(*parm));
|
||||
} else {
|
||||
/* need enqueue, prepare cmd_obj and enqueue */
|
||||
cmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(*cmdobj));
|
||||
if (cmdobj == NULL) {
|
||||
res = _FAIL;
|
||||
rtw_mfree((u8 *)parm, sizeof(*parm));
|
||||
goto exit;
|
||||
}
|
||||
|
||||
init_h2fwcmd_w_parm_no_rsp(cmdobj, parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||
|
||||
if (flags & RTW_CMDF_WAIT_ACK) {
|
||||
cmdobj->sctx = &sctx;
|
||||
rtw_sctx_init(&sctx, 10 * 1000);
|
||||
}
|
||||
|
||||
res = rtw_enqueue_cmd(pcmdpriv, cmdobj);
|
||||
|
||||
if (res == _SUCCESS && (flags & RTW_CMDF_WAIT_ACK)) {
|
||||
rtw_sctx_wait(&sctx, __func__);
|
||||
_enter_critical_mutex(&pcmdpriv->sctx_mutex, NULL);
|
||||
if (sctx.status == RTW_SCTX_SUBMITTED)
|
||||
cmdobj->sctx = NULL;
|
||||
_exit_critical_mutex(&pcmdpriv->sctx_mutex, NULL);
|
||||
if (sctx.status != RTW_SCTX_DONE_SUCCESS)
|
||||
res = _FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
exit:
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RTW_CUSTOMER_STR
|
||||
static s32 rtw_customer_str_cmd_hdl(_adapter *adapter, u8 write, const u8 *cstr)
|
||||
{
|
||||
@@ -4630,11 +4295,6 @@ u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||
case DM_RA_MSK_WK_CID:
|
||||
rtw_dm_ra_mask_hdl(padapter, (struct sta_info *)pdrvextra_cmd->pbuf);
|
||||
break;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
case BTINFO_WK_CID:
|
||||
rtw_btinfo_hdl(padapter, pdrvextra_cmd->pbuf, pdrvextra_cmd->size);
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
case DFS_MASTER_WK_CID:
|
||||
rtw_dfs_master_hdl(padapter);
|
||||
@@ -4648,15 +4308,6 @@ u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_EN_HW_UPDATE_TSF, NULL);
|
||||
break;
|
||||
|
||||
case MP_CMD_WK_CID:
|
||||
ret = rtw_mp_cmd_hdl(padapter, pdrvextra_cmd->type);
|
||||
break;
|
||||
#ifdef CONFIG_RTW_CUSTOMER_STR
|
||||
case CUSTOMER_STR_WK_CID:
|
||||
ret = rtw_customer_str_cmd_hdl(padapter, pdrvextra_cmd->type, pdrvextra_cmd->pbuf);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -4877,10 +4528,6 @@ void rtw_getrttbl_cmd_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd)
|
||||
_func_enter_;
|
||||
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.workparam.bcompleted=_TRUE;
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
|
||||
|
||||
@@ -100,19 +100,6 @@ void dump_drv_cfg(void *sel)
|
||||
DBG_871X_SEL_NL(sel, "CONFIG_POWER_SAVING\n");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
DBG_871X_SEL_NL(sel, "LOAD_PHY_PARA_FROM_FILE - REALTEK_CONFIG_PATH=%s\n", REALTEK_CONFIG_PATH);
|
||||
#if defined(CONFIG_MULTIDRV) || defined(REALTEK_CONFIG_PATH_WITH_IC_NAME_FOLDER)
|
||||
DBG_871X_SEL_NL(sel, "LOAD_PHY_PARA_FROM_FILE - REALTEK_CONFIG_PATH_WITH_IC_NAME_FOLDER\n");
|
||||
#endif
|
||||
#ifdef CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY
|
||||
DBG_871X_SEL_NL(sel, "CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY\n");
|
||||
#endif
|
||||
#ifdef CONFIG_CALIBRATE_TX_POWER_TO_MAX
|
||||
DBG_871X_SEL_NL(sel, "CONFIG_CALIBRATE_TX_POWER_TO_MAX\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISABLE_ODM
|
||||
DBG_871X_SEL_NL(sel, "CONFIG_DISABLE_ODM\n");
|
||||
#endif
|
||||
@@ -131,12 +118,6 @@ void dump_drv_cfg(void *sel)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#ifdef CONFIG_SUPPORT_USB_INT
|
||||
DBG_871X_SEL_NL(sel, "CONFIG_SUPPORT_USB_INT\n");
|
||||
#endif
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
DBG_871X_SEL_NL(sel, "CONFIG_USB_INTERRUPT_IN_PIPE\n");
|
||||
#endif
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
DBG_871X_SEL_NL(sel, "CONFIG_USB_TX_AGGREGATION\n");
|
||||
#endif
|
||||
@@ -1111,16 +1092,6 @@ ssize_t proc_set_survey_info(struct file *file, const char __user *buffer, size_
|
||||
if (count < 1)
|
||||
return -EFAULT;
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if ((padapter->registrypriv.mp_mode == 1)
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|| ((padapter->pbuddy_adapter) && (padapter->pbuddy_adapter->registrypriv.mp_mode == 1))
|
||||
#endif
|
||||
){
|
||||
DBG_871X(FUNC_ADPT_FMT ": MP mode block Scan request\n", FUNC_ADPT_ARG(padapter));
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
rtw_ps_deny(padapter, PS_DENY_SCAN);
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||
goto exit;
|
||||
@@ -2662,109 +2633,6 @@ ssize_t proc_set_best_channel(struct file *file, const char __user *buffer, size
|
||||
}
|
||||
#endif /* CONFIG_FIND_BEST_CHANNEL */
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
int proc_get_btcoex_dbg(struct seq_file *m, void *v)
|
||||
{
|
||||
struct net_device *dev = m->private;
|
||||
PADAPTER padapter;
|
||||
char buf[512] = {0};
|
||||
padapter = (PADAPTER)rtw_netdev_priv(dev);
|
||||
|
||||
rtw_btcoex_GetDBG(padapter, buf, 512);
|
||||
|
||||
DBG_871X_SEL(m, "%s", buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssize_t proc_set_btcoex_dbg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
PADAPTER padapter;
|
||||
u8 tmp[80] = {0};
|
||||
u32 module[2] = {0};
|
||||
u32 num;
|
||||
|
||||
padapter = (PADAPTER)rtw_netdev_priv(dev);
|
||||
|
||||
// DBG_871X("+" FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(padapter));
|
||||
|
||||
if (NULL == buffer)
|
||||
{
|
||||
DBG_871X(FUNC_ADPT_FMT ": input buffer is NULL!\n",
|
||||
FUNC_ADPT_ARG(padapter));
|
||||
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (count < 1)
|
||||
{
|
||||
DBG_871X(FUNC_ADPT_FMT ": input length is 0!\n",
|
||||
FUNC_ADPT_ARG(padapter));
|
||||
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
num = count;
|
||||
if (num > (sizeof(tmp) - 1))
|
||||
num = (sizeof(tmp) - 1);
|
||||
|
||||
if (copy_from_user(tmp, buffer, num))
|
||||
{
|
||||
DBG_871X(FUNC_ADPT_FMT ": copy buffer from user space FAIL!\n",
|
||||
FUNC_ADPT_ARG(padapter));
|
||||
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
num = sscanf(tmp, "%x %x", module, module+1);
|
||||
if (1 == num)
|
||||
{
|
||||
if (0 == module[0])
|
||||
_rtw_memset(module, 0, sizeof(module));
|
||||
else
|
||||
_rtw_memset(module, 0xFF, sizeof(module));
|
||||
}
|
||||
else if (2 != num)
|
||||
{
|
||||
DBG_871X(FUNC_ADPT_FMT ": input(\"%s\") format incorrect!\n",
|
||||
FUNC_ADPT_ARG(padapter), tmp);
|
||||
|
||||
if (0 == num)
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
DBG_871X(FUNC_ADPT_FMT ": input 0x%08X 0x%08X\n",
|
||||
FUNC_ADPT_ARG(padapter), module[0], module[1]);
|
||||
rtw_btcoex_SetDBG(padapter, module);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
int proc_get_btcoex_info(struct seq_file *m, void *v)
|
||||
{
|
||||
struct net_device *dev = m->private;
|
||||
PADAPTER padapter;
|
||||
const u32 bufsize = 30*100;
|
||||
u8 *pbuf = NULL;
|
||||
|
||||
padapter = (PADAPTER)rtw_netdev_priv(dev);
|
||||
|
||||
pbuf = rtw_zmalloc(bufsize);
|
||||
if (NULL == pbuf) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
rtw_btcoex_DisplayBtCoexInfo(padapter, pbuf, bufsize);
|
||||
|
||||
DBG_871X_SEL(m, "%s\n", pbuf);
|
||||
|
||||
rtw_mfree(pbuf, bufsize);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
#if defined(DBG_CONFIG_ERROR_DETECT)
|
||||
int proc_get_sreset(struct seq_file *m, void *v)
|
||||
{
|
||||
|
||||
@@ -1406,9 +1406,7 @@ int rtw_get_mac_addr_intel(unsigned char *buf)
|
||||
int ret = 0;
|
||||
int i;
|
||||
struct file *fp = NULL;
|
||||
#ifdef set_fs
|
||||
mm_segment_t oldfs;
|
||||
#endif
|
||||
mm_segment_t oldfs;
|
||||
unsigned char c_mac[MAC_ADDRESS_LEN];
|
||||
char fname[]="/config/wifi/mac.txt";
|
||||
int jj,kk;
|
||||
|
||||
@@ -1356,14 +1356,6 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
|
||||
u8 rf_type = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (adapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if((check_fwstate(pmlmepriv, _FW_LINKED) != _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) != _TRUE))
|
||||
return 0;
|
||||
|
||||
@@ -3050,18 +3050,8 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (is_primary_adapter(adapter)) {
|
||||
if (GET_HAL_DATA(adapter)->EEPROMBluetoothCoexist == 1)
|
||||
DBG_871X("IsBtDisabled=%d, IsBtControlLps=%d\n" , rtw_btcoex_IsBtDisabled(adapter) , rtw_btcoex_IsBtControlLps(adapter));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK_WD_TIMER /* to avoid leaving lps 32k frequently*/
|
||||
if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode ==_TRUE )
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
&& (rtw_btcoex_IsBtControlLps(adapter) == _FALSE)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
u8 bEnterPS;
|
||||
|
||||
@@ -1188,7 +1188,9 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
|
||||
ptable->func = &OnAuth;
|
||||
else
|
||||
ptable->func = &OnAuthClient;
|
||||
#if defined(fallthrough)
|
||||
fallthrough;
|
||||
#endif
|
||||
case WIFI_ASSOCREQ:
|
||||
case WIFI_REASSOCREQ:
|
||||
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||
@@ -3339,13 +3341,6 @@ u8 rtw_rx_ampdu_size(_adapter *adapter)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBTCoexCtrlAMPDUSize(adapter) == _TRUE) {
|
||||
size = rtw_btcoex_GetAMPDUSize(adapter);
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* for scan */
|
||||
if (!mlmeext_chk_scan_state(&adapter->mlmeextpriv, SCAN_DISABLE)
|
||||
&& !mlmeext_chk_scan_state(&adapter->mlmeextpriv, SCAN_COMPLETE)
|
||||
@@ -3395,13 +3390,6 @@ bool rtw_rx_ampdu_is_accept(_adapter *adapter)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBTCoexRejectAMPDU(adapter) == _TRUE) {
|
||||
accept = _FALSE;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* for scan */
|
||||
if (!mlmeext_chk_scan_state(&adapter->mlmeextpriv, SCAN_DISABLE)
|
||||
&& !mlmeext_chk_scan_state(&adapter->mlmeextpriv, SCAN_COMPLETE)
|
||||
@@ -13007,15 +12995,6 @@ u8 setopmode_hdl(_adapter *padapter, u8 *pbuf)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (psetop->mode == Ndis802_11APMode)
|
||||
{
|
||||
// Do this after port switch to
|
||||
// prevent from downloading rsvd page to wrong port
|
||||
rtw_btcoex_MediaStatusNotify(padapter, 1); //connect
|
||||
}
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
return H2C_SUCCESS;
|
||||
|
||||
}
|
||||
@@ -14724,10 +14703,7 @@ u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||
//_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL);
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
if (rtw_get_intf_type(padapter) != RTW_PCIE) {
|
||||
/* check hi queue and bmc_sleepq */
|
||||
rtw_chk_hi_queue_cmd(padapter);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -15274,8 +15250,7 @@ u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_REGULATION,NULL,_TRUE);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (padapter->rtw_wdev != NULL)
|
||||
rtw_reg_notify_by_driver(padapter->rtw_wdev->wiphy);
|
||||
rtw_reg_notify_by_driver(padapter);
|
||||
#endif //CONFIG_IOCTL_CFG80211
|
||||
|
||||
return H2C_SUCCESS;
|
||||
|
||||
@@ -682,9 +682,6 @@ static void disable_dm(PADAPTER padapter)
|
||||
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = _FALSE;
|
||||
rtw_phydm_func_set(padapter, ODM_RF_CALIBRATION);
|
||||
|
||||
//#ifdef CONFIG_BT_COEXIST
|
||||
// rtw_btcoex_Switch(padapter, 0); //remove for BT MP Down.
|
||||
//#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -839,122 +836,7 @@ end_of_mp_start_test:
|
||||
|
||||
return res;
|
||||
}
|
||||
//This function initializes the DUT to the MP test mode
|
||||
s32 mp_start_test(PADAPTER padapter)
|
||||
{
|
||||
struct mp_priv *pmppriv = &padapter->mppriv;
|
||||
s32 res = _SUCCESS;
|
||||
|
||||
padapter->registrypriv.mp_mode = 1;
|
||||
|
||||
//3 disable dynamic mechanism
|
||||
disable_dm(padapter);
|
||||
#ifdef CONFIG_RTL8814A
|
||||
rtl8814_InitHalDm(padapter);
|
||||
#endif /* CONFIG_RTL8814A */
|
||||
#ifdef CONFIG_RTL8812A
|
||||
rtl8812_InitHalDm(padapter);
|
||||
#endif /* CONFIG_RTL8812A */
|
||||
#ifdef CONFIG_RTL8723B
|
||||
rtl8723b_InitHalDm(padapter);
|
||||
#endif /* CONFIG_RTL8723B */
|
||||
#ifdef CONFIG_RTL8703B
|
||||
rtl8703b_InitHalDm(padapter);
|
||||
#endif /* CONFIG_RTL8703B */
|
||||
#ifdef CONFIG_RTL8192E
|
||||
rtl8192e_InitHalDm(padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8188F
|
||||
rtl8188f_InitHalDm(padapter);
|
||||
#endif
|
||||
|
||||
//3 0. update mp_priv
|
||||
|
||||
if (padapter->registrypriv.rf_config == RF_MAX_TYPE) {
|
||||
// switch (phal->rf_type) {
|
||||
switch (GET_RF_TYPE(padapter)) {
|
||||
case RF_1T1R:
|
||||
pmppriv->antenna_tx = ANTENNA_A;
|
||||
pmppriv->antenna_rx = ANTENNA_A;
|
||||
break;
|
||||
case RF_1T2R:
|
||||
default:
|
||||
pmppriv->antenna_tx = ANTENNA_A;
|
||||
pmppriv->antenna_rx = ANTENNA_AB;
|
||||
break;
|
||||
case RF_2T2R:
|
||||
case RF_2T2R_GREEN:
|
||||
pmppriv->antenna_tx = ANTENNA_AB;
|
||||
pmppriv->antenna_rx = ANTENNA_AB;
|
||||
break;
|
||||
case RF_2T4R:
|
||||
pmppriv->antenna_tx = ANTENNA_AB;
|
||||
pmppriv->antenna_rx = ANTENNA_ABCD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
mpt_ProStartTest(padapter);
|
||||
|
||||
mp_join(padapter,WIFI_FW_ADHOC_STATE);
|
||||
|
||||
return res;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
//This function change the DUT from the MP test mode into normal mode
|
||||
void mp_stop_test(PADAPTER padapter)
|
||||
{
|
||||
struct mp_priv *pmppriv = &padapter->mppriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wlan_network *tgt_network = &pmlmepriv->cur_network;
|
||||
struct sta_info *psta;
|
||||
|
||||
_irqL irqL;
|
||||
|
||||
if(pmppriv->mode==MP_ON)
|
||||
{
|
||||
pmppriv->bSetTxPower=0;
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _FALSE)
|
||||
goto end_of_mp_stop_test;
|
||||
|
||||
//3 1. disconnect psudo AdHoc
|
||||
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||
|
||||
//3 2. clear psta used in mp test mode.
|
||||
// rtw_free_assoc_resources(padapter, 1);
|
||||
psta = rtw_get_stainfo(&padapter->stapriv, tgt_network->network.MacAddress);
|
||||
if (psta) rtw_free_stainfo(padapter, psta);
|
||||
|
||||
//3 3. return to normal state (default:station mode)
|
||||
pmlmepriv->fw_state = pmppriv->prev_fw_state; // WIFI_STATION_STATE;
|
||||
|
||||
//flush the cur_network
|
||||
_rtw_memset(tgt_network, 0, sizeof(struct wlan_network));
|
||||
|
||||
_clr_fwstate_(pmlmepriv, WIFI_MP_STATE);
|
||||
|
||||
end_of_mp_stop_test:
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
#ifdef CONFIG_RTL8812A
|
||||
rtl8812_InitHalDm(padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8723B
|
||||
rtl8723b_InitHalDm(padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8703B
|
||||
rtl8703b_InitHalDm(padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8192E
|
||||
rtl8192e_InitHalDm(padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8188F
|
||||
rtl8188f_InitHalDm(padapter);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/*---------------------------hal\rtl8192c\MPT_Phy.c---------------------------*/
|
||||
#if 0
|
||||
//#ifdef CONFIG_USB_HCI
|
||||
|
||||
@@ -282,8 +282,7 @@ _func_enter_;
|
||||
|
||||
RT_TRACE(_module_mp_, _drv_notice_, ("+oid_rt_pro_start_test_hdl\n"));
|
||||
|
||||
if (Adapter->registrypriv.mp_mode == 0)
|
||||
return NDIS_STATUS_NOT_ACCEPTED;
|
||||
return NDIS_STATUS_NOT_ACCEPTED;
|
||||
|
||||
if (poid_par_priv->type_of_oid != SET_OID)
|
||||
return NDIS_STATUS_NOT_ACCEPTED;
|
||||
@@ -326,7 +325,6 @@ _func_enter_;
|
||||
return NDIS_STATUS_NOT_ACCEPTED;
|
||||
|
||||
_irqlevel_changed_(&oldirql, LOWER);
|
||||
mp_stop_test(Adapter);
|
||||
_irqlevel_changed_(&oldirql, RAISE);
|
||||
|
||||
RT_TRACE(_module_mp_, _drv_notice_, ("-Set OID_RT_PRO_STOP_TEST\n"));
|
||||
|
||||
@@ -104,10 +104,6 @@ void ips_enter(_adapter * padapter)
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_IpsNotify(padapter, pwrpriv->ips_mode_req);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
_ips_enter(padapter);
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
@@ -164,11 +160,6 @@ int ips_leave(_adapter * padapter)
|
||||
if (_SUCCESS == ret)
|
||||
ODM_DMReset(&GET_HAL_DATA(padapter)->odmpriv);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (_SUCCESS == ret)
|
||||
rtw_btcoex_IpsNotify(padapter, IPS_NONE);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_IPS */
|
||||
@@ -252,11 +243,6 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
||||
}
|
||||
}
|
||||
|
||||
#if (MP_DRIVER == 1)
|
||||
if (adapter->registrypriv.mp_mode == 1)
|
||||
goto exit;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if(adapter->proximity.proxim_on==_TRUE){
|
||||
return;
|
||||
@@ -380,10 +366,7 @@ void rtw_ps_processor(_adapter*padapter)
|
||||
if((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4)==0))
|
||||
{
|
||||
DBG_871X("==>%s .fw_state(%x)\n",__FUNCTION__,get_fwstate(pmlmepriv));
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
#else
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
#endif
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if(padapter->registrypriv.usbss_enable)
|
||||
{
|
||||
@@ -393,17 +376,7 @@ void rtw_ps_processor(_adapter*padapter)
|
||||
if(padapter->net_closed == _TRUE)
|
||||
pwrpriv->ps_flag = _TRUE;
|
||||
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if (_TRUE==pwrpriv->bInternalAutoSuspend) {
|
||||
DBG_871X("<==%s .pwrpriv->bInternalAutoSuspend)(%x)\n",__FUNCTION__,pwrpriv->bInternalAutoSuspend);
|
||||
} else {
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
DBG_871X("<==%s .pwrpriv->bInternalAutoSuspend)(%x) call autosuspend_enter\n",__FUNCTION__,pwrpriv->bInternalAutoSuspend);
|
||||
autosuspend_enter(padapter);
|
||||
}
|
||||
#else
|
||||
autosuspend_enter(padapter);
|
||||
#endif //if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
}
|
||||
else if(pwrpriv->bHWPwrPindetect)
|
||||
{
|
||||
@@ -411,10 +384,6 @@ void rtw_ps_processor(_adapter*padapter)
|
||||
else
|
||||
#endif //CONFIG_AUTOSUSPEND
|
||||
{
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
#endif //defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
ips_enter(padapter);
|
||||
#endif
|
||||
@@ -459,9 +428,6 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
|
||||
{
|
||||
if ((adapter_to_pwrctl(padapter)->bLeisurePs)
|
||||
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _FALSE)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
//DBG_871X("leave lps via Tx = %d\n", xmit_cnt);
|
||||
@@ -480,9 +446,6 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
|
||||
{
|
||||
if ((adapter_to_pwrctl(padapter)->bLeisurePs)
|
||||
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _FALSE)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
//DBG_871X("leave lps via Rx = %d\n", pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod);
|
||||
@@ -724,9 +687,6 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
|
||||
|
||||
//u8 cmd_param; //BIT0:enable, BIT1:NoConnect32k
|
||||
if (enable) {
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_IpsNotify(padapter, pwrpriv->ips_mode_req);
|
||||
#endif
|
||||
//Enter IPS
|
||||
DBG_871X("%s: issue H2C to FW when entering IPS\n", __func__);
|
||||
|
||||
@@ -817,9 +777,6 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
|
||||
parm[2] = 0x0;
|
||||
rtw_hal_fill_h2c_cmd(padapter, H2C_INACTIVE_PS_,
|
||||
H2C_INACTIVE_PS_LEN, parm);
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_IpsNotify(padapter, IPS_NONE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_PNO_SUPPORT
|
||||
@@ -855,13 +812,11 @@ _func_enter_;
|
||||
{
|
||||
if (PS_MODE_ACTIVE == ps_mode) return;
|
||||
|
||||
#ifndef CONFIG_BT_COEXIST
|
||||
if ((pwrpriv->smart_ps == smart_ps) &&
|
||||
(pwrpriv->bcn_ant_mode == bcn_ant_mode))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif // !CONFIG_BT_COEXIST
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
@@ -872,20 +827,9 @@ _func_enter_;
|
||||
if(ps_mode == PS_MODE_ACTIVE)
|
||||
{
|
||||
if (1
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
&& (((rtw_btcoex_IsBtControlLps(padapter) == _FALSE)
|
||||
#ifdef CONFIG_P2P_PS
|
||||
&& (pwdinfo->opp_ps == 0)
|
||||
#endif // CONFIG_P2P_PS
|
||||
)
|
||||
|| ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
&& (rtw_btcoex_IsLpsOn(padapter) == _FALSE))
|
||||
)
|
||||
#else // !CONFIG_BT_COEXIST
|
||||
#ifdef CONFIG_P2P_PS
|
||||
&& (pwdinfo->opp_ps == 0)
|
||||
#endif // CONFIG_P2P_PS
|
||||
#endif // !CONFIG_BT_COEXIST
|
||||
)
|
||||
{
|
||||
DBG_871X(FUNC_ADPT_FMT" Leave 802.11 power save - %s\n",
|
||||
@@ -918,18 +862,11 @@ _func_enter_;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
|
||||
pwrpriv->bFwCurrentInPSMode = _FALSE;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_LpsNotify(padapter, ps_mode);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE))
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
|| ((rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
&& (rtw_btcoex_IsLpsOn(padapter) == _TRUE))
|
||||
#endif
|
||||
)
|
||||
{
|
||||
u8 pslv;
|
||||
@@ -958,10 +895,6 @@ _func_enter_;
|
||||
}
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_LpsNotify(padapter, ps_mode);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
pwrpriv->bFwCurrentInPSMode = _TRUE;
|
||||
pwrpriv->pwr_mode = ps_mode;
|
||||
pwrpriv->smart_ps = smart_ps;
|
||||
@@ -980,19 +913,6 @@ _func_enter_;
|
||||
pslv = PS_STATE_S0;
|
||||
#endif // CONFIG_LPS_LCLK
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE))
|
||||
{
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
if (val8 & BIT(4))
|
||||
pslv = PS_STATE_S2;
|
||||
|
||||
}
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
rtw_set_rpwm(padapter, pslv);
|
||||
}
|
||||
}
|
||||
@@ -1060,11 +980,6 @@ _func_enter_;
|
||||
|
||||
// DBG_871X("+LeisurePSEnter\n");
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
return;
|
||||
#endif
|
||||
|
||||
/* Skip lps enter request if number of assocated adapters is not 1 */
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
if (check_fwstate(&(dvobj->padapters[i]->mlmepriv), WIFI_ASOC_STATE))
|
||||
@@ -1129,10 +1044,6 @@ _func_enter_;
|
||||
|
||||
// DBG_871X("+LeisurePSLeave\n");
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (pwrpriv->bLeisurePs)
|
||||
{
|
||||
@@ -1650,19 +1561,6 @@ _func_enter_;
|
||||
pwrctrl = adapter_to_pwrctl(padapter);
|
||||
pslv = PS_STATE_S0;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE))
|
||||
{
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
if (val8 & BIT(4))
|
||||
pslv = PS_STATE_S2;
|
||||
|
||||
}
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
_enter_pwrlock(&pwrctrl->lock);
|
||||
|
||||
unregister_task_alive(pwrctrl, task);
|
||||
@@ -1883,19 +1781,6 @@ _func_enter_;
|
||||
pwrctrl = adapter_to_pwrctl(padapter);
|
||||
pslv = PS_STATE_S0;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE))
|
||||
{
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
if (val8 & BIT(4))
|
||||
pslv = PS_STATE_S2;
|
||||
|
||||
}
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
if(padapter->wdinfo.p2p_ps_mode > P2P_PS_NONE)
|
||||
{
|
||||
@@ -1950,19 +1835,6 @@ _func_enter_;
|
||||
pwrctrl = adapter_to_pwrctl(padapter);
|
||||
pslv = PS_STATE_S0;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if ((rtw_btcoex_IsBtDisabled(padapter) == _FALSE)
|
||||
&& (rtw_btcoex_IsBtControlLps(padapter) == _TRUE))
|
||||
{
|
||||
u8 val8;
|
||||
|
||||
val8 = rtw_btcoex_LpsVal(padapter);
|
||||
if (val8 & BIT(4))
|
||||
pslv = PS_STATE_S2;
|
||||
|
||||
}
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
if(padapter->wdinfo.p2p_ps_mode > P2P_PS_NONE)
|
||||
{
|
||||
@@ -2091,10 +1963,7 @@ _func_enter_;
|
||||
|
||||
pwrctrlpriv->LpsIdleCount = 0;
|
||||
//pwrctrlpriv->FWCtrlPSMode =padapter->registrypriv.power_mgnt;// PS_MODE_MIN;
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
pwrctrlpriv->power_mgnt =PS_MODE_ACTIVE ;
|
||||
else
|
||||
pwrctrlpriv->power_mgnt =padapter->registrypriv.power_mgnt;// PS_MODE_MIN;
|
||||
pwrctrlpriv->power_mgnt =padapter->registrypriv.power_mgnt;// PS_MODE_MIN;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?_TRUE:_FALSE;
|
||||
|
||||
pwrctrlpriv->bFwCurrentInPSMode = _FALSE;
|
||||
@@ -2427,27 +2296,8 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||
//I think this should be check in IPS, LPS, autosuspend functions...
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
{
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if(_TRUE==pwrpriv->bInternalAutoSuspend){
|
||||
if(0==pwrpriv->autopm_cnt){
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
|
||||
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0)
|
||||
{
|
||||
DBG_871X( "can't get autopm: \n");
|
||||
}
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,20))
|
||||
usb_autopm_disable(adapter_to_dvobj(padapter)->pusbintf);
|
||||
#else
|
||||
usb_autoresume_device(adapter_to_dvobj(padapter)->pusbdev, 1);
|
||||
#endif
|
||||
pwrpriv->autopm_cnt++;
|
||||
}
|
||||
#endif //#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
ret = _SUCCESS;
|
||||
goto exit;
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
}
|
||||
#endif //#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
}
|
||||
|
||||
if(rf_off == pwrpriv->rf_pwrstate )
|
||||
|
||||
@@ -1378,13 +1378,6 @@ _func_enter_;
|
||||
|
||||
if (*psta == NULL) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("can't get psta under sta2sta_data_frame ; drop pkt\n"));
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (adapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if(check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
adapter->mppriv.rx_pktloss++;
|
||||
}
|
||||
#endif
|
||||
ret= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
@@ -4328,15 +4321,6 @@ int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1 || padapter->mppriv.bRTWSmbCfg ==_TRUE)
|
||||
{
|
||||
mp_recv_frame(padapter,rframe);
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
//check the frame crtl field and decache
|
||||
ret = validate_recv_frame(padapter, rframe);
|
||||
@@ -4614,11 +4598,6 @@ _func_exit_;
|
||||
|
||||
_recv_entry_drop:
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
padapter->mppriv.rx_pktloss = precvpriv->rx_drop;
|
||||
#endif
|
||||
|
||||
//RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("_recv_entry_drop\n"));
|
||||
|
||||
_func_exit_;
|
||||
|
||||
@@ -2279,324 +2279,6 @@ BIP_exit:
|
||||
}
|
||||
#endif //CONFIG_IEEE80211W
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
/* compress 512-bits */
|
||||
static int sha256_compress(struct rtw_sha256_state *md, unsigned char *buf)
|
||||
{
|
||||
u32 S[8], W[64], t0, t1;
|
||||
u32 t;
|
||||
int i;
|
||||
|
||||
/* copy state into S */
|
||||
for (i = 0; i < 8; i++) {
|
||||
S[i] = md->state[i];
|
||||
}
|
||||
|
||||
/* copy the state into 512-bits into W[0..15] */
|
||||
for (i = 0; i < 16; i++)
|
||||
W[i] = WPA_GET_BE32(buf + (4 * i));
|
||||
|
||||
/* fill W[16..63] */
|
||||
for (i = 16; i < 64; i++) {
|
||||
W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) +
|
||||
W[i - 16];
|
||||
}
|
||||
|
||||
/* Compress */
|
||||
#define RND(a,b,c,d,e,f,g,h,i) \
|
||||
t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \
|
||||
t1 = Sigma0(a) + Maj(a, b, c); \
|
||||
d += t0; \
|
||||
h = t0 + t1;
|
||||
|
||||
for (i = 0; i < 64; ++i) {
|
||||
RND(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], i);
|
||||
t = S[7]; S[7] = S[6]; S[6] = S[5]; S[5] = S[4];
|
||||
S[4] = S[3]; S[3] = S[2]; S[2] = S[1]; S[1] = S[0]; S[0] = t;
|
||||
}
|
||||
|
||||
/* feedback */
|
||||
for (i = 0; i < 8; i++) {
|
||||
md->state[i] = md->state[i] + S[i];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Initialize the hash state */
|
||||
static void sha256_init(struct rtw_sha256_state *md)
|
||||
{
|
||||
md->curlen = 0;
|
||||
md->length = 0;
|
||||
md->state[0] = 0x6A09E667UL;
|
||||
md->state[1] = 0xBB67AE85UL;
|
||||
md->state[2] = 0x3C6EF372UL;
|
||||
md->state[3] = 0xA54FF53AUL;
|
||||
md->state[4] = 0x510E527FUL;
|
||||
md->state[5] = 0x9B05688CUL;
|
||||
md->state[6] = 0x1F83D9ABUL;
|
||||
md->state[7] = 0x5BE0CD19UL;
|
||||
}
|
||||
|
||||
/**
|
||||
Process a block of memory though the hash
|
||||
@param md The hash state
|
||||
@param in The data to hash
|
||||
@param inlen The length of the data (octets)
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
static int sha256_process(struct rtw_sha256_state *md, unsigned char *in,
|
||||
unsigned long inlen)
|
||||
{
|
||||
unsigned long n;
|
||||
#define block_size 64
|
||||
|
||||
if (md->curlen > sizeof(md->buf))
|
||||
return -1;
|
||||
|
||||
while (inlen > 0) {
|
||||
if (md->curlen == 0 && inlen >= block_size) {
|
||||
if (sha256_compress(md, (unsigned char *) in) < 0)
|
||||
return -1;
|
||||
md->length += block_size * 8;
|
||||
in += block_size;
|
||||
inlen -= block_size;
|
||||
} else {
|
||||
n = MIN(inlen, (block_size - md->curlen));
|
||||
_rtw_memcpy(md->buf + md->curlen, in, n);
|
||||
md->curlen += n;
|
||||
in += n;
|
||||
inlen -= n;
|
||||
if (md->curlen == block_size) {
|
||||
if (sha256_compress(md, md->buf) < 0)
|
||||
return -1;
|
||||
md->length += 8 * block_size;
|
||||
md->curlen = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Terminate the hash to get the digest
|
||||
@param md The hash state
|
||||
@param out [out] The destination of the hash (32 bytes)
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
static int sha256_done(struct rtw_sha256_state *md, unsigned char *out)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (md->curlen >= sizeof(md->buf))
|
||||
return -1;
|
||||
|
||||
/* increase the length of the message */
|
||||
md->length += md->curlen * 8;
|
||||
|
||||
/* append the '1' bit */
|
||||
md->buf[md->curlen++] = (unsigned char) 0x80;
|
||||
|
||||
/* if the length is currently above 56 bytes we append zeros
|
||||
* then compress. Then we can fall back to padding zeros and length
|
||||
* encoding like normal.
|
||||
*/
|
||||
if (md->curlen > 56) {
|
||||
while (md->curlen < 64) {
|
||||
md->buf[md->curlen++] = (unsigned char) 0;
|
||||
}
|
||||
sha256_compress(md, md->buf);
|
||||
md->curlen = 0;
|
||||
}
|
||||
|
||||
/* pad upto 56 bytes of zeroes */
|
||||
while (md->curlen < 56) {
|
||||
md->buf[md->curlen++] = (unsigned char) 0;
|
||||
}
|
||||
|
||||
/* store length */
|
||||
WPA_PUT_BE64(md->buf + 56, md->length);
|
||||
sha256_compress(md, md->buf);
|
||||
|
||||
/* copy output */
|
||||
for (i = 0; i < 8; i++)
|
||||
WPA_PUT_BE32(out + (4 * i), md->state[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* sha256_vector - SHA256 hash for data vector
|
||||
* @num_elem: Number of elements in the data vector
|
||||
* @addr: Pointers to the data areas
|
||||
* @len: Lengths of the data blocks
|
||||
* @mac: Buffer for the hash
|
||||
* Returns: 0 on success, -1 of failure
|
||||
*/
|
||||
static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len,
|
||||
u8 *mac)
|
||||
{
|
||||
struct rtw_sha256_state ctx;
|
||||
size_t i;
|
||||
|
||||
sha256_init(&ctx);
|
||||
for (i = 0; i < num_elem; i++)
|
||||
if (sha256_process(&ctx, addr[i], len[i]))
|
||||
return -1;
|
||||
if (sha256_done(&ctx, mac))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u8 os_strlen(const char *s)
|
||||
{
|
||||
const char *p = s;
|
||||
while (*p)
|
||||
p++;
|
||||
return p - s;
|
||||
}
|
||||
|
||||
static int os_memcmp(void *s1, void *s2, u8 n)
|
||||
{
|
||||
unsigned char *p1 = s1, *p2 = s2;
|
||||
|
||||
if (n == 0)
|
||||
return 0;
|
||||
|
||||
while (*p1 == *p2) {
|
||||
p1++;
|
||||
p2++;
|
||||
n--;
|
||||
if (n == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return *p1 - *p2;
|
||||
}
|
||||
|
||||
/**
|
||||
* hmac_sha256_vector - HMAC-SHA256 over data vector (RFC 2104)
|
||||
* @key: Key for HMAC operations
|
||||
* @key_len: Length of the key in bytes
|
||||
* @num_elem: Number of elements in the data vector
|
||||
* @addr: Pointers to the data areas
|
||||
* @len: Lengths of the data blocks
|
||||
* @mac: Buffer for the hash (32 bytes)
|
||||
*/
|
||||
static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
|
||||
u8 *addr[], size_t *len, u8 *mac)
|
||||
{
|
||||
unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */
|
||||
unsigned char tk[32];
|
||||
u8 *_addr[6];
|
||||
size_t _len[6], i;
|
||||
|
||||
if (num_elem > 5) {
|
||||
/*
|
||||
* Fixed limit on the number of fragments to avoid having to
|
||||
* allocate memory (which could fail).
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
/* if key is longer than 64 bytes reset it to key = SHA256(key) */
|
||||
if (key_len > 64) {
|
||||
sha256_vector(1, &key, &key_len, tk);
|
||||
key = tk;
|
||||
key_len = 32;
|
||||
}
|
||||
|
||||
/* the HMAC_SHA256 transform looks like:
|
||||
*
|
||||
* SHA256(K XOR opad, SHA256(K XOR ipad, text))
|
||||
*
|
||||
* where K is an n byte key
|
||||
* ipad is the byte 0x36 repeated 64 times
|
||||
* opad is the byte 0x5c repeated 64 times
|
||||
* and text is the data being protected */
|
||||
|
||||
/* start out by storing key in ipad */
|
||||
_rtw_memset(k_pad, 0, sizeof(k_pad));
|
||||
_rtw_memcpy(k_pad, key, key_len);
|
||||
/* XOR key with ipad values */
|
||||
for (i = 0; i < 64; i++)
|
||||
k_pad[i] ^= 0x36;
|
||||
|
||||
/* perform inner SHA256 */
|
||||
_addr[0] = k_pad;
|
||||
_len[0] = 64;
|
||||
for (i = 0; i < num_elem; i++) {
|
||||
_addr[i + 1] = addr[i];
|
||||
_len[i + 1] = len[i];
|
||||
}
|
||||
sha256_vector(1 + num_elem, _addr, _len, mac);
|
||||
|
||||
_rtw_memset(k_pad, 0, sizeof(k_pad));
|
||||
_rtw_memcpy(k_pad, key, key_len);
|
||||
/* XOR key with opad values */
|
||||
for (i = 0; i < 64; i++)
|
||||
k_pad[i] ^= 0x5c;
|
||||
|
||||
/* perform outer SHA256 */
|
||||
_addr[0] = k_pad;
|
||||
_len[0] = 64;
|
||||
_addr[1] = mac;
|
||||
_len[1] = 32;
|
||||
sha256_vector(2, _addr, _len, mac);
|
||||
}
|
||||
#endif //PLATFORM_FREEBSD
|
||||
/**
|
||||
* sha256_prf - SHA256-based Pseudo-Random Function (IEEE 802.11r, 8.5.1.5.2)
|
||||
* @key: Key for PRF
|
||||
* @key_len: Length of the key in bytes
|
||||
* @label: A unique label for each purpose of the PRF
|
||||
* @data: Extra data to bind into the key
|
||||
* @data_len: Length of the data
|
||||
* @buf: Buffer for the generated pseudo-random key
|
||||
* @buf_len: Number of bytes of key to generate
|
||||
*
|
||||
* This function is used to derive new, cryptographically separate keys from a
|
||||
* given key.
|
||||
*/
|
||||
#ifndef PLATFORM_FREEBSD //Baron
|
||||
static void sha256_prf(u8 *key, size_t key_len, char *label,
|
||||
u8 *data, size_t data_len, u8 *buf, size_t buf_len)
|
||||
{
|
||||
u16 counter = 1;
|
||||
size_t pos, plen;
|
||||
u8 hash[SHA256_MAC_LEN];
|
||||
u8 *addr[4];
|
||||
size_t len[4];
|
||||
u8 counter_le[2], length_le[2];
|
||||
|
||||
addr[0] = counter_le;
|
||||
len[0] = 2;
|
||||
addr[1] = (u8 *) label;
|
||||
len[1] = os_strlen(label);
|
||||
addr[2] = data;
|
||||
len[2] = data_len;
|
||||
addr[3] = length_le;
|
||||
len[3] = sizeof(length_le);
|
||||
|
||||
WPA_PUT_LE16(length_le, buf_len * 8);
|
||||
pos = 0;
|
||||
while (pos < buf_len) {
|
||||
plen = buf_len - pos;
|
||||
WPA_PUT_LE16(counter_le, counter);
|
||||
if (plen >= SHA256_MAC_LEN) {
|
||||
hmac_sha256_vector(key, key_len, 4, addr, len,
|
||||
&buf[pos]);
|
||||
pos += SHA256_MAC_LEN;
|
||||
} else {
|
||||
hmac_sha256_vector(key, key_len, 4, addr, len, hash);
|
||||
_rtw_memcpy(&buf[pos], hash, plen);
|
||||
break;
|
||||
}
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
#endif //PLATFORM_FREEBSD Baron
|
||||
|
||||
/* AES tables*/
|
||||
const u32 Te0[256] = {
|
||||
|
||||
@@ -345,8 +345,7 @@ void rtw_mfree_stainfo(struct sta_info *psta)
|
||||
{
|
||||
_func_enter_;
|
||||
|
||||
if(&psta->lock != NULL)
|
||||
_rtw_spinlock_free(&psta->lock);
|
||||
_rtw_spinlock_free(&psta->lock);
|
||||
|
||||
_rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv);
|
||||
_rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv);
|
||||
|
||||
@@ -4169,9 +4169,7 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,
|
||||
|
||||
int i = 0;
|
||||
struct file *fp;
|
||||
#ifdef set_fs
|
||||
mm_segment_t fs;
|
||||
#endif
|
||||
loff_t pos = 0;
|
||||
u8 *source = NULL;
|
||||
long len = 0;
|
||||
@@ -4208,10 +4206,8 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef set_fs
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#endif
|
||||
|
||||
source = rtw_zmalloc(2048);
|
||||
|
||||
@@ -4221,9 +4217,7 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,
|
||||
rtw_mfree(source, 2048);
|
||||
}
|
||||
|
||||
#ifdef set_fs
|
||||
set_fs(fs);
|
||||
#endif
|
||||
filp_close(fp, NULL);
|
||||
|
||||
DBG_871X("-%s-\n", __func__);
|
||||
|
||||
@@ -4103,8 +4103,6 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
|
||||
_adapter *adapter = xmitframe->padapter;
|
||||
struct registry_priv *registry = &adapter->registrypriv;
|
||||
|
||||
if (rtw_get_intf_type(adapter) != RTW_PCIE) {
|
||||
|
||||
if (adapter->registrypriv.wifi_spec == 1) {
|
||||
allow = _TRUE;
|
||||
} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) {
|
||||
@@ -4132,7 +4130,7 @@ if (rtw_get_intf_type(adapter) != RTW_PCIE) {
|
||||
else {
|
||||
rtw_warn_on(1);
|
||||
}
|
||||
}
|
||||
|
||||
return allow;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,150 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8188C 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8188C_2ANT 6
|
||||
|
||||
typedef enum _BT_INFO_SRC_8188C_2ANT{
|
||||
BT_INFO_SRC_8188C_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8188C_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8188C_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8188C_2ANT_MAX
|
||||
}BT_INFO_SRC_8188C_2ANT,*PBT_INFO_SRC_8188C_2ANT;
|
||||
|
||||
typedef enum _BT_8188C_2ANT_BT_STATUS{
|
||||
BT_8188C_2ANT_BT_STATUS_IDLE = 0x0,
|
||||
BT_8188C_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8188C_2ANT_BT_STATUS_NON_IDLE = 0x2,
|
||||
BT_8188C_2ANT_BT_STATUS_MAX
|
||||
}BT_8188C_2ANT_BT_STATUS,*PBT_8188C_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8188C_2ANT_COEX_ALGO{
|
||||
BT_8188C_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8188C_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8188C_2ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8188C_2ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8188C_2ANT_COEX_ALGO_PAN = 0x4,
|
||||
BT_8188C_2ANT_COEX_ALGO_HID_A2DP = 0x5,
|
||||
BT_8188C_2ANT_COEX_ALGO_HID_PAN = 0x6,
|
||||
BT_8188C_2ANT_COEX_ALGO_PAN_A2DP = 0x7,
|
||||
BT_8188C_2ANT_COEX_ALGO_MAX
|
||||
}BT_8188C_2ANT_COEX_ALGO,*PBT_8188C_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8188C_2ANT{
|
||||
// fw mechanism
|
||||
BOOLEAN bPreBalanceOn;
|
||||
BOOLEAN bCurBalanceOn;
|
||||
|
||||
// diminishWifi
|
||||
BOOLEAN bPreDacOn;
|
||||
BOOLEAN bCurDacOn;
|
||||
BOOLEAN bPreInterruptOn;
|
||||
BOOLEAN bCurInterruptOn;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bPreNavOn;
|
||||
BOOLEAN bCurNavOn;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
//u4Byte preVal0x6c0;
|
||||
//u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u4Byte preVal0x6cc;
|
||||
u4Byte curVal0x6cc;
|
||||
//BOOLEAN bLimitedDig;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
//u1Byte btStatus;
|
||||
//u1Byte wifiChnlInfo[3];
|
||||
} COEX_DM_8188C_2ANT, *PCOEX_DM_8188C_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8188C_2ANT{
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bBtBusy;
|
||||
BOOLEAN bBtUplink;
|
||||
BOOLEAN bBtDownLink;
|
||||
BOOLEAN bA2dpBusy;
|
||||
}COEX_STA_8188C_2ANT, *PCOEX_STA_8188C_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8188c2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8188c2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,171 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8192D 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8192D_2ANT 6
|
||||
|
||||
typedef enum _BT_INFO_SRC_8192D_2ANT{
|
||||
BT_INFO_SRC_8192D_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8192D_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8192D_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8192D_2ANT_MAX
|
||||
}BT_INFO_SRC_8192D_2ANT,*PBT_INFO_SRC_8192D_2ANT;
|
||||
|
||||
typedef enum _BT_8192D_2ANT_BT_STATUS{
|
||||
BT_8192D_2ANT_BT_STATUS_IDLE = 0x0,
|
||||
BT_8192D_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8192D_2ANT_BT_STATUS_NON_IDLE = 0x2,
|
||||
BT_8192D_2ANT_BT_STATUS_MAX
|
||||
}BT_8192D_2ANT_BT_STATUS,*PBT_8192D_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8192D_2ANT_COEX_ALGO{
|
||||
BT_8192D_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8192D_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8192D_2ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8192D_2ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8192D_2ANT_COEX_ALGO_PAN = 0x4,
|
||||
BT_8192D_2ANT_COEX_ALGO_HID_A2DP = 0x5,
|
||||
BT_8192D_2ANT_COEX_ALGO_HID_PAN = 0x6,
|
||||
BT_8192D_2ANT_COEX_ALGO_PAN_A2DP = 0x7,
|
||||
BT_8192D_2ANT_COEX_ALGO_MAX
|
||||
}BT_8192D_2ANT_COEX_ALGO,*PBT_8192D_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8192D_2ANT{
|
||||
// fw mechanism
|
||||
BOOLEAN bPreBalanceOn;
|
||||
BOOLEAN bCurBalanceOn;
|
||||
|
||||
// diminishWifi
|
||||
BOOLEAN bPreDacOn;
|
||||
BOOLEAN bCurDacOn;
|
||||
BOOLEAN bPreInterruptOn;
|
||||
BOOLEAN bCurInterruptOn;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bPreNavOn;
|
||||
BOOLEAN bCurNavOn;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//BOOLEAN bPreDecBtPwr;
|
||||
//BOOLEAN bCurDecBtPwr;
|
||||
|
||||
//u1Byte preFwDacSwingLvl;
|
||||
//u1Byte curFwDacSwingLvl;
|
||||
//BOOLEAN bCurIgnoreWlanAct;
|
||||
//BOOLEAN bPreIgnoreWlanAct;
|
||||
//u1Byte prePsTdma;
|
||||
//u1Byte curPsTdma;
|
||||
//u1Byte psTdmaPara[5];
|
||||
//u1Byte psTdmaDuAdjType;
|
||||
//BOOLEAN bResetTdmaAdjust;
|
||||
//BOOLEAN bPrePsTdmaOn;
|
||||
//BOOLEAN bCurPsTdmaOn;
|
||||
//BOOLEAN bPreBtAutoReport;
|
||||
//BOOLEAN bCurBtAutoReport;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
//u4Byte preVal0x6c0;
|
||||
//u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u4Byte preVal0x6cc;
|
||||
u4Byte curVal0x6cc;
|
||||
//BOOLEAN bLimitedDig;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
//u1Byte btStatus;
|
||||
//u1Byte wifiChnlInfo[3];
|
||||
} COEX_DM_8192D_2ANT, *PCOEX_DM_8192D_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8192D_2ANT{
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bBtBusy;
|
||||
BOOLEAN bBtUplink;
|
||||
BOOLEAN bBtDownLink;
|
||||
BOOLEAN bA2dpBusy;
|
||||
}COEX_STA_8192D_2ANT, *PCOEX_STA_8192D_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8192d2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192d2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,255 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8192E 1ANT BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8192E_1ANT 1
|
||||
|
||||
#define BT_INFO_8192E_1ANT_B_FTP BIT7
|
||||
#define BT_INFO_8192E_1ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8192E_1ANT_B_HID BIT5
|
||||
#define BT_INFO_8192E_1ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8192E_1ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8192E_1ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8192E_1ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8192E_1ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BT_INFO_8192E_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8192E_1ANT 2
|
||||
|
||||
#define BT_8192E_1ANT_WIFI_NOISY_THRESH 30 //max: 255
|
||||
|
||||
typedef enum _BT_INFO_SRC_8192E_1ANT{
|
||||
BT_INFO_SRC_8192E_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8192E_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8192E_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8192E_1ANT_MAX
|
||||
}BT_INFO_SRC_8192E_1ANT,*PBT_INFO_SRC_8192E_1ANT;
|
||||
|
||||
typedef enum _BT_8192E_1ANT_BT_STATUS{
|
||||
BT_8192E_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8192E_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8192E_1ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8192E_1ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8192E_1ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8192E_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8192E_1ANT_BT_STATUS_MAX
|
||||
}BT_8192E_1ANT_BT_STATUS,*PBT_8192E_1ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8192E_1ANT_WIFI_STATUS{
|
||||
BT_8192E_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8192E_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT = 0x3,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||
BT_8192E_1ANT_WIFI_STATUS_MAX
|
||||
}BT_8192E_1ANT_WIFI_STATUS,*PBT_8192E_1ANT_WIFI_STATUS;
|
||||
|
||||
typedef enum _BT_8192E_1ANT_COEX_ALGO{
|
||||
BT_8192E_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8192E_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8192E_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8192E_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8192E_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8192E_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8192E_1ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8192E_1ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8192E_1ANT_COEX_ALGO,*PBT_8192E_1ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8192E_1ANT{
|
||||
// fw mechanism
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
|
||||
u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
|
||||
u2Byte backupRetryLimit;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
u1Byte preArfrType;
|
||||
u1Byte curArfrType;
|
||||
u1Byte preRetryLimitType;
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte curAmpduTimeType;
|
||||
u4Byte nArpCnt;
|
||||
|
||||
u1Byte errorCondition;
|
||||
} COEX_DM_8192E_1ANT, *PCOEX_DM_8192E_1ANT;
|
||||
|
||||
typedef struct _COEX_STA_8192E_1ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte specialPktPeriodCnt;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
s1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8192E_1ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8192E_1ANT_MAX];
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
BOOLEAN bC2hBtPage; //Add for win8.1 page out issue
|
||||
BOOLEAN bWiFiIsHighPriTask; //Add for win8.1 page out issue
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
u4Byte popEventCnt;
|
||||
u1Byte nScanAPNum;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
BOOLEAN bCCKLock;
|
||||
BOOLEAN bPreCCKLock;
|
||||
u1Byte nCoexTableType;
|
||||
|
||||
BOOLEAN bForceLpsOn;
|
||||
}COEX_STA_8192E_1ANT, *PCOEX_STA_8192E_1ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8192e1ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_RfStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_CoexDmReset(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e1ant_DbgControl(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte opCode,
|
||||
IN u1Byte opLen,
|
||||
IN pu1Byte pData
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,232 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8192E 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8192E_2ANT 0
|
||||
|
||||
#define BT_INFO_8192E_2ANT_B_FTP BIT7
|
||||
#define BT_INFO_8192E_2ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8192E_2ANT_B_HID BIT5
|
||||
#define BT_INFO_8192E_2ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8192E_2ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8192E_2ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8192E_2ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8192E_2ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BT_INFO_8192E_2ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT 2
|
||||
#define NOISY_AP_NUM_THRESH 5
|
||||
|
||||
typedef enum _BT_INFO_SRC_8192E_2ANT{
|
||||
BT_INFO_SRC_8192E_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8192E_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8192E_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8192E_2ANT_MAX
|
||||
}BT_INFO_SRC_8192E_2ANT,*PBT_INFO_SRC_8192E_2ANT;
|
||||
|
||||
typedef enum _BT_8192E_2ANT_BT_STATUS{
|
||||
BT_8192E_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8192E_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8192E_2ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8192E_2ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8192E_2ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8192E_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8192E_2ANT_BT_STATUS_MAX
|
||||
}BT_8192E_2ANT_BT_STATUS,*PBT_8192E_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8192E_2ANT_COEX_ALGO{
|
||||
BT_8192E_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8192E_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8192E_2ANT_COEX_ALGO_SCO_PAN = 0x2,
|
||||
BT_8192E_2ANT_COEX_ALGO_HID = 0x3,
|
||||
BT_8192E_2ANT_COEX_ALGO_A2DP = 0x4,
|
||||
BT_8192E_2ANT_COEX_ALGO_A2DP_PANHS = 0x5,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANEDR = 0x6,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANHS = 0x7,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANEDR_A2DP = 0x8,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANEDR_HID = 0x9,
|
||||
BT_8192E_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0xa,
|
||||
BT_8192E_2ANT_COEX_ALGO_HID_A2DP = 0xb,
|
||||
BT_8192E_2ANT_COEX_ALGO_MAX = 0xc
|
||||
}BT_8192E_2ANT_COEX_ALGO,*PBT_8192E_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8192E_2ANT{
|
||||
// fw mechanism
|
||||
u1Byte preBtDecPwrLvl;
|
||||
u1Byte curBtDecPwrLvl;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bResetTdmaAdjust;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bAutoTdmaAdjustLowRssi;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
|
||||
u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
|
||||
u2Byte backupRetryLimit;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
u1Byte preSsType;
|
||||
u1Byte curSsType;
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
u1Byte curRaMaskType;
|
||||
u1Byte preArfrType;
|
||||
u1Byte curArfrType;
|
||||
u1Byte preRetryLimitType;
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte curAmpduTimeType;
|
||||
} COEX_DM_8192E_2ANT, *PCOEX_DM_8192E_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8192E_2ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8192E_2ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8192E_2ANT_MAX];
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
u1Byte nScanAPNum;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
u1Byte nCoexTableType;
|
||||
BOOLEAN bForceLpsOn;
|
||||
|
||||
u1Byte disVerInfoCnt;
|
||||
}COEX_STA_8192E_2ANT, *PCOEX_STA_8192E_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8192e2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8192e2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,387 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8703B 1ANT BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8703B_1ANT 1
|
||||
|
||||
#define BT_INFO_8703B_1ANT_B_FTP BIT7
|
||||
#define BT_INFO_8703B_1ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8703B_1ANT_B_HID BIT5
|
||||
#define BT_INFO_8703B_1ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8703B_1ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8703B_1ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8703B_1ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8703B_1ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BT_INFO_8703B_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8703B_1ANT 2
|
||||
|
||||
#define BT_8703B_1ANT_WIFI_NOISY_THRESH 30 //max: 255
|
||||
|
||||
//for Antenna detection
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_BACKGROUND 50
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_2ANT_BADISOLATION 70
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_2ANT_GOODISOLATION 55
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_1ANT 35
|
||||
#define BT_8703B_1ANT_ANTDET_RETRY_INTERVAL 10 //retry timer if ant det is fail, unit: second
|
||||
#define BT_8703B_1ANT_ANTDET_ENABLE 0
|
||||
#define BT_8703B_1ANT_ANTDET_COEXMECHANISMSWITCH_ENABLE 0
|
||||
|
||||
#define BT_8703B_1ANT_LTECOEX_INDIRECTREG_ACCESS_TIMEOUT 30000
|
||||
|
||||
typedef enum _BT_8703B_1ANT_SIGNAL_STATE{
|
||||
BT_8703B_1ANT_SIG_STA_SET_TO_LOW = 0x0,
|
||||
BT_8703B_1ANT_SIG_STA_SET_BY_HW = 0x0,
|
||||
BT_8703B_1ANT_SIG_STA_SET_TO_HIGH = 0x1,
|
||||
BT_8703B_1ANT_SIG_STA_MAX
|
||||
}BT_8703B_1ANT_SIGNAL_STATE,*PBT_8703B_1ANT_SIGNAL_STATE;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_PATH_CTRL_OWNER{
|
||||
BT_8703B_1ANT_PCO_BTSIDE = 0x0,
|
||||
BT_8703B_1ANT_PCO_WLSIDE = 0x1,
|
||||
BT_8703B_1ANT_PCO_MAX
|
||||
}BT_8703B_1ANT_PATH_CTRL_OWNER,*PBT_8703B_1ANT_PATH_CTRL_OWNER;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_GNT_CTRL_TYPE{
|
||||
BT_8703B_1ANT_GNT_TYPE_CTRL_BY_PTA = 0x0,
|
||||
BT_8703B_1ANT_GNT_TYPE_CTRL_BY_SW = 0x1,
|
||||
BT_8703B_1ANT_GNT_TYPE_MAX
|
||||
}BT_8703B_1ANT_GNT_CTRL_TYPE,*PBT_8703B_1ANT_GNT_CTRL_TYPE;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_GNT_CTRL_BLOCK{
|
||||
BT_8703B_1ANT_GNT_BLOCK_RFC_BB = 0x0,
|
||||
BT_8703B_1ANT_GNT_BLOCK_RFC = 0x1,
|
||||
BT_8703B_1ANT_GNT_BLOCK_BB = 0x2,
|
||||
BT_8703B_1ANT_GNT_BLOCK_MAX
|
||||
}BT_8703B_1ANT_GNT_CTRL_BLOCK,*PBT_8703B_1ANT_GNT_CTRL_BLOCK;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_LTE_COEX_TABLE_TYPE{
|
||||
BT_8703B_1ANT_CTT_WL_VS_LTE = 0x0,
|
||||
BT_8703B_1ANT_CTT_BT_VS_LTE = 0x1,
|
||||
BT_8703B_1ANT_CTT_MAX
|
||||
}BT_8703B_1ANT_LTE_COEX_TABLE_TYPE,*PBT_8703B_1ANT_LTE_COEX_TABLE_TYPE;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_LTE_BREAK_TABLE_TYPE{
|
||||
BT_8703B_1ANT_LBTT_WL_BREAK_LTE = 0x0,
|
||||
BT_8703B_1ANT_LBTT_BT_BREAK_LTE = 0x1,
|
||||
BT_8703B_1ANT_LBTT_LTE_BREAK_WL = 0x2,
|
||||
BT_8703B_1ANT_LBTT_LTE_BREAK_BT = 0x3,
|
||||
BT_8703B_1ANT_LBTT_MAX
|
||||
}BT_8703B_1ANT_LTE_BREAK_TABLE_TYPE,*PBT_8703B_1ANT_LTE_BREAK_TABLE_TYPE;
|
||||
|
||||
typedef enum _BT_INFO_SRC_8703B_1ANT{
|
||||
BT_INFO_SRC_8703B_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8703B_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8703B_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8703B_1ANT_MAX
|
||||
}BT_INFO_SRC_8703B_1ANT,*PBT_INFO_SRC_8703B_1ANT;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_BT_STATUS{
|
||||
BT_8703B_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8703B_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8703B_1ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8703B_1ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8703B_1ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8703B_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8703B_1ANT_BT_STATUS_MAX
|
||||
}BT_8703B_1ANT_BT_STATUS,*PBT_8703B_1ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_WIFI_STATUS{
|
||||
BT_8703B_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8703B_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT = 0x3,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||
BT_8703B_1ANT_WIFI_STATUS_MAX
|
||||
}BT_8703B_1ANT_WIFI_STATUS,*PBT_8703B_1ANT_WIFI_STATUS;
|
||||
|
||||
typedef enum _BT_8703B_1ANT_COEX_ALGO{
|
||||
BT_8703B_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8703B_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8703B_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8703B_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8703B_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8703B_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8703B_1ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8703B_1ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8703B_1ANT_COEX_ALGO,*PBT_8703B_1ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8703B_1ANT{
|
||||
// hw setting
|
||||
u1Byte preAntPosType;
|
||||
u1Byte curAntPosType;
|
||||
// fw mechanism
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
|
||||
u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
|
||||
u2Byte backupRetryLimit;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
u1Byte preArfrType;
|
||||
u1Byte curArfrType;
|
||||
u1Byte preRetryLimitType;
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte curAmpduTimeType;
|
||||
u4Byte nArpCnt;
|
||||
|
||||
u1Byte errorCondition;
|
||||
} COEX_DM_8703B_1ANT, *PCOEX_DM_8703B_1ANT;
|
||||
|
||||
typedef struct _COEX_STA_8703B_1ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
BOOLEAN bBtHiPriLinkExist;
|
||||
u1Byte nNumOfProfile;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte specialPktPeriodCnt;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
s1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8703B_1ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8703B_1ANT_MAX];
|
||||
BOOLEAN bBtWhckTest;
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
BOOLEAN bC2hBtPage; //Add for win8.1 page out issue
|
||||
BOOLEAN bWiFiIsHighPriTask; //Add for win8.1 page out issue
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
u4Byte popEventCnt;
|
||||
u1Byte nScanAPNum;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
BOOLEAN bCCKLock;
|
||||
BOOLEAN bPreCCKLock;
|
||||
BOOLEAN bCCKEverLock;
|
||||
u1Byte nCoexTableType;
|
||||
|
||||
BOOLEAN bForceLpsOn;
|
||||
u4Byte wrongProfileNotification;
|
||||
|
||||
BOOLEAN bConCurrentRxModeOn;
|
||||
|
||||
u2Byte nScoreBoard;
|
||||
}COEX_STA_8703B_1ANT, *PCOEX_STA_8703B_1ANT;
|
||||
|
||||
#define BT_8703B_1ANT_ANTDET_PSD_POINTS 256 //MAX:1024
|
||||
#define BT_8703B_1ANT_ANTDET_PSD_AVGNUM 1 //MAX:3
|
||||
#define BT_8703B_1ANT_ANTDET_BUF_LEN 16
|
||||
|
||||
typedef struct _PSDSCAN_STA_8703B_1ANT{
|
||||
|
||||
u4Byte nAntDet_BTLEChannel; //BT LE Channel ex:2412
|
||||
u4Byte nAntDet_BTTxTime;
|
||||
u4Byte nAntDet_PrePSDScanPeakVal;
|
||||
BOOLEAN nAntDet_IsAntDetAvailable;
|
||||
u4Byte nAntDet_PSDScanPeakVal;
|
||||
BOOLEAN nAntDet_IsBTReplyAvailable;
|
||||
u4Byte nAntDet_PSDScanPeakFreq;
|
||||
|
||||
u1Byte nAntDet_Result;
|
||||
u1Byte nAntDet_PeakVal[BT_8703B_1ANT_ANTDET_BUF_LEN];
|
||||
u1Byte nAntDet_PeakFreq[BT_8703B_1ANT_ANTDET_BUF_LEN];
|
||||
u4Byte bAntDet_TryCount;
|
||||
u4Byte bAntDet_FailCount;
|
||||
u4Byte nAntDet_IntevalCount;
|
||||
u4Byte nAntDet_ThresOffset;
|
||||
|
||||
u4Byte nRealCentFreq;
|
||||
s4Byte nRealOffset;
|
||||
u4Byte nRealSpan;
|
||||
|
||||
u4Byte nPSDBandWidth; //unit: Hz
|
||||
u4Byte nPSDPoint; //128/256/512/1024
|
||||
u4Byte nPSDReport[1024]; //unit:dB (20logx), 0~255
|
||||
u4Byte nPSDReport_MaxHold[1024]; //unit:dB (20logx), 0~255
|
||||
u4Byte nPSDStartPoint;
|
||||
u4Byte nPSDStopPoint;
|
||||
u4Byte nPSDMaxValuePoint;
|
||||
u4Byte nPSDMaxValue;
|
||||
u4Byte nPSDStartBase;
|
||||
u4Byte nPSDAvgNum; // 1/8/16/32
|
||||
u4Byte nPSDGenCount;
|
||||
BOOLEAN bIsPSDRunning;
|
||||
BOOLEAN bIsPSDShowMaxOnly;
|
||||
} PSDSCAN_STA_8703B_1ANT, *PPSDSCAN_STA_8703B_1ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8703b1ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_RfStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_ScoreBoardStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_CoexDmReset(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_AntennaDetection(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u4Byte centFreq,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte span,
|
||||
IN u4Byte seconds
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_AntennaIsolation(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u4Byte centFreq,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte span,
|
||||
IN u4Byte seconds
|
||||
);
|
||||
|
||||
VOID
|
||||
EXhalbtc8703b1ant_PSDScan(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u4Byte centFreq,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte span,
|
||||
IN u4Byte seconds
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b1ant_DisplayAntDetection(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,229 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8703B 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8703B_2ANT 1
|
||||
|
||||
|
||||
#define BT_INFO_8703B_2ANT_B_FTP BIT7
|
||||
#define BT_INFO_8703B_2ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8703B_2ANT_B_HID BIT5
|
||||
#define BT_INFO_8703B_2ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8703B_2ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8703B_2ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8703B_2ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8703B_2ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8703B_2ANT 2
|
||||
|
||||
|
||||
#define BT_8703B_2ANT_WIFI_RSSI_COEXSWITCH_THRES 42 //WiFi RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
|
||||
#define BT_8703B_2ANT_BT_RSSI_COEXSWITCH_THRES 46 //BT RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
|
||||
|
||||
typedef enum _BT_INFO_SRC_8703B_2ANT{
|
||||
BT_INFO_SRC_8703B_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8703B_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8703B_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8703B_2ANT_MAX
|
||||
}BT_INFO_SRC_8703B_2ANT,*PBT_INFO_SRC_8703B_2ANT;
|
||||
|
||||
typedef enum _BT_8703B_2ANT_BT_STATUS{
|
||||
BT_8703B_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8703B_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8703B_2ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8703B_2ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8703B_2ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8703B_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8703B_2ANT_BT_STATUS_MAX
|
||||
}BT_8703B_2ANT_BT_STATUS,*PBT_8703B_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8703B_2ANT_COEX_ALGO{
|
||||
BT_8703B_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8703B_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8703B_2ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8703B_2ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8703B_2ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8703B_2ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8703B_2ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8703B_2ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8703B_2ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8703B_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8703B_2ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8703B_2ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8703B_2ANT_COEX_ALGO,*PBT_8703B_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8703B_2ANT{
|
||||
// fw mechanism
|
||||
u1Byte preBtDecPwrLvl;
|
||||
u1Byte curBtDecPwrLvl;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bResetTdmaAdjust;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
BOOLEAN bNeedRecover0x948;
|
||||
u4Byte backup0x948;
|
||||
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
BOOLEAN bIsSwitchTo1dot5Ant;
|
||||
} COEX_DM_8703B_2ANT, *PCOEX_DM_8703B_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8703B_2ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8703B_2ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8703B_2ANT_MAX];
|
||||
BOOLEAN bBtWhckTest;
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
u1Byte nCoexTableType;
|
||||
BOOLEAN bForceLpsOn;
|
||||
|
||||
u1Byte disVerInfoCnt;
|
||||
}COEX_STA_8703B_2ANT, *PCOEX_STA_8703B_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8703b2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8703b2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,172 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8723A 1Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_INFO_8723A_1ANT_B_FTP BIT7
|
||||
#define BT_INFO_8723A_1ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8723A_1ANT_B_HID BIT5
|
||||
#define BT_INFO_8723A_1ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8723A_1ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8723A_1ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8723A_1ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8723A_1ANT_B_CONNECTION BIT0
|
||||
|
||||
typedef enum _BT_STATE_8723A_1ANT{
|
||||
BT_STATE_8723A_1ANT_DISABLED = 0,
|
||||
BT_STATE_8723A_1ANT_NO_CONNECTION = 1,
|
||||
BT_STATE_8723A_1ANT_CONNECT_IDLE = 2,
|
||||
BT_STATE_8723A_1ANT_INQ_OR_PAG = 3,
|
||||
BT_STATE_8723A_1ANT_ACL_ONLY_BUSY = 4,
|
||||
BT_STATE_8723A_1ANT_SCO_ONLY_BUSY = 5,
|
||||
BT_STATE_8723A_1ANT_ACL_SCO_BUSY = 6,
|
||||
BT_STATE_8723A_1ANT_HID_BUSY = 7,
|
||||
BT_STATE_8723A_1ANT_HID_SCO_BUSY = 8,
|
||||
BT_STATE_8723A_1ANT_MAX
|
||||
}BT_STATE_8723A_1ANT, *PBT_STATE_8723A_1ANT;
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8723A_1ANT 2
|
||||
|
||||
typedef enum _BT_INFO_SRC_8723A_1ANT{
|
||||
BT_INFO_SRC_8723A_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8723A_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8723A_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8723A_1ANT_MAX
|
||||
}BT_INFO_SRC_8723A_1ANT,*PBT_INFO_SRC_8723A_1ANT;
|
||||
|
||||
typedef enum _BT_8723A_1ANT_BT_STATUS{
|
||||
BT_8723A_1ANT_BT_STATUS_IDLE = 0x0,
|
||||
BT_8723A_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8723A_1ANT_BT_STATUS_NON_IDLE = 0x2,
|
||||
BT_8723A_1ANT_BT_STATUS_MAX
|
||||
}BT_8723A_1ANT_BT_STATUS,*PBT_8723A_1ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8723A_1ANT_COEX_ALGO{
|
||||
BT_8723A_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8723A_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8723A_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8723A_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8723A_1ANT_COEX_ALGO_PANEDR = 0x4,
|
||||
BT_8723A_1ANT_COEX_ALGO_PANHS = 0x5,
|
||||
BT_8723A_1ANT_COEX_ALGO_PANEDR_A2DP = 0x6,
|
||||
BT_8723A_1ANT_COEX_ALGO_PANEDR_HID = 0x7,
|
||||
BT_8723A_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x8,
|
||||
BT_8723A_1ANT_COEX_ALGO_HID_A2DP = 0x9,
|
||||
BT_8723A_1ANT_COEX_ALGO_MAX
|
||||
}BT_8723A_1ANT_COEX_ALGO,*PBT_8723A_1ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8723A_1ANT{
|
||||
// fw mechanism
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
u4Byte psTdmaMonitorCnt;
|
||||
u4Byte psTdmaGlobalCnt;
|
||||
BOOLEAN bResetTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
} COEX_DM_8723A_1ANT, *PCOEX_DM_8723A_1ANT;
|
||||
|
||||
typedef struct _COEX_STA_8723A_1ANT{
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preBtRssiState1;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8723A_1ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8723A_1ANT_MAX];
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
//BOOLEAN bHoldForStackOperation;
|
||||
//u1Byte bHoldPeriodCnt;
|
||||
// this is for c2h hang work-around
|
||||
u4Byte c2hHangDetectCnt;
|
||||
}COEX_STA_8723A_1ANT, *PCOEX_STA_8723A_1ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8723a1ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a1ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,185 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8723A 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_INFO_8723A_2ANT_B_FTP BIT7
|
||||
#define BT_INFO_8723A_2ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8723A_2ANT_B_HID BIT5
|
||||
#define BT_INFO_8723A_2ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8723A_2ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8723A_2ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8723A_2ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8723A_2ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8723A_2ANT 2
|
||||
|
||||
typedef enum _BT_INFO_SRC_8723A_2ANT{
|
||||
BT_INFO_SRC_8723A_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8723A_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8723A_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8723A_2ANT_MAX
|
||||
}BT_INFO_SRC_8723A_2ANT,*PBT_INFO_SRC_8723A_2ANT;
|
||||
|
||||
typedef enum _BT_8723A_2ANT_BT_STATUS{
|
||||
BT_8723A_2ANT_BT_STATUS_IDLE = 0x0,
|
||||
BT_8723A_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8723A_2ANT_BT_STATUS_NON_IDLE = 0x2,
|
||||
BT_8723A_2ANT_BT_STATUS_MAX
|
||||
}BT_8723A_2ANT_BT_STATUS,*PBT_8723A_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8723A_2ANT_COEX_ALGO{
|
||||
BT_8723A_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8723A_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8723A_2ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8723A_2ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8723A_2ANT_COEX_ALGO_PANEDR = 0x4,
|
||||
BT_8723A_2ANT_COEX_ALGO_PANHS = 0x5,
|
||||
BT_8723A_2ANT_COEX_ALGO_PANEDR_A2DP = 0x6,
|
||||
BT_8723A_2ANT_COEX_ALGO_PANEDR_HID = 0x7,
|
||||
BT_8723A_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x8,
|
||||
BT_8723A_2ANT_COEX_ALGO_HID_A2DP = 0x9,
|
||||
BT_8723A_2ANT_COEX_ALGO_MAX
|
||||
}BT_8723A_2ANT_COEX_ALGO,*PBT_8723A_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8723A_2ANT{
|
||||
// fw mechanism
|
||||
BOOLEAN bPreDecBtPwr;
|
||||
BOOLEAN bCurDecBtPwr;
|
||||
//BOOLEAN bPreBtLnaConstrain;
|
||||
//BOOLEAN bCurBtLnaConstrain;
|
||||
//u1Byte bPreBtPsdMode;
|
||||
//u1Byte bCurBtPsdMode;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bResetTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
//BOOLEAN bPreBtAutoReport;
|
||||
//BOOLEAN bCurBtAutoReport;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
} COEX_DM_8723A_2ANT, *PCOEX_DM_8723A_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8723A_2ANT{
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preBtRssiState1;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8723A_2ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8723A_2ANT_MAX];
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
BOOLEAN bHoldForStackOperation;
|
||||
u1Byte bHoldPeriodCnt;
|
||||
// this is for c2h hang work-around
|
||||
u4Byte c2hHangDetectCnt;
|
||||
}COEX_STA_8723A_2ANT, *PCOEX_STA_8723A_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8723a2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_StackOperationNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723a2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,338 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8723B 1ANT BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8723B_1ANT 1
|
||||
|
||||
#define BT_INFO_8723B_1ANT_B_FTP BIT7
|
||||
#define BT_INFO_8723B_1ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8723B_1ANT_B_HID BIT5
|
||||
#define BT_INFO_8723B_1ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8723B_1ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8723B_1ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8723B_1ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8723B_1ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BT_INFO_8723B_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT 2
|
||||
|
||||
#define BT_8723B_1ANT_WIFI_NOISY_THRESH 50 //30 //max: 255
|
||||
|
||||
//for Antenna detection
|
||||
#define BT_8723B_1ANT_ANTDET_PSDTHRES_BACKGROUND 50
|
||||
#define BT_8723B_1ANT_ANTDET_PSDTHRES_2ANT_BADISOLATION 70
|
||||
#define BT_8723B_1ANT_ANTDET_PSDTHRES_2ANT_GOODISOLATION 55
|
||||
#define BT_8723B_1ANT_ANTDET_PSDTHRES_1ANT 35
|
||||
#define BT_8723B_1ANT_ANTDET_RETRY_INTERVAL 10 //retry timer if ant det is fail, unit: second
|
||||
#define BT_8723B_1ANT_ANTDET_ENABLE 0
|
||||
#define BT_8723B_1ANT_ANTDET_COEXMECHANISMSWITCH_ENABLE 0
|
||||
|
||||
typedef enum _BT_INFO_SRC_8723B_1ANT{
|
||||
BT_INFO_SRC_8723B_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8723B_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8723B_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8723B_1ANT_MAX
|
||||
}BT_INFO_SRC_8723B_1ANT,*PBT_INFO_SRC_8723B_1ANT;
|
||||
|
||||
typedef enum _BT_8723B_1ANT_BT_STATUS{
|
||||
BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8723B_1ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8723B_1ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8723B_1ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8723B_1ANT_BT_STATUS_MAX
|
||||
}BT_8723B_1ANT_BT_STATUS,*PBT_8723B_1ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8723B_1ANT_WIFI_STATUS{
|
||||
BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
|
||||
BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
|
||||
BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT = 0x3,
|
||||
BT_8723B_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||
BT_8723B_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||
BT_8723B_1ANT_WIFI_STATUS_MAX
|
||||
}BT_8723B_1ANT_WIFI_STATUS,*PBT_8723B_1ANT_WIFI_STATUS;
|
||||
|
||||
typedef enum _BT_8723B_1ANT_COEX_ALGO{
|
||||
BT_8723B_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8723B_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8723B_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8723B_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8723B_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8723B_1ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8723B_1ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8723B_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8723B_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8723B_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8723B_1ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8723B_1ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8723B_1ANT_COEX_ALGO,*PBT_8723B_1ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8723B_1ANT{
|
||||
// hw setting
|
||||
u1Byte preAntPosType;
|
||||
u1Byte curAntPosType;
|
||||
// fw mechanism
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
|
||||
u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
|
||||
u2Byte backupRetryLimit;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
u1Byte preArfrType;
|
||||
u1Byte curArfrType;
|
||||
u1Byte preRetryLimitType;
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte curAmpduTimeType;
|
||||
u4Byte nArpCnt;
|
||||
|
||||
u1Byte errorCondition;
|
||||
} COEX_DM_8723B_1ANT, *PCOEX_DM_8723B_1ANT;
|
||||
|
||||
typedef struct _COEX_STA_8723B_1ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
BOOLEAN bBtHiPriLinkExist;
|
||||
u1Byte nNumOfProfile;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte specialPktPeriodCnt;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
s1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8723B_1ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8723B_1ANT_MAX];
|
||||
BOOLEAN bBtWhckTest;
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
BOOLEAN bC2hBtRemoteNameReq;
|
||||
BOOLEAN bWiFiIsHighPriTask; //Add for win8.1 page out issue
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
u4Byte popEventCnt;
|
||||
u1Byte nScanAPNum;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
BOOLEAN bCCKLock;
|
||||
BOOLEAN bPreCCKLock;
|
||||
BOOLEAN bCCKEverLock;
|
||||
u1Byte nCoexTableType;
|
||||
|
||||
BOOLEAN bForceLpsOn;
|
||||
u4Byte wrongProfileNotification;
|
||||
|
||||
u1Byte nA2DPBitPool;
|
||||
u1Byte nCutVersion;
|
||||
}COEX_STA_8723B_1ANT, *PCOEX_STA_8723B_1ANT;
|
||||
|
||||
#define BT_8723B_1ANT_ANTDET_PSD_POINTS 256 //MAX:1024
|
||||
#define BT_8723B_1ANT_ANTDET_PSD_AVGNUM 1 //MAX:3
|
||||
#define BT_8723B_1ANT_ANTDET_BUF_LEN 16
|
||||
|
||||
typedef struct _PSDSCAN_STA_8723B_1ANT{
|
||||
|
||||
u4Byte nAntDet_BTLEChannel; //BT LE Channel ex:2412
|
||||
u4Byte nAntDet_BTTxTime;
|
||||
u4Byte nAntDet_PrePSDScanPeakVal;
|
||||
BOOLEAN nAntDet_IsAntDetAvailable;
|
||||
u4Byte nAntDet_PSDScanPeakVal;
|
||||
BOOLEAN nAntDet_IsBTReplyAvailable;
|
||||
u4Byte nAntDet_PSDScanPeakFreq;
|
||||
|
||||
u1Byte nAntDet_Result;
|
||||
u1Byte nAntDet_PeakVal[BT_8723B_1ANT_ANTDET_BUF_LEN];
|
||||
u1Byte nAntDet_PeakFreq[BT_8723B_1ANT_ANTDET_BUF_LEN];
|
||||
u4Byte bAntDet_TryCount;
|
||||
u4Byte bAntDet_FailCount;
|
||||
u4Byte nAntDet_IntevalCount;
|
||||
u4Byte nAntDet_ThresOffset;
|
||||
|
||||
u4Byte nRealCentFreq;
|
||||
s4Byte nRealOffset;
|
||||
u4Byte nRealSpan;
|
||||
|
||||
u4Byte nPSDBandWidth; //unit: Hz
|
||||
u4Byte nPSDPoint; //128/256/512/1024
|
||||
u4Byte nPSDReport[1024]; //unit:dB (20logx), 0~255
|
||||
u4Byte nPSDReport_MaxHold[1024]; //unit:dB (20logx), 0~255
|
||||
u4Byte nPSDStartPoint;
|
||||
u4Byte nPSDStopPoint;
|
||||
u4Byte nPSDMaxValuePoint;
|
||||
u4Byte nPSDMaxValue;
|
||||
u4Byte nPSDStartBase;
|
||||
u4Byte nPSDAvgNum; // 1/8/16/32
|
||||
u4Byte nPSDGenCount;
|
||||
BOOLEAN bIsPSDRunning;
|
||||
BOOLEAN bIsPSDShowMaxOnly;
|
||||
} PSDSCAN_STA_8723B_1ANT, *PPSDSCAN_STA_8723B_1ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8723b1ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_RfStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_CoexDmReset(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_AntennaDetection(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u4Byte centFreq,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte span,
|
||||
IN u4Byte seconds
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_AntennaIsolation(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u4Byte centFreq,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte span,
|
||||
IN u4Byte seconds
|
||||
);
|
||||
|
||||
VOID
|
||||
EXhalbtc8723b1ant_PSDScan(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u4Byte centFreq,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte span,
|
||||
IN u4Byte seconds
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b1ant_DisplayAntDetection(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,235 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8723B 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8723B_2ANT 1
|
||||
|
||||
|
||||
#define BT_INFO_8723B_2ANT_B_FTP BIT7
|
||||
#define BT_INFO_8723B_2ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8723B_2ANT_B_HID BIT5
|
||||
#define BT_INFO_8723B_2ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8723B_2ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8723B_2ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8723B_2ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8723B_2ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT 2
|
||||
|
||||
|
||||
#define BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES 42 //WiFi RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
|
||||
#define BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES 46 //BT RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
|
||||
|
||||
typedef enum _BT_INFO_SRC_8723B_2ANT{
|
||||
BT_INFO_SRC_8723B_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8723B_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8723B_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8723B_2ANT_MAX
|
||||
}BT_INFO_SRC_8723B_2ANT,*PBT_INFO_SRC_8723B_2ANT;
|
||||
|
||||
typedef enum _BT_8723B_2ANT_BT_STATUS{
|
||||
BT_8723B_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8723B_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8723B_2ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8723B_2ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8723B_2ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8723B_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8723B_2ANT_BT_STATUS_MAX
|
||||
}BT_8723B_2ANT_BT_STATUS,*PBT_8723B_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8723B_2ANT_COEX_ALGO{
|
||||
BT_8723B_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8723B_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8723B_2ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8723B_2ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8723B_2ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8723B_2ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8723B_2ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8723B_2ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8723B_2ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8723B_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8723B_2ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8723B_2ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8723B_2ANT_COEX_ALGO,*PBT_8723B_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8723B_2ANT{
|
||||
// fw mechanism
|
||||
u1Byte preBtDecPwrLvl;
|
||||
u1Byte curBtDecPwrLvl;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bResetTdmaAdjust;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
BOOLEAN bNeedRecover0x948;
|
||||
u4Byte backup0x948;
|
||||
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
BOOLEAN bIsSwitchTo1dot5Ant;
|
||||
} COEX_DM_8723B_2ANT, *PCOEX_DM_8723B_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8723B_2ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8723B_2ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8723B_2ANT_MAX];
|
||||
BOOLEAN bBtWhckTest;
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
BOOLEAN bC2hBtRemoteNameReq;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
u4Byte popEventCnt;
|
||||
u1Byte nScanAPNum;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
u1Byte nCoexTableType;
|
||||
BOOLEAN bForceLpsOn;
|
||||
|
||||
u1Byte disVerInfoCnt;
|
||||
|
||||
u1Byte nA2DPBitPool;
|
||||
u1Byte nCutVersion;
|
||||
}COEX_STA_8723B_2ANT, *PCOEX_STA_8723B_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8723b2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8723b2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,259 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8812A 1ANT BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8812A_1ANT 1
|
||||
|
||||
#define BT_INFO_8812A_1ANT_B_FTP BIT7
|
||||
#define BT_INFO_8812A_1ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8812A_1ANT_B_HID BIT5
|
||||
#define BT_INFO_8812A_1ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8812A_1ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8812A_1ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8812A_1ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8812A_1ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BT_INFO_8812A_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8812A_1ANT 2
|
||||
|
||||
#define BT_8812A_1ANT_WIFI_NOISY_THRESH 30 //max: 255
|
||||
|
||||
typedef enum _BT_INFO_SRC_8812A_1ANT{
|
||||
BT_INFO_SRC_8812A_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8812A_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8812A_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8812A_1ANT_MAX
|
||||
}BT_INFO_SRC_8812A_1ANT,*PBT_INFO_SRC_8812A_1ANT;
|
||||
|
||||
typedef enum _BT_8812A_1ANT_BT_STATUS{
|
||||
BT_8812A_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8812A_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8812A_1ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8812A_1ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8812A_1ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8812A_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8812A_1ANT_BT_STATUS_MAX
|
||||
}BT_8812A_1ANT_BT_STATUS,*PBT_8812A_1ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8812A_1ANT_WIFI_STATUS{
|
||||
BT_8812A_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8812A_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
|
||||
BT_8812A_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
|
||||
BT_8812A_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT = 0x3,
|
||||
BT_8812A_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||
BT_8812A_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||
BT_8812A_1ANT_WIFI_STATUS_MAX
|
||||
}BT_8812A_1ANT_WIFI_STATUS,*PBT_8812A_1ANT_WIFI_STATUS;
|
||||
|
||||
typedef enum _BT_8812A_1ANT_COEX_ALGO{
|
||||
BT_8812A_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8812A_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8812A_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8812A_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8812A_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8812A_1ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8812A_1ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8812A_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8812A_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8812A_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8812A_1ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8812A_1ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8812A_1ANT_COEX_ALGO,*PBT_8812A_1ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8812A_1ANT{
|
||||
// hw setting
|
||||
u1Byte preAntPosType;
|
||||
u1Byte curAntPosType;
|
||||
// fw mechanism
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
|
||||
u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
|
||||
u2Byte backupRetryLimit;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
u1Byte preArfrType;
|
||||
u1Byte curArfrType;
|
||||
u1Byte preRetryLimitType;
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte curAmpduTimeType;
|
||||
u4Byte nArpCnt;
|
||||
|
||||
u1Byte errorCondition;
|
||||
} COEX_DM_8812A_1ANT, *PCOEX_DM_8812A_1ANT;
|
||||
|
||||
typedef struct _COEX_STA_8812A_1ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte specialPktPeriodCnt;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
s1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8812A_1ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8812A_1ANT_MAX];
|
||||
u4Byte btInfoQueryCnt;
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
BOOLEAN bC2hBtPage; //Add for win8.1 page out issue
|
||||
BOOLEAN bWiFiIsHighPriTask; //Add for win8.1 page out issue
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
u4Byte popEventCnt;
|
||||
u1Byte nScanAPNum;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
BOOLEAN bCCKLock;
|
||||
BOOLEAN bPreCCKLock;
|
||||
u1Byte nCoexTableType;
|
||||
|
||||
BOOLEAN bForceLpsOn;
|
||||
}COEX_STA_8812A_1ANT, *PCOEX_STA_8812A_1ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8812a1ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_RfStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_CoexDmReset(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_DbgControl(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte opCode,
|
||||
IN u1Byte opLen,
|
||||
IN pu1Byte pData
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a1ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,250 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8812A 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8812A_2ANT 0
|
||||
|
||||
#define BT_INFO_8812A_2ANT_B_FTP BIT7
|
||||
#define BT_INFO_8812A_2ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8812A_2ANT_B_HID BIT5
|
||||
#define BT_INFO_8812A_2ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8812A_2ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8812A_2ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8812A_2ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8812A_2ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BT_INFO_8812A_2ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8812A_2ANT 2
|
||||
#define NOISY_AP_NUM_THRESH_8812A 50
|
||||
|
||||
|
||||
typedef enum _BT_INFO_SRC_8812A_2ANT{
|
||||
BT_INFO_SRC_8812A_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8812A_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8812A_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8812A_2ANT_MAX
|
||||
}BT_INFO_SRC_8812A_2ANT,*PBT_INFO_SRC_8812A_2ANT;
|
||||
|
||||
typedef enum _BT_8812A_2ANT_BT_STATUS{
|
||||
BT_8812A_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8812A_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8812A_2ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8812A_2ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8812A_2ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8812A_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8812A_2ANT_BT_STATUS_MAX
|
||||
}BT_8812A_2ANT_BT_STATUS,*PBT_8812A_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8812A_2ANT_COEX_ALGO{
|
||||
BT_8812A_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8812A_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8812A_2ANT_COEX_ALGO_SCO_HID = 0x2,
|
||||
BT_8812A_2ANT_COEX_ALGO_HID = 0x3,
|
||||
BT_8812A_2ANT_COEX_ALGO_A2DP = 0x4,
|
||||
BT_8812A_2ANT_COEX_ALGO_A2DP_PANHS = 0x5,
|
||||
BT_8812A_2ANT_COEX_ALGO_PANEDR = 0x6,
|
||||
BT_8812A_2ANT_COEX_ALGO_PANHS = 0x7,
|
||||
BT_8812A_2ANT_COEX_ALGO_PANEDR_A2DP = 0x8,
|
||||
BT_8812A_2ANT_COEX_ALGO_PANEDR_HID = 0x9,
|
||||
BT_8812A_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0xa,
|
||||
BT_8812A_2ANT_COEX_ALGO_HID_A2DP_PANHS = 0xb,
|
||||
BT_8812A_2ANT_COEX_ALGO_HID_A2DP = 0xc,
|
||||
BT_8812A_2ANT_COEX_ALGO_MAX = 0xd
|
||||
}BT_8812A_2ANT_COEX_ALGO,*PBT_8812A_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8812A_2ANT{
|
||||
// fw mechanism
|
||||
u1Byte preBtDecPwrLvl;
|
||||
u1Byte curBtDecPwrLvl;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bAutoTdmaAdjustLowRssi;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
BOOLEAN bPreEnablePTA;
|
||||
BOOLEAN bCurEnablePTA;
|
||||
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
|
||||
u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
|
||||
u2Byte backupRetryLimit;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
u1Byte curRaMaskType;
|
||||
u1Byte preArfrType;
|
||||
u1Byte curArfrType;
|
||||
u1Byte preRetryLimitType;
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte curAmpduTimeType;
|
||||
} COEX_DM_8812A_2ANT, *PCOEX_DM_8812A_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8812A_2ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
BOOLEAN bAclBusy;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preBtDisabled;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8812A_2ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8812A_2ANT_MAX];
|
||||
u4Byte prebtInfoC2hCnt_BT_RSP;
|
||||
u4Byte prebtInfoC2hCnt_BT_SEND;
|
||||
u4Byte btInfoQueryCnt;
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
u1Byte nScanAPNum;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
u1Byte nCoexTableType;
|
||||
BOOLEAN bForceLpsOn;
|
||||
|
||||
u1Byte disVerInfoCnt;
|
||||
|
||||
}COEX_STA_8812A_2ANT, *PCOEX_STA_8812A_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8812a2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_DbgControl(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte opCode,
|
||||
IN u1Byte opLen,
|
||||
IN pu1Byte pData
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8812a2ant_BTOffOnNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte BTstatus
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,214 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8821A 1ANT BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8821A_1ANT 1
|
||||
|
||||
#define BT_INFO_8821A_1ANT_B_FTP BIT7
|
||||
#define BT_INFO_8821A_1ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8821A_1ANT_B_HID BIT5
|
||||
#define BT_INFO_8821A_1ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8821A_1ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8821A_1ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8821A_1ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8821A_1ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BT_INFO_8821A_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8821A_1ANT 2
|
||||
|
||||
typedef enum _BT_INFO_SRC_8821A_1ANT{
|
||||
BT_INFO_SRC_8821A_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8821A_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8821A_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8821A_1ANT_MAX
|
||||
}BT_INFO_SRC_8821A_1ANT,*PBT_INFO_SRC_8821A_1ANT;
|
||||
|
||||
typedef enum _BT_8821A_1ANT_BT_STATUS{
|
||||
BT_8821A_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8821A_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8821A_1ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8821A_1ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8821A_1ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8821A_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8821A_1ANT_BT_STATUS_MAX
|
||||
}BT_8821A_1ANT_BT_STATUS,*PBT_8821A_1ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8821A_1ANT_WIFI_STATUS{
|
||||
BT_8821A_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8821A_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
|
||||
BT_8821A_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
|
||||
BT_8821A_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT = 0x3,
|
||||
BT_8821A_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||
BT_8821A_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||
BT_8821A_1ANT_WIFI_STATUS_MAX
|
||||
}BT_8821A_1ANT_WIFI_STATUS,*PBT_8821A_1ANT_WIFI_STATUS;
|
||||
|
||||
typedef enum _BT_8821A_1ANT_COEX_ALGO{
|
||||
BT_8821A_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8821A_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8821A_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8821A_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8821A_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8821A_1ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8821A_1ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8821A_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8821A_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8821A_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8821A_1ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8821A_1ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8821A_1ANT_COEX_ALGO,*PBT_8821A_1ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8821A_1ANT{
|
||||
// fw mechanism
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
|
||||
u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
|
||||
u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
|
||||
u2Byte backupRetryLimit;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
u1Byte preArfrType;
|
||||
u1Byte curArfrType;
|
||||
u1Byte preRetryLimitType;
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte curAmpduTimeType;
|
||||
u4Byte nArpCnt;
|
||||
|
||||
u1Byte errorCondition;
|
||||
} COEX_DM_8821A_1ANT, *PCOEX_DM_8821A_1ANT;
|
||||
|
||||
typedef struct _COEX_STA_8821A_1ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte specialPktPeriodCnt;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8821A_1ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8821A_1ANT_MAX];
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
BOOLEAN bC2hBtPage; //Add for win8.1 page out issue
|
||||
BOOLEAN bWiFiIsHighPriTask; //Add for win8.1 page out issue
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
}COEX_STA_8821A_1ANT, *PCOEX_STA_8821A_1ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8821a1ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a1ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,227 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8821A 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_AUTO_REPORT_ONLY_8821A_2ANT 1
|
||||
|
||||
|
||||
#define BT_INFO_8821A_2ANT_B_FTP BIT7
|
||||
#define BT_INFO_8821A_2ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8821A_2ANT_B_HID BIT5
|
||||
#define BT_INFO_8821A_2ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8821A_2ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8821A_2ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8821A_2ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8821A_2ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8821A_2ANT 2
|
||||
|
||||
|
||||
#define BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES 42 //WiFi RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
|
||||
#define BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES 46 //BT RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
|
||||
|
||||
typedef enum _BT_INFO_SRC_8821A_2ANT{
|
||||
BT_INFO_SRC_8821A_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8821A_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8821A_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8821A_2ANT_MAX
|
||||
}BT_INFO_SRC_8821A_2ANT,*PBT_INFO_SRC_8821A_2ANT;
|
||||
|
||||
typedef enum _BT_8821A_2ANT_BT_STATUS{
|
||||
BT_8821A_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8821A_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8821A_2ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8821A_2ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8821A_2ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8821A_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8821A_2ANT_BT_STATUS_MAX
|
||||
}BT_8821A_2ANT_BT_STATUS,*PBT_8821A_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8821A_2ANT_COEX_ALGO{
|
||||
BT_8821A_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8821A_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8821A_2ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8821A_2ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8821A_2ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8821A_2ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8821A_2ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8821A_2ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8821A_2ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8821A_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8821A_2ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8821A_2ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8821A_2ANT_COEX_ALGO,*PBT_8821A_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8821A_2ANT{
|
||||
// fw mechanism
|
||||
u1Byte preBtDecPwrLvl;
|
||||
u1Byte curBtDecPwrLvl;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[5];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bResetTdmaAdjust;
|
||||
BOOLEAN bAutoTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
|
||||
BOOLEAN bNeedRecover0x948;
|
||||
u4Byte backup0x948;
|
||||
|
||||
u1Byte preLps;
|
||||
u1Byte curLps;
|
||||
u1Byte preRpwm;
|
||||
u1Byte curRpwm;
|
||||
} COEX_DM_8821A_2ANT, *PCOEX_DM_8821A_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8821A_2ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8821A_2ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8821A_2ANT_MAX];
|
||||
BOOLEAN bBtWhckTest;
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
|
||||
u4Byte nCRCOK_CCK;
|
||||
u4Byte nCRCOK_11g;
|
||||
u4Byte nCRCOK_11n;
|
||||
u4Byte nCRCOK_11nAgg;
|
||||
|
||||
u4Byte nCRCErr_CCK;
|
||||
u4Byte nCRCErr_11g;
|
||||
u4Byte nCRCErr_11n;
|
||||
u4Byte nCRCErr_11nAgg;
|
||||
|
||||
u1Byte nCoexTableType;
|
||||
BOOLEAN bForceLpsOn;
|
||||
|
||||
u1Byte disVerInfoCnt;
|
||||
}COEX_STA_8821A_2ANT, *PCOEX_STA_8821A_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8821a2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821a2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,208 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
//===========================================
|
||||
// The following is for 8821A_CSR 2Ant BT Co-exist definition
|
||||
//===========================================
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_FTP BIT7
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_A2DP BIT6
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_HID BIT5
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_SCO_BUSY BIT4
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_ACL_BUSY BIT3
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_INQ_PAGE BIT2
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_SCO_ESCO BIT1
|
||||
#define BT_INFO_8821A_CSR_2ANT_B_CONNECTION BIT0
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8821A_CSR_2ANT 2
|
||||
|
||||
typedef enum _BT_INFO_SRC_8821A_CSR_2ANT{
|
||||
BT_INFO_SRC_8821A_CSR_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8821A_CSR_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8821A_CSR_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8821A_CSR_2ANT_MAX
|
||||
}BT_INFO_SRC_8821A_CSR_2ANT,*PBT_INFO_SRC_8821A_CSR_2ANT;
|
||||
|
||||
typedef enum _BT_8821A_CSR_2ANT_BT_STATUS{
|
||||
BT_8821A_CSR_2ANT_BT_STATUS_IDLE = 0x0,
|
||||
BT_8821A_CSR_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8821A_CSR_2ANT_BT_STATUS_NON_IDLE = 0x2,
|
||||
BT_8821A_CSR_2ANT_BT_STATUS_MAX
|
||||
}BT_8821A_CSR_2ANT_BT_STATUS,*PBT_8821A_CSR_2ANT_BT_STATUS;
|
||||
|
||||
typedef enum _BT_8821A_CSR_2ANT_COEX_ALGO{
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8821A_CSR_2ANT_COEX_ALGO_MAX = 0xb,
|
||||
}BT_8821A_CSR_2ANT_COEX_ALGO,*PBT_8821A_CSR_2ANT_COEX_ALGO;
|
||||
|
||||
typedef struct _COEX_DM_8821A_CSR_2ANT{
|
||||
// fw mechanism
|
||||
BOOLEAN bPreDecBtPwr;
|
||||
BOOLEAN bCurDecBtPwr;
|
||||
u1Byte preFwDacSwingLvl;
|
||||
u1Byte curFwDacSwingLvl;
|
||||
BOOLEAN bCurIgnoreWlanAct;
|
||||
BOOLEAN bPreIgnoreWlanAct;
|
||||
u1Byte prePsTdma;
|
||||
u1Byte curPsTdma;
|
||||
u1Byte psTdmaPara[6];
|
||||
u1Byte psTdmaDuAdjType;
|
||||
BOOLEAN bResetTdmaAdjust;
|
||||
BOOLEAN bPrePsTdmaOn;
|
||||
BOOLEAN bCurPsTdmaOn;
|
||||
BOOLEAN bPreBtAutoReport;
|
||||
BOOLEAN bCurBtAutoReport;
|
||||
|
||||
// sw mechanism
|
||||
BOOLEAN bPreRfRxLpfShrink;
|
||||
BOOLEAN bCurRfRxLpfShrink;
|
||||
u4Byte btRf0x1eBackup;
|
||||
BOOLEAN bPreLowPenaltyRa;
|
||||
BOOLEAN bCurLowPenaltyRa;
|
||||
BOOLEAN bPreDacSwingOn;
|
||||
u4Byte preDacSwingLvl;
|
||||
BOOLEAN bCurDacSwingOn;
|
||||
u4Byte curDacSwingLvl;
|
||||
BOOLEAN bPreAdcBackOff;
|
||||
BOOLEAN bCurAdcBackOff;
|
||||
BOOLEAN bPreAgcTableEn;
|
||||
BOOLEAN bCurAgcTableEn;
|
||||
u4Byte preVal0x6c0;
|
||||
u4Byte curVal0x6c0;
|
||||
u4Byte preVal0x6c4;
|
||||
u4Byte curVal0x6c4;
|
||||
u4Byte preVal0x6c8;
|
||||
u4Byte curVal0x6c8;
|
||||
u1Byte preVal0x6cc;
|
||||
u1Byte curVal0x6cc;
|
||||
BOOLEAN bLimitedDig;
|
||||
|
||||
u4Byte preRaMask;
|
||||
u4Byte curRaMask;
|
||||
|
||||
u1Byte curAmpduNumType;
|
||||
u1Byte preAmpduNumType;
|
||||
u2Byte backupAmpduMaxNum;
|
||||
|
||||
u1Byte curAmpduTimeType;
|
||||
u1Byte preAmpduTimeType;
|
||||
u1Byte backupAmpduMaxTime;
|
||||
|
||||
u1Byte curArfrType;
|
||||
u1Byte preArfrType;
|
||||
u4Byte backupArfrCnt1;
|
||||
u4Byte backupArfrCnt2;
|
||||
|
||||
u1Byte curRetryLimitType;
|
||||
u1Byte preRetryLimitType;
|
||||
u2Byte backupRetryLimit;
|
||||
|
||||
// algorithm related
|
||||
u1Byte preAlgorithm;
|
||||
u1Byte curAlgorithm;
|
||||
u1Byte btStatus;
|
||||
u1Byte wifiChnlInfo[3];
|
||||
} COEX_DM_8821A_CSR_2ANT, *PCOEX_DM_8821A_CSR_2ANT;
|
||||
|
||||
typedef struct _COEX_STA_8821A_CSR_2ANT{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bSlave;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bPanExist;
|
||||
|
||||
BOOLEAN bUnderLps;
|
||||
BOOLEAN bUnderIps;
|
||||
u4Byte highPriorityTx;
|
||||
u4Byte highPriorityRx;
|
||||
u4Byte lowPriorityTx;
|
||||
u4Byte lowPriorityRx;
|
||||
u1Byte btRssi;
|
||||
u1Byte preBtRssiState;
|
||||
u1Byte preWifiRssiState[4];
|
||||
BOOLEAN bC2hBtInfoReqSent;
|
||||
u1Byte btInfoC2h[BT_INFO_SRC_8821A_CSR_2ANT_MAX][10];
|
||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8821A_CSR_2ANT_MAX];
|
||||
BOOLEAN bC2hBtInquiryPage;
|
||||
u1Byte btRetryCnt;
|
||||
u1Byte btInfoExt;
|
||||
}COEX_STA_8821A_CSR_2ANT, *PCOEX_STA_8821A_CSR_2ANT;
|
||||
|
||||
//===========================================
|
||||
// The following is interface which will notify coex module.
|
||||
//===========================================
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtc8821aCsr2ant_DisplayCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
@@ -1,748 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __HALBTC_OUT_SRC_H__
|
||||
#define __HALBTC_OUT_SRC_H__
|
||||
|
||||
#define NORMAL_EXEC FALSE
|
||||
#define FORCE_EXEC TRUE
|
||||
|
||||
#define BTC_RF_OFF 0x0
|
||||
#define BTC_RF_ON 0x1
|
||||
|
||||
#define BTC_RF_A 0x0
|
||||
#define BTC_RF_B 0x1
|
||||
#define BTC_RF_C 0x2
|
||||
#define BTC_RF_D 0x3
|
||||
|
||||
#define BTC_SMSP SINGLEMAC_SINGLEPHY
|
||||
#define BTC_DMDP DUALMAC_DUALPHY
|
||||
#define BTC_DMSP DUALMAC_SINGLEPHY
|
||||
#define BTC_MP_UNKNOWN 0xff
|
||||
|
||||
#define BT_COEX_ANT_TYPE_PG 0
|
||||
#define BT_COEX_ANT_TYPE_ANTDIV 1
|
||||
#define BT_COEX_ANT_TYPE_DETECTED 2
|
||||
|
||||
#define BTC_MIMO_PS_STATIC 0 // 1ss
|
||||
#define BTC_MIMO_PS_DYNAMIC 1 // 2ss
|
||||
|
||||
#define BTC_RATE_DISABLE 0
|
||||
#define BTC_RATE_ENABLE 1
|
||||
|
||||
// single Antenna definition
|
||||
#define BTC_ANT_PATH_WIFI 0
|
||||
#define BTC_ANT_PATH_BT 1
|
||||
#define BTC_ANT_PATH_PTA 2
|
||||
// dual Antenna definition
|
||||
#define BTC_ANT_WIFI_AT_MAIN 0
|
||||
#define BTC_ANT_WIFI_AT_AUX 1
|
||||
// coupler Antenna definition
|
||||
#define BTC_ANT_WIFI_AT_CPL_MAIN 0
|
||||
#define BTC_ANT_WIFI_AT_CPL_AUX 1
|
||||
|
||||
typedef enum _BTC_POWERSAVE_TYPE{
|
||||
BTC_PS_WIFI_NATIVE = 0, // wifi original power save behavior
|
||||
BTC_PS_LPS_ON = 1,
|
||||
BTC_PS_LPS_OFF = 2,
|
||||
BTC_PS_MAX
|
||||
} BTC_POWERSAVE_TYPE, *PBTC_POWERSAVE_TYPE;
|
||||
|
||||
typedef enum _BTC_BT_REG_TYPE{
|
||||
BTC_BT_REG_RF = 0,
|
||||
BTC_BT_REG_MODEM = 1,
|
||||
BTC_BT_REG_BLUEWIZE = 2,
|
||||
BTC_BT_REG_VENDOR = 3,
|
||||
BTC_BT_REG_LE = 4,
|
||||
BTC_BT_REG_MAX
|
||||
} BTC_BT_REG_TYPE, *PBTC_BT_REG_TYPE;
|
||||
|
||||
typedef enum _BTC_CHIP_INTERFACE{
|
||||
BTC_INTF_UNKNOWN = 0,
|
||||
BTC_INTF_PCI = 1,
|
||||
BTC_INTF_USB = 2,
|
||||
BTC_INTF_SDIO = 3,
|
||||
BTC_INTF_MAX
|
||||
} BTC_CHIP_INTERFACE, *PBTC_CHIP_INTERFACE;
|
||||
|
||||
typedef enum _BTC_CHIP_TYPE{
|
||||
BTC_CHIP_UNDEF = 0,
|
||||
BTC_CHIP_CSR_BC4 = 1,
|
||||
BTC_CHIP_CSR_BC8 = 2,
|
||||
BTC_CHIP_RTL8723A = 3,
|
||||
BTC_CHIP_RTL8821 = 4,
|
||||
BTC_CHIP_RTL8723B = 5,
|
||||
BTC_CHIP_MAX
|
||||
} BTC_CHIP_TYPE, *PBTC_CHIP_TYPE;
|
||||
|
||||
// following is for wifi link status
|
||||
#define WIFI_STA_CONNECTED BIT0
|
||||
#define WIFI_AP_CONNECTED BIT1
|
||||
#define WIFI_HS_CONNECTED BIT2
|
||||
#define WIFI_P2P_GO_CONNECTED BIT3
|
||||
#define WIFI_P2P_GC_CONNECTED BIT4
|
||||
|
||||
// following is for command line utility
|
||||
#define CL_SPRINTF rsprintf
|
||||
#define CL_PRINTF DCMD_Printf
|
||||
|
||||
|
||||
typedef struct _BTC_BOARD_INFO{
|
||||
// The following is some board information
|
||||
u1Byte btChipType;
|
||||
u1Byte pgAntNum; // pg ant number
|
||||
u1Byte btdmAntNum; // ant number for btdm
|
||||
u1Byte btdmAntNumByAntDet; // ant number for btdm after antenna detection
|
||||
u1Byte btdmAntPos; //Bryant Add to indicate Antenna Position for (pgAntNum = 2) && (btdmAntNum =1) (DPDT+1Ant case)
|
||||
u1Byte singleAntPath; // current used for 8723b only, 1=>s0, 0=>s1
|
||||
u1Byte bTfbgaPackage; //for Antenna detect threshold
|
||||
u1Byte btdmAntDetFinish;
|
||||
u1Byte antType;
|
||||
} BTC_BOARD_INFO, *PBTC_BOARD_INFO;
|
||||
|
||||
typedef enum _BTC_DBG_OPCODE{
|
||||
BTC_DBG_SET_COEX_NORMAL = 0x0,
|
||||
BTC_DBG_SET_COEX_WIFI_ONLY = 0x1,
|
||||
BTC_DBG_SET_COEX_BT_ONLY = 0x2,
|
||||
BTC_DBG_SET_COEX_DEC_BT_PWR = 0x3,
|
||||
BTC_DBG_SET_COEX_BT_AFH_MAP = 0x4,
|
||||
BTC_DBG_SET_COEX_BT_IGNORE_WLAN_ACT = 0x5,
|
||||
BTC_DBG_MAX
|
||||
}BTC_DBG_OPCODE,*PBTC_DBG_OPCODE;
|
||||
|
||||
typedef enum _BTC_RSSI_STATE{
|
||||
BTC_RSSI_STATE_HIGH = 0x0,
|
||||
BTC_RSSI_STATE_MEDIUM = 0x1,
|
||||
BTC_RSSI_STATE_LOW = 0x2,
|
||||
BTC_RSSI_STATE_STAY_HIGH = 0x3,
|
||||
BTC_RSSI_STATE_STAY_MEDIUM = 0x4,
|
||||
BTC_RSSI_STATE_STAY_LOW = 0x5,
|
||||
BTC_RSSI_MAX
|
||||
}BTC_RSSI_STATE,*PBTC_RSSI_STATE;
|
||||
#define BTC_RSSI_HIGH(_rssi_) ((_rssi_==BTC_RSSI_STATE_HIGH||_rssi_==BTC_RSSI_STATE_STAY_HIGH)? TRUE:FALSE)
|
||||
#define BTC_RSSI_MEDIUM(_rssi_) ((_rssi_==BTC_RSSI_STATE_MEDIUM||_rssi_==BTC_RSSI_STATE_STAY_MEDIUM)? TRUE:FALSE)
|
||||
#define BTC_RSSI_LOW(_rssi_) ((_rssi_==BTC_RSSI_STATE_LOW||_rssi_==BTC_RSSI_STATE_STAY_LOW)? TRUE:FALSE)
|
||||
|
||||
typedef enum _BTC_WIFI_ROLE{
|
||||
BTC_ROLE_STATION = 0x0,
|
||||
BTC_ROLE_AP = 0x1,
|
||||
BTC_ROLE_IBSS = 0x2,
|
||||
BTC_ROLE_HS_MODE = 0x3,
|
||||
BTC_ROLE_MAX
|
||||
}BTC_WIFI_ROLE,*PBTC_WIFI_ROLE;
|
||||
|
||||
typedef enum _BTC_WIRELESS_FREQ{
|
||||
BTC_FREQ_2_4G = 0x0,
|
||||
BTC_FREQ_5G = 0x1,
|
||||
BTC_FREQ_MAX
|
||||
}BTC_WIRELESS_FREQ,*PBTC_WIRELESS_FREQ;
|
||||
|
||||
typedef enum _BTC_WIFI_BW_MODE{
|
||||
BTC_WIFI_BW_LEGACY = 0x0,
|
||||
BTC_WIFI_BW_HT20 = 0x1,
|
||||
BTC_WIFI_BW_HT40 = 0x2,
|
||||
BTC_WIFI_BW_HT80 = 0x3,
|
||||
BTC_WIFI_BW_HT160 = 0x4,
|
||||
BTC_WIFI_BW_MAX
|
||||
}BTC_WIFI_BW_MODE,*PBTC_WIFI_BW_MODE;
|
||||
|
||||
typedef enum _BTC_WIFI_TRAFFIC_DIR{
|
||||
BTC_WIFI_TRAFFIC_TX = 0x0,
|
||||
BTC_WIFI_TRAFFIC_RX = 0x1,
|
||||
BTC_WIFI_TRAFFIC_MAX
|
||||
}BTC_WIFI_TRAFFIC_DIR,*PBTC_WIFI_TRAFFIC_DIR;
|
||||
|
||||
typedef enum _BTC_WIFI_PNP{
|
||||
BTC_WIFI_PNP_WAKE_UP = 0x0,
|
||||
BTC_WIFI_PNP_SLEEP = 0x1,
|
||||
BTC_WIFI_PNP_MAX
|
||||
}BTC_WIFI_PNP,*PBTC_WIFI_PNP;
|
||||
|
||||
typedef enum _BTC_IOT_PEER
|
||||
{
|
||||
BTC_IOT_PEER_UNKNOWN = 0,
|
||||
BTC_IOT_PEER_REALTEK = 1,
|
||||
BTC_IOT_PEER_REALTEK_92SE = 2,
|
||||
BTC_IOT_PEER_BROADCOM = 3,
|
||||
BTC_IOT_PEER_RALINK = 4,
|
||||
BTC_IOT_PEER_ATHEROS = 5,
|
||||
BTC_IOT_PEER_CISCO = 6,
|
||||
BTC_IOT_PEER_MERU = 7,
|
||||
BTC_IOT_PEER_MARVELL = 8,
|
||||
BTC_IOT_PEER_REALTEK_SOFTAP = 9,// peer is RealTek SOFT_AP, by Bohn, 2009.12.17
|
||||
BTC_IOT_PEER_SELF_SOFTAP = 10, // Self is SoftAP
|
||||
BTC_IOT_PEER_AIRGO = 11,
|
||||
BTC_IOT_PEER_INTEL = 12,
|
||||
BTC_IOT_PEER_RTK_APCLIENT = 13,
|
||||
BTC_IOT_PEER_REALTEK_81XX = 14,
|
||||
BTC_IOT_PEER_REALTEK_WOW = 15,
|
||||
BTC_IOT_PEER_REALTEK_JAGUAR_BCUTAP = 16,
|
||||
BTC_IOT_PEER_REALTEK_JAGUAR_CCUTAP = 17,
|
||||
BTC_IOT_PEER_MAX,
|
||||
}BTC_IOT_PEER, *PBTC_IOT_PEER;
|
||||
|
||||
//for 8723b-d cut large current issue
|
||||
typedef enum _BT_WIFI_COEX_STATE{
|
||||
BTC_WIFI_STAT_INIT,
|
||||
BTC_WIFI_STAT_IQK,
|
||||
BTC_WIFI_STAT_NORMAL_OFF,
|
||||
BTC_WIFI_STAT_MP_OFF,
|
||||
BTC_WIFI_STAT_NORMAL,
|
||||
BTC_WIFI_STAT_ANT_DIV,
|
||||
BTC_WIFI_STAT_MAX
|
||||
}BT_WIFI_COEX_STATE,*PBT_WIFI_COEX_STATE;
|
||||
|
||||
typedef enum _BT_ANT_TYPE{
|
||||
BTC_ANT_TYPE_0,
|
||||
BTC_ANT_TYPE_1,
|
||||
BTC_ANT_TYPE_2,
|
||||
BTC_ANT_TYPE_3,
|
||||
BTC_ANT_TYPE_4,
|
||||
BTC_ANT_TYPE_MAX
|
||||
}BT_ANT_TYPE,*PBT_ANT_TYPE;
|
||||
|
||||
// defined for BFP_BTC_GET
|
||||
typedef enum _BTC_GET_TYPE{
|
||||
// type BOOLEAN
|
||||
BTC_GET_BL_HS_OPERATION,
|
||||
BTC_GET_BL_HS_CONNECTING,
|
||||
BTC_GET_BL_WIFI_CONNECTED,
|
||||
BTC_GET_BL_WIFI_BUSY,
|
||||
BTC_GET_BL_WIFI_SCAN,
|
||||
BTC_GET_BL_WIFI_LINK,
|
||||
BTC_GET_BL_WIFI_ROAM,
|
||||
BTC_GET_BL_WIFI_4_WAY_PROGRESS,
|
||||
BTC_GET_BL_WIFI_UNDER_5G,
|
||||
BTC_GET_BL_WIFI_AP_MODE_ENABLE,
|
||||
BTC_GET_BL_WIFI_ENABLE_ENCRYPTION,
|
||||
BTC_GET_BL_WIFI_UNDER_B_MODE,
|
||||
BTC_GET_BL_EXT_SWITCH,
|
||||
BTC_GET_BL_WIFI_IS_IN_MP_MODE,
|
||||
BTC_GET_BL_IS_ASUS_8723B,
|
||||
|
||||
// type s4Byte
|
||||
BTC_GET_S4_WIFI_RSSI,
|
||||
BTC_GET_S4_HS_RSSI,
|
||||
|
||||
// type u4Byte
|
||||
BTC_GET_U4_WIFI_BW,
|
||||
BTC_GET_U4_WIFI_TRAFFIC_DIRECTION,
|
||||
BTC_GET_U4_WIFI_FW_VER,
|
||||
BTC_GET_U4_WIFI_LINK_STATUS,
|
||||
BTC_GET_U4_BT_PATCH_VER,
|
||||
|
||||
// type u1Byte
|
||||
BTC_GET_U1_WIFI_DOT11_CHNL,
|
||||
BTC_GET_U1_WIFI_CENTRAL_CHNL,
|
||||
BTC_GET_U1_WIFI_HS_CHNL,
|
||||
BTC_GET_U1_MAC_PHY_MODE,
|
||||
BTC_GET_U1_AP_NUM,
|
||||
BTC_GET_U1_ANT_TYPE,
|
||||
BTC_GET_U1_IOT_PEER,
|
||||
|
||||
//===== for 1Ant ======
|
||||
BTC_GET_U1_LPS_MODE,
|
||||
|
||||
BTC_GET_MAX
|
||||
}BTC_GET_TYPE,*PBTC_GET_TYPE;
|
||||
|
||||
// defined for BFP_BTC_SET
|
||||
typedef enum _BTC_SET_TYPE{
|
||||
// type BOOLEAN
|
||||
BTC_SET_BL_BT_DISABLE,
|
||||
BTC_SET_BL_BT_TRAFFIC_BUSY,
|
||||
BTC_SET_BL_BT_LIMITED_DIG,
|
||||
BTC_SET_BL_FORCE_TO_ROAM,
|
||||
BTC_SET_BL_TO_REJ_AP_AGG_PKT,
|
||||
BTC_SET_BL_BT_CTRL_AGG_SIZE,
|
||||
BTC_SET_BL_INC_SCAN_DEV_NUM,
|
||||
BTC_SET_BL_BT_TX_RX_MASK,
|
||||
BTC_SET_BL_MIRACAST_PLUS_BT,
|
||||
|
||||
// type u1Byte
|
||||
BTC_SET_U1_RSSI_ADJ_VAL_FOR_AGC_TABLE_ON,
|
||||
BTC_SET_U1_AGG_BUF_SIZE,
|
||||
|
||||
// type trigger some action
|
||||
BTC_SET_ACT_GET_BT_RSSI,
|
||||
BTC_SET_ACT_AGGREGATE_CTRL,
|
||||
//===== for 1Ant ======
|
||||
// type BOOLEAN
|
||||
|
||||
// type u1Byte
|
||||
BTC_SET_U1_RSSI_ADJ_VAL_FOR_1ANT_COEX_TYPE,
|
||||
BTC_SET_U1_LPS_VAL,
|
||||
BTC_SET_U1_RPWM_VAL,
|
||||
// type trigger some action
|
||||
BTC_SET_ACT_LEAVE_LPS,
|
||||
BTC_SET_ACT_ENTER_LPS,
|
||||
BTC_SET_ACT_NORMAL_LPS,
|
||||
BTC_SET_ACT_DISABLE_LOW_POWER,
|
||||
BTC_SET_ACT_UPDATE_RAMASK,
|
||||
BTC_SET_ACT_SEND_MIMO_PS,
|
||||
// BT Coex related
|
||||
BTC_SET_ACT_CTRL_BT_INFO,
|
||||
BTC_SET_ACT_CTRL_BT_COEX,
|
||||
BTC_SET_ACT_CTRL_8723B_ANT,
|
||||
//=================
|
||||
BTC_SET_MAX
|
||||
}BTC_SET_TYPE,*PBTC_SET_TYPE;
|
||||
|
||||
typedef enum _BTC_DBG_DISP_TYPE{
|
||||
BTC_DBG_DISP_COEX_STATISTICS = 0x0,
|
||||
BTC_DBG_DISP_BT_LINK_INFO = 0x1,
|
||||
BTC_DBG_DISP_WIFI_STATUS = 0x2,
|
||||
BTC_DBG_DISP_MAX
|
||||
}BTC_DBG_DISP_TYPE,*PBTC_DBG_DISP_TYPE;
|
||||
|
||||
typedef enum _BTC_NOTIFY_TYPE_IPS{
|
||||
BTC_IPS_LEAVE = 0x0,
|
||||
BTC_IPS_ENTER = 0x1,
|
||||
BTC_IPS_MAX
|
||||
}BTC_NOTIFY_TYPE_IPS,*PBTC_NOTIFY_TYPE_IPS;
|
||||
typedef enum _BTC_NOTIFY_TYPE_LPS{
|
||||
BTC_LPS_DISABLE = 0x0,
|
||||
BTC_LPS_ENABLE = 0x1,
|
||||
BTC_LPS_MAX
|
||||
}BTC_NOTIFY_TYPE_LPS,*PBTC_NOTIFY_TYPE_LPS;
|
||||
typedef enum _BTC_NOTIFY_TYPE_SCAN{
|
||||
BTC_SCAN_FINISH = 0x0,
|
||||
BTC_SCAN_START = 0x1,
|
||||
BTC_SCAN_MAX
|
||||
}BTC_NOTIFY_TYPE_SCAN,*PBTC_NOTIFY_TYPE_SCAN;
|
||||
typedef enum _BTC_NOTIFY_TYPE_ASSOCIATE{
|
||||
BTC_ASSOCIATE_FINISH = 0x0,
|
||||
BTC_ASSOCIATE_START = 0x1,
|
||||
BTC_ASSOCIATE_MAX
|
||||
}BTC_NOTIFY_TYPE_ASSOCIATE,*PBTC_NOTIFY_TYPE_ASSOCIATE;
|
||||
typedef enum _BTC_NOTIFY_TYPE_MEDIA_STATUS{
|
||||
BTC_MEDIA_DISCONNECT = 0x0,
|
||||
BTC_MEDIA_CONNECT = 0x1,
|
||||
BTC_MEDIA_MAX
|
||||
}BTC_NOTIFY_TYPE_MEDIA_STATUS,*PBTC_NOTIFY_TYPE_MEDIA_STATUS;
|
||||
typedef enum _BTC_NOTIFY_TYPE_SPECIAL_PACKET{
|
||||
BTC_PACKET_UNKNOWN = 0x0,
|
||||
BTC_PACKET_DHCP = 0x1,
|
||||
BTC_PACKET_ARP = 0x2,
|
||||
BTC_PACKET_EAPOL = 0x3,
|
||||
BTC_PACKET_MAX
|
||||
}BTC_NOTIFY_TYPE_SPECIAL_PACKET,*PBTC_NOTIFY_TYPE_SPECIAL_PACKET;
|
||||
typedef enum _BTC_NOTIFY_TYPE_STACK_OPERATION{
|
||||
BTC_STACK_OP_NONE = 0x0,
|
||||
BTC_STACK_OP_INQ_PAGE_PAIR_START = 0x1,
|
||||
BTC_STACK_OP_INQ_PAGE_PAIR_FINISH = 0x2,
|
||||
BTC_STACK_OP_MAX
|
||||
}BTC_NOTIFY_TYPE_STACK_OPERATION,*PBTC_NOTIFY_TYPE_STACK_OPERATION;
|
||||
|
||||
//Bryant Add
|
||||
typedef enum _BTC_ANTENNA_POS{
|
||||
BTC_ANTENNA_AT_MAIN_PORT = 0x1,
|
||||
BTC_ANTENNA_AT_AUX_PORT = 0x2,
|
||||
}BTC_ANTENNA_POS,*PBTC_ANTENNA_POS;
|
||||
|
||||
//Bryant Add
|
||||
typedef enum _BTC_BT_OFFON{
|
||||
BTC_BT_OFF = 0x0,
|
||||
BTC_BT_ON = 0x1,
|
||||
}BTC_BTOFFON,*PBTC_BT_OFFON;
|
||||
|
||||
typedef u1Byte
|
||||
(*BFP_BTC_R1)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr
|
||||
);
|
||||
typedef u2Byte
|
||||
(*BFP_BTC_R2)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr
|
||||
);
|
||||
typedef u4Byte
|
||||
(*BFP_BTC_R4)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_W1)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr,
|
||||
IN u1Byte Data
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_W1_BIT_MASK)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte regAddr,
|
||||
IN u1Byte bitMask,
|
||||
IN u1Byte data1b
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_W2)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr,
|
||||
IN u2Byte Data
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_W4)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr,
|
||||
IN u4Byte Data
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_LOCAL_REG_W1)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr,
|
||||
IN u1Byte Data
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_SET_BB_REG)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr,
|
||||
IN u4Byte BitMask,
|
||||
IN u4Byte Data
|
||||
);
|
||||
typedef u4Byte
|
||||
(*BFP_BTC_GET_BB_REG)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u4Byte RegAddr,
|
||||
IN u4Byte BitMask
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_SET_RF_REG)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u1Byte eRFPath,
|
||||
IN u4Byte RegAddr,
|
||||
IN u4Byte BitMask,
|
||||
IN u4Byte Data
|
||||
);
|
||||
typedef u4Byte
|
||||
(*BFP_BTC_GET_RF_REG)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u1Byte eRFPath,
|
||||
IN u4Byte RegAddr,
|
||||
IN u4Byte BitMask
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_FILL_H2C)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u1Byte elementId,
|
||||
IN u4Byte cmdLen,
|
||||
IN pu1Byte pCmdBuffer
|
||||
);
|
||||
|
||||
typedef BOOLEAN
|
||||
(*BFP_BTC_GET)(
|
||||
IN PVOID pBtCoexist,
|
||||
IN u1Byte getType,
|
||||
OUT PVOID pOutBuf
|
||||
);
|
||||
|
||||
typedef BOOLEAN
|
||||
(*BFP_BTC_SET)(
|
||||
IN PVOID pBtCoexist,
|
||||
IN u1Byte setType,
|
||||
OUT PVOID pInBuf
|
||||
);
|
||||
typedef u2Byte
|
||||
(*BFP_BTC_SET_BT_REG)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u1Byte regType,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte value
|
||||
);
|
||||
typedef BOOLEAN
|
||||
(*BFP_BTC_SET_BT_ANT_DETECTION)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u1Byte txTime,
|
||||
IN u1Byte btChnl
|
||||
);
|
||||
typedef u2Byte
|
||||
(*BFP_BTC_GET_BT_REG)(
|
||||
IN PVOID pBtcContext,
|
||||
IN u1Byte regType,
|
||||
IN u4Byte offset,
|
||||
IN pu4Byte data
|
||||
);
|
||||
typedef VOID
|
||||
(*BFP_BTC_DISP_DBG_MSG)(
|
||||
IN PVOID pBtCoexist,
|
||||
IN u1Byte dispType
|
||||
);
|
||||
|
||||
typedef struct _BTC_BT_INFO{
|
||||
BOOLEAN bBtDisabled;
|
||||
u1Byte rssiAdjustForAgcTableOn;
|
||||
u1Byte rssiAdjustFor1AntCoexType;
|
||||
BOOLEAN bPreBtCtrlAggBufSize;
|
||||
BOOLEAN bBtCtrlAggBufSize;
|
||||
BOOLEAN bPreRejectAggPkt;
|
||||
BOOLEAN bRejectAggPkt;
|
||||
BOOLEAN bIncreaseScanDevNum;
|
||||
BOOLEAN bBtTxRxMask;
|
||||
u1Byte preAggBufSize;
|
||||
u1Byte aggBufSize;
|
||||
BOOLEAN bBtBusy;
|
||||
BOOLEAN bLimitedDig;
|
||||
u2Byte btHciVer;
|
||||
u2Byte btRealFwVer;
|
||||
u1Byte btFwVer;
|
||||
u4Byte getBtFwVerCnt;
|
||||
BOOLEAN bMiracastPlusBt;
|
||||
|
||||
BOOLEAN bBtDisableLowPwr;
|
||||
|
||||
BOOLEAN bBtCtrlLps;
|
||||
BOOLEAN bBtLpsOn;
|
||||
BOOLEAN bForceToRoam; // for 1Ant solution
|
||||
u1Byte lpsVal;
|
||||
u1Byte rpwmVal;
|
||||
u4Byte raMask;
|
||||
} BTC_BT_INFO, *PBTC_BT_INFO;
|
||||
|
||||
typedef struct _BTC_STACK_INFO{
|
||||
BOOLEAN bProfileNotified;
|
||||
u2Byte hciVersion; // stack hci version
|
||||
u1Byte numOfLink;
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bAclExist;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bHidExist;
|
||||
u1Byte numOfHid;
|
||||
BOOLEAN bPanExist;
|
||||
BOOLEAN bUnknownAclExist;
|
||||
s1Byte minBtRssi;
|
||||
} BTC_STACK_INFO, *PBTC_STACK_INFO;
|
||||
|
||||
typedef struct _BTC_BT_LINK_INFO{
|
||||
BOOLEAN bBtLinkExist;
|
||||
BOOLEAN bBtHiPriLinkExist;
|
||||
BOOLEAN bScoExist;
|
||||
BOOLEAN bScoOnly;
|
||||
BOOLEAN bA2dpExist;
|
||||
BOOLEAN bA2dpOnly;
|
||||
BOOLEAN bHidExist;
|
||||
BOOLEAN bHidOnly;
|
||||
BOOLEAN bPanExist;
|
||||
BOOLEAN bPanOnly;
|
||||
BOOLEAN bSlaveRole;
|
||||
BOOLEAN bAclBusy;
|
||||
} BTC_BT_LINK_INFO, *PBTC_BT_LINK_INFO;
|
||||
|
||||
typedef struct _BTC_STATISTICS{
|
||||
u4Byte cntBind;
|
||||
u4Byte cntPowerOn;
|
||||
u4Byte cntPreLoadFirmware;
|
||||
u4Byte cntInitHwConfig;
|
||||
u4Byte cntInitCoexDm;
|
||||
u4Byte cntIpsNotify;
|
||||
u4Byte cntLpsNotify;
|
||||
u4Byte cntScanNotify;
|
||||
u4Byte cntConnectNotify;
|
||||
u4Byte cntMediaStatusNotify;
|
||||
u4Byte cntSpecialPacketNotify;
|
||||
u4Byte cntBtInfoNotify;
|
||||
u4Byte cntRfStatusNotify;
|
||||
u4Byte cntPeriodical;
|
||||
u4Byte cntCoexDmSwitch;
|
||||
u4Byte cntStackOperationNotify;
|
||||
u4Byte cntDbgCtrl;
|
||||
} BTC_STATISTICS, *PBTC_STATISTICS;
|
||||
|
||||
typedef struct _BTC_COEXIST{
|
||||
BOOLEAN bBinded; // make sure only one adapter can bind the data context
|
||||
PVOID Adapter; // default adapter
|
||||
BTC_BOARD_INFO boardInfo;
|
||||
BTC_BT_INFO btInfo; // some bt info referenced by non-bt module
|
||||
BTC_STACK_INFO stackInfo;
|
||||
BTC_BT_LINK_INFO btLinkInfo;
|
||||
BTC_CHIP_INTERFACE chipInterface;
|
||||
|
||||
BOOLEAN bInitilized;
|
||||
BOOLEAN bStopCoexDm;
|
||||
BOOLEAN bManualControl;
|
||||
pu1Byte cliBuf;
|
||||
BTC_STATISTICS statistics;
|
||||
u1Byte pwrModeVal[10];
|
||||
|
||||
// function pointers
|
||||
// io related
|
||||
BFP_BTC_R1 fBtcRead1Byte;
|
||||
BFP_BTC_W1 fBtcWrite1Byte;
|
||||
BFP_BTC_W1_BIT_MASK fBtcWrite1ByteBitMask;
|
||||
BFP_BTC_R2 fBtcRead2Byte;
|
||||
BFP_BTC_W2 fBtcWrite2Byte;
|
||||
BFP_BTC_R4 fBtcRead4Byte;
|
||||
BFP_BTC_W4 fBtcWrite4Byte;
|
||||
BFP_BTC_LOCAL_REG_W1 fBtcWriteLocalReg1Byte;
|
||||
// read/write bb related
|
||||
BFP_BTC_SET_BB_REG fBtcSetBbReg;
|
||||
BFP_BTC_GET_BB_REG fBtcGetBbReg;
|
||||
|
||||
// read/write rf related
|
||||
BFP_BTC_SET_RF_REG fBtcSetRfReg;
|
||||
BFP_BTC_GET_RF_REG fBtcGetRfReg;
|
||||
|
||||
// fill h2c related
|
||||
BFP_BTC_FILL_H2C fBtcFillH2c;
|
||||
// other
|
||||
BFP_BTC_DISP_DBG_MSG fBtcDispDbgMsg;
|
||||
// normal get/set related
|
||||
BFP_BTC_GET fBtcGet;
|
||||
BFP_BTC_SET fBtcSet;
|
||||
|
||||
BFP_BTC_GET_BT_REG fBtcGetBtReg;
|
||||
BFP_BTC_SET_BT_REG fBtcSetBtReg;
|
||||
|
||||
BFP_BTC_SET_BT_ANT_DETECTION fBtcSetBtAntDetection;
|
||||
} BTC_COEXIST, *PBTC_COEXIST;
|
||||
|
||||
extern BTC_COEXIST GLBtCoexist;
|
||||
|
||||
BOOLEAN
|
||||
EXhalbtcoutsrc_InitlizeVariables(
|
||||
IN PVOID Adapter
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_PowerOnSetting(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_PreLoadFirmware(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_InitHwConfig(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN BOOLEAN bWifiOnly
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_InitCoexDm(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_IpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_LpsNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_ScanNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_ConnectNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte action
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_MediaStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN RT_MEDIA_STATUS mediaStatus
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_SpecialPacketNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pktType
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_BtInfoNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_RfStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_StackOperationNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte type
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_HaltNotify(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_PnpNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte pnpState
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_ScoreBoardStatusNotify(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN pu1Byte tmpBuf,
|
||||
IN u1Byte length
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_CoexDmSwitch(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_Periodical(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_DbgControl(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u1Byte opCode,
|
||||
IN u1Byte opLen,
|
||||
IN pu1Byte pData
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_AntennaDetection(
|
||||
IN PBTC_COEXIST pBtCoexist,
|
||||
IN u4Byte centFreq,
|
||||
IN u4Byte offset,
|
||||
IN u4Byte span,
|
||||
IN u4Byte seconds
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_StackUpdateProfileInfo(
|
||||
VOID
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_SetHciVersion(
|
||||
IN u2Byte hciVersion
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_SetBtPatchVersion(
|
||||
IN u2Byte btHciVersion,
|
||||
IN u2Byte btPatchVersion
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_UpdateMinBtRssi(
|
||||
IN s1Byte btRssi
|
||||
);
|
||||
#if 0
|
||||
VOID
|
||||
EXhalbtcoutsrc_SetBtExist(
|
||||
IN BOOLEAN bBtExist
|
||||
);
|
||||
#endif
|
||||
VOID
|
||||
EXhalbtcoutsrc_SetChipType(
|
||||
IN u1Byte chipType
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_SetAntNum(
|
||||
IN u1Byte type,
|
||||
IN u1Byte antNum
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_SetSingleAntPath(
|
||||
IN u1Byte singleAntPath
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_DisplayBtCoexInfo(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
VOID
|
||||
EXhalbtcoutsrc_DisplayAntDetection(
|
||||
IN PBTC_COEXIST pBtCoexist
|
||||
);
|
||||
|
||||
#endif
|
||||
@@ -1,89 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2013 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef __MP_PRECOMP_H__
|
||||
#define __MP_PRECOMP_H__
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#define BT_TMP_BUF_SIZE 100
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define rsprintf snprintf
|
||||
#elif defined(PLATFORM_WINDOWS)
|
||||
#define rsprintf sprintf_s
|
||||
#endif
|
||||
|
||||
#define DCMD_Printf DBG_BT_INFO
|
||||
|
||||
#define delay_ms(ms) rtw_mdelay_os(ms)
|
||||
|
||||
#ifdef bEnable
|
||||
#undef bEnable
|
||||
#endif
|
||||
|
||||
#define WPP_SOFTWARE_TRACE 0
|
||||
|
||||
typedef enum _BTC_MSG_COMP_TYPE{
|
||||
COMP_COEX = 0,
|
||||
COMP_MAX
|
||||
}BTC_MSG_COMP_TYPE;
|
||||
extern u4Byte GLBtcDbgType[];
|
||||
|
||||
#define DBG_OFF 0
|
||||
#define DBG_SEC 1
|
||||
#define DBG_SERIOUS 2
|
||||
#define DBG_WARNING 3
|
||||
#define DBG_LOUD 4
|
||||
#define DBG_TRACE 5
|
||||
|
||||
#if DBG
|
||||
#ifdef RT_TRACE
|
||||
#undef RT_TRACE
|
||||
#define RT_TRACE(dbgtype, dbgflag, printstr)\
|
||||
do {\
|
||||
if (GLBtcDbgType[dbgtype] & BIT(dbgflag))\
|
||||
{\
|
||||
DbgPrint printstr;\
|
||||
}\
|
||||
} while (0)
|
||||
#endif
|
||||
#else
|
||||
#define RT_TRACE(dbgtype, dbgflag, printstr)
|
||||
#endif
|
||||
|
||||
#include "HalBtcOutSrc.h"
|
||||
#include "HalBtc8188c2Ant.h"
|
||||
#include "HalBtc8192d2Ant.h"
|
||||
#include "HalBtc8192e1Ant.h"
|
||||
#include "HalBtc8192e2Ant.h"
|
||||
#include "HalBtc8723a1Ant.h"
|
||||
#include "HalBtc8723a2Ant.h"
|
||||
#include "HalBtc8723b1Ant.h"
|
||||
#include "HalBtc8723b2Ant.h"
|
||||
#include "HalBtc8812a1Ant.h"
|
||||
#include "HalBtc8812a2Ant.h"
|
||||
#include "HalBtc8821a1Ant.h"
|
||||
#include "HalBtc8821a2Ant.h"
|
||||
#include "HalBtc8821aCsr2Ant.h"
|
||||
#include "HalBtc8703b1Ant.h"
|
||||
#include "HalBtc8703b2Ant.h"
|
||||
|
||||
#endif // __MP_PRECOMP_H__
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,10 +26,6 @@
|
||||
|
||||
//#define CONFIG_GTK_OL_DBG
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
char rtw_phy_para_file_path[PATH_LENGTH_MAX];
|
||||
#endif
|
||||
|
||||
void dump_chip_info(HAL_VERSION ChipVersion)
|
||||
{
|
||||
int cnt = 0;
|
||||
@@ -966,8 +962,7 @@ int hal_read_mac_hidden_rpt(_adapter *adapter)
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_PCI_HCI)
|
||||
u8 hci_type = rtw_get_intf_type(adapter);
|
||||
|
||||
if ((hci_type == RTW_USB || hci_type == RTW_PCIE)
|
||||
&& !rtw_is_hw_init_completed(adapter))
|
||||
if (!rtw_is_hw_init_completed(adapter))
|
||||
rtw_hal_power_on(adapter);
|
||||
#endif
|
||||
|
||||
@@ -1008,8 +1003,7 @@ mac_hidden_rpt_hdl:
|
||||
exit:
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_PCI_HCI)
|
||||
if ((hci_type == RTW_USB || hci_type == RTW_PCIE)
|
||||
&& !rtw_is_hw_init_completed(adapter))
|
||||
if (!rtw_is_hw_init_completed(adapter))
|
||||
rtw_hal_power_off(adapter);
|
||||
#endif
|
||||
|
||||
@@ -1668,14 +1662,6 @@ void hw_var_port_switch(_adapter *adapter)
|
||||
rtw_write8(adapter, REG_BSSID1+i, bssid[i]);
|
||||
|
||||
/* write bcn ctl */
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
#if defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B)
|
||||
// always enable port0 beacon function for PSTDMA
|
||||
bcn_ctrl_1 |= EN_BCN_FUNCTION;
|
||||
// always disable port1 beacon function for PSTDMA
|
||||
bcn_ctrl &= ~EN_BCN_FUNCTION;
|
||||
#endif
|
||||
#endif
|
||||
rtw_write8(adapter, REG_BCN_CTRL, bcn_ctrl_1);
|
||||
rtw_write8(adapter, REG_BCN_CTRL_1, bcn_ctrl);
|
||||
|
||||
@@ -2327,26 +2313,6 @@ void rtw_hal_set_fw_rsvd_page(_adapter* adapter, bool finished)
|
||||
|
||||
BufIndex += (CurtPktPageNum*PageSize);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
/* BT Qos null data * 1 page */
|
||||
RsvdPageLoc.LocBTQosNull = TotalPageNum;
|
||||
DBG_871X("LocBTQosNull: %d\n", RsvdPageLoc.LocBTQosNull);
|
||||
rtw_hal_construct_NullFunctionData(
|
||||
adapter,
|
||||
&ReservedPagePacket[BufIndex],
|
||||
&BTQosNullLength,
|
||||
get_my_bssid(&pmlmeinfo->network),
|
||||
_TRUE, 0, 0, _FALSE);
|
||||
rtw_hal_fill_fake_txdesc(adapter,
|
||||
&ReservedPagePacket[BufIndex-TxDescLen],
|
||||
BTQosNullLength, _FALSE, _TRUE, _FALSE);
|
||||
|
||||
CurtPktPageNum = (u8)PageNum(TxDescLen + BTQosNullLength, PageSize);
|
||||
|
||||
TotalPageNum += CurtPktPageNum;
|
||||
|
||||
BufIndex += (CurtPktPageNum*PageSize);
|
||||
#endif /* CONFIG_BT_COEXIT */
|
||||
|
||||
/* null data * 1 page */
|
||||
RsvdPageLoc.LocNullData = TotalPageNum;
|
||||
@@ -3445,8 +3411,6 @@ int hal_efuse_macaddr_offset(_adapter *adapter)
|
||||
case RTL8188F:
|
||||
if (interface_type == RTW_USB)
|
||||
addr_offset = EEPROM_MAC_ADDR_8188FU;
|
||||
else if (interface_type == RTW_SDIO)
|
||||
addr_offset = EEPROM_MAC_ADDR_8188FS;
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8812A
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -90,9 +90,6 @@ void Init_ODM_ComInfo(_adapter *adapter)
|
||||
|
||||
rtw_odm_init_ic_type(adapter);
|
||||
|
||||
if (rtw_get_intf_type(adapter) == RTW_GSPI)
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_SDIO);
|
||||
else
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_INTERFACE, rtw_get_intf_type(adapter));
|
||||
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_MP_TEST_CHIP, IS_NORMAL_CHIP(pHalData->VersionID));
|
||||
|
||||
@@ -35,7 +35,7 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&precvpriv->recv_tasklet,
|
||||
(void(*)(unsigned long))usb_recv_tasklet,
|
||||
(void *)usb_recv_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
@@ -45,23 +45,6 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
||||
#endif /* CONFIG_RX_INDICATE_QUEUE */
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if(precvpriv->int_in_urb == NULL){
|
||||
res = _FAIL;
|
||||
DBG_8192C("alloc_urb for interrupt in endpoint fail !!!!\n");
|
||||
goto exit;
|
||||
}
|
||||
#endif /* PLATFORM_LINUX */
|
||||
precvpriv->int_in_buf = rtw_zmalloc(ini_in_buf_sz);
|
||||
if(precvpriv->int_in_buf == NULL){
|
||||
res = _FAIL;
|
||||
DBG_8192C("alloc_mem for interrupt in endpoint fail !!!!\n");
|
||||
goto exit;
|
||||
}
|
||||
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
|
||||
/* init recv_buf */
|
||||
_rtw_init_queue(&precvpriv->free_recv_buf_queue);
|
||||
_rtw_init_queue(&precvpriv->recv_buf_pending_queue);
|
||||
@@ -177,17 +160,6 @@ void usb_free_recv_priv (_adapter *padapter, u16 ini_in_buf_sz)
|
||||
if(precvpriv->pallocated_recv_buf)
|
||||
rtw_mfree(precvpriv->pallocated_recv_buf, NR_RECVBUFF *sizeof(struct recv_buf) + 4);
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
if(precvpriv->int_in_urb)
|
||||
{
|
||||
usb_free_urb(precvpriv->int_in_urb);
|
||||
}
|
||||
#endif
|
||||
if(precvpriv->int_in_buf)
|
||||
rtw_mfree(precvpriv->int_in_buf, ini_in_buf_sz);
|
||||
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
if (skb_queue_len(&precvpriv->rx_skb_queue)) {
|
||||
|
||||
@@ -46,17 +46,8 @@ void rtw_hal_read_chip_info(_adapter *padapter)
|
||||
u8 hci_type = rtw_get_intf_type(padapter);
|
||||
u32 start = rtw_get_current_time();
|
||||
|
||||
/* before access eFuse, make sure card enable has been called */
|
||||
if ((hci_type == RTW_SDIO || hci_type == RTW_GSPI)
|
||||
&& !rtw_is_hw_init_completed(padapter))
|
||||
rtw_hal_power_on(padapter);
|
||||
|
||||
padapter->HalFunc.read_adapter_info(padapter);
|
||||
|
||||
if ((hci_type == RTW_SDIO || hci_type == RTW_GSPI)
|
||||
&& !rtw_is_hw_init_completed(padapter))
|
||||
rtw_hal_power_off(padapter);
|
||||
|
||||
DBG_871X("%s in %d ms\n", __func__, rtw_get_passing_time_ms(start));
|
||||
}
|
||||
|
||||
@@ -104,9 +95,6 @@ void rtw_hal_data_deinit(_adapter *padapter)
|
||||
if (is_primary_adapter(padapter)) {
|
||||
if (padapter->HalData)
|
||||
{
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
phy_free_filebuf(padapter);
|
||||
#endif
|
||||
rtw_vmfree(padapter->HalData, padapter->hal_data_sz);
|
||||
padapter->HalData = NULL;
|
||||
padapter->hal_data_sz = 0;
|
||||
@@ -526,12 +514,6 @@ s32 rtw_hal_interrupt_handler(_adapter *padapter)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#if defined(CONFIG_USB_HCI) && defined(CONFIG_SUPPORT_USB_INT)
|
||||
void rtw_hal_interrupt_handler(_adapter *padapter, u16 pkt_len, u8 *pbuf)
|
||||
{
|
||||
padapter->HalFunc.interrupt_handler(padapter, pkt_len, pbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
void rtw_hal_set_bwmode(_adapter *padapter, CHANNEL_WIDTH Bandwidth, u8 Offset)
|
||||
{
|
||||
@@ -784,7 +766,7 @@ s32 rtw_hal_fill_h2c_cmd(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBu
|
||||
|
||||
if (pri_adapter->bFWReady == _TRUE)
|
||||
return padapter->HalFunc.fill_h2c_cmd(padapter, ElementID, CmdLen, pCmdBuffer);
|
||||
else if (padapter->registrypriv.mp_mode == 0)
|
||||
else
|
||||
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" FW doesn't exit when no MP mode, by pass H2C id:0x%02x\n"
|
||||
, FUNC_ADPT_ARG(padapter), ElementID);
|
||||
return _FAIL;
|
||||
@@ -926,12 +908,6 @@ u8 rtw_hal_ops_check(_adapter *padapter)
|
||||
ret = _FAIL;
|
||||
}
|
||||
#endif/*#if defined(CONFIG_PCI_HCI)*/
|
||||
#if (defined(CONFIG_PCI_HCI)) || (defined(CONFIG_USB_HCI) && defined(CONFIG_SUPPORT_USB_INT))
|
||||
if (NULL == padapter->HalFunc.interrupt_handler) {
|
||||
rtw_hal_error_msg("interrupt_handler");
|
||||
ret = _FAIL;
|
||||
}
|
||||
#endif /*#if (defined(CONFIG_PCI_HCI)) || (defined(CONFIG_USB_HCI) && defined(CONFIG_SUPPORT_USB_INT))*/
|
||||
|
||||
#if defined(CONFIG_PCI_HCI) || defined (CONFIG_SDIO_HCI) || defined (CONFIG_GSPI_HCI)
|
||||
if (NULL == padapter->HalFunc.enable_interrupt) {
|
||||
|
||||
@@ -5012,11 +5012,6 @@ LedControlUSB(
|
||||
{
|
||||
struct led_priv *ledpriv = &(padapter->ledpriv);
|
||||
|
||||
#if(MP_DRIVER == 1)
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (RTW_CANNOT_RUN(padapter) || (!rtw_is_hw_init_completed(padapter))) {
|
||||
/*DBG_871X("%s bDriverStopped:%s, bSurpriseRemoved:%s\n"
|
||||
, __func__
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,162 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __HAL_PHY_RF_H__
|
||||
#define __HAL_PHY_RF_H__
|
||||
|
||||
#include "phydm_powertracking_ap.h"
|
||||
#if (RTL8814A_SUPPORT == 1)
|
||||
#include "rtl8814a/phydm_iqk_8814a.h"
|
||||
#endif
|
||||
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
#include "rtl8822b/phydm_iqk_8822b.h"
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum _PWRTRACK_CONTROL_METHOD {
|
||||
BBSWING,
|
||||
TXAGC,
|
||||
MIX_MODE,
|
||||
TSSI_MODE
|
||||
} PWRTRACK_METHOD;
|
||||
|
||||
typedef VOID (*FuncSetPwr)(PVOID, PWRTRACK_METHOD, u1Byte, u1Byte);
|
||||
typedef VOID(*FuncIQK)(PVOID, u1Byte, u1Byte, u1Byte);
|
||||
typedef VOID (*FuncLCK)(PVOID);
|
||||
//refine by YuChen for 8814A
|
||||
typedef VOID (*FuncSwing)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*);
|
||||
typedef VOID (*FuncSwing8814only)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*);
|
||||
|
||||
typedef struct _TXPWRTRACK_CFG {
|
||||
u1Byte SwingTableSize_CCK;
|
||||
u1Byte SwingTableSize_OFDM;
|
||||
u1Byte Threshold_IQK;
|
||||
u1Byte Threshold_DPK;
|
||||
u1Byte AverageThermalNum;
|
||||
u1Byte RfPathCount;
|
||||
u4Byte ThermalRegAddr;
|
||||
FuncSetPwr ODM_TxPwrTrackSetPwr;
|
||||
FuncIQK DoIQK;
|
||||
FuncLCK PHY_LCCalibrate;
|
||||
FuncSwing GetDeltaSwingTable;
|
||||
FuncSwing8814only GetDeltaSwingTable8814only;
|
||||
} TXPWRTRACK_CFG, *PTXPWRTRACK_CFG;
|
||||
|
||||
VOID
|
||||
ConfigureTxpowerTrack(
|
||||
IN PVOID pDM_VOID,
|
||||
OUT PTXPWRTRACK_CFG pConfig
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
ODM_TXPowerTrackingCallback_ThermalMeter(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PVOID pDM_VOID
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
);
|
||||
|
||||
#if (RTL8192E_SUPPORT==1)
|
||||
VOID
|
||||
ODM_TXPowerTrackingCallback_ThermalMeter_92E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PVOID pDM_VOID
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
||||
#if (RTL8814A_SUPPORT == 1)
|
||||
VOID
|
||||
ODM_TXPowerTrackingCallback_ThermalMeter_JaguarSeries2(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PVOID pDM_VOID
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
);
|
||||
|
||||
#elif ODM_IC_11AC_SERIES_SUPPORT
|
||||
VOID
|
||||
ODM_TXPowerTrackingCallback_ThermalMeter_JaguarSeries(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PVOID pDM_VOID
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
||||
#define IS_CCK_RATE(_rate) (ODM_MGN_1M == _rate || _rate == ODM_MGN_2M || _rate == ODM_MGN_5_5M || _rate == ODM_MGN_11M )
|
||||
|
||||
|
||||
#if(DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
||||
#define MAX_TOLERANCE 5
|
||||
#define IQK_DELAY_TIME 1 //ms
|
||||
|
||||
//
|
||||
// BB/MAC/RF other monitor API
|
||||
//
|
||||
|
||||
void PHY_SetMonitorMode8192C(IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bEnableMonitorMode );
|
||||
|
||||
//
|
||||
// IQ calibrate
|
||||
//
|
||||
void
|
||||
PHY_IQCalibrate_8192C( IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bReCovery);
|
||||
|
||||
//
|
||||
// LC calibrate
|
||||
//
|
||||
void
|
||||
PHY_LCCalibrate_8192C( IN PADAPTER pAdapter);
|
||||
|
||||
//
|
||||
// AP calibrate
|
||||
//
|
||||
void
|
||||
PHY_APCalibrate_8192C( IN PADAPTER pAdapter,
|
||||
IN s1Byte delta);
|
||||
#endif
|
||||
|
||||
#define ODM_TARGET_CHNL_NUM_2G_5G 59
|
||||
|
||||
|
||||
VOID
|
||||
ODM_ResetIQKResult(
|
||||
IN PVOID pDM_VOID
|
||||
);
|
||||
u1Byte
|
||||
ODM_GetRightChnlPlaceforIQK(
|
||||
IN u1Byte chnl
|
||||
);
|
||||
|
||||
void phydm_rf_init(IN PVOID pDM_VOID);
|
||||
void phydm_rf_watchdog(IN PVOID pDM_VOID);
|
||||
|
||||
#endif // #ifndef __HAL_PHY_RF_H__
|
||||
|
||||
@@ -188,18 +188,6 @@ ODM_TXPowerTrackingCallback_ThermalMeter(
|
||||
pDM_Odm->RFCalibrateInfo.TXPowerTrackingCallbackCnt++; //cosa add for debug
|
||||
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = TRUE;
|
||||
|
||||
#if (MP_DRIVER == 1)
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
||||
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = pHalData->TxPowerTrackControl; // <Kordan> We should keep updating the control variable according to HalData.
|
||||
#endif
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
if (pDM_Odm->mp_mode == TRUE)
|
||||
#endif
|
||||
// <Kordan> RFCalibrateInfo.RegA24 will be initialized when ODM HW configuring, but MP configures with para files.
|
||||
pDM_Odm->RFCalibrateInfo.RegA24 = 0x090e1317;
|
||||
#endif
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("===>ODM_TXPowerTrackingCallback_ThermalMeter Start\n pRFCalibrateInfo->BbSwingIdxCckBase: %d, pRFCalibrateInfo->BbSwingIdxOfdmBase[A]: %d, pRFCalibrateInfo->DefaultOfdmIndex: %d\n",
|
||||
pRFCalibrateInfo->BbSwingIdxCckBase, pRFCalibrateInfo->BbSwingIdxOfdmBase[ODM_RF_PATH_A], pRFCalibrateInfo->DefaultOfdmIndex));
|
||||
|
||||
@@ -1,716 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "mp_precomp.h"
|
||||
#include "phydm_precomp.h"
|
||||
|
||||
//#if(DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
||||
|
||||
#define CALCULATE_SWINGTALBE_OFFSET(_offset, _direction, _size, _deltaThermal) \
|
||||
do {\
|
||||
for(_offset = 0; _offset < _size; _offset++)\
|
||||
{\
|
||||
if(_deltaThermal < thermalThreshold[_direction][_offset])\
|
||||
{\
|
||||
if(_offset != 0)\
|
||||
_offset--;\
|
||||
break;\
|
||||
}\
|
||||
} \
|
||||
if(_offset >= _size)\
|
||||
_offset = _size-1;\
|
||||
} while(0)
|
||||
|
||||
|
||||
void ConfigureTxpowerTrack(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
OUT PTXPWRTRACK_CFG pConfig
|
||||
)
|
||||
{
|
||||
#if RTL8192E_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8192E)
|
||||
ConfigureTxpowerTrack_8192E(pConfig);
|
||||
#endif
|
||||
#if RTL8821A_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8821)
|
||||
ConfigureTxpowerTrack_8821A(pConfig);
|
||||
#endif
|
||||
#if RTL8812A_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8812)
|
||||
ConfigureTxpowerTrack_8812A(pConfig);
|
||||
#endif
|
||||
#if RTL8188E_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8188E)
|
||||
ConfigureTxpowerTrack_8188E(pConfig);
|
||||
#endif
|
||||
|
||||
#if RTL8188F_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8188F)
|
||||
ConfigureTxpowerTrack_8188F(pConfig);
|
||||
#endif
|
||||
|
||||
#if RTL8723B_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8723B)
|
||||
ConfigureTxpowerTrack_8723B(pConfig);
|
||||
#endif
|
||||
|
||||
#if RTL8814A_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8814A)
|
||||
ConfigureTxpowerTrack_8814A(pConfig);
|
||||
#endif
|
||||
|
||||
#if RTL8821B_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8821B)
|
||||
ConfigureTxpowerTrack_8821B(pConfig);
|
||||
#endif
|
||||
|
||||
#if RTL8703B_SUPPORT
|
||||
if(pDM_Odm->SupportICType==ODM_RTL8703B)
|
||||
ConfigureTxpowerTrack_8703B(pConfig);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
// <20121113, Kordan> This function should be called when TxAGC changed.
|
||||
// Otherwise the previous compensation is gone, because we record the
|
||||
// delta of temperature between two TxPowerTracking watch dogs.
|
||||
//
|
||||
// NOTE: If Tx BB swing or Tx scaling is varified during run-time, still
|
||||
// need to call this function.
|
||||
//======================================================================
|
||||
VOID
|
||||
ODM_ClearTxPowerTrackingState(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pDM_Odm->Adapter);
|
||||
u1Byte p = 0;
|
||||
PODM_RF_CAL_T pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo);
|
||||
|
||||
pRFCalibrateInfo->BbSwingIdxCckBase = pRFCalibrateInfo->DefaultCckIndex;
|
||||
pRFCalibrateInfo->BbSwingIdxCck = pRFCalibrateInfo->DefaultCckIndex;
|
||||
pRFCalibrateInfo->CCK_index = 0;
|
||||
|
||||
for (p = ODM_RF_PATH_A; p < MAX_RF_PATH; ++p)
|
||||
{
|
||||
pRFCalibrateInfo->BbSwingIdxOfdmBase[p] = pRFCalibrateInfo->DefaultOfdmIndex;
|
||||
pRFCalibrateInfo->BbSwingIdxOfdm[p] = pRFCalibrateInfo->DefaultOfdmIndex;
|
||||
pRFCalibrateInfo->OFDM_index[p] = pRFCalibrateInfo->DefaultOfdmIndex;
|
||||
|
||||
pRFCalibrateInfo->PowerIndexOffset[p] = 0;
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = 0;
|
||||
pRFCalibrateInfo->DeltaPowerIndexLast[p] = 0;
|
||||
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = 0; // Initial Mix mode power tracking
|
||||
pRFCalibrateInfo->Remnant_OFDMSwingIdx[p] = 0;
|
||||
pRFCalibrateInfo->KfreeOffset[p] = 0;
|
||||
}
|
||||
|
||||
pRFCalibrateInfo->Modify_TxAGC_Flag_PathA= FALSE; //Initial at Modify Tx Scaling Mode
|
||||
pRFCalibrateInfo->Modify_TxAGC_Flag_PathB= FALSE; //Initial at Modify Tx Scaling Mode
|
||||
pRFCalibrateInfo->Modify_TxAGC_Flag_PathC= FALSE; //Initial at Modify Tx Scaling Mode
|
||||
pRFCalibrateInfo->Modify_TxAGC_Flag_PathD= FALSE; //Initial at Modify Tx Scaling Mode
|
||||
pRFCalibrateInfo->Remnant_CCKSwingIdx= 0;
|
||||
pRFCalibrateInfo->ThermalValue = pHalData->EEPROMThermalMeter;
|
||||
|
||||
pRFCalibrateInfo->Modify_TxAGC_Value_CCK=0; //modify by Mingzhi.Guo
|
||||
pRFCalibrateInfo->Modify_TxAGC_Value_OFDM=0; //modify by Mingzhi.Guo
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
ODM_TXPowerTrackingCallback_ThermalMeter(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc;
|
||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
||||
PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc;
|
||||
#else
|
||||
PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
|
||||
#endif
|
||||
PODM_RF_CAL_T pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo);
|
||||
|
||||
u1Byte ThermalValue = 0, delta, delta_LCK, delta_IQK, p = 0, i = 0, pathName = 0;
|
||||
s1Byte diff_DPK[4] = {0};
|
||||
u1Byte ThermalValue_AVG_count = 0;
|
||||
u4Byte ThermalValue_AVG = 0;
|
||||
|
||||
u1Byte OFDM_min_index = 0; // OFDM BB Swing should be less than +3.0dB, which is required by Arthur
|
||||
u1Byte Indexforchannel = 0; // GetRightChnlPlaceforIQK(pHalData->CurrentChannel)
|
||||
BOOLEAN bTSSIenable = FALSE;
|
||||
|
||||
TXPWRTRACK_CFG c;
|
||||
|
||||
//4 1. The following TWO tables decide the final index of OFDM/CCK swing table.
|
||||
pu1Byte deltaSwingTableIdx_TUP_A, deltaSwingTableIdx_TDOWN_A;
|
||||
pu1Byte deltaSwingTableIdx_TUP_B, deltaSwingTableIdx_TDOWN_B;
|
||||
//for 8814 add by Yu Chen
|
||||
pu1Byte deltaSwingTableIdx_TUP_C = NULL, deltaSwingTableIdx_TDOWN_C = NULL;
|
||||
pu1Byte deltaSwingTableIdx_TUP_D= NULL, deltaSwingTableIdx_TDOWN_D = NULL;
|
||||
|
||||
//4 2. Initilization ( 7 steps in total )
|
||||
|
||||
ConfigureTxpowerTrack(pDM_Odm, &c);
|
||||
|
||||
(*c.GetDeltaSwingTable)(pDM_Odm, (pu1Byte*)&deltaSwingTableIdx_TUP_A, (pu1Byte*)&deltaSwingTableIdx_TDOWN_A,
|
||||
(pu1Byte*)&deltaSwingTableIdx_TUP_B, (pu1Byte*)&deltaSwingTableIdx_TDOWN_B);
|
||||
|
||||
if(pDM_Odm->SupportICType & ODM_RTL8814A) // for 8814 path C & D
|
||||
(*c.GetDeltaSwingTable8814only)(pDM_Odm, (pu1Byte*)&deltaSwingTableIdx_TUP_C, (pu1Byte*)&deltaSwingTableIdx_TDOWN_C,
|
||||
(pu1Byte*)&deltaSwingTableIdx_TUP_D, (pu1Byte*)&deltaSwingTableIdx_TDOWN_D);
|
||||
|
||||
|
||||
pRFCalibrateInfo->TXPowerTrackingCallbackCnt++; //cosa add for debug
|
||||
pRFCalibrateInfo->bTXPowerTrackingInit = TRUE;
|
||||
|
||||
#if (MP_DRIVER == 1)
|
||||
/*pRFCalibrateInfo->TxPowerTrackControl = pHalData->TxPowerTrackControl;
|
||||
<Kordan> We should keep updating the control variable according to HalData.
|
||||
<Kordan> RFCalibrateInfo.RegA24 will be initialized when ODM HW configuring, but MP configures with para files. */
|
||||
pRFCalibrateInfo->RegA24 = 0x090e1317;
|
||||
#endif
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("===>ODM_TXPowerTrackingCallback_ThermalMeter, \
|
||||
\n pRFCalibrateInfo->BbSwingIdxCckBase: %d, pRFCalibrateInfo->BbSwingIdxOfdmBase[A]: %d, pRFCalibrateInfo->DefaultOfdmIndex: %d\n",
|
||||
pRFCalibrateInfo->BbSwingIdxCckBase, pRFCalibrateInfo->BbSwingIdxOfdmBase[ODM_RF_PATH_A], pRFCalibrateInfo->DefaultOfdmIndex));
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("pRFCalibrateInfo->TxPowerTrackControl %d, pHalData->EEPROMThermalMeter %d\n", pRFCalibrateInfo->TxPowerTrackControl, pHalData->EEPROMThermalMeter));
|
||||
ThermalValue = (u1Byte)ODM_GetRFReg(pDM_Odm, ODM_RF_PATH_A, c.ThermalRegAddr, 0xfc00); //0x42: RF Reg[15:10] 88E
|
||||
|
||||
|
||||
if( ! pRFCalibrateInfo->TxPowerTrackControl )
|
||||
return;
|
||||
|
||||
|
||||
//4 3. Initialize ThermalValues of RFCalibrateInfo
|
||||
|
||||
if(pRFCalibrateInfo->bReloadtxpowerindex)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,("reload ofdm index for band switch\n"));
|
||||
}
|
||||
|
||||
//4 4. Calculate average thermal meter
|
||||
|
||||
pRFCalibrateInfo->ThermalValue_AVG[pRFCalibrateInfo->ThermalValue_AVG_index] = ThermalValue;
|
||||
pRFCalibrateInfo->ThermalValue_AVG_index++;
|
||||
if(pRFCalibrateInfo->ThermalValue_AVG_index == c.AverageThermalNum) //Average times = c.AverageThermalNum
|
||||
pRFCalibrateInfo->ThermalValue_AVG_index = 0;
|
||||
|
||||
for(i = 0; i < c.AverageThermalNum; i++)
|
||||
{
|
||||
if(pRFCalibrateInfo->ThermalValue_AVG[i])
|
||||
{
|
||||
ThermalValue_AVG += pRFCalibrateInfo->ThermalValue_AVG[i];
|
||||
ThermalValue_AVG_count++;
|
||||
}
|
||||
}
|
||||
|
||||
if(ThermalValue_AVG_count) //Calculate Average ThermalValue after average enough times
|
||||
{
|
||||
ThermalValue = (u1Byte)(ThermalValue_AVG / ThermalValue_AVG_count);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("AVG Thermal Meter = 0x%X, EFUSE Thermal Base = 0x%X\n", ThermalValue, pHalData->EEPROMThermalMeter));
|
||||
}
|
||||
|
||||
//4 5. Calculate delta, delta_LCK, delta_IQK.
|
||||
|
||||
//"delta" here is used to determine whether thermal value changes or not.
|
||||
delta = (ThermalValue > pRFCalibrateInfo->ThermalValue)?(ThermalValue - pRFCalibrateInfo->ThermalValue):(pRFCalibrateInfo->ThermalValue - ThermalValue);
|
||||
delta_LCK = (ThermalValue > pRFCalibrateInfo->ThermalValue_LCK)?(ThermalValue - pRFCalibrateInfo->ThermalValue_LCK):(pRFCalibrateInfo->ThermalValue_LCK - ThermalValue);
|
||||
delta_IQK = (ThermalValue > pRFCalibrateInfo->ThermalValue_IQK)?(ThermalValue - pRFCalibrateInfo->ThermalValue_IQK):(pRFCalibrateInfo->ThermalValue_IQK - ThermalValue);
|
||||
|
||||
if(pRFCalibrateInfo->ThermalValue_IQK == 0xff) //no PG, use thermal value for IQK
|
||||
{
|
||||
pRFCalibrateInfo->ThermalValue_IQK = ThermalValue;
|
||||
delta_IQK = (ThermalValue > pRFCalibrateInfo->ThermalValue_IQK)?(ThermalValue - pRFCalibrateInfo->ThermalValue_IQK):(pRFCalibrateInfo->ThermalValue_IQK - ThermalValue);
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD, ("no PG, use ThermalValue for IQK\n"));
|
||||
}
|
||||
|
||||
for(p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
{
|
||||
diff_DPK[p] = (s1Byte)ThermalValue - (s1Byte)pRFCalibrateInfo->DpkThermal[p];
|
||||
}
|
||||
|
||||
//4 6. If necessary, do LCK.
|
||||
|
||||
if (!(pDM_Odm->SupportICType & ODM_RTL8821)) {
|
||||
/*no PG , do LCK at initial status*/
|
||||
if (pRFCalibrateInfo->ThermalValue_LCK == 0xff) {
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD, ("no PG, do LCK\n"));
|
||||
pRFCalibrateInfo->ThermalValue_LCK = ThermalValue;
|
||||
if(c.PHY_LCCalibrate)
|
||||
(*c.PHY_LCCalibrate)(pDM_Odm);
|
||||
delta_LCK = (ThermalValue > pRFCalibrateInfo->ThermalValue_LCK)?(ThermalValue - pRFCalibrateInfo->ThermalValue_LCK):(pRFCalibrateInfo->ThermalValue_LCK - ThermalValue);
|
||||
}
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD, ("(delta, delta_LCK, delta_IQK) = (%d, %d, %d)\n", delta, delta_LCK, delta_IQK));
|
||||
|
||||
/* Delta temperature is equal to or larger than 20 centigrade.*/
|
||||
if (delta_LCK >= c.Threshold_IQK) {
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD, ("delta_LCK(%d) >= Threshold_IQK(%d)\n", delta_LCK, c.Threshold_IQK));
|
||||
pRFCalibrateInfo->ThermalValue_LCK = ThermalValue;
|
||||
if(c.PHY_LCCalibrate)
|
||||
(*c.PHY_LCCalibrate)(pDM_Odm);
|
||||
}
|
||||
}
|
||||
|
||||
//3 7. If necessary, move the index of swing table to adjust Tx power.
|
||||
|
||||
if (delta > 0 && pRFCalibrateInfo->TxPowerTrackControl)
|
||||
{
|
||||
//"delta" here is used to record the absolute value of differrence.
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
||||
delta = ThermalValue > pHalData->EEPROMThermalMeter?(ThermalValue - pHalData->EEPROMThermalMeter):(pHalData->EEPROMThermalMeter - ThermalValue);
|
||||
#else
|
||||
delta = (ThermalValue > pDM_Odm->priv->pmib->dot11RFEntry.ther)?(ThermalValue - pDM_Odm->priv->pmib->dot11RFEntry.ther):(pDM_Odm->priv->pmib->dot11RFEntry.ther - ThermalValue);
|
||||
#endif
|
||||
if (delta >= TXPWR_TRACK_TABLE_SIZE)
|
||||
delta = TXPWR_TRACK_TABLE_SIZE - 1;
|
||||
|
||||
//4 7.1 The Final Power Index = BaseIndex + PowerIndexOffset
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
||||
if(ThermalValue > pHalData->EEPROMThermalMeter) {
|
||||
#else
|
||||
if(ThermalValue > pDM_Odm->priv->pmib->dot11RFEntry.ther) {
|
||||
#endif
|
||||
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
{
|
||||
pRFCalibrateInfo->DeltaPowerIndexLast[p] = pRFCalibrateInfo->DeltaPowerIndex[p]; //recording poer index offset
|
||||
switch(p)
|
||||
{
|
||||
case ODM_RF_PATH_B:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TUP_B[%d] = %d\n", delta, deltaSwingTableIdx_TUP_B[delta]));
|
||||
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = deltaSwingTableIdx_TUP_B[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = deltaSwingTableIdx_TUP_B[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is higher and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_B] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
|
||||
case ODM_RF_PATH_C:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TUP_C[%d] = %d\n", delta, deltaSwingTableIdx_TUP_C[delta]));
|
||||
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = deltaSwingTableIdx_TUP_C[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = deltaSwingTableIdx_TUP_C[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is higher and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_C] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
|
||||
case ODM_RF_PATH_D:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TUP_D[%d] = %d\n", delta, deltaSwingTableIdx_TUP_D[delta]));
|
||||
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = deltaSwingTableIdx_TUP_D[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = deltaSwingTableIdx_TUP_D[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is higher and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_D] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
|
||||
default:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TUP_A[%d] = %d\n", delta, deltaSwingTableIdx_TUP_A[delta]));
|
||||
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = deltaSwingTableIdx_TUP_A[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = deltaSwingTableIdx_TUP_A[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is higher and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_A] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
{
|
||||
pRFCalibrateInfo->DeltaPowerIndexLast[p] = pRFCalibrateInfo->DeltaPowerIndex[p]; //recording poer index offset
|
||||
switch(p)
|
||||
{
|
||||
case ODM_RF_PATH_B:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TDOWN_B[%d] = %d\n", delta, deltaSwingTableIdx_TDOWN_B[delta]));
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = -1 * deltaSwingTableIdx_TDOWN_B[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = -1 * deltaSwingTableIdx_TDOWN_B[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is lower and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_B] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
|
||||
case ODM_RF_PATH_C:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TDOWN_C[%d] = %d\n", delta, deltaSwingTableIdx_TDOWN_C[delta]));
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = -1 * deltaSwingTableIdx_TDOWN_C[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = -1 * deltaSwingTableIdx_TDOWN_C[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is lower and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_C] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
|
||||
case ODM_RF_PATH_D:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TDOWN_D[%d] = %d\n", delta, deltaSwingTableIdx_TDOWN_D[delta]));
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = -1 * deltaSwingTableIdx_TDOWN_D[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = -1 * deltaSwingTableIdx_TDOWN_D[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is lower and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_D] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
|
||||
default:
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("deltaSwingTableIdx_TDOWN_A[%d] = %d\n", delta, deltaSwingTableIdx_TDOWN_A[delta]));
|
||||
pRFCalibrateInfo->DeltaPowerIndex[p] = -1 * deltaSwingTableIdx_TDOWN_A[delta];
|
||||
pRFCalibrateInfo->Absolute_OFDMSwingIdx[p] = -1 * deltaSwingTableIdx_TDOWN_A[delta]; // Record delta swing for mix mode power tracking
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("******Temp is lower and pRFCalibrateInfo->Absolute_OFDMSwingIdx[ODM_RF_PATH_A] = %d\n", pRFCalibrateInfo->Absolute_OFDMSwingIdx[p]));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("\n\n=========================== [Path-%d] Calculating PowerIndexOffset===========================\n", p));
|
||||
|
||||
if(pRFCalibrateInfo->DeltaPowerIndex[p] == pRFCalibrateInfo->DeltaPowerIndexLast[p]) // If Thermal value changes but lookup table value still the same
|
||||
pRFCalibrateInfo->PowerIndexOffset[p] = 0;
|
||||
else
|
||||
pRFCalibrateInfo->PowerIndexOffset[p] = pRFCalibrateInfo->DeltaPowerIndex[p] - pRFCalibrateInfo->DeltaPowerIndexLast[p]; // Power Index Diff between 2 times Power Tracking
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("[Path-%d] PowerIndexOffset(%d) = DeltaPowerIndex(%d) - DeltaPowerIndexLast(%d)\n", p, pRFCalibrateInfo->PowerIndexOffset[p], pRFCalibrateInfo->DeltaPowerIndex[p], pRFCalibrateInfo->DeltaPowerIndexLast[p]));
|
||||
|
||||
pRFCalibrateInfo->OFDM_index[p] = pRFCalibrateInfo->BbSwingIdxOfdmBase[p] + pRFCalibrateInfo->PowerIndexOffset[p];
|
||||
pRFCalibrateInfo->CCK_index = pRFCalibrateInfo->BbSwingIdxCckBase + pRFCalibrateInfo->PowerIndexOffset[p];
|
||||
|
||||
pRFCalibrateInfo->BbSwingIdxCck = pRFCalibrateInfo->CCK_index;
|
||||
pRFCalibrateInfo->BbSwingIdxOfdm[p] = pRFCalibrateInfo->OFDM_index[p];
|
||||
|
||||
// *************Print BB Swing Base and Index Offset*************
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("The 'CCK' final index(%d) = BaseIndex(%d) + PowerIndexOffset(%d)\n", pRFCalibrateInfo->BbSwingIdxCck, pRFCalibrateInfo->BbSwingIdxCckBase, pRFCalibrateInfo->PowerIndexOffset[p]));
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("The 'OFDM' final index(%d) = BaseIndex[%d](%d) + PowerIndexOffset(%d)\n", pRFCalibrateInfo->BbSwingIdxOfdm[p], p, pRFCalibrateInfo->BbSwingIdxOfdmBase[p], pRFCalibrateInfo->PowerIndexOffset[p]));
|
||||
|
||||
//4 7.1 Handle boundary conditions of index.
|
||||
|
||||
if(pRFCalibrateInfo->OFDM_index[p] > c.SwingTableSize_OFDM-1)
|
||||
{
|
||||
pRFCalibrateInfo->OFDM_index[p] = c.SwingTableSize_OFDM-1;
|
||||
}
|
||||
else if (pRFCalibrateInfo->OFDM_index[p] <= OFDM_min_index)
|
||||
{
|
||||
pRFCalibrateInfo->OFDM_index[p] = OFDM_min_index;
|
||||
}
|
||||
}
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("\n\n========================================================================================================\n"));
|
||||
if(pRFCalibrateInfo->CCK_index > c.SwingTableSize_CCK-1)
|
||||
pRFCalibrateInfo->CCK_index = c.SwingTableSize_CCK-1;
|
||||
else if (pRFCalibrateInfo->CCK_index <= 0)
|
||||
pRFCalibrateInfo->CCK_index = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("The thermal meter is unchanged or TxPowerTracking OFF(%d): ThermalValue: %d , pRFCalibrateInfo->ThermalValue: %d\n",
|
||||
pRFCalibrateInfo->TxPowerTrackControl, ThermalValue, pRFCalibrateInfo->ThermalValue));
|
||||
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
pRFCalibrateInfo->PowerIndexOffset[p] = 0;
|
||||
}
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("TxPowerTracking: [CCK] Swing Current Index: %d, Swing Base Index: %d\n",
|
||||
pRFCalibrateInfo->CCK_index, pRFCalibrateInfo->BbSwingIdxCckBase)); //Print Swing base & current
|
||||
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("TxPowerTracking: [OFDM] Swing Current Index: %d, Swing Base Index[%d]: %d\n",
|
||||
pRFCalibrateInfo->OFDM_index[p], p, pRFCalibrateInfo->BbSwingIdxOfdmBase[p]));
|
||||
}
|
||||
|
||||
if ((pRFCalibrateInfo->PowerIndexOffset[ODM_RF_PATH_A] != 0 ||
|
||||
pRFCalibrateInfo->PowerIndexOffset[ODM_RF_PATH_B] != 0 ||
|
||||
pRFCalibrateInfo->PowerIndexOffset[ODM_RF_PATH_C] != 0 ||
|
||||
pRFCalibrateInfo->PowerIndexOffset[ODM_RF_PATH_D] != 0) &&
|
||||
pRFCalibrateInfo->TxPowerTrackControl && (pHalData->EEPROMThermalMeter != 0xff))
|
||||
{
|
||||
//4 7.2 Configure the Swing Table to adjust Tx Power.
|
||||
|
||||
pRFCalibrateInfo->bTxPowerChanged = TRUE; // Always TRUE after Tx Power is adjusted by power tracking.
|
||||
//
|
||||
// 2012/04/23 MH According to Luke's suggestion, we can not write BB digital
|
||||
// to increase TX power. Otherwise, EVM will be bad.
|
||||
//
|
||||
// 2012/04/25 MH Add for tx power tracking to set tx power in tx agc for 88E.
|
||||
if (ThermalValue > pRFCalibrateInfo->ThermalValue)
|
||||
{
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("Temperature Increasing(%d): delta_pi: %d , delta_t: %d, Now_t: %d, EFUSE_t: %d, Last_t: %d\n",
|
||||
p, pRFCalibrateInfo->PowerIndexOffset[p], delta, ThermalValue, pHalData->EEPROMThermalMeter, pRFCalibrateInfo->ThermalValue));
|
||||
}
|
||||
}
|
||||
|
||||
else if (ThermalValue < pRFCalibrateInfo->ThermalValue)// Low temperature
|
||||
{
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("Temperature Decreasing(%d): delta_pi: %d , delta_t: %d, Now_t: %d, EFUSE_t: %d, Last_t: %d\n",
|
||||
p, pRFCalibrateInfo->PowerIndexOffset[p], delta, ThermalValue, pHalData->EEPROMThermalMeter, pRFCalibrateInfo->ThermalValue));
|
||||
}
|
||||
}
|
||||
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
if (ThermalValue > pHalData->EEPROMThermalMeter)
|
||||
#else
|
||||
if (ThermalValue > pDM_Odm->priv->pmib->dot11RFEntry.ther)
|
||||
#endif
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("Temperature(%d) higher than PG value(%d)\n", ThermalValue, pHalData->EEPROMThermalMeter));
|
||||
|
||||
if (pDM_Odm->SupportICType == ODM_RTL8188E || pDM_Odm->SupportICType == ODM_RTL8192E ||pDM_Odm->SupportICType == ODM_RTL8821 ||
|
||||
pDM_Odm->SupportICType == ODM_RTL8812 || pDM_Odm->SupportICType == ODM_RTL8723B || pDM_Odm->SupportICType == ODM_RTL8814A || pDM_Odm->SupportICType == ODM_RTL8703B || pDM_Odm->SupportICType == ODM_RTL8188F)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,("**********Enter POWER Tracking MIX_MODE**********\n"));
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
(*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,("**********Enter POWER Tracking BBSWING_MODE**********\n"));
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
(*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, BBSWING, p, Indexforchannel);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("Temperature(%d) lower than PG value(%d)\n", ThermalValue, pHalData->EEPROMThermalMeter));
|
||||
|
||||
if (pDM_Odm->SupportICType == ODM_RTL8188E || pDM_Odm->SupportICType == ODM_RTL8192E || pDM_Odm->SupportICType == ODM_RTL8821 ||
|
||||
pDM_Odm->SupportICType == ODM_RTL8812 || pDM_Odm->SupportICType == ODM_RTL8723B || pDM_Odm->SupportICType == ODM_RTL8814A || pDM_Odm->SupportICType == ODM_RTL8703B || pDM_Odm->SupportICType == ODM_RTL8188F)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,("**********Enter POWER Tracking MIX_MODE**********\n"));
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
(*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, Indexforchannel);
|
||||
}
|
||||
else
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,("**********Enter POWER Tracking BBSWING_MODE**********\n"));
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
(*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, BBSWING, p, Indexforchannel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pRFCalibrateInfo->BbSwingIdxCckBase = pRFCalibrateInfo->BbSwingIdxCck; // Record last time Power Tracking result as base.
|
||||
for (p = ODM_RF_PATH_A; p < c.RfPathCount; p++)
|
||||
pRFCalibrateInfo->BbSwingIdxOfdmBase[p] = pRFCalibrateInfo->BbSwingIdxOfdm[p];
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,
|
||||
("pRFCalibrateInfo->ThermalValue = %d ThermalValue= %d\n", pRFCalibrateInfo->ThermalValue, ThermalValue));
|
||||
|
||||
pRFCalibrateInfo->ThermalValue = ThermalValue; //Record last Power Tracking Thermal Value
|
||||
|
||||
}
|
||||
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
|
||||
if(!IS_HARDWARE_TYPE_8723B(Adapter))
|
||||
{
|
||||
// Delta temperature is equal to or larger than 20 centigrade (When threshold is 8).
|
||||
if ((delta_IQK >= c.Threshold_IQK)) {
|
||||
if ( ! pRFCalibrateInfo->bIQKInProgress)
|
||||
(*c.DoIQK)(pDM_Odm, delta_IQK, ThermalValue, 8);
|
||||
}
|
||||
}
|
||||
if (pRFCalibrateInfo->DpkThermal[ODM_RF_PATH_A] != 0) {
|
||||
if ((diff_DPK[ODM_RF_PATH_A] >= c.Threshold_DPK)) {
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x1);
|
||||
ODM_SetBBReg(pDM_Odm, 0xcc4, BIT14|BIT13|BIT12|BIT11|BIT10, (diff_DPK[ODM_RF_PATH_A] / c.Threshold_DPK));
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x0);
|
||||
} else if ((diff_DPK[ODM_RF_PATH_A] <= -1 * c.Threshold_DPK)) {
|
||||
s4Byte value = 0x20 + (diff_DPK[ODM_RF_PATH_A] / c.Threshold_DPK);
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x1);
|
||||
ODM_SetBBReg(pDM_Odm, 0xcc4, BIT14|BIT13|BIT12|BIT11|BIT10, value);
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x0);
|
||||
} else {
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x1);
|
||||
ODM_SetBBReg(pDM_Odm, 0xcc4, BIT14|BIT13|BIT12|BIT11|BIT10, 0);
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x0);
|
||||
}
|
||||
}
|
||||
if (pRFCalibrateInfo->DpkThermal[ODM_RF_PATH_B] != 0) {
|
||||
if ((diff_DPK[ODM_RF_PATH_B] >= c.Threshold_DPK)) {
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x1);
|
||||
ODM_SetBBReg(pDM_Odm, 0xec4, BIT14|BIT13|BIT12|BIT11|BIT10, (diff_DPK[ODM_RF_PATH_B] / c.Threshold_DPK));
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x0);
|
||||
} else if ((diff_DPK[ODM_RF_PATH_B] <= -1 * c.Threshold_DPK)) {
|
||||
s4Byte value = 0x20 + (diff_DPK[ODM_RF_PATH_B] / c.Threshold_DPK);
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x1);
|
||||
ODM_SetBBReg(pDM_Odm, 0xec4, BIT14|BIT13|BIT12|BIT11|BIT10, value);
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x0);
|
||||
} else {
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x1);
|
||||
ODM_SetBBReg(pDM_Odm, 0xec4, BIT14|BIT13|BIT12|BIT11|BIT10, 0);
|
||||
ODM_SetBBReg(pDM_Odm, 0x82c, BIT(31), 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD,("<===ODM_TXPowerTrackingCallback_ThermalMeter\n"));
|
||||
|
||||
pRFCalibrateInfo->TXPowercount = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//3============================================================
|
||||
//3 IQ Calibration
|
||||
//3============================================================
|
||||
|
||||
VOID
|
||||
ODM_ResetIQKResult(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
u1Byte ODM_GetRightChnlPlaceforIQK(u1Byte chnl)
|
||||
{
|
||||
u1Byte channel_all[ODM_TARGET_CHNL_NUM_2G_5G] =
|
||||
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,149,151,153,155,157,159,161,163,165};
|
||||
u1Byte place = chnl;
|
||||
|
||||
|
||||
if(chnl > 14)
|
||||
{
|
||||
for(place = 14; place<sizeof(channel_all); place++)
|
||||
{
|
||||
if(channel_all[place] == chnl)
|
||||
{
|
||||
return place-13;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
VOID
|
||||
odm_IQCalibrate(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
||||
if (*pDM_Odm->pIsFcsModeEnable)
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
||||
if (!IS_HARDWARE_TYPE_JAGUAR(Adapter))
|
||||
return;
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE))
|
||||
else if (IS_HARDWARE_TYPE_8812AU(Adapter))
|
||||
return;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (RTL8821A_SUPPORT == 1)
|
||||
if (pDM_Odm->bLinked) {
|
||||
if ((*pDM_Odm->pChannel != pDM_Odm->preChannel) && (!*pDM_Odm->pbScanInProcess)) {
|
||||
pDM_Odm->preChannel = *pDM_Odm->pChannel;
|
||||
pDM_Odm->LinkedInterval = 0;
|
||||
}
|
||||
|
||||
if (pDM_Odm->LinkedInterval < 3)
|
||||
pDM_Odm->LinkedInterval++;
|
||||
|
||||
if (pDM_Odm->LinkedInterval == 2) {
|
||||
/*Mark out IQK flow to prevent tx stuck. by Maddest 20130306*/
|
||||
/*Open it verified by James 20130715*/
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
PHY_IQCalibrate_8821A(pDM_Odm, FALSE);
|
||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
||||
PHY_IQCalibrate(Adapter, FALSE);
|
||||
#else
|
||||
PHY_IQCalibrate_8821A(Adapter, FALSE);
|
||||
#endif
|
||||
}
|
||||
} else
|
||||
pDM_Odm->LinkedInterval = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void phydm_rf_init(IN PDM_ODM_T pDM_Odm)
|
||||
{
|
||||
|
||||
odm_TXPowerTrackingInit(pDM_Odm);
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
||||
ODM_ClearTxPowerTrackingState(pDM_Odm);
|
||||
#endif
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
#if (RTL8814A_SUPPORT == 1)
|
||||
if (pDM_Odm->SupportICType & ODM_RTL8814A)
|
||||
PHY_IQCalibrate_8814A_Init(pDM_Odm);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void phydm_rf_watchdog(IN PDM_ODM_T pDM_Odm)
|
||||
{
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
||||
ODM_TXPowerTrackingCheck(pDM_Odm);
|
||||
if (pDM_Odm->SupportICType & ODM_IC_11AC_SERIES)
|
||||
odm_IQCalibrate(pDM_Odm);
|
||||
#endif
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __HAL_PHY_RF_H__
|
||||
#define __HAL_PHY_RF_H__
|
||||
|
||||
#include "phydm_kfree.h"
|
||||
#if (RTL8814A_SUPPORT == 1)
|
||||
#include "rtl8814a/phydm_iqk_8814a.h"
|
||||
#endif
|
||||
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
#include "rtl8822b/phydm_iqk_8822b.h"
|
||||
#endif
|
||||
#include "phydm_powertracking_win.h"
|
||||
|
||||
typedef enum _SPUR_CAL_METHOD {
|
||||
PLL_RESET,
|
||||
AFE_PHASE_SEL
|
||||
} SPUR_CAL_METHOD;
|
||||
|
||||
typedef enum _PWRTRACK_CONTROL_METHOD {
|
||||
BBSWING,
|
||||
TXAGC,
|
||||
MIX_MODE,
|
||||
TSSI_MODE
|
||||
} PWRTRACK_METHOD;
|
||||
|
||||
typedef VOID (*FuncSetPwr)(PDM_ODM_T, PWRTRACK_METHOD, u1Byte, u1Byte);
|
||||
typedef VOID(*FuncIQK)(PVOID, u1Byte, u1Byte, u1Byte);
|
||||
typedef VOID (*FuncLCK)(PDM_ODM_T);
|
||||
//refine by YuChen for 8814A
|
||||
typedef VOID (*FuncSwing)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*);
|
||||
typedef VOID (*FuncSwing8814only)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*);
|
||||
|
||||
typedef struct _TXPWRTRACK_CFG {
|
||||
u1Byte SwingTableSize_CCK;
|
||||
u1Byte SwingTableSize_OFDM;
|
||||
u1Byte Threshold_IQK;
|
||||
u1Byte Threshold_DPK;
|
||||
u1Byte AverageThermalNum;
|
||||
u1Byte RfPathCount;
|
||||
u4Byte ThermalRegAddr;
|
||||
FuncSetPwr ODM_TxPwrTrackSetPwr;
|
||||
FuncIQK DoIQK;
|
||||
FuncLCK PHY_LCCalibrate;
|
||||
FuncSwing GetDeltaSwingTable;
|
||||
FuncSwing8814only GetDeltaSwingTable8814only;
|
||||
} TXPWRTRACK_CFG, *PTXPWRTRACK_CFG;
|
||||
|
||||
VOID
|
||||
ConfigureTxpowerTrack(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
OUT PTXPWRTRACK_CFG pConfig
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
ODM_ClearTxPowerTrackingState(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
VOID
|
||||
ODM_TXPowerTrackingCallback_ThermalMeter(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
|
||||
#define ODM_TARGET_CHNL_NUM_2G_5G 59
|
||||
|
||||
|
||||
VOID
|
||||
ODM_ResetIQKResult(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
u1Byte
|
||||
ODM_GetRightChnlPlaceforIQK(
|
||||
IN u1Byte chnl
|
||||
);
|
||||
|
||||
VOID odm_IQCalibrate(IN PDM_ODM_T pDM_Odm);
|
||||
VOID phydm_rf_init( IN PDM_ODM_T pDM_Odm);
|
||||
VOID phydm_rf_watchdog( IN PDM_ODM_T pDM_Odm);
|
||||
|
||||
#endif // #ifndef __HAL_PHY_RF_H__
|
||||
|
||||
@@ -124,9 +124,6 @@ ODM_InitMpDriverStatus(
|
||||
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
|
||||
// Update information every period
|
||||
pDM_Odm->mp_mode = (BOOLEAN)Adapter->registrypriv.mp_mode;
|
||||
|
||||
#else
|
||||
|
||||
// MP mode is always false at AP side
|
||||
@@ -147,8 +144,6 @@ ODM_UpdateMpDriverStatus(
|
||||
#elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
|
||||
// Update information erery period
|
||||
pDM_Odm->mp_mode = (BOOLEAN)Adapter->registrypriv.mp_mode;
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -735,7 +735,6 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
|
||||
u1Byte InterfaceIndex; /*Add for 92D dual MAC: 0--Mac0 1--Mac1*/
|
||||
BOOLEAN bIsMPChip;
|
||||
BOOLEAN bOneEntryOnly;
|
||||
BOOLEAN mp_mode;
|
||||
u4Byte OneEntry_MACID;
|
||||
u1Byte pre_number_linked_client;
|
||||
u1Byte number_linked_client;
|
||||
|
||||
@@ -634,7 +634,7 @@ Phydm_AdaptivityInit(
|
||||
pDM_Odm->Adaptivity_IGI_upper = 0;
|
||||
pDM_Odm->Adaptivity_enable = FALSE; /*use this flag to decide enable or disable*/
|
||||
|
||||
if (pDM_Odm->bWIFITest == TRUE || pDM_Odm->mp_mode == TRUE)
|
||||
if (pDM_Odm->bWIFITest == TRUE)
|
||||
pDM_Odm->EDCCA_enable = FALSE;
|
||||
else
|
||||
pDM_Odm->EDCCA_enable = TRUE; /*even no adaptivity, we still enable EDCCA*/
|
||||
|
||||
@@ -4736,8 +4736,6 @@ odm_AntennaDiversityInit(
|
||||
)
|
||||
{
|
||||
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
|
||||
if(pDM_Odm->mp_mode == TRUE)
|
||||
return;
|
||||
|
||||
#if (defined(CONFIG_PHYDM_ANTENNA_DIVERSITY))
|
||||
ODM_AntDiv_Config(pDM_Odm);
|
||||
@@ -4751,8 +4749,6 @@ odm_AntennaDiversity(
|
||||
)
|
||||
{
|
||||
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
|
||||
if(pDM_Odm->mp_mode == TRUE)
|
||||
return;
|
||||
|
||||
#if (defined(CONFIG_PHYDM_ANTENNA_DIVERSITY))
|
||||
ODM_AntDiv(pDM_Odm);
|
||||
|
||||
@@ -1430,12 +1430,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_RA:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "new SET, RA_var[%d]= (( %d ))\n", i , var1[i]));
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "new SET, RA_var[%d]= (( %d ))\n", i , var1[i]));
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@@ -1451,12 +1449,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_PATHDIV:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@@ -1471,12 +1467,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_DEBUG:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, Debug_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, Debug_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@@ -1490,12 +1484,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_SUPPORT_ABILITY:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, support ablity_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, support ablity_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@@ -1508,10 +1500,8 @@ phydm_cmd_parser(
|
||||
case PHYDM_SMART_ANT:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@@ -1531,10 +1521,8 @@ phydm_cmd_parser(
|
||||
BOOLEAN bEnableDbgMode;
|
||||
u1Byte central_ch, primary_ch_idx, bandwidth;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (input[i + 1])
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
bEnableDbgMode = (BOOLEAN)var1[0];
|
||||
central_ch = (u1Byte) var1[1];
|
||||
@@ -1568,12 +1556,10 @@ phydm_cmd_parser(
|
||||
|
||||
case PHYDM_SET_TXAGC:
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, support ablity_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, support ablity_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
phydm_set_txagc(pDM_Odm, (u4Byte *)var1, &used, output, &out_len);
|
||||
@@ -1657,10 +1643,8 @@ phydm_cmd_parser(
|
||||
{
|
||||
u1Byte type = 0;
|
||||
|
||||
if (input[1]) {
|
||||
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
|
||||
type = (u1Byte)var1[0];
|
||||
}
|
||||
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
|
||||
type = (u1Byte)var1[0];
|
||||
|
||||
if (type == 0)
|
||||
phydm_DumpBbReg(pDM_Odm);
|
||||
|
||||
@@ -1341,7 +1341,7 @@ odm_DIG(
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#if ((DM_ODM_SUPPORT_TYPE & ODM_WIN) || ((DM_ODM_SUPPORT_TYPE & ODM_CE) && (ODM_CONFIG_BT_COEXIST == 1)))
|
||||
#if ((DM_ODM_SUPPORT_TYPE & ODM_WIN))
|
||||
if(pDM_Odm->bBtHsOperation)
|
||||
{
|
||||
if(pDM_Odm->bLinked)
|
||||
|
||||
@@ -205,15 +205,6 @@ odm_EdcaTurboCheckCE(
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pDM_Odm->SupportInterface==ODM_ITRF_PCIE) {
|
||||
if((ICType==ODM_RTL8192C)&&(pDM_Odm->RFType==ODM_2T2R)) {
|
||||
EDCA_BE_UL = 0x60a42b;
|
||||
EDCA_BE_DL = 0x60a42b;
|
||||
} else {
|
||||
EDCA_BE_UL = 0x6ea42b;
|
||||
EDCA_BE_DL = 0x6ea42b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//92D txop can't be set to 0x3e for cisco1250
|
||||
|
||||
@@ -26,19 +26,9 @@
|
||||
#include "phydm_precomp.h"
|
||||
|
||||
#define READ_AND_CONFIG_MP(ic, txt) (ODM_ReadAndConfig_MP_##ic##txt(pDM_Odm))
|
||||
#define READ_AND_CONFIG_TC(ic, txt) (ODM_ReadAndConfig_TC_##ic##txt(pDM_Odm))
|
||||
|
||||
|
||||
#if (PHYDM_TESTCHIP_SUPPORT == 1)
|
||||
#define READ_AND_CONFIG(ic, txt) do {\
|
||||
if (pDM_Odm->bIsMPChip)\
|
||||
READ_AND_CONFIG_MP(ic,txt);\
|
||||
else\
|
||||
READ_AND_CONFIG_TC(ic,txt);\
|
||||
} while(0)
|
||||
#else
|
||||
#define READ_AND_CONFIG READ_AND_CONFIG_MP
|
||||
#endif
|
||||
|
||||
#define GET_VERSION_MP(ic, txt) (ODM_GetVersion_MP_##ic##txt())
|
||||
#define GET_VERSION_TC(ic, txt) (ODM_GetVersion_TC_##ic##txt())
|
||||
@@ -241,7 +231,7 @@ odm_SignalScaleMapping_92CSeries(
|
||||
#endif
|
||||
|
||||
#if ((DEV_BUS_TYPE == RT_USB_INTERFACE) ||(DEV_BUS_TYPE == RT_SDIO_INTERFACE))
|
||||
if((pDM_Odm->SupportInterface == ODM_ITRF_USB) || (pDM_Odm->SupportInterface == ODM_ITRF_SDIO))
|
||||
if((pDM_Odm->SupportInterface == ODM_ITRF_USB))
|
||||
{
|
||||
if(CurrSig >= 51 && CurrSig <= 100)
|
||||
{
|
||||
@@ -2270,8 +2260,6 @@ ODM_ConfigRFWithTxPwrTrackHeaderFile(
|
||||
if (pDM_Odm->SupportICType == ODM_RTL8188F) {
|
||||
if (pDM_Odm->SupportInterface == ODM_ITRF_USB)
|
||||
READ_AND_CONFIG_MP(8188F, _TxPowerTrack_USB);
|
||||
else if (pDM_Odm->SupportInterface == ODM_ITRF_SDIO)
|
||||
READ_AND_CONFIG_MP(8188F, _TxPowerTrack_SDIO);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -458,13 +458,8 @@ odm_TXPowerTrackingThermalMeterInit(
|
||||
pRFCalibrateInfo->TXPowercount = 0;
|
||||
pRFCalibrateInfo->bTXPowerTrackingInit = _FALSE;
|
||||
|
||||
if(pDM_Odm->mp_mode == FALSE)
|
||||
pRFCalibrateInfo->TxPowerTrackControl = _TRUE;
|
||||
else
|
||||
pRFCalibrateInfo->TxPowerTrackControl = _FALSE;
|
||||
|
||||
if(pDM_Odm->mp_mode == FALSE)
|
||||
pRFCalibrateInfo->TxPowerTrackControl = _TRUE;
|
||||
pRFCalibrateInfo->TxPowerTrackControl = _TRUE;
|
||||
pRFCalibrateInfo->TxPowerTrackControl = _TRUE;
|
||||
|
||||
|
||||
MSG_8192C("pDM_Odm TxPowerTrackControl = %d\n", pRFCalibrateInfo->TxPowerTrackControl);
|
||||
|
||||
@@ -123,28 +123,10 @@ typedef struct ODM_RF_Calibration_Structure
|
||||
u1Byte DeltaSwingTableIdx_2GCCKA_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GCCKB_P[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GCCKB_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GCCKC_P[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GCCKC_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GCCKD_P[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GCCKD_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GA_P[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GA_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GB_P[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GB_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GC_P[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GC_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GD_P[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GD_N[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GA_P[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GA_N[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GB_P[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GB_N[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GC_P[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GC_N[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GD_P[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_5GD_N[BAND_NUM][DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GA_P_8188E[DELTA_SWINGIDX_SIZE];
|
||||
u1Byte DeltaSwingTableIdx_2GA_N_8188E[DELTA_SWINGIDX_SIZE];
|
||||
|
||||
u1Byte BbSwingIdxOfdm[MAX_RF_PATH];
|
||||
u1Byte BbSwingIdxOfdmCurrent;
|
||||
|
||||
@@ -249,9 +249,7 @@
|
||||
// ODM_CMNINFO_INTERFACE
|
||||
typedef enum tag_ODM_Support_Interface_Definition
|
||||
{
|
||||
ODM_ITRF_PCIE = 0x1,
|
||||
ODM_ITRF_USB = 0x2,
|
||||
ODM_ITRF_SDIO = 0x4,
|
||||
ODM_ITRF_ALL = 0x7,
|
||||
}ODM_INTERFACE_E;
|
||||
|
||||
@@ -294,13 +292,11 @@ typedef enum tag_ODM_Support_IC_Type_Definition
|
||||
#endif
|
||||
|
||||
#define ODM_IC_11N_SERIES_SUPPORT 1
|
||||
#define ODM_CONFIG_BT_COEXIST 0
|
||||
|
||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
||||
|
||||
#define ODM_IC_11AC_SERIES_SUPPORT 1
|
||||
#define ODM_IC_11N_SERIES_SUPPORT 1
|
||||
#define ODM_CONFIG_BT_COEXIST 1
|
||||
|
||||
#else
|
||||
|
||||
@@ -314,12 +310,6 @@ typedef enum tag_ODM_Support_IC_Type_Definition
|
||||
#define ODM_IC_11AC_SERIES_SUPPORT 1
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
#define ODM_CONFIG_BT_COEXIST 1
|
||||
#else
|
||||
#define ODM_CONFIG_BT_COEXIST 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@ typedef enum _RT_SPINLOCK_TYPE{
|
||||
#define STA_INFO_T RT_WLAN_STA
|
||||
#define PSTA_INFO_T PRT_WLAN_STA
|
||||
#define __func__ __FUNCTION__
|
||||
#define PHYDM_TESTCHIP_SUPPORT TESTCHIP_SUPPORT
|
||||
#define bMaskH3Bytes 0xffffff00
|
||||
#define SUCCESS 0
|
||||
#define FAIL (-1)
|
||||
@@ -162,12 +161,6 @@ typedef enum _RT_SPINLOCK_TYPE{
|
||||
#define _TRUE 1
|
||||
#define _FALSE 0
|
||||
|
||||
#if (defined(TESTCHIP_SUPPORT))
|
||||
#define PHYDM_TESTCHIP_SUPPORT 1
|
||||
#else
|
||||
#define PHYDM_TESTCHIP_SUPPORT 0
|
||||
#endif
|
||||
|
||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
#include <drv_types.h>
|
||||
#if 0
|
||||
@@ -244,11 +237,6 @@ typedef enum _RT_SPINLOCK_TYPE{
|
||||
#define FPGA_TWO_MAC_VERIFICATION 0
|
||||
#define RTL8881A_SUPPORT 0
|
||||
|
||||
#if (defined(TESTCHIP_SUPPORT))
|
||||
#define PHYDM_TESTCHIP_SUPPORT 1
|
||||
#else
|
||||
#define PHYDM_TESTCHIP_SUPPORT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define READ_NEXT_PAIR(v1, v2, i) do { if (i+2 >= ArrayLen) break; i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0)
|
||||
|
||||
@@ -342,157 +342,11 @@ ODM_GetVersion_MP_8188F_RadioA(void)
|
||||
return 31;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* TxPowerTrack_AP.TXT
|
||||
******************************************************************************/
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_AP_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 17, 17, 17, 17, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_AP_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_AP_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 17, 17, 17, 17, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_AP_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_AP_8188F[] = {0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_AP_8188F[] = {0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_AP_8188F[] = {0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_AP_8188F[] = {0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_AP_8188F[] = {0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_AP_8188F[] = {0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_AP_8188F[] = {0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_AP_8188F[] = {0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9};
|
||||
#endif
|
||||
|
||||
void
|
||||
ODM_ReadAndConfig_MP_8188F_TxPowerTrack_AP(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
PODM_RF_CAL_T pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo);
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD, ("===> ODM_ReadAndConfig_MP_MP_8188F\n"));
|
||||
|
||||
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GA_P, gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GA_N, gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GB_P, gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N, gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_P, gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_N, gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_P, gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_N, gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE);
|
||||
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GA_P, gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GA_N, gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GB_P, gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GB_N, gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_AP_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* TxPowerTrack_SDIO.TXT
|
||||
******************************************************************************/
|
||||
|
||||
#if DEV_BUS_TYPE == RT_SDIO_INTERFACE
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_SDIO_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 17, 17, 17, 17, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_SDIO_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_SDIO_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 17, 17, 17, 17, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_SDIO_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8188F[] = {0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_SDIO_8188F[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 7, 8, 8, 8, 8};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_SDIO_8188F[] = {0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_SDIO_8188F[] = {0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8188F[] = {0, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_SDIO_8188F[] = {0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 6, 6, 6, 6, 7, 7};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_SDIO_8188F[] = {0, 1, 2, 3, 4, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_SDIO_8188F[] = {0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14};
|
||||
#endif
|
||||
|
||||
void
|
||||
ODM_ReadAndConfig_MP_8188F_TxPowerTrack_SDIO(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
#if DEV_BUS_TYPE == RT_SDIO_INTERFACE
|
||||
PODM_RF_CAL_T pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo);
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD, ("===> ODM_ReadAndConfig_MP_MP_8188F\n"));
|
||||
|
||||
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GA_P, gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GA_N, gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GB_P, gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N, gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_P, gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_N, gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_P, gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_N, gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE);
|
||||
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GA_P, gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GA_N, gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GB_P, gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GB_N, gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_SDIO_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* TxPowerTrack_USB.TXT
|
||||
******************************************************************************/
|
||||
|
||||
#if DEV_BUS_TYPE == RT_USB_INTERFACE
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_USB_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 17, 17, 17, 17, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_USB_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_USB_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 17, 17, 17, 17, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
{0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 18},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_USB_8188F[][DELTA_SWINGIDX_SIZE] = {
|
||||
{0, 1, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
|
||||
};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_USB_8188F[] = {0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_USB_8188F[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 7, 8, 8, 8, 8};
|
||||
u1Byte gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_USB_8188F[] = {0, 1, 1, 2, 3, 4, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15};
|
||||
@@ -523,11 +377,6 @@ ODM_ReadAndConfig_MP_8188F_TxPowerTrack_USB(
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_N, gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_USB_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_P, gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_USB_8188F, DELTA_SWINGIDX_SIZE);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_N, gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_USB_8188F, DELTA_SWINGIDX_SIZE);
|
||||
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GA_P, gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_USB_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GA_N, gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_USB_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GB_P, gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_USB_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
ODM_MoveMemory(pDM_Odm, pRFCalibrateInfo->DeltaSwingTableIdx_5GB_N, gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_USB_8188F, DELTA_SWINGIDX_SIZE*3);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -589,21 +589,7 @@ GetDeltaSwingTable_8188F(
|
||||
u1Byte TxRate = 0xFF;
|
||||
u1Byte channel = pHalData->CurrentChannel;
|
||||
|
||||
if (pDM_Odm->mp_mode == TRUE) {
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE))
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
||||
#if (MP_DRIVER == 1)
|
||||
PMPT_CONTEXT pMptCtx = &(Adapter->MptCtx);
|
||||
|
||||
TxRate = MptToMgntRate(pMptCtx->MptRateIndex);
|
||||
#endif
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
|
||||
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.MptCtx);
|
||||
|
||||
TxRate = MptToMgntRate(pMptCtx->MptRateIndex);
|
||||
#endif
|
||||
#endif
|
||||
} else {
|
||||
{
|
||||
u2Byte rate = *(pDM_Odm->pForcedDataRate);
|
||||
|
||||
if (!rate) { /*auto rate*/
|
||||
@@ -2877,9 +2863,6 @@ PHY_IQCalibrate_8188F(
|
||||
pDM_Odm->RFCalibrateInfo.RegE9C = pDM_Odm->RFCalibrateInfo.RegEBC = 0x0; //Y default value
|
||||
}
|
||||
|
||||
#if MP_DRIVER == 1
|
||||
if ((pMptCtx->MptRfPath == ODM_RF_PATH_A) || ((pDM_Odm->mp_mode) == 0))
|
||||
#endif
|
||||
{
|
||||
if (RegE94 != 0) {
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
@@ -2891,9 +2874,6 @@ PHY_IQCalibrate_8188F(
|
||||
}
|
||||
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
#if MP_DRIVER == 1
|
||||
if ((pMptCtx->MptRfPath == ODM_RF_PATH_A) || ((pDM_Odm->mp_mode) == 0))
|
||||
#endif
|
||||
{
|
||||
if (RegEB4 != 0)
|
||||
_PHY_PathBFillIQKMatrix8188F(pAdapter, bPathBOK, result, final_candidate, (RegEC4 == 0));
|
||||
@@ -2992,59 +2972,6 @@ PHY_LCCalibrate_8188F(
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
PHY_APCalibrate_8188F(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN s1Byte delta
|
||||
)
|
||||
{
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
#if DBG
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
|
||||
#endif
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
||||
PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if DISABLE_BB_RF
|
||||
return;
|
||||
#endif
|
||||
|
||||
return;
|
||||
#if 0
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
if (!(pDM_Odm->SupportAbility & ODM_RF_CALIBRATION))
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if FOR_BRAZIL_PRETEST != 1
|
||||
if (pDM_Odm->RFCalibrateInfo.bAPKdone)
|
||||
#endif
|
||||
return;
|
||||
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
if (IS_2T2R(pHalData->VersionID))
|
||||
phy_APCalibrate_8188F(pAdapter, delta, TRUE);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// For 88C 1T1R
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
phy_APCalibrate_8188F(pAdapter, delta, FALSE);
|
||||
#else
|
||||
phy_APCalibrate_8188F(pDM_Odm, delta, FALSE);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID phy_SetRFPathSwitch_8188F(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
|
||||
@@ -70,17 +70,6 @@ PHY_LCCalibrate_8188F(
|
||||
IN PVOID pDM_VOID
|
||||
);
|
||||
|
||||
//
|
||||
// AP calibrate
|
||||
//
|
||||
void
|
||||
PHY_APCalibrate_8188F(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN s1Byte delta);
|
||||
void
|
||||
PHY_DigitalPredistortion_8188F( IN PADAPTER pAdapter);
|
||||
|
||||
|
||||
@@ -576,19 +576,6 @@ void rtl8188f_set_FwPwrMode_cmd(PADAPTER padapter, u8 psmode)
|
||||
}
|
||||
|
||||
if (psmode > 0) {
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (rtw_btcoex_IsBtControlLps(padapter) == _TRUE) {
|
||||
PowerState = rtw_btcoex_RpwmVal(padapter);
|
||||
byte5 = rtw_btcoex_LpsVal(padapter);
|
||||
|
||||
if ((rlbm == 2) && (byte5 & BIT(4))) {
|
||||
/* Keep awake interval to 1 to prevent from */
|
||||
/* decreasing coex performance */
|
||||
awake_intvl = 2;
|
||||
rlbm = 2;
|
||||
}
|
||||
} else
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
{
|
||||
PowerState = 0x00;/* AllON(0x0C), RFON(0x04), RFOFF(0x00) */
|
||||
byte5 = 0x40;
|
||||
@@ -664,9 +651,6 @@ void rtl8188f_set_FwPwrMode_cmd(PADAPTER padapter, u8 psmode)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_RecordPwrMode(padapter, u1H2CPwrModeParm, H2C_PWRMODE_LEN);
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
RT_PRINT_DATA(_module_hal_init_c_, _drv_always_, "u1H2CPwrModeParm:", u1H2CPwrModeParm, H2C_PWRMODE_LEN);
|
||||
|
||||
@@ -915,278 +899,6 @@ void rtl8188f_fw_try_ap_cmd(PADAPTER padapter, u32 need_ack)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
static void ConstructBtNullFunctionData(
|
||||
PADAPTER padapter,
|
||||
u8 *pframe,
|
||||
u32 *pLength,
|
||||
u8 *StaAddr,
|
||||
u8 bQoS,
|
||||
u8 AC,
|
||||
u8 bEosp,
|
||||
u8 bForcePowerSave)
|
||||
{
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
u16 *fctrl;
|
||||
u32 pktlen;
|
||||
struct mlme_ext_priv *pmlmeext;
|
||||
struct mlme_ext_info *pmlmeinfo;
|
||||
u8 bssid[ETH_ALEN];
|
||||
|
||||
|
||||
DBG_871X("+" FUNC_ADPT_FMT ": qos=%d eosp=%d ps=%d\n",
|
||||
FUNC_ADPT_ARG(padapter), bQoS, bEosp, bForcePowerSave);
|
||||
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
pmlmeext = &padapter->mlmeextpriv;
|
||||
pmlmeinfo = &pmlmeext->mlmext_info;
|
||||
|
||||
if (NULL == StaAddr) {
|
||||
_rtw_memcpy(bssid, myid(&padapter->eeprompriv), ETH_ALEN);
|
||||
StaAddr = bssid;
|
||||
}
|
||||
|
||||
fctrl = &pwlanhdr->frame_ctl;
|
||||
*fctrl = 0;
|
||||
if (bForcePowerSave)
|
||||
SetPwrMgt(fctrl);
|
||||
|
||||
SetFrDs(fctrl);
|
||||
_rtw_memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
|
||||
_rtw_memcpy(pwlanhdr->addr3, myid(&padapter->eeprompriv), ETH_ALEN);
|
||||
|
||||
SetDuration(pwlanhdr, 0);
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
|
||||
if (bQoS == _TRUE) {
|
||||
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
|
||||
|
||||
SetFrameSubType(pframe, WIFI_QOS_DATA_NULL);
|
||||
|
||||
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
|
||||
SetPriority(&pwlanqoshdr->qc, AC);
|
||||
SetEOSP(&pwlanqoshdr->qc, bEosp);
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
|
||||
} else {
|
||||
SetFrameSubType(pframe, WIFI_DATA_NULL);
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
}
|
||||
|
||||
*pLength = pktlen;
|
||||
}
|
||||
|
||||
static void SetFwRsvdPagePkt_BTCoex(PADAPTER padapter)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData;
|
||||
struct xmit_frame *pcmdframe;
|
||||
struct pkt_attrib *pattrib;
|
||||
struct xmit_priv *pxmitpriv;
|
||||
struct mlme_ext_priv *pmlmeext;
|
||||
struct mlme_ext_info *pmlmeinfo;
|
||||
u32 BeaconLength = 0;
|
||||
u32 BTQosNullLength = 0;
|
||||
u8 *ReservedPagePacket;
|
||||
u8 TxDescLen, TxDescOffset;
|
||||
u8 TotalPageNum = 0, CurtPktPageNum = 0, RsvdPageNum = 0;
|
||||
u16 BufIndex, PageSize;
|
||||
u32 TotalPacketLen, MaxRsvdPageBufSize = 0;
|
||||
RSVDPAGE_LOC RsvdPageLoc;
|
||||
|
||||
|
||||
/*DBG_8192C("+" FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(padapter)); */
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
pxmitpriv = &padapter->xmitpriv;
|
||||
pmlmeext = &padapter->mlmeextpriv;
|
||||
pmlmeinfo = &pmlmeext->mlmext_info;
|
||||
TxDescLen = TXDESC_SIZE;
|
||||
TxDescOffset = TXDESC_OFFSET;
|
||||
PageSize = PAGE_SIZE_TX_8188F;
|
||||
|
||||
RsvdPageNum = BCNQ_PAGE_NUM_8188F;
|
||||
MaxRsvdPageBufSize = RsvdPageNum * PageSize;
|
||||
|
||||
pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
|
||||
if (pcmdframe == NULL) {
|
||||
DBG_8192C("%s: alloc ReservedPagePacket fail!\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
ReservedPagePacket = pcmdframe->buf_addr;
|
||||
_rtw_memset(&RsvdPageLoc, 0, sizeof(RSVDPAGE_LOC));
|
||||
|
||||
/*3 (1) beacon */
|
||||
BufIndex = TxDescOffset;
|
||||
ConstructBeacon(padapter, &ReservedPagePacket[BufIndex], &BeaconLength);
|
||||
|
||||
/* When we count the first page size, we need to reserve description size for the RSVD */
|
||||
/* packet, it will be filled in front of the packet in TXPKTBUF. */
|
||||
CurtPktPageNum = (u8)PageNum_128(TxDescLen + BeaconLength);
|
||||
/*If we don't add 1 more page, the WOWLAN function has a problem. Baron thinks it's a bug of firmware */
|
||||
if (CurtPktPageNum == 1)
|
||||
CurtPktPageNum += 1;
|
||||
TotalPageNum += CurtPktPageNum;
|
||||
|
||||
BufIndex += (CurtPktPageNum * PageSize);
|
||||
|
||||
/* Jump to lastest page */
|
||||
if (BufIndex < (MaxRsvdPageBufSize - PageSize)) {
|
||||
BufIndex = TxDescOffset + (MaxRsvdPageBufSize - PageSize);
|
||||
TotalPageNum = BCNQ_PAGE_NUM_8188F - 1;
|
||||
}
|
||||
|
||||
/*3 (6) BT Qos null data */
|
||||
RsvdPageLoc.LocBTQosNull = TotalPageNum;
|
||||
ConstructBtNullFunctionData(
|
||||
padapter,
|
||||
&ReservedPagePacket[BufIndex],
|
||||
&BTQosNullLength,
|
||||
NULL,
|
||||
_TRUE, 0, 0, _FALSE);
|
||||
rtl8188f_fill_fake_txdesc(padapter, &ReservedPagePacket[BufIndex - TxDescLen], BTQosNullLength, _FALSE, _TRUE, _FALSE);
|
||||
|
||||
CurtPktPageNum = (u8)PageNum_128(TxDescLen + BTQosNullLength);
|
||||
|
||||
TotalPageNum += CurtPktPageNum;
|
||||
|
||||
TotalPacketLen = BufIndex + BTQosNullLength;
|
||||
if (TotalPacketLen > MaxRsvdPageBufSize) {
|
||||
DBG_8192C(FUNC_ADPT_FMT ": ERROR: The rsvd page size is not enough!!TotalPacketLen %d, MaxRsvdPageBufSize %d\n",
|
||||
FUNC_ADPT_ARG(padapter), TotalPacketLen, MaxRsvdPageBufSize);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* update attribute */
|
||||
pattrib = &pcmdframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
pattrib->qsel = QSLT_BEACON;
|
||||
pattrib->pktlen = pattrib->last_txcmdsz = TotalPacketLen - TxDescOffset;
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
dump_mgntframe(padapter, pcmdframe);
|
||||
#else
|
||||
dump_mgntframe_and_wait(padapter, pcmdframe, 100);
|
||||
#endif
|
||||
|
||||
/*DBG_8192C(FUNC_ADPT_FMT ": Set RSVD page location to Fw, TotalPacketLen(%d), TotalPageNum(%d)\n", */
|
||||
/* FUNC_ADPT_ARG(padapter), TotalPacketLen, TotalPageNum); */
|
||||
rtl8188f_set_FwRsvdPage_cmd(padapter, &RsvdPageLoc);
|
||||
rtl8188f_set_FwAoacRsvdPage_cmd(padapter, &RsvdPageLoc);
|
||||
|
||||
return;
|
||||
|
||||
error:
|
||||
rtw_free_xmitframe(pxmitpriv, pcmdframe);
|
||||
}
|
||||
|
||||
void rtl8188f_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData;
|
||||
struct mlme_ext_priv *pmlmeext;
|
||||
struct mlme_ext_info *pmlmeinfo;
|
||||
u8 bRecover = _FALSE;
|
||||
u8 bcn_valid = _FALSE;
|
||||
u8 DLBcnCount = 0;
|
||||
u32 poll = 0;
|
||||
u8 val8;
|
||||
|
||||
|
||||
DBG_8192C("+" FUNC_ADPT_FMT ": iface_type=%d fw_state=0x%08X\n",
|
||||
FUNC_ADPT_ARG(padapter), get_iface_type(padapter), get_fwstate(&padapter->mlmepriv));
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _FALSE) {
|
||||
DBG_8192C(FUNC_ADPT_FMT ": [WARNING] not in AP mode!!\n",
|
||||
FUNC_ADPT_ARG(padapter));
|
||||
}
|
||||
#endif /* CONFIG_DEBUG */
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
pmlmeext = &padapter->mlmeextpriv;
|
||||
pmlmeinfo = &pmlmeext->mlmext_info;
|
||||
|
||||
/* We should set AID, correct TSF, HW seq enable before set JoinBssReport to Fw in 88/92C. */
|
||||
/* Suggested by filen. Added by tynli. */
|
||||
rtw_write16(padapter, REG_BCN_PSR_RPT, (0xC000 | pmlmeinfo->aid));
|
||||
|
||||
/* set REG_CR bit 8 */
|
||||
val8 = rtw_read8(padapter, REG_CR + 1);
|
||||
val8 |= BIT(0); /* ENSWBCN */
|
||||
rtw_write8(padapter, REG_CR + 1, val8);
|
||||
|
||||
/* Disable Hw protection for a time which revserd for Hw sending beacon. */
|
||||
/* Fix download reserved page packet fail that access collision with the protection time. */
|
||||
/* 2010.05.11. Added by tynli. */
|
||||
val8 = rtw_read8(padapter, REG_BCN_CTRL);
|
||||
val8 &= ~EN_BCN_FUNCTION;
|
||||
val8 |= DIS_TSF_UDT;
|
||||
rtw_write8(padapter, REG_BCN_CTRL, val8);
|
||||
|
||||
/* Set FWHW_TXQ_CTRL 0x422[6]=0 to tell Hw the packet is not a real beacon frame. */
|
||||
if (pHalData->RegFwHwTxQCtrl & BIT(6))
|
||||
bRecover = _TRUE;
|
||||
|
||||
/* To tell Hw the packet is not a real beacon frame. */
|
||||
pHalData->RegFwHwTxQCtrl &= ~BIT(6);
|
||||
rtw_write8(padapter, REG_FWHW_TXQ_CTRL + 2, pHalData->RegFwHwTxQCtrl);
|
||||
|
||||
/* Clear beacon valid check bit. */
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DL_BCN_SEL, NULL);
|
||||
|
||||
DLBcnCount = 0;
|
||||
poll = 0;
|
||||
do {
|
||||
SetFwRsvdPagePkt_BTCoex(padapter);
|
||||
DLBcnCount++;
|
||||
do {
|
||||
rtw_yield_os();
|
||||
/*rtw_mdelay_os(10); */
|
||||
/* check rsvd page download OK. */
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, &bcn_valid);
|
||||
poll++;
|
||||
} while (!bcn_valid && (poll % 10) != 0 && !RTW_CANNOT_RUN(padapter));
|
||||
} while (!bcn_valid && (DLBcnCount <= 100) && !RTW_CANNOT_RUN(padapter));
|
||||
|
||||
if (_TRUE == bcn_valid) {
|
||||
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
|
||||
pwrctl->fw_psmode_iface_id = padapter->iface_id;
|
||||
DBG_8192C(ADPT_FMT": DL RSVD page success! DLBcnCount:%d, poll:%d\n",
|
||||
ADPT_ARG(padapter), DLBcnCount, poll);
|
||||
} else {
|
||||
DBG_871X(ADPT_FMT": DL RSVD page fail! DLBcnCount:%d, poll:%d\n",
|
||||
ADPT_ARG(padapter), DLBcnCount, poll);
|
||||
DBG_871X(ADPT_FMT": DL RSVD page fail! bSurpriseRemoved=%s\n",
|
||||
ADPT_ARG(padapter), rtw_is_surprise_removed(padapter)?"True":"False");
|
||||
DBG_871X(ADPT_FMT": DL RSVD page fail! bDriverStopped=%s\n",
|
||||
ADPT_ARG(padapter), rtw_is_drv_stopped(padapter)?"True":"False");
|
||||
}
|
||||
|
||||
/* 2010.05.11. Added by tynli. */
|
||||
val8 = rtw_read8(padapter, REG_BCN_CTRL);
|
||||
val8 |= EN_BCN_FUNCTION;
|
||||
val8 &= ~DIS_TSF_UDT;
|
||||
rtw_write8(padapter, REG_BCN_CTRL, val8);
|
||||
|
||||
/* To make sure that if there exists an adapter which would like to send beacon. */
|
||||
/* If exists, the origianl value of 0x422[6] will be 1, we should check this to */
|
||||
/* prevent from setting 0x422[6] to 0 after download reserved page, or it will cause */
|
||||
/* the beacon cannot be sent by HW. */
|
||||
/* 2010.06.23. Added by tynli. */
|
||||
if (bRecover) {
|
||||
pHalData->RegFwHwTxQCtrl |= BIT(6);
|
||||
rtw_write8(padapter, REG_FWHW_TXQ_CTRL + 2, pHalData->RegFwHwTxQCtrl);
|
||||
}
|
||||
|
||||
/* Clear CR[8] or beacon packet will not be send to TxBuf anymore. */
|
||||
val8 = rtw_read8(padapter, REG_CR + 1);
|
||||
val8 &= ~BIT(0); /* ~ENSWBCN */
|
||||
rtw_write8(padapter, REG_CR + 1, val8);
|
||||
}
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
void rtl8188f_set_p2p_ps_offload_cmd(_adapter *padapter, u8 p2p_ps_state)
|
||||
{
|
||||
|
||||
@@ -290,15 +290,6 @@ static void Update_ODM_ComInfo_8188f(PADAPTER Adapter)
|
||||
SupportAbility |= ODM_BB_ANT_DIV;
|
||||
#endif
|
||||
|
||||
#if (MP_DRIVER==1)
|
||||
if (Adapter->registrypriv.mp_mode == 1) {
|
||||
SupportAbility = 0
|
||||
| ODM_RF_CALIBRATION
|
||||
| ODM_RF_TX_PWR_TRACK
|
||||
;
|
||||
}
|
||||
#endif/*(MP_DRIVER==1) */
|
||||
|
||||
#ifdef CONFIG_DISABLE_ODM
|
||||
SupportAbility = 0;
|
||||
#endif/*CONFIG_DISABLE_ODM */
|
||||
@@ -415,10 +406,6 @@ rtl8188f_HalDmWatchDog(
|
||||
PADAPTER pbuddy_adapter = Adapter->pbuddy_adapter;
|
||||
#endif /*CONFIG_CONCURRENT_MODE */
|
||||
|
||||
if (Adapter->registrypriv.mp_mode == 1 && Adapter->mppriv.mp_dm == 0) /* for MP power tracking */
|
||||
return;
|
||||
|
||||
|
||||
if (!rtw_is_hw_init_completed(Adapter))
|
||||
goto skip_dm;
|
||||
|
||||
@@ -482,9 +469,6 @@ rtl8188f_HalDmWatchDog(
|
||||
/*FindMinimumRSSI_8188f(Adapter); */
|
||||
/*ODM_CmnInfoUpdate(&pHalData->odmpriv ,ODM_CMNINFO_RSSI_MIN, pHalData->MinUndecoratedPWDBForDM); */
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
bBtDisabled = rtw_btcoex_IsBtDisabled(Adapter);
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_BT_ENABLED, ((bBtDisabled == _TRUE) ? _FALSE : _TRUE));
|
||||
|
||||
ODM_DMWatchdog(&pHalData->odmpriv);
|
||||
|
||||
@@ -840,95 +840,6 @@ int ReservedPage_Compare(PADAPTER Adapter, PRT_MP_FIRMWARE pFirmware, u32 BTPatc
|
||||
return _TRUE;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
/* As the size of bt firmware is more than 16k which is too big for some platforms, we divide it
|
||||
* into four parts to transfer. The last parameter of _WriteBTFWtoTxPktBuf8188F is used to indicate
|
||||
* the location of every part. We call the first 4096 byte of bt firmware as part 1, the second 4096
|
||||
* part as part 2, the third 4096 part as part 3, the remain as part 4. First we transform the part
|
||||
* 4 and set the register 0x209 to 0x90, then the 32 bytes description are added to the head of part
|
||||
* 4, and those bytes are putted at the location 0x90. Second we transform the part 3 and set the
|
||||
* register 0x209 to 0x70. The 32 bytes description and part 3(4196 bytes) are putted at the location
|
||||
* 0x70. It can contain 4196 bytes between 0x70 and 0x90. So the last 32 bytes os part 3 will cover the
|
||||
* 32 bytes description of part4. Using this method, we can put the whole bt firmware to 0x30 and only
|
||||
* has 32 bytes descrption at the head of part 1.
|
||||
*/
|
||||
s32 FirmwareDownloadBT(PADAPTER padapter, PRT_MP_FIRMWARE pFirmware)
|
||||
{
|
||||
s32 rtStatus;
|
||||
u8 *pBTFirmwareBuf;
|
||||
u32 BTFirmwareLen;
|
||||
u8 download_time;
|
||||
s8 i;
|
||||
|
||||
|
||||
rtStatus = _SUCCESS;
|
||||
pBTFirmwareBuf = NULL;
|
||||
BTFirmwareLen = 0;
|
||||
|
||||
/* */
|
||||
/* Patch BT Fw. Download BT RAM code to Tx packet buffer. */
|
||||
/* */
|
||||
if (padapter->bBTFWReady) {
|
||||
DBG_8192C("%s: BT Firmware is ready!!\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FILE_FWIMG
|
||||
if (rtw_is_file_readable(rtw_fw_mp_bt_file_path) == _TRUE) {
|
||||
DBG_8192C("%s: acquire MP BT FW from file:%s\n", __func__, rtw_fw_mp_bt_file_path);
|
||||
|
||||
rtStatus = rtw_retrieve_from_file(rtw_fw_mp_bt_file_path, FwBuffer, FW_8188F_SIZE);
|
||||
BTFirmwareLen = rtStatus >= 0 ? rtStatus : 0;
|
||||
pBTFirmwareBuf = FwBuffer;
|
||||
} else
|
||||
#endif /* CONFIG_FILE_FWIMG */
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
DBG_8192C("%s: Download MP BT FW from header\n", __func__);
|
||||
|
||||
pBTFirmwareBuf = (u8 *)Rtl8188FFwBTImgArray;
|
||||
BTFirmwareLen = Rtl8188FFwBTImgArrayLength;
|
||||
pFirmware->szFwBuffer = pBTFirmwareBuf;
|
||||
pFirmware->ulFwLength = BTFirmwareLen;
|
||||
#endif /* CONFIG_EMBEDDED_FWIMG */
|
||||
}
|
||||
|
||||
DBG_8192C("%s: MP BT Firmware size=%d\n", __func__, BTFirmwareLen);
|
||||
|
||||
/* for h2c cam here should be set to true */
|
||||
padapter->bFWReady = _TRUE;
|
||||
|
||||
download_time = (BTFirmwareLen + 4095) / 4096;
|
||||
DBG_8192C("%s: download_time is %d\n", __func__, download_time);
|
||||
|
||||
/* Download BT patch Fw. */
|
||||
for (i = (download_time - 1); i >= 0; i--) {
|
||||
if (i == (download_time - 1)) {
|
||||
rtStatus = _WriteBTFWtoTxPktBuf8188F(padapter, pBTFirmwareBuf + (4096 * i), (BTFirmwareLen - (4096 * i)), 1);
|
||||
DBG_8192C("%s: start %d, len %d, time 1\n", __func__, 4096 * i, BTFirmwareLen - (4096 * i));
|
||||
} else {
|
||||
rtStatus = _WriteBTFWtoTxPktBuf8188F(padapter, pBTFirmwareBuf + (4096 * i), 4096, (download_time - i));
|
||||
DBG_8192C("%s: start %d, len 4096, time %d\n", __func__, 4096 * i, download_time - i);
|
||||
}
|
||||
|
||||
if (rtStatus != _SUCCESS) {
|
||||
DBG_8192C("%s: BT Firmware download to Tx packet buffer fail!\n", __func__);
|
||||
padapter->bBTFWReady = _FALSE;
|
||||
return rtStatus;
|
||||
}
|
||||
}
|
||||
|
||||
ReservedPage_Compare(padapter, pFirmware, BTFirmwareLen);
|
||||
|
||||
padapter->bBTFWReady = _TRUE;
|
||||
SetFwBTFwPatchCmd(padapter, (u16)BTFirmwareLen);
|
||||
rtStatus = _CheckWLANFwPatchBTFwReady(padapter);
|
||||
|
||||
DBG_8192C("<===%s: return %s!\n", __func__, rtStatus == _SUCCESS ? "SUCCESS" : "FAIL");
|
||||
|
||||
return rtStatus;
|
||||
}
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
#endif /* CONFIG_MP_INCLUDED */
|
||||
|
||||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
@@ -1116,10 +1027,6 @@ s32 rtl8188f_FirmwareDownload(PADAPTER padapter, BOOLEAN bUsedqFw)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_PreLoadFirmware(padapter);
|
||||
#endif
|
||||
|
||||
dev_info(&psdpriv->pusbdev->dev, "request firmware %s\n",fw_name);
|
||||
if (request_firmware(&fw, fw_name, &psdpriv->pusbdev->dev)) {
|
||||
dev_err(&psdpriv->pusbdev->dev, "Firmware %s not available\n", fw_name);
|
||||
@@ -2876,10 +2783,6 @@ void rtl8188f_InitBeaconParameters(PADAPTER padapter)
|
||||
|
||||
val8 = DIS_TSF_UDT;
|
||||
val16 = val8 | (val8 << 8); /* port0 and port1 */
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
/* Enable prot0 beacon function for PSTDMA */
|
||||
val16 |= EN_BCN_FUNCTION;
|
||||
#endif
|
||||
rtw_write16(padapter, REG_BCN_CTRL, val16);
|
||||
|
||||
/* TODO: Remove these magic number */
|
||||
@@ -3144,22 +3047,8 @@ void UpdateHalRAMask8188F(PADAPTER padapter, u32 mac_id, u8 rssi_level)
|
||||
|
||||
mask &= rate_bitmap;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rate_bitmap = rtw_btcoex_GetRaMask(padapter);
|
||||
mask &= ~rate_bitmap;
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
#ifdef CONFIG_CMCC_TEST
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (pmlmeext->cur_wireless_mode & WIRELESS_11G) {
|
||||
if (mac_id == 0) {
|
||||
DBG_871X("CMCC_BT update raid entry, mask=0x%x\n", mask);
|
||||
/*mask &=0xffffffc0; //disable CCK & <12M OFDM rate for 11G mode for CMCC */
|
||||
mask &= 0xffffff00; /*disable CCK & <24M OFDM rate for 11G mode for CMCC */
|
||||
DBG_871X("CMCC_BT update raid entry, mask=0x%x\n", mask);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (pHalData->fw_ractrl == _TRUE)
|
||||
@@ -5169,11 +5058,6 @@ static void hw_var_set_bcn_func(PADAPTER padapter, u8 variable, u8 *val)
|
||||
u8 val8;
|
||||
val8 = rtw_read8(padapter, bcn_ctrl_reg);
|
||||
val8 &= ~(EN_BCN_FUNCTION | EN_TXBCN_RPT);
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
/* Always enable port0 beacon function for PSTDMA */
|
||||
if (REG_BCN_CTRL == bcn_ctrl_reg)
|
||||
val8 |= EN_BCN_FUNCTION;
|
||||
#endif
|
||||
rtw_write8(padapter, bcn_ctrl_reg, val8);
|
||||
}
|
||||
}
|
||||
@@ -5755,12 +5639,6 @@ s32 c2h_handler_8188f(PADAPTER padapter, u8 *buf)
|
||||
/*CCX_FwC2HTxRpt(padapter, QueueID, pC2hEvent->payload); */
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
case C2H_BT_INFO:
|
||||
rtw_btcoex_BtInfoNotify(padapter, pC2hEvent->plen, pC2hEvent->payload);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_CUSTOMER_STR
|
||||
case C2H_CUSTOMER_STR_RPT:
|
||||
c2h_customer_str_rpt_hdl(padapter, pC2hEvent->payload, pC2hEvent->plen);
|
||||
@@ -5810,12 +5688,6 @@ static void process_c2h_event(PADAPTER padapter, PC2H_EVT_HDR pC2hEvent, u8 *c2h
|
||||
break;
|
||||
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
case C2H_BT_INFO:
|
||||
rtw_btcoex_BtInfoNotify(padapter, pC2hEvent->CmdLen, c2hBuf);
|
||||
break;
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
case C2H_BT_MP_INFO:
|
||||
@@ -6129,30 +6001,10 @@ void SetHwReg8188F(PADAPTER padapter, u8 variable, u8 *val)
|
||||
case HW_VAR_MLME_SITESURVEY:
|
||||
hw_var_set_mlme_sitesurvey(padapter, variable, val);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_ScanNotify(padapter, *val ? _TRUE : _FALSE);
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
break;
|
||||
|
||||
case HW_VAR_MLME_JOIN:
|
||||
hw_var_set_mlme_join(padapter, variable, val);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
switch (*val) {
|
||||
case 0:
|
||||
/* prepare to join */
|
||||
rtw_btcoex_ConnectNotify(padapter, _TRUE);
|
||||
break;
|
||||
case 1:
|
||||
/* joinbss_event callback when join res < 0 */
|
||||
rtw_btcoex_ConnectNotify(padapter, _FALSE);
|
||||
break;
|
||||
case 2:
|
||||
/* sta add event callback */
|
||||
/*rtw_btcoex_MediaStatusNotify(padapter, RT_MEDIA_CONNECT); */
|
||||
break;
|
||||
}
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
break;
|
||||
|
||||
case HW_VAR_ON_RCR_AM:
|
||||
@@ -6507,11 +6359,6 @@ void SetHwReg8188F(PADAPTER padapter, u8 variable, u8 *val)
|
||||
break;
|
||||
|
||||
case HW_VAR_DL_RSVD_PAGE:
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
rtl8188f_download_BTCoex_AP_mode_rsvd_page(padapter);
|
||||
else
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
{
|
||||
rtl8188f_download_rsvd_page(padapter, RT_MEDIA_CONNECT);
|
||||
}
|
||||
@@ -7015,40 +6862,5 @@ void rtl8188f_stop_thread(_adapter *padapter)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
extern void check_bt_status_work(void *data);
|
||||
void rtl8188fs_init_checkbthang_workqueue(_adapter *adapter)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||
adapter->priv_checkbt_wq = alloc_workqueue("sdio_wq", 0, 0);
|
||||
#else
|
||||
adapter->priv_checkbt_wq = create_workqueue("sdio_wq");
|
||||
#endif
|
||||
INIT_DELAYED_WORK(&adapter->checkbt_work, (void *)check_bt_status_work);
|
||||
}
|
||||
|
||||
void rtl8188fs_free_checkbthang_workqueue(_adapter *adapter)
|
||||
{
|
||||
if (adapter->priv_checkbt_wq) {
|
||||
cancel_delayed_work_sync(&adapter->checkbt_work);
|
||||
flush_workqueue(adapter->priv_checkbt_wq);
|
||||
destroy_workqueue(adapter->priv_checkbt_wq);
|
||||
adapter->priv_checkbt_wq = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void rtl8188fs_cancle_checkbthang_workqueue(_adapter *adapter)
|
||||
{
|
||||
if (adapter->priv_checkbt_wq)
|
||||
cancel_delayed_work_sync(&adapter->checkbt_work);
|
||||
}
|
||||
|
||||
void rtl8188fs_hal_check_bt_hang(_adapter *adapter)
|
||||
{
|
||||
if (adapter->priv_checkbt_wq)
|
||||
queue_delayed_work(adapter->priv_checkbt_wq, &(adapter->checkbt_work), 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -477,10 +477,6 @@ s32 PHY_MACConfig8188F(PADAPTER Adapter)
|
||||
/* */
|
||||
/* Config MAC */
|
||||
/* */
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
rtStatus = phy_ConfigMACWithParaFile(Adapter, PHY_FILE_MAC_REG);
|
||||
if (rtStatus == _FAIL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
ODM_ConfigMACWithHeaderFile(&pHalData->odmpriv);
|
||||
@@ -547,9 +543,6 @@ phy_BB8188f_Config_ParaFile(
|
||||
/* */
|
||||
/* 1. Read PHY_REG.TXT BB INIT!! */
|
||||
/* */
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
if (phy_ConfigBBWithParaFile(Adapter, PHY_FILE_PHY_REG, CONFIG_BB_PHY_REG) == _FAIL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
|
||||
@@ -562,34 +555,9 @@ phy_BB8188f_Config_ParaFile(
|
||||
goto phy_BB8190_Config_ParaFile_Fail;
|
||||
}
|
||||
|
||||
#if MP_DRIVER == 1
|
||||
if (Adapter->registrypriv.mp_mode == 1) {
|
||||
/* */
|
||||
/* 1.1 Read PHY_REG_MP.TXT BB INIT!! */
|
||||
/* */
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
if (phy_ConfigBBWithMpParaFile(Adapter, PHY_FILE_PHY_REG_MP) == _FAIL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG_MP))
|
||||
rtStatus = _FAIL;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (rtStatus != _SUCCESS) {
|
||||
DBG_8192C("%s():Write BB Reg MP Fail!!", __func__);
|
||||
goto phy_BB8190_Config_ParaFile_Fail;
|
||||
}
|
||||
}
|
||||
#endif /* #if (MP_DRIVER == 1) */
|
||||
|
||||
/* */
|
||||
/* 2. Read BB AGC table Initialization */
|
||||
/* */
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
if (phy_ConfigBBWithParaFile(Adapter, PHY_FILE_AGC_TAB, CONFIG_BB_AGC_TAB) == _FAIL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_AGC_TAB))
|
||||
|
||||
@@ -197,9 +197,6 @@ phy_RF6052_Config_ParaFile(
|
||||
/*----Initialize RF fom connfiguration file----*/
|
||||
switch (eRFPath) {
|
||||
case RF_PATH_A:
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
if (PHY_ConfigRFWithParaFile(Adapter, PHY_FILE_RADIO_A, eRFPath) == _FAIL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_RADIO, (ODM_RF_RADIO_PATH_E)eRFPath))
|
||||
@@ -208,9 +205,6 @@ phy_RF6052_Config_ParaFile(
|
||||
}
|
||||
break;
|
||||
case RF_PATH_B:
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
if (PHY_ConfigRFWithParaFile(Adapter, PHY_FILE_RADIO_B, eRFPath) == _FAIL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_RADIO, (ODM_RF_RADIO_PATH_E)eRFPath))
|
||||
@@ -247,9 +241,6 @@ phy_RF6052_Config_ParaFile(
|
||||
/*3 Configuration of Tx Power Tracking */
|
||||
/*3 ----------------------------------------------------------------- */
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
if (PHY_ConfigRFWithTxPwrTrackParaFile(Adapter, PHY_FILE_TXPWR_TRACK) == _FAIL)
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_EMBEDDED_FWIMG
|
||||
ODM_ConfigRFWithTxPwrTrackHeaderFile(&pHalData->odmpriv);
|
||||
|
||||
@@ -29,7 +29,7 @@ s32 rtl8188fu_init_xmit_priv(_adapter *padapter)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&pxmitpriv->xmit_tasklet,
|
||||
(void(*)(unsigned long))rtl8188fu_xmit_tasklet,
|
||||
(void *)rtl8188fu_xmit_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif
|
||||
return _SUCCESS;
|
||||
|
||||
@@ -158,30 +158,6 @@ static u32 _InitPowerOn_8188FU(PADAPTER padapter)
|
||||
| PROTOCOL_EN | SCHEDULE_EN | ENSEC | CALTMR_EN);
|
||||
rtw_write16(padapter, REG_CR_8188F, value16);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_PowerOnSetting(padapter);
|
||||
|
||||
/* external switch to S1 */
|
||||
/* 0x38[11] = 0x1 */
|
||||
/* 0x4c[23] = 0x1 */
|
||||
/* 0x64[0] = 0 */
|
||||
value16 = rtw_read16(padapter, REG_PWR_DATA);
|
||||
/* Switch the control of EESK, EECS to RFC for DPDT or Antenna switch */
|
||||
value16 |= BIT(11); /* BIT_EEPRPAD_RFE_CTRL_EN */
|
||||
rtw_write16(padapter, REG_PWR_DATA, value16);
|
||||
/*DBG_8192C("%s: REG_PWR_DATA(0x%x)=0x%04X\n", __func__, REG_PWR_DATA, rtw_read16(padapter, REG_PWR_DATA)); */
|
||||
|
||||
value32 = rtw_read32(padapter, REG_LEDCFG0);
|
||||
value32 |= BIT(23); /* DPDT_SEL_EN, 1 for SW control */
|
||||
rtw_write32(padapter, REG_LEDCFG0, value32);
|
||||
/*DBG_8192C("%s: REG_LEDCFG0(0x%x)=0x%08X\n", __func__, REG_LEDCFG0, rtw_read32(padapter, REG_LEDCFG0)); */
|
||||
|
||||
value8 = rtw_read8(padapter, REG_PAD_CTRL1_8188F);
|
||||
value8 &= ~BIT(0); /* BIT_SW_DPDT_SEL_DATA, DPDT_SEL default configuration */
|
||||
rtw_write8(padapter, REG_PAD_CTRL1_8188F, value8);
|
||||
/*DBG_8192C("%s: REG_PAD_CTRL1(0x%x)=0x%02X\n", __func__, REG_PAD_CTRL1_8188F, rtw_read8(padapter, REG_PAD_CTRL1_8188F)); */
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -232,11 +208,6 @@ static u8 _LLTWrite(
|
||||
*/
|
||||
static void _InitInterrupt(PADAPTER padapter)
|
||||
{
|
||||
#ifdef CONFIG_SUPPORT_USB_INT
|
||||
/* clear interrupt, write 1 clear */
|
||||
rtw_write32(padapter, REG_HISR0_8188F, 0xFFFFFFFF);
|
||||
rtw_write32(padapter, REG_HISR1_8188F, 0xFFFFFFFF);
|
||||
#endif /* CONFIG_SUPPORT_USB_INT */
|
||||
}
|
||||
|
||||
static void _InitQueueReservedPage(PADAPTER padapter)
|
||||
@@ -764,7 +735,9 @@ static void usb_AggSettingRxUpdate(PADAPTER padapter)
|
||||
aggctrl &= ~RXDMA_AGG_EN;
|
||||
aggrx &= ~BIT_USB_RXDMA_AGG_EN;
|
||||
rxdmamode &= ~BIT_DMA_MODE;
|
||||
#if defined(fallthrough)
|
||||
fallthrough;
|
||||
#endif
|
||||
default:
|
||||
DBG_8192C("%s: RX Aggregation Disable!\n", __func__);
|
||||
break;
|
||||
@@ -1213,23 +1186,6 @@ u32 rtl8188fu_hal_init(PADAPTER padapter)
|
||||
/*InitHalDm(Adapter); */
|
||||
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOWNLOAD_FW);
|
||||
if (padapter->registrypriv.mp_mode == 0
|
||||
#if defined(CONFIG_MP_INCLUDED) && defined(CONFIG_RTW_CUSTOMER_STR)
|
||||
|| padapter->registrypriv.mp_customer_str
|
||||
#endif
|
||||
) {
|
||||
status = rtl8188f_FirmwareDownload(padapter, _FALSE);
|
||||
if (status != _SUCCESS) {
|
||||
padapter->bFWReady = _FALSE;
|
||||
pHalData->fw_ractrl = _FALSE;
|
||||
DBG_871X("fw download fail!\n");
|
||||
goto exit;
|
||||
} else {
|
||||
padapter->bFWReady = _TRUE;
|
||||
pHalData->fw_ractrl = _TRUE;
|
||||
DBG_871X("fw download ok!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (pwrctrlpriv->reg_rfoff == _TRUE)
|
||||
pwrctrlpriv->rf_pwrstate = rf_off;
|
||||
@@ -1372,12 +1328,6 @@ u32 rtl8188fu_hal_init(PADAPTER padapter)
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_HAL_DM);
|
||||
rtl8188f_InitHalDm(padapter);
|
||||
|
||||
#if (MP_DRIVER == 1)
|
||||
if (padapter->registrypriv.mp_mode == 1) {
|
||||
padapter->mppriv.channel = pHalData->CurrentChannel;
|
||||
MPT_InitializeAdapter(padapter, padapter->mppriv.channel);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
pwrctrlpriv->rf_pwrstate = rf_on;
|
||||
|
||||
@@ -1391,35 +1341,10 @@ u32 rtl8188fu_hal_init(PADAPTER padapter)
|
||||
|
||||
PHY_LCCalibrate_8188F(&pHalData->odmpriv);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
/* Inform WiFi FW that it is the beginning of IQK */
|
||||
h2cCmdBuf = 1;
|
||||
FillH2CCmd8188F(padapter, H2C_8188F_BT_WLAN_CALIBRATION, 1, &h2cCmdBuf);
|
||||
|
||||
start_time = rtw_get_current_time();
|
||||
do {
|
||||
if (rtw_read8(padapter, 0x1e7) & 0x01)
|
||||
break;
|
||||
|
||||
rtw_msleep_os(50);
|
||||
} while (rtw_get_passing_time_ms(start_time) <= 400);
|
||||
|
||||
|
||||
rtw_btcoex_IQKNotify(padapter, _TRUE);
|
||||
#endif
|
||||
|
||||
restore_iqk_rst = (pwrpriv->bips_processing == _TRUE) ? _TRUE : _FALSE;
|
||||
PHY_IQCalibrate_8188F(padapter, _FALSE, restore_iqk_rst);
|
||||
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = _TRUE;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
rtw_btcoex_IQKNotify(padapter, _FALSE);
|
||||
|
||||
/* Inform WiFi FW that it is the finish of IQK */
|
||||
h2cCmdBuf = 0;
|
||||
FillH2CCmd8188F(padapter, H2C_8188F_BT_WLAN_CALIBRATION, 1, &h2cCmdBuf);
|
||||
#endif
|
||||
|
||||
ODM_TXPowerTrackingCheck(&pHalData->odmpriv);
|
||||
}
|
||||
}
|
||||
@@ -1431,12 +1356,7 @@ u32 rtl8188fu_hal_init(PADAPTER padapter)
|
||||
/* _InitPABias(Adapter); */
|
||||
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BT_COEXIST);
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
/* Init BT hw config. */
|
||||
rtw_btcoex_HAL_Initialize(padapter, _FALSE);
|
||||
#else
|
||||
/* rtw_btcoex_HAL_Initialize(padapter, _TRUE); // For Test. */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* 2010/05/20 MH We need to init timer after update setting. Otherwise, we can not get correct inf setting. */
|
||||
@@ -1967,11 +1887,6 @@ u32 rtl8188fu_hal_deinit(PADAPTER Adapter)
|
||||
rtw_write32(Adapter, REG_HIMR1_8188F, IMR_DISABLED_8188F);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (Adapter->registrypriv.mp_mode == 1)
|
||||
MPT_DeInitAdapter(Adapter);
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
DBG_871X("%s: bkeepfwalive(%x)\n", __func__, pwrctl->bkeepfwalive);
|
||||
|
||||
@@ -2003,10 +1918,6 @@ unsigned int rtl8188fu_inirp_init(PADAPTER Adapter)
|
||||
struct recv_priv *precvpriv = &(Adapter->recvpriv);
|
||||
|
||||
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
#endif /*CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
|
||||
_func_enter_;
|
||||
|
||||
@@ -2031,17 +1942,6 @@ unsigned int rtl8188fu_inirp_init(PADAPTER Adapter)
|
||||
precvpriv->free_recv_buf_queue_cnt--;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
_read_interrupt = pintfhdl->io_ops._read_interrupt;
|
||||
if (_read_interrupt(pintfhdl, RECV_INT_IN_ADDR) == _FALSE) {
|
||||
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_interrupt error\n"));
|
||||
status = _FAIL;
|
||||
}
|
||||
pHalData->IntrMask[0] = rtw_read32(Adapter, REG_USB_HIMR);
|
||||
MSG_8192C("pHalData->IntrMask = 0x%04x\n", pHalData->IntrMask[0]);
|
||||
pHalData->IntrMask[0] |= UHIMR_C2HCMD | UHIMR_CPWM;
|
||||
rtw_write32(Adapter, REG_USB_HIMR, pHalData->IntrMask[0]);
|
||||
#endif /*CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
|
||||
exit:
|
||||
|
||||
@@ -2055,20 +1955,9 @@ exit:
|
||||
|
||||
unsigned int rtl8188fu_inirp_deinit(PADAPTER Adapter)
|
||||
{
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
#endif /*CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("\n ===> usb_rx_deinit\n"));
|
||||
|
||||
rtw_read_port_cancel(Adapter);
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
pHalData->IntrMask[0] = rtw_read32(Adapter, REG_USB_HIMR);
|
||||
MSG_8192C("%s pHalData->IntrMask = 0x%04x\n", __func__, pHalData->IntrMask[0]);
|
||||
pHalData->IntrMask[0] = 0x0;
|
||||
rtw_write32(Adapter, REG_USB_HIMR, pHalData->IntrMask[0]);
|
||||
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("\n <=== usb_rx_deinit\n"));
|
||||
#endif /*CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
@@ -2545,9 +2434,6 @@ void rtl8188fu_set_hal_ops(_adapter *padapter)
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
pHalFunc->xmit_thread_handler = &rtl8188fu_xmit_buf_handler;
|
||||
#endif
|
||||
#ifdef CONFIG_SUPPORT_USB_INT
|
||||
pHalFunc->interrupt_handler = interrupt_handler_8188fu;
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
@@ -20,110 +20,6 @@
|
||||
|
||||
#include <rtl8188f_hal.h>
|
||||
|
||||
#ifdef CONFIG_SUPPORT_USB_INT
|
||||
void interrupt_handler_8188fu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct reportpwrstate_parm pwr_rpt;
|
||||
|
||||
if (pkt_len != INTERRUPT_MSG_FORMAT_LEN) {
|
||||
DBG_8192C("%s Invalid interrupt content length (%d)!\n", __func__, pkt_len);
|
||||
return;
|
||||
}
|
||||
|
||||
/* HISR */
|
||||
_rtw_memcpy(&(pHalData->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4);
|
||||
_rtw_memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4);
|
||||
|
||||
#if 0 /*DBG */
|
||||
{
|
||||
u32 hisr = 0 , hisr_ex = 0;
|
||||
|
||||
_rtw_memcpy(&hisr, &(pHalData->IntArray[0]), 4);
|
||||
hisr = le32_to_cpu(hisr);
|
||||
|
||||
_rtw_memcpy(&hisr_ex, &(pHalData->IntArray[1]), 4);
|
||||
hisr_ex = le32_to_cpu(hisr_ex);
|
||||
|
||||
if ((hisr != 0) || (hisr_ex != 0))
|
||||
DBG_871X("===> %s hisr:0x%08x ,hisr_ex:0x%08x\n", __func__, hisr, hisr_ex);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
if (pHalData->IntArray[0] & IMR_CPWM_88E) {
|
||||
_rtw_memcpy(&pwr_rpt.state, &(pbuf[USB_INTR_CONTENT_CPWM1_OFFSET]), 1);
|
||||
/*_rtw_memcpy(&pwr_rpt.state2, &(pbuf[USB_INTR_CONTENT_CPWM2_OFFSET]), 1); */
|
||||
|
||||
/*88e's cpwm value only change BIT0, so driver need to add PS_STATE_S2 for LPS flow. */
|
||||
pwr_rpt.state |= PS_STATE_S2;
|
||||
_set_workitem(&(adapter_to_pwrctl(padapter)->cpwm_event));
|
||||
}
|
||||
#endif/*CONFIG_LPS_LCLK */
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
if (pHalData->IntArray[0] & IMR_BCNDMAINT0_88E)
|
||||
/* suspect code indent for conditional statements */
|
||||
#endif
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
if (pHalData->IntArray[0] & (IMR_TBDER_88E | IMR_TBDOK_88E))
|
||||
/* suspect code indent for conditional statements */
|
||||
#endif
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
#if 0
|
||||
if (pHalData->IntArray[0] & IMR_BCNDMAINT0_88E)
|
||||
DBG_8192C("%s: HISR_BCNERLY_INT\n", __func__);
|
||||
if (pHalData->IntArray[0] & IMR_TBDOK_88E)
|
||||
DBG_8192C("%s: HISR_TXBCNOK\n", __func__);
|
||||
if (pHalData->IntArray[0] & IMR_TBDER_88E)
|
||||
DBG_8192C("%s: HISR_TXBCNERR\n", __func__);
|
||||
#endif
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
|
||||
/*send_beacon(padapter); */
|
||||
if (pmlmepriv->update_bcn == _TRUE) {
|
||||
/*tx_beacon_hdl(padapter, NULL); */
|
||||
set_tx_beacon_cmd(padapter);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, WIFI_AP_STATE)) {
|
||||
/*send_beacon(padapter); */
|
||||
if (padapter->pbuddy_adapter->mlmepriv.update_bcn == _TRUE) {
|
||||
/*tx_beacon_hdl(padapter, NULL); */
|
||||
set_tx_beacon_cmd(padapter->pbuddy_adapter);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /*CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT_INT
|
||||
if (pHalData->IntArray[1] & IMR_TXERR_8188F)
|
||||
DBG_871X("===> %s Tx Error Flag Interrupt Status\n", __func__);
|
||||
if (pHalData->IntArray[1] & IMR_RXERR_8188F)
|
||||
DBG_871X("===> %s Rx Error Flag INT Status\n", __func__);
|
||||
if (pHalData->IntArray[1] & IMR_TXFOVW_8188F)
|
||||
DBG_871X("===> %s Transmit FIFO Overflow\n", __func__);
|
||||
if (pHalData->IntArray[1] & IMR_RXFOVW_8188F)
|
||||
DBG_871X("===> %s Receive FIFO Overflow\n", __func__);
|
||||
#endif/*DBG_CONFIG_ERROR_DETECT_INT */
|
||||
|
||||
|
||||
/* C2H Event */
|
||||
if (pbuf[0] != 0) {
|
||||
_rtw_memcpy(&(pHalData->C2hArray[0]), &(pbuf[USB_INTR_CONTENT_C2H_OFFSET]), 16);
|
||||
/*rtw_c2h_wk_cmd(padapter); to do.. */
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static s32 pre_recv_entry(union recv_frame *precvframe, u8 *pphy_status)
|
||||
{
|
||||
s32 ret = _SUCCESS;
|
||||
@@ -409,8 +305,7 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr)
|
||||
|
||||
pattrib = &precvframe->u.hdr.attrib;
|
||||
|
||||
if ((padapter->registrypriv.mp_mode == 0)
|
||||
&& ((pattrib->crc_err) || (pattrib->icv_err))) {
|
||||
if (((pattrib->crc_err) || (pattrib->icv_err))) {
|
||||
DBG_8192C("%s: RX Warning! crc_err=%d icv_err=%d, skip!\n",
|
||||
__func__, pattrib->crc_err, pattrib->icv_err);
|
||||
|
||||
@@ -541,10 +436,6 @@ void rtl8188fu_set_intf_ops(struct _io_ops *pops)
|
||||
pops->_read_port_cancel = &usb_read_port_cancel;
|
||||
pops->_write_port_cancel = &usb_write_port_cancel;
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
pops->_read_interrupt = &usb_read_interrupt;
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
|
||||
}
|
||||
|
||||
@@ -160,11 +160,6 @@
|
||||
|
||||
#define ENABLE_USB_DROP_INCORRECT_OUT
|
||||
|
||||
/* #define CONFIG_SUPPORT_USB_INT */
|
||||
#ifdef CONFIG_SUPPORT_USB_INT
|
||||
/* #define CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
#endif
|
||||
|
||||
/* #define CONFIG_REDUCE_USB_TX_INT */ /* Trade-off: Improve performance, but may cause TX URBs blocked by USB Host/Bus driver on few platforms. */
|
||||
|
||||
/*
|
||||
@@ -238,29 +233,12 @@
|
||||
/* #define CONFIG_IPS_LEVEL_2 1 */ /*enable this to set default IPS mode to IPS_LEVEL_2 */
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LPS) && defined(CONFIG_SUPPORT_USB_INT)
|
||||
/* #define CONFIG_LPS_LCLK */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
#define CONFIG_XMIT_THREAD_MODE
|
||||
#endif
|
||||
#endif /* CONFIG_POWER_SAVING */
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
/* for ODM and outsrc BT-Coex */
|
||||
#define BT_30_SUPPORT 1
|
||||
|
||||
#ifndef CONFIG_LPS
|
||||
#define CONFIG_LPS /* download reserved page to FW */
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_C2H_PACKET_EN
|
||||
#define CONFIG_C2H_PACKET_EN
|
||||
#endif
|
||||
#else /* !ONFIG_BT_COEXIST */
|
||||
#define BT_30_SUPPORT 0
|
||||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
#ifndef WAKEUP_GPIO_IDX
|
||||
|
||||
@@ -150,10 +150,6 @@ typedef struct _ADAPTER _adapter, ADAPTER,*PADAPTER;
|
||||
#include <ethernet.h>
|
||||
#include <circ_buf.h>
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
#include <rtw_btcoex.h>
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
#define SPEC_DEV_ID_NONE BIT(0)
|
||||
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
|
||||
#define SPEC_DEV_ID_ENABLE_PS BIT(2)
|
||||
@@ -197,11 +193,6 @@ struct registry_priv
|
||||
u8 short_retry_lmt;
|
||||
u16 busy_thresh;
|
||||
u8 ack_policy;
|
||||
u8 mp_mode;
|
||||
#if defined(CONFIG_MP_INCLUDED) && defined(CONFIG_RTW_CUSTOMER_STR)
|
||||
u8 mp_customer_str;
|
||||
#endif
|
||||
u8 mp_dm;
|
||||
u8 software_encrypt;
|
||||
u8 software_decrypt;
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
@@ -260,13 +251,6 @@ struct registry_priv
|
||||
char alpha2[2];
|
||||
u8 channel_plan;
|
||||
u8 full_ch_in_p2p_handshake; /* 0: reply only softap channel, 1: reply full channel list*/
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
u8 btcoex;
|
||||
u8 bt_iso;
|
||||
u8 bt_sco;
|
||||
u8 bt_ampdu;
|
||||
s8 ant_num;
|
||||
#endif
|
||||
BOOLEAN bAcceptAddbaReq;
|
||||
|
||||
u8 antdiv_cfg;
|
||||
@@ -331,11 +315,6 @@ struct registry_priv
|
||||
u8 check_fw_ps;
|
||||
u8 RegPwrTrimEnable;
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
u8 load_phy_file;
|
||||
u8 RegDecryptCustomFile;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MULTI_VIR_IFACES
|
||||
u8 ext_iface_num;//primary/secondary iface is excluded
|
||||
#endif
|
||||
@@ -1002,10 +981,6 @@ struct _ADAPTER{
|
||||
struct wifi_display_info wfd_info;
|
||||
#endif //CONFIG_WFD
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
struct bt_coex_info coex_info;
|
||||
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
|
||||
ERROR_CODE LastError; /* <20130613, Kordan> Only the functions associated with MP records the error code by now. */
|
||||
|
||||
PVOID HalData;
|
||||
|
||||
@@ -87,10 +87,6 @@ void hal_btcoex_SendScanNotify(PADAPTER, u8 type);
|
||||
void hal_btcoex_StackUpdateProfileInfo(void);
|
||||
void hal_btcoex_BTOffOnNotify(PADAPTER padapter, u8 bBTON);
|
||||
void hal_btcoex_SetAntIsolationType(PADAPTER padapter, u8 anttype);
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
int hal_btcoex_AntIsolationConfig_ParaFile(IN PADAPTER Adapter,IN char* pFileName);
|
||||
int hal_btcoex_ParseAntIsolationConfigFile(PADAPTER Adapter, char* buffer);
|
||||
#endif // CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
u16 hal_btcoex_btreg_read(PADAPTER padapter, u8 type, u16 addr, u32 *data);
|
||||
u16 hal_btcoex_btreg_write(PADAPTER padapter, u8 type, u16 addr, u16 val);
|
||||
#endif // !__HAL_BTCOEX_H__
|
||||
|
||||
@@ -534,12 +534,6 @@ static inline u32 rtw_phydm_ability_get(_adapter *adapter)
|
||||
return rtw_phydm_ability_ops(adapter, HAL_PHYDM_ABILITY_GET, 0);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
extern char *rtw_phy_file_path;
|
||||
extern char rtw_phy_para_file_path[PATH_LENGTH_MAX];
|
||||
#define GetLineFromBuffer(buffer) strsep(&buffer, "\r\n")
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FW_C2H_DEBUG
|
||||
void Debug_FwC2H(PADAPTER padapter, u8 *pdata, u8 len);
|
||||
#endif
|
||||
|
||||
@@ -252,52 +252,5 @@ void dump_tx_power_limit(void *sel, _adapter *adapter);
|
||||
|
||||
int rtw_get_phy_file_path(_adapter *adapter, const char *file_name);
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
#define MAC_FILE_FW_NIC "FW_NIC.bin"
|
||||
#define MAC_FILE_FW_WW_IMG "FW_WoWLAN.bin"
|
||||
#define PHY_FILE_MAC_REG "MAC_REG.txt"
|
||||
|
||||
#define PHY_FILE_AGC_TAB "AGC_TAB.txt"
|
||||
#define PHY_FILE_PHY_REG "PHY_REG.txt"
|
||||
#define PHY_FILE_PHY_REG_MP "PHY_REG_MP.txt"
|
||||
#define PHY_FILE_PHY_REG_PG "PHY_REG_PG.txt"
|
||||
|
||||
#define PHY_FILE_RADIO_A "RadioA.txt"
|
||||
#define PHY_FILE_RADIO_B "RadioB.txt"
|
||||
#define PHY_FILE_RADIO_C "RadioC.txt"
|
||||
#define PHY_FILE_RADIO_D "RadioD.txt"
|
||||
#define PHY_FILE_TXPWR_TRACK "TxPowerTrack.txt"
|
||||
#define PHY_FILE_TXPWR_LMT "TXPWR_LMT.txt"
|
||||
|
||||
#define PHY_FILE_WIFI_ANT_ISOLATION "wifi_ant_isolation.txt"
|
||||
|
||||
#define MAX_PARA_FILE_BUF_LEN 25600
|
||||
|
||||
#define LOAD_MAC_PARA_FILE BIT0
|
||||
#define LOAD_BB_PARA_FILE BIT1
|
||||
#define LOAD_BB_PG_PARA_FILE BIT2
|
||||
#define LOAD_BB_MP_PARA_FILE BIT3
|
||||
#define LOAD_RF_PARA_FILE BIT4
|
||||
#define LOAD_RF_TXPWR_TRACK_PARA_FILE BIT5
|
||||
#define LOAD_RF_TXPWR_LMT_PARA_FILE BIT6
|
||||
|
||||
int phy_ConfigMACWithParaFile(IN PADAPTER Adapter, IN char* pFileName);
|
||||
|
||||
int phy_ConfigBBWithParaFile(IN PADAPTER Adapter, IN char* pFileName, IN u32 ConfigType);
|
||||
|
||||
int phy_ConfigBBWithPgParaFile(IN PADAPTER Adapter, IN const char *pFileName);
|
||||
|
||||
int phy_ConfigBBWithMpParaFile(IN PADAPTER Adapter, IN char* pFileName);
|
||||
|
||||
int PHY_ConfigRFWithParaFile(IN PADAPTER Adapter, IN char* pFileName, IN u8 eRFPath);
|
||||
|
||||
int PHY_ConfigRFWithTxPwrTrackParaFile(IN PADAPTER Adapter, IN char* pFileName);
|
||||
|
||||
int PHY_ConfigRFWithPowerLimitTableParaFile(IN PADAPTER Adapter, IN const char *pFileName);
|
||||
|
||||
void phy_free_filebuf_mask(_adapter *padapter, u8 mask);
|
||||
void phy_free_filebuf(_adapter *padapter);
|
||||
#endif /* CONFIG_LOAD_PHY_PARA_FROM_FILE */
|
||||
|
||||
#endif /* __HAL_COMMON_H__ */
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
#if 1//def CONFIG_SINGLE_IMG
|
||||
|
||||
#include "../hal/phydm/phydm_precomp.h"
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
#include <hal_btcoex.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include <hal_sdio.h>
|
||||
@@ -579,11 +576,6 @@ typedef struct hal_com_data
|
||||
struct sreset_priv srestpriv;
|
||||
#endif //#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
// For bluetooth co-existance
|
||||
BT_COEXIST bt_coexist;
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
|
||||
#if defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8703B) || defined(CONFIG_RTL8188F)
|
||||
#ifndef CONFIG_PCI_HCI // mutual exclusive with PCI -- so they're SDIO and GSPI
|
||||
// Interrupt relatd register information.
|
||||
@@ -592,28 +584,6 @@ typedef struct hal_com_data
|
||||
#endif
|
||||
#endif /*endif CONFIG_RTL8723B */
|
||||
|
||||
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
|
||||
char para_file_buf[MAX_PARA_FILE_BUF_LEN];
|
||||
char *mac_reg;
|
||||
u32 mac_reg_len;
|
||||
char *bb_phy_reg;
|
||||
u32 bb_phy_reg_len;
|
||||
char *bb_agc_tab;
|
||||
u32 bb_agc_tab_len;
|
||||
char *bb_phy_reg_pg;
|
||||
u32 bb_phy_reg_pg_len;
|
||||
char *bb_phy_reg_mp;
|
||||
u32 bb_phy_reg_mp_len;
|
||||
char *rf_radio_a;
|
||||
u32 rf_radio_a_len;
|
||||
char *rf_radio_b;
|
||||
u32 rf_radio_b_len;
|
||||
char *rf_tx_pwr_track;
|
||||
u32 rf_tx_pwr_track_len;
|
||||
char *rf_tx_pwr_lmt;
|
||||
u32 rf_tx_pwr_lmt_len;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BACKGROUND_NOISE_MONITOR
|
||||
s16 noise[ODM_MAX_CHANNEL_NUM];
|
||||
#endif
|
||||
|
||||
@@ -22,10 +22,7 @@
|
||||
|
||||
|
||||
enum RTL871X_HCI_TYPE {
|
||||
RTW_PCIE = BIT0,
|
||||
RTW_USB = BIT1,
|
||||
RTW_SDIO = BIT2,
|
||||
RTW_GSPI = BIT3,
|
||||
};
|
||||
|
||||
enum _CHIP_TYPE {
|
||||
@@ -269,10 +266,6 @@ struct hal_ops {
|
||||
s32 (*interrupt_handler)(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_HCI) && defined(CONFIG_SUPPORT_USB_INT)
|
||||
void (*interrupt_handler)(_adapter *padapter, u16 pkt_len, u8 *pbuf);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PCI_HCI)
|
||||
void (*irp_reset)(_adapter *padapter);
|
||||
#endif
|
||||
@@ -608,9 +601,6 @@ void rtw_hal_write_rfreg(_adapter *padapter, u32 eRFPath, u32 RegAddr, u32 BitMa
|
||||
#if defined(CONFIG_PCI_HCI)
|
||||
s32 rtw_hal_interrupt_handler(_adapter *padapter);
|
||||
#endif
|
||||
#if defined(CONFIG_USB_HCI) && defined(CONFIG_SUPPORT_USB_INT)
|
||||
void rtw_hal_interrupt_handler(_adapter *padapter, u16 pkt_len, u8 *pbuf);
|
||||
#endif
|
||||
|
||||
void rtw_hal_set_bwmode(_adapter *padapter, CHANNEL_WIDTH Bandwidth, u8 Offset);
|
||||
void rtw_hal_set_chan(_adapter *padapter, u8 channel);
|
||||
|
||||
@@ -1384,29 +1384,22 @@ enum ieee80211_state {
|
||||
#define PORT_FMT "%u"
|
||||
#define PORT_ARG(x) ntohs(*((u16 *)(x)))
|
||||
|
||||
#ifdef PLATFORM_FREEBSD //Baron change func to macro
|
||||
#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
|
||||
#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \
|
||||
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
|
||||
(((Addr[5]) & 0xff) == 0xff))
|
||||
#else
|
||||
extern __inline int is_multicast_mac_addr(const u8 *addr)
|
||||
static inline int is_multicast_mac_addr(const u8 *addr)
|
||||
{
|
||||
return ((addr[0] != 0xff) && (0x01 & addr[0]));
|
||||
}
|
||||
|
||||
extern __inline int is_broadcast_mac_addr(const u8 *addr)
|
||||
static inline int is_broadcast_mac_addr(const u8 *addr)
|
||||
{
|
||||
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
|
||||
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
|
||||
}
|
||||
|
||||
extern __inline int is_zero_mac_addr(const u8 *addr)
|
||||
static int is_zero_mac_addr(const u8 *addr)
|
||||
{
|
||||
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
|
||||
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
|
||||
}
|
||||
#endif //PLATFORM_FREEBSD
|
||||
|
||||
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
||||
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
|
||||
|
||||
@@ -124,8 +124,6 @@ u16 rtw_recv_select_queue(struct sk_buff *skb);
|
||||
int rtw_ndev_notifier_register(void);
|
||||
void rtw_ndev_notifier_unregister(void);
|
||||
|
||||
#include "../os_dep/linux/rtw_proc.h"
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
#include "../os_dep/linux/ioctl_cfg80211.h"
|
||||
#endif //CONFIG_IOCTL_CFG80211
|
||||
|
||||
@@ -635,3 +635,4 @@ char alpha_to_upper(char c);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -109,14 +109,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
#include <net/sock.h>
|
||||
#include <net/tcp.h>
|
||||
#include <linux/udp.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/netlink.h>
|
||||
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
typedef struct urb * PURB;
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22))
|
||||
@@ -162,7 +154,11 @@
|
||||
typedef int thread_return;
|
||||
typedef void* thread_context;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
||||
#define thread_exit() complete_and_exit(NULL, 0)
|
||||
#else
|
||||
#define thread_exit() kthread_complete_and_exit(NULL, 0)
|
||||
#endif
|
||||
|
||||
typedef void timer_hdl_return;
|
||||
typedef void* timer_hdl_context;
|
||||
|
||||
@@ -191,9 +191,6 @@ void rtl8188f_set_FwPsTuneParam_cmd(PADAPTER padapter);
|
||||
void rtl8188f_set_FwMacIdConfig_cmd(_adapter* padapter, u8 mac_id, u8 raid, u8 bw, u8 sgi, u32 mask);
|
||||
void rtl8188f_set_FwBtMpOper_cmd(PADAPTER padapter, u8 idx, u8 ver, u8 reqnum, u8 *param);
|
||||
void rtl8188f_download_rsvd_page(PADAPTER padapter, u8 mstatus);
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
void rtl8188f_download_BTCoex_AP_mode_rsvd_page(PADAPTER padapter);
|
||||
#endif // CONFIG_BT_COEXIST
|
||||
#ifdef CONFIG_P2P
|
||||
void rtl8188f_set_p2p_ps_offload_cmd(PADAPTER padapter, u8 p2p_ps_state);
|
||||
#endif //CONFIG_P2P
|
||||
|
||||
@@ -233,13 +233,6 @@ void _8051Reset8188(PADAPTER padapter);
|
||||
void rtl8188f_start_thread(_adapter *padapter);
|
||||
void rtl8188f_stop_thread(_adapter *padapter);
|
||||
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
void rtl8188fs_init_checkbthang_workqueue(_adapter * adapter);
|
||||
void rtl8188fs_free_checkbthang_workqueue(_adapter * adapter);
|
||||
void rtl8188fs_cancle_checkbthang_workqueue(_adapter * adapter);
|
||||
void rtl8188fs_hal_check_bt_hang(_adapter * adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
void HalSetOutPutGPIO(PADAPTER padapter, u8 index, u8 OutPutValue);
|
||||
#endif
|
||||
|
||||
@@ -1,436 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2013 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef __RTW_BTCOEX_H__
|
||||
#define __RTW_BTCOEX_H__
|
||||
|
||||
#include <drv_types.h>
|
||||
|
||||
/* For H2C: H2C_BT_MP_OPER. Return status definition to the user layer */
|
||||
typedef enum _BT_CTRL_STATUS {
|
||||
BT_STATUS_SUCCESS = 0x00, /* Success */
|
||||
BT_STATUS_BT_OP_SUCCESS = 0x01, /* bt fw op execution success */
|
||||
BT_STATUS_H2C_SUCCESS = 0x02, /* H2c success */
|
||||
BT_STATUS_H2C_FAIL = 0x03, /* H2c fail */
|
||||
BT_STATUS_H2C_LENGTH_EXCEEDED = 0x04, /* H2c command length exceeded */
|
||||
BT_STATUS_H2C_TIMTOUT = 0x05, /* H2c timeout */
|
||||
BT_STATUS_H2C_BT_NO_RSP = 0x06, /* H2c sent, bt no rsp */
|
||||
BT_STATUS_C2H_SUCCESS = 0x07, /* C2h success */
|
||||
BT_STATUS_C2H_REQNUM_MISMATCH = 0x08, /* bt fw wrong rsp */
|
||||
BT_STATUS_OPCODE_U_VERSION_MISMATCH = 0x08, /* Upper layer OP code version mismatch. */
|
||||
BT_STATUS_OPCODE_L_VERSION_MISMATCH = 0x0a, /* Lower layer OP code version mismatch. */
|
||||
BT_STATUS_UNKNOWN_OPCODE_U = 0x0b, /* Unknown Upper layer OP code */
|
||||
BT_STATUS_UNKNOWN_OPCODE_L = 0x0c, /* Unknown Lower layer OP code */
|
||||
BT_STATUS_PARAMETER_FORMAT_ERROR_U = 0x0d, /* Wrong parameters sent by upper layer. */
|
||||
BT_STATUS_PARAMETER_FORMAT_ERROR_L = 0x0e, /* bt fw parameter format is not consistency */
|
||||
BT_STATUS_PARAMETER_OUT_OF_RANGE_U = 0x0f, /* uppery layer parameter value is out of range */
|
||||
BT_STATUS_PARAMETER_OUT_OF_RANGE_L = 0x10, /* bt fw parameter value is out of range */
|
||||
BT_STATUS_UNKNOWN_STATUS_L = 0x11, /* bt returned an defined status code */
|
||||
BT_STATUS_UNKNOWN_STATUS_H = 0x12, /* driver need to do error handle or not handle-well. */
|
||||
BT_STATUS_WRONG_LEVEL = 0x13, /* should be under passive level */
|
||||
BT_STATUS_NOT_IMPLEMENT = 0x14, /* op code not implemented yet */
|
||||
BT_STATUS_BT_STACK_OP_SUCCESS = 0x15, /* bt stack op execution success */
|
||||
BT_STATUS_BT_STACK_NOT_SUPPORT = 0x16, /* stack version not support this. */
|
||||
BT_STATUS_BT_STACK_SEND_HCI_EVENT_FAIL = 0x17, /* send hci event fail */
|
||||
BT_STATUS_BT_STACK_NOT_BIND = 0x18, /* stack not bind wifi driver */
|
||||
BT_STATUS_BT_STACK_NO_RSP = 0x19, /* stack doesn't have any rsp. */
|
||||
BT_STATUS_MAX
|
||||
} BT_CTRL_STATUS, *PBT_CTRL_STATUS;
|
||||
|
||||
#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)
|
||||
#define CHECK_STATUS_CODE_FROM_BT_MP_OPER_RET(RetCode, StatusCode) (GET_STATUS_CODE_FROM_BT_MP_OPER_RET(RetCode) == StatusCode)
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
|
||||
#define NETLINK_USER 31
|
||||
#define CONNECT_PORT 30000
|
||||
#define CONNECT_PORT_BT 30001
|
||||
#define KERNEL_SOCKET_OK 0x01
|
||||
#define NETLINK_SOCKET_OK 0x02
|
||||
|
||||
#define OTHER 0
|
||||
#define RX_ATTEND_ACK 1
|
||||
#define RX_LEAVE_ACK 2
|
||||
#define RX_BT_LEAVE 3
|
||||
#define RX_INVITE_REQ 4
|
||||
#define RX_ATTEND_REQ 5
|
||||
#define RX_INVITE_RSP 6
|
||||
|
||||
#define invite_req "INVITE_REQ"
|
||||
#define invite_rsp "INVITE_RSP"
|
||||
#define attend_req "ATTEND_REQ"
|
||||
#define attend_ack "ATTEND_ACK"
|
||||
#define wifi_leave "WIFI_LEAVE"
|
||||
#define leave_ack "LEAVE_ACK"
|
||||
#define bt_leave "BT_LEAVE"
|
||||
|
||||
#define BT_INFO_NOTIFY_CMD 0x0106
|
||||
#define BT_INFO_LEN 8
|
||||
|
||||
typedef struct _HCI_LINK_INFO{
|
||||
u2Byte ConnectHandle;
|
||||
u1Byte IncomingTrafficMode;
|
||||
u1Byte OutgoingTrafficMode;
|
||||
u1Byte BTProfile;
|
||||
u1Byte BTCoreSpec;
|
||||
s1Byte BT_RSSI;
|
||||
u1Byte TrafficProfile;
|
||||
u1Byte linkRole;
|
||||
}HCI_LINK_INFO, *PHCI_LINK_INFO;
|
||||
|
||||
#define MAX_BT_ACL_LINK_NUM 8
|
||||
|
||||
typedef struct _HCI_EXT_CONFIG{
|
||||
HCI_LINK_INFO aclLink[MAX_BT_ACL_LINK_NUM];
|
||||
u1Byte btOperationCode;
|
||||
u2Byte CurrentConnectHandle;
|
||||
u1Byte CurrentIncomingTrafficMode;
|
||||
u1Byte CurrentOutgoingTrafficMode;
|
||||
|
||||
u1Byte NumberOfACL;
|
||||
u1Byte NumberOfSCO;
|
||||
u1Byte CurrentBTStatus;
|
||||
u2Byte HCIExtensionVer;
|
||||
|
||||
BOOLEAN bEnableWifiScanNotify;
|
||||
}HCI_EXT_CONFIG, *PHCI_EXT_CONFIG;
|
||||
|
||||
typedef struct _HCI_PHY_LINK_BSS_INFO{
|
||||
u2Byte bdCap; // capability information
|
||||
|
||||
// Qos related. Added by Annie, 2005-11-01.
|
||||
//BSS_QOS BssQos;
|
||||
|
||||
}HCI_PHY_LINK_BSS_INFO, *PHCI_PHY_LINK_BSS_INFO;
|
||||
|
||||
typedef enum _BT_CONNECT_TYPE{
|
||||
BT_CONNECT_AUTH_REQ =0x00,
|
||||
BT_CONNECT_AUTH_RSP =0x01,
|
||||
BT_CONNECT_ASOC_REQ =0x02,
|
||||
BT_CONNECT_ASOC_RSP =0x03,
|
||||
BT_DISCONNECT =0x04
|
||||
}BT_CONNECT_TYPE,*PBT_CONNECT_TYPE;
|
||||
|
||||
|
||||
typedef struct _PACKET_IRP_HCIEVENT_DATA {
|
||||
u8 EventCode;
|
||||
u8 Length; //total cmd length = extension event length+1(extension event code length)
|
||||
u8 Data[1]; // byte1 is extension event code
|
||||
} rtw_HCI_event;
|
||||
|
||||
|
||||
struct btinfo_8761ATV {
|
||||
u8 cid;
|
||||
u8 len;
|
||||
|
||||
u8 bConnection:1;
|
||||
u8 bSCOeSCO:1;
|
||||
u8 bInQPage:1;
|
||||
u8 bACLBusy:1;
|
||||
u8 bSCOBusy:1;
|
||||
u8 bHID:1;
|
||||
u8 bA2DP:1;
|
||||
u8 bFTP:1;
|
||||
|
||||
u8 retry_cnt:4;
|
||||
u8 rsvd_34:1;
|
||||
u8 bPage:1;
|
||||
u8 TRxMask:1;
|
||||
u8 Sniff_attempt:1;
|
||||
|
||||
u8 rssi;
|
||||
|
||||
u8 A2dp_rate:1;
|
||||
u8 ReInit:1;
|
||||
u8 MaxPower:1;
|
||||
u8 bEnIgnoreWlanAct:1;
|
||||
u8 TxPowerLow:1;
|
||||
u8 TxPowerHigh:1;
|
||||
u8 eSCO_SCO:1;
|
||||
u8 Master_Slave:1;
|
||||
|
||||
u8 ACL_TRx_TP_low;
|
||||
u8 ACL_TRx_TP_high;
|
||||
};
|
||||
|
||||
#define HCIOPCODE(_OCF, _OGF) ((_OGF)<<10|(_OCF))
|
||||
#define HCIOPCODELOW(_OCF, _OGF) (u8)(HCIOPCODE(_OCF, _OGF)&0x00ff)
|
||||
#define HCIOPCODEHIGHT(_OCF, _OGF) (u8)(HCIOPCODE(_OCF, _OGF)>>8)
|
||||
#define HCI_OGF(opCode) (unsigned char)((0xFC00 & (opCode)) >> 10)
|
||||
#define HCI_OCF(opCode) ( 0x3FF & (opCode))
|
||||
|
||||
|
||||
typedef enum _HCI_STATUS{
|
||||
HCI_STATUS_SUCCESS =0x00, //Success
|
||||
HCI_STATUS_UNKNOW_HCI_CMD =0x01, //Unknown HCI Command
|
||||
HCI_STATUS_UNKNOW_CONNECT_ID =0X02, //Unknown Connection Identifier
|
||||
HCI_STATUS_HW_FAIL =0X03, //Hardware Failure
|
||||
HCI_STATUS_PAGE_TIMEOUT =0X04, //Page Timeout
|
||||
HCI_STATUS_AUTH_FAIL =0X05, //Authentication Failure
|
||||
HCI_STATUS_PIN_OR_KEY_MISSING =0X06, //PIN or Key Missing
|
||||
HCI_STATUS_MEM_CAP_EXCEED =0X07, //Memory Capacity Exceeded
|
||||
HCI_STATUS_CONNECT_TIMEOUT =0X08, //Connection Timeout
|
||||
HCI_STATUS_CONNECT_LIMIT =0X09, //Connection Limit Exceeded
|
||||
HCI_STATUS_SYN_CONNECT_LIMIT =0X0a, //Synchronous Connection Limit To A Device Exceeded
|
||||
HCI_STATUS_ACL_CONNECT_EXISTS =0X0b, //ACL Connection Already Exists
|
||||
HCI_STATUS_CMD_DISALLOW =0X0c, //Command Disallowed
|
||||
HCI_STATUS_CONNECT_RJT_LIMIT_RESOURCE =0X0d, //Connection Rejected due to Limited Resources
|
||||
HCI_STATUS_CONNECT_RJT_SEC_REASON =0X0e, //Connection Rejected Due To Security Reasons
|
||||
HCI_STATUS_CONNECT_RJT_UNACCEPT_BD_ADDR =0X0f, //Connection Rejected due to Unacceptable BD_ADDR
|
||||
HCI_STATUS_CONNECT_ACCEPT_TIMEOUT =0X10, //Connection Accept Timeout Exceeded
|
||||
HCI_STATUS_UNSUPPORT_FEATURE_PARA_VALUE =0X11, //Unsupported Feature or Parameter Value
|
||||
HCI_STATUS_INVALID_HCI_CMD_PARA_VALUE =0X12, //Invalid HCI Command Parameters
|
||||
HCI_STATUS_REMOTE_USER_TERMINATE_CONNECT =0X13, //Remote User Terminated Connection
|
||||
HCI_STATUS_REMOTE_DEV_TERMINATE_LOW_RESOURCE =0X14, //Remote Device Terminated Connection due to Low Resources
|
||||
HCI_STATUS_REMOTE_DEV_TERMINATE_CONNECT_POWER_OFF =0X15, //Remote Device Terminated Connection due to Power Off
|
||||
HCI_STATUS_CONNECT_TERMINATE_LOCAL_HOST =0X16, //Connection Terminated By Local Host
|
||||
HCI_STATUS_REPEATE_ATTEMPT =0X17, //Repeated Attempts
|
||||
HCI_STATUS_PAIR_NOT_ALLOW =0X18, //Pairing Not Allowed
|
||||
HCI_STATUS_UNKNOW_LMP_PDU =0X19, //Unknown LMP PDU
|
||||
HCI_STATUS_UNSUPPORT_REMOTE_LMP_FEATURE =0X1a, //Unsupported Remote Feature / Unsupported LMP Feature
|
||||
HCI_STATUS_SOC_OFFSET_REJECT =0X1b, //SCO Offset Rejected
|
||||
HCI_STATUS_SOC_INTERVAL_REJECT =0X1c, //SCO Interval Rejected
|
||||
HCI_STATUS_SOC_AIR_MODE_REJECT =0X1d,//SCO Air Mode Rejected
|
||||
HCI_STATUS_INVALID_LMP_PARA =0X1e, //Invalid LMP Parameters
|
||||
HCI_STATUS_UNSPECIFIC_ERROR =0X1f, //Unspecified Error
|
||||
HCI_STATUS_UNSUPPORT_LMP_PARA_VALUE =0X20, //Unsupported LMP Parameter Value
|
||||
HCI_STATUS_ROLE_CHANGE_NOT_ALLOW =0X21, //Role Change Not Allowed
|
||||
HCI_STATUS_LMP_RESPONSE_TIMEOUT =0X22, //LMP Response Timeout
|
||||
HCI_STATUS_LMP_ERROR_TRANSACTION_COLLISION =0X23, //LMP Error Transaction Collision
|
||||
HCI_STATUS_LMP_PDU_NOT_ALLOW =0X24, //LMP PDU Not Allowed
|
||||
HCI_STATUS_ENCRYPTION_MODE_NOT_ALLOW =0X25, //Encryption Mode Not Acceptable
|
||||
HCI_STATUS_LINK_KEY_CAN_NOT_CHANGE =0X26, //Link Key Can Not be Changed
|
||||
HCI_STATUS_REQUEST_QOS_NOT_SUPPORT =0X27, //Requested QoS Not Supported
|
||||
HCI_STATUS_INSTANT_PASSED =0X28, //Instant Passed
|
||||
HCI_STATUS_PAIRING_UNIT_KEY_NOT_SUPPORT =0X29, //Pairing With Unit Key Not Supported
|
||||
HCI_STATUS_DIFFERENT_TRANSACTION_COLLISION =0X2a, //Different Transaction Collision
|
||||
HCI_STATUS_RESERVE_1 =0X2b, //Reserved
|
||||
HCI_STATUS_QOS_UNACCEPT_PARA =0X2c, //QoS Unacceptable Parameter
|
||||
HCI_STATUS_QOS_REJECT =0X2d, //QoS Rejected
|
||||
HCI_STATUS_CHNL_CLASSIFICATION_NOT_SUPPORT =0X2e, //Channel Classification Not Supported
|
||||
HCI_STATUS_INSUFFICIENT_SECURITY =0X2f, //Insufficient Security
|
||||
HCI_STATUS_PARA_OUT_OF_RANGE =0x30, //Parameter Out Of Mandatory Range
|
||||
HCI_STATUS_RESERVE_2 =0X31, //Reserved
|
||||
HCI_STATUS_ROLE_SWITCH_PENDING =0X32, //Role Switch Pending
|
||||
HCI_STATUS_RESERVE_3 =0X33, //Reserved
|
||||
HCI_STATUS_RESERVE_SOLT_VIOLATION =0X34, //Reserved Slot Violation
|
||||
HCI_STATUS_ROLE_SWITCH_FAIL =0X35, //Role Switch Failed
|
||||
HCI_STATUS_EXTEND_INQUIRY_RSP_TOO_LARGE =0X36, //Extended Inquiry Response Too Large
|
||||
HCI_STATUS_SEC_SIMPLE_PAIRING_NOT_SUPPORT =0X37, //Secure Simple Pairing Not Supported By Host.
|
||||
HCI_STATUS_HOST_BUSY_PAIRING =0X38, //Host Busy - Pairing
|
||||
HCI_STATUS_CONNECT_REJ_NOT_SUIT_CHNL_FOUND =0X39, //Connection Rejected due to No Suitable Channel Found
|
||||
HCI_STATUS_CONTROLLER_BUSY =0X3a //CONTROLLER BUSY
|
||||
}RTW_HCI_STATUS;
|
||||
|
||||
#define HCI_EVENT_COMMAND_COMPLETE 0x0e
|
||||
|
||||
#define OGF_EXTENSION 0X3f
|
||||
typedef enum HCI_EXTENSION_COMMANDS{
|
||||
HCI_SET_ACL_LINK_DATA_FLOW_MODE =0x0010,
|
||||
HCI_SET_ACL_LINK_STATUS =0x0020,
|
||||
HCI_SET_SCO_LINK_STATUS =0x0030,
|
||||
HCI_SET_RSSI_VALUE =0x0040,
|
||||
HCI_SET_CURRENT_BLUETOOTH_STATUS =0x0041,
|
||||
|
||||
//The following is for RTK8723
|
||||
HCI_EXTENSION_VERSION_NOTIFY =0x0100,
|
||||
HCI_LINK_STATUS_NOTIFY =0x0101,
|
||||
HCI_BT_OPERATION_NOTIFY =0x0102,
|
||||
HCI_ENABLE_WIFI_SCAN_NOTIFY =0x0103,
|
||||
HCI_QUERY_RF_STATUS =0x0104,
|
||||
HCI_BT_ABNORMAL_NOTIFY =0x0105,
|
||||
HCI_BT_INFO_NOTIFY =0x0106,
|
||||
HCI_BT_COEX_NOTIFY =0x0107,
|
||||
HCI_BT_PATCH_VERSION_NOTIFY =0x0108,
|
||||
HCI_BT_AFH_MAP_NOTIFY =0x0109,
|
||||
HCI_BT_REGISTER_VALUE_NOTIFY =0x010a,
|
||||
|
||||
//The following is for IVT
|
||||
HCI_WIFI_CURRENT_CHANNEL =0x0300,
|
||||
HCI_WIFI_CURRENT_BANDWIDTH =0x0301,
|
||||
HCI_WIFI_CONNECTION_STATUS =0x0302
|
||||
}RTW_HCI_EXT_CMD;
|
||||
|
||||
#define HCI_EVENT_EXTENSION_RTK 0xfe
|
||||
typedef enum HCI_EXTENSION_EVENT_RTK{
|
||||
HCI_EVENT_EXT_WIFI_SCAN_NOTIFY =0x01,
|
||||
HCI_EVENT_EXT_WIFI_RF_STATUS_NOTIFY =0x02,
|
||||
HCI_EVENT_EXT_BT_INFO_CONTROL =0x03,
|
||||
HCI_EVENT_EXT_BT_COEX_CONTROL =0x04
|
||||
}RTW_HCI_EXT_EVENT;
|
||||
|
||||
typedef enum _BT_TRAFFIC_MODE{
|
||||
BT_MOTOR_EXT_BE = 0x00, //Best Effort. Default. for HCRP, PAN, SDP, RFCOMM-based profiles like FTP,OPP, SPP, DUN, etc.
|
||||
BT_MOTOR_EXT_GUL = 0x01, //Guaranteed Latency. This type of traffic is used e.g. for HID and AVRCP.
|
||||
BT_MOTOR_EXT_GUB = 0X02, //Guaranteed Bandwidth.
|
||||
BT_MOTOR_EXT_GULB = 0X03 //Guaranteed Latency and Bandwidth. for A2DP and VDP.
|
||||
} BT_TRAFFIC_MODE;
|
||||
|
||||
typedef enum _BT_TRAFFIC_MODE_PROFILE{
|
||||
BT_PROFILE_NONE,
|
||||
BT_PROFILE_A2DP,
|
||||
BT_PROFILE_PAN ,
|
||||
BT_PROFILE_HID,
|
||||
BT_PROFILE_SCO
|
||||
} BT_TRAFFIC_MODE_PROFILE;
|
||||
|
||||
typedef enum _HCI_EXT_BT_OPERATION {
|
||||
HCI_BT_OP_NONE = 0x0,
|
||||
HCI_BT_OP_INQUIRY_START = 0x1,
|
||||
HCI_BT_OP_INQUIRY_FINISH = 0x2,
|
||||
HCI_BT_OP_PAGING_START = 0x3,
|
||||
HCI_BT_OP_PAGING_SUCCESS = 0x4,
|
||||
HCI_BT_OP_PAGING_UNSUCCESS = 0x5,
|
||||
HCI_BT_OP_PAIRING_START = 0x6,
|
||||
HCI_BT_OP_PAIRING_FINISH = 0x7,
|
||||
HCI_BT_OP_BT_DEV_ENABLE = 0x8,
|
||||
HCI_BT_OP_BT_DEV_DISABLE = 0x9,
|
||||
HCI_BT_OP_MAX
|
||||
} HCI_EXT_BT_OPERATION, *PHCI_EXT_BT_OPERATION;
|
||||
|
||||
typedef struct _BT_MGNT{
|
||||
BOOLEAN bBTConnectInProgress;
|
||||
BOOLEAN bLogLinkInProgress;
|
||||
BOOLEAN bPhyLinkInProgress;
|
||||
BOOLEAN bPhyLinkInProgressStartLL;
|
||||
u1Byte BtCurrentPhyLinkhandle;
|
||||
u2Byte BtCurrentLogLinkhandle;
|
||||
u1Byte CurrentConnectEntryNum;
|
||||
u1Byte DisconnectEntryNum;
|
||||
u1Byte CurrentBTConnectionCnt;
|
||||
BT_CONNECT_TYPE BTCurrentConnectType;
|
||||
BT_CONNECT_TYPE BTReceiveConnectPkt;
|
||||
u1Byte BTAuthCount;
|
||||
u1Byte BTAsocCount;
|
||||
BOOLEAN bStartSendSupervisionPkt;
|
||||
BOOLEAN BtOperationOn;
|
||||
BOOLEAN BTNeedAMPStatusChg;
|
||||
BOOLEAN JoinerNeedSendAuth;
|
||||
HCI_PHY_LINK_BSS_INFO bssDesc;
|
||||
HCI_EXT_CONFIG ExtConfig;
|
||||
BOOLEAN bNeedNotifyAMPNoCap;
|
||||
BOOLEAN bCreateSpportQos;
|
||||
BOOLEAN bSupportProfile;
|
||||
u1Byte BTChannel;
|
||||
BOOLEAN CheckChnlIsSuit;
|
||||
BOOLEAN bBtScan;
|
||||
BOOLEAN btLogoTest;
|
||||
BOOLEAN bRfStatusNotified;
|
||||
BOOLEAN bBtRsvedPageDownload;
|
||||
}BT_MGNT, *PBT_MGNT;
|
||||
|
||||
struct bt_coex_info {
|
||||
/* For Kernel Socket */
|
||||
struct socket *udpsock;
|
||||
struct sockaddr_in wifi_sockaddr; /*wifi socket*/
|
||||
struct sockaddr_in bt_sockaddr;/* BT socket */
|
||||
struct sock *sk_store;/*back up socket for UDP RX int*/
|
||||
|
||||
/* store which socket is OK */
|
||||
u8 sock_open;
|
||||
|
||||
u8 BT_attend;
|
||||
u8 is_exist; /* socket exist */
|
||||
BT_MGNT BtMgnt;
|
||||
struct workqueue_struct *btcoex_wq;
|
||||
struct delayed_work recvmsg_work;
|
||||
};
|
||||
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
|
||||
#define PACKET_NORMAL 0
|
||||
#define PACKET_DHCP 1
|
||||
#define PACKET_ARP 2
|
||||
#define PACKET_EAPOL 3
|
||||
|
||||
void rtw_btcoex_Initialize(PADAPTER);
|
||||
void rtw_btcoex_PowerOnSetting(PADAPTER padapter);
|
||||
void rtw_btcoex_PreLoadFirmware(PADAPTER padapter);
|
||||
void rtw_btcoex_HAL_Initialize(PADAPTER padapter, u8 bWifiOnly);
|
||||
void rtw_btcoex_IpsNotify(PADAPTER, u8 type);
|
||||
void rtw_btcoex_LpsNotify(PADAPTER, u8 type);
|
||||
void rtw_btcoex_ScanNotify(PADAPTER, u8 type);
|
||||
void rtw_btcoex_ConnectNotify(PADAPTER, u8 action);
|
||||
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_BtInfoNotify(PADAPTER, u8 length, u8 *tmpBuf);
|
||||
void rtw_btcoex_BtMpRptNotify(PADAPTER, u8 length, u8 *tmpBuf);
|
||||
void rtw_btcoex_SuspendNotify(PADAPTER, u8 state);
|
||||
void rtw_btcoex_HaltNotify(PADAPTER);
|
||||
void rtw_btcoex_ScoreBoardStatusNotify(PADAPTER, u8 length, u8 *tmpBuf);
|
||||
void rtw_btcoex_SwitchBtTRxMask(PADAPTER);
|
||||
void rtw_btcoex_Switch(PADAPTER, u8 enable);
|
||||
u8 rtw_btcoex_IsBtDisabled(PADAPTER);
|
||||
void rtw_btcoex_Handler(PADAPTER);
|
||||
s32 rtw_btcoex_IsBTCoexRejectAMPDU(PADAPTER padapter);
|
||||
s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(PADAPTER);
|
||||
u32 rtw_btcoex_GetAMPDUSize(PADAPTER);
|
||||
void rtw_btcoex_SetManualControl(PADAPTER, u8 bmanual);
|
||||
u8 rtw_btcoex_1Ant(PADAPTER);
|
||||
u8 rtw_btcoex_IsBtControlLps(PADAPTER);
|
||||
u8 rtw_btcoex_IsLpsOn(PADAPTER);
|
||||
u8 rtw_btcoex_RpwmVal(PADAPTER);
|
||||
u8 rtw_btcoex_LpsVal(PADAPTER);
|
||||
void rtw_btcoex_SetBTCoexist(PADAPTER, u8 bBtExist);
|
||||
void rtw_btcoex_SetChipType(PADAPTER, u8 chipType);
|
||||
void rtw_btcoex_SetPGAntNum(PADAPTER, u8 antNum);
|
||||
u8 rtw_btcoex_GetPGAntNum(PADAPTER);
|
||||
void rtw_btcoex_SetSingleAntPath(PADAPTER padapter, u8 singleAntPath);
|
||||
u32 rtw_btcoex_GetRaMask(PADAPTER);
|
||||
void rtw_btcoex_RecordPwrMode(PADAPTER, u8 *pCmdBuf, u8 cmdLen);
|
||||
void rtw_btcoex_DisplayBtCoexInfo(PADAPTER, u8 *pbuf, u32 bufsize);
|
||||
void rtw_btcoex_SetDBG(PADAPTER, u32 *pDbgModule);
|
||||
u32 rtw_btcoex_GetDBG(PADAPTER, u8 *pStrBuf, u32 bufSize);
|
||||
u8 rtw_btcoex_IncreaseScanDeviceNum(PADAPTER);
|
||||
u8 rtw_btcoex_IsBtLinkExist(PADAPTER);
|
||||
void rtw_btcoex_BTOffOnNotify(PADAPTER padapter, u8 bBTON);
|
||||
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
void rtw_btcoex_SetBtPatchVersion(PADAPTER padapter,u16 btHciVer, u16 btPatchVer);
|
||||
void rtw_btcoex_SetHciVersion(PADAPTER padapter, u16 hciVersion);
|
||||
void rtw_btcoex_StackUpdateProfileInfo(void);
|
||||
void rtw_btcoex_init_socket(_adapter *padapter);
|
||||
void rtw_btcoex_close_socket(_adapter *padapter);
|
||||
void rtw_btcoex_dump_tx_msg(u8 *tx_msg, u8 len, u8 *msg_name);
|
||||
u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool force);
|
||||
u8 rtw_btcoex_create_kernel_socket(_adapter *padapter);
|
||||
void rtw_btcoex_close_kernel_socket(_adapter *padapter);
|
||||
void rtw_btcoex_recvmsgbysocket(void *data);
|
||||
u16 rtw_btcoex_parse_recv_data(u8 *msg, u8 msg_size);
|
||||
u8 rtw_btcoex_btinfo_cmd(PADAPTER padapter, u8 *pbuf, u16 length);
|
||||
void rtw_btcoex_parse_hci_cmd(_adapter *padapter, u8 *cmd, u16 len);
|
||||
void rtw_btcoex_SendEventExtBtCoexControl(PADAPTER Adapter, u8 bNeedDbgRsp, u8 dataLen, void *pData);
|
||||
void rtw_btcoex_SendEventExtBtInfoControl(PADAPTER Adapter, u8 dataLen, void *pData);
|
||||
void rtw_btcoex_SendScanNotify(PADAPTER padapter, u8 scanType);
|
||||
#define BT_SendEventExtBtCoexControl(Adapter, bNeedDbgRsp, dataLen, pData) rtw_btcoex_SendEventExtBtCoexControl(Adapter, bNeedDbgRsp, dataLen, pData)
|
||||
#define BT_SendEventExtBtInfoControl(Adapter, dataLen, pData) rtw_btcoex_SendEventExtBtInfoControl(Adapter, dataLen, pData)
|
||||
#endif //CONFIG_BT_COEXIST_SOCKET_TRX
|
||||
u16 rtw_btcoex_btreg_read(PADAPTER padapter, u8 type, u16 addr, u32 *data);
|
||||
u16 rtw_btcoex_btreg_write(PADAPTER padapter, u8 type, u16 addr, u16 val);
|
||||
|
||||
// ==================================================
|
||||
// Below Functions are called by BT-Coex
|
||||
// ==================================================
|
||||
void rtw_btcoex_rx_ampdu_apply(PADAPTER);
|
||||
void rtw_btcoex_LPS_Enter(PADAPTER);
|
||||
void rtw_btcoex_LPS_Leave(PADAPTER);
|
||||
|
||||
#endif // __RTW_BTCOEX_H__
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user