mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-11-22 05:25:03 +00:00
Updated to 4.4.1
This commit is contained in:
parent
9dde4572b4
commit
3d6c7de21a
File diff suppressed because it is too large
Load Diff
1588
core/rtw_ap.c
1588
core/rtw_ap.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -48,9 +48,13 @@
|
|||||||
#include <linux/ipv6.h>
|
#include <linux/ipv6.h>
|
||||||
#include <linux/icmpv6.h>
|
#include <linux/icmpv6.h>
|
||||||
#include <net/ndisc.h>
|
#include <net/ndisc.h>
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
|
||||||
|
#include <net/ip6_checksum.h>
|
||||||
|
#else
|
||||||
#include <net/checksum.h>
|
#include <net/checksum.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_BR_EXT
|
#ifdef CONFIG_BR_EXT
|
||||||
|
|
||||||
|
@ -22,13 +22,11 @@
|
|||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
#include <rtw_bt_mp.h>
|
#include <rtw_bt_mp.h>
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8723A
|
#if defined(CONFIG_RTL8723B)
|
||||||
#include <rtl8723a_hal.h>
|
|
||||||
#elif defined(CONFIG_RTL8723B)
|
|
||||||
#include <rtl8723b_hal.h>
|
#include <rtl8723b_hal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_RTL8723A) || defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8821A)
|
#if defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8821A)
|
||||||
void MPh2c_timeout_handle(void *FunctionContext)
|
void MPh2c_timeout_handle(void *FunctionContext)
|
||||||
{
|
{
|
||||||
PADAPTER pAdapter;
|
PADAPTER pAdapter;
|
||||||
@ -135,9 +133,7 @@ mptbt_SendH2c(
|
|||||||
pMptCtx->MptH2cRspEvent = _FALSE;
|
pMptCtx->MptH2cRspEvent = _FALSE;
|
||||||
pMptCtx->MptBtC2hEvent = _FALSE;
|
pMptCtx->MptBtC2hEvent = _FALSE;
|
||||||
|
|
||||||
#if defined(CONFIG_RTL8723A)
|
#if defined(CONFIG_RTL8723B)
|
||||||
rtw_hal_fill_h2c_cmd(Adapter, 70, h2cCmdLen, (pu1Byte)pH2c);
|
|
||||||
#elif defined(CONFIG_RTL8723B)
|
|
||||||
rtl8723b_set_FwBtMpOper_cmd(Adapter, pH2c->opCode, pH2c->opCodeVer, pH2c->reqNum, pH2c->buf);
|
rtl8723b_set_FwBtMpOper_cmd(Adapter, pH2c->opCode, pH2c->opCodeVer, pH2c->reqNum, pH2c->buf);
|
||||||
#endif
|
#endif
|
||||||
pMptCtx->h2cReqNum++;
|
pMptCtx->h2cReqNum++;
|
||||||
@ -397,14 +393,14 @@ void mptbt_close_WiFiRF(PADAPTER Adapter)
|
|||||||
{
|
{
|
||||||
PHY_SetBBReg(Adapter, 0x824, 0xF, 0x0);
|
PHY_SetBBReg(Adapter, 0x824, 0xF, 0x0);
|
||||||
PHY_SetBBReg(Adapter, 0x824, 0x700000, 0x0);
|
PHY_SetBBReg(Adapter, 0x824, 0x700000, 0x0);
|
||||||
PHY_SetRFReg(Adapter, RF90_PATH_A, 0x0, 0xF0000, 0x0);
|
PHY_SetRFReg(Adapter, RF_PATH_A, 0x0, 0xF0000, 0x0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mptbt_open_WiFiRF(PADAPTER Adapter)
|
void mptbt_open_WiFiRF(PADAPTER Adapter)
|
||||||
{
|
{
|
||||||
PHY_SetBBReg(Adapter, 0x824, 0x700000, 0x3);
|
PHY_SetBBReg(Adapter, 0x824, 0x700000, 0x3);
|
||||||
PHY_SetBBReg(Adapter, 0x824, 0xF, 0x2);
|
PHY_SetBBReg(Adapter, 0x824, 0xF, 0x2);
|
||||||
PHY_SetRFReg(Adapter, RF90_PATH_A, 0x0, 0xF0000, 0x3);
|
PHY_SetRFReg(Adapter, RF_PATH_A, 0x0, 0xF0000, 0x3);
|
||||||
}
|
}
|
||||||
|
|
||||||
u4Byte mptbt_switch_RF(PADAPTER Adapter, u1Byte Enter)
|
u4Byte mptbt_switch_RF(PADAPTER Adapter, u1Byte Enter)
|
||||||
@ -1089,25 +1085,7 @@ mptbt_BtSetGeneral(
|
|||||||
calVal = pBtReq->pParamStart[1];
|
calVal = pBtReq->pParamStart[1];
|
||||||
break;
|
break;
|
||||||
case BT_GSET_UPDATE_BT_PATCH:
|
case BT_GSET_UPDATE_BT_PATCH:
|
||||||
if(IS_HARDWARE_TYPE_8723AE(Adapter) && Adapter->bFWReady)
|
|
||||||
{
|
|
||||||
u1Byte i;
|
|
||||||
DBG_8192C ("[MPT], write regs for load patch\n");
|
|
||||||
//BTFwPatch8723A(Adapter);
|
|
||||||
PlatformEFIOWrite1Byte(Adapter, 0xCC, 0x2d);
|
|
||||||
rtw_msleep_os(50);
|
|
||||||
PlatformEFIOWrite4Byte(Adapter, 0x68, 0xa005000c);
|
|
||||||
rtw_msleep_os(50);
|
|
||||||
PlatformEFIOWrite4Byte(Adapter, 0x68, 0xb005000c);
|
|
||||||
rtw_msleep_os(50);
|
|
||||||
PlatformEFIOWrite1Byte(Adapter, 0xCC, 0x29);
|
|
||||||
for(i=0; i<12; i++)
|
|
||||||
rtw_msleep_os(100);
|
|
||||||
//#if (DEV_BUS_TYPE == RT_PCI_INTERFACE)
|
|
||||||
// BTFwPatch8723A(Adapter);
|
|
||||||
//#endif
|
|
||||||
DBG_8192C("[MPT], load BT FW Patch finished!!!\n");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
1466
core/rtw_btcoex.c
1466
core/rtw_btcoex.c
File diff suppressed because it is too large
Load Diff
1512
core/rtw_cmd.c
1512
core/rtw_cmd.c
File diff suppressed because it is too large
Load Diff
2086
core/rtw_debug.c
2086
core/rtw_debug.c
File diff suppressed because it is too large
Load Diff
@ -48,8 +48,8 @@ void shift_out_bits(_adapter * padapter, u16 data, u16 count)
|
|||||||
u16 x,mask;
|
u16 x,mask;
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
mask = 0x01 << (count - 1);
|
mask = 0x01 << (count - 1);
|
||||||
@ -62,8 +62,8 @@ _func_enter_;
|
|||||||
x &= ~_EEDI;
|
x &= ~_EEDI;
|
||||||
if(data & mask)
|
if(data & mask)
|
||||||
x |= _EEDI;
|
x |= _EEDI;
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
rtw_write8(padapter, EE_9346CR, (u8)x);
|
rtw_write8(padapter, EE_9346CR, (u8)x);
|
||||||
@ -72,8 +72,8 @@ _func_enter_;
|
|||||||
down_clk(padapter, &x);
|
down_clk(padapter, &x);
|
||||||
mask = mask >> 1;
|
mask = mask >> 1;
|
||||||
} while(mask);
|
} while(mask);
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
x &= ~_EEDI;
|
x &= ~_EEDI;
|
||||||
@ -86,8 +86,8 @@ u16 shift_in_bits (_adapter * padapter)
|
|||||||
{
|
{
|
||||||
u16 x,d=0,i;
|
u16 x,d=0,i;
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
x = rtw_read8(padapter, EE_9346CR);
|
x = rtw_read8(padapter, EE_9346CR);
|
||||||
@ -99,8 +99,8 @@ _func_enter_;
|
|||||||
{
|
{
|
||||||
d = d << 1;
|
d = d << 1;
|
||||||
up_clk(padapter, &x);
|
up_clk(padapter, &x);
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
x = rtw_read8(padapter, EE_9346CR);
|
x = rtw_read8(padapter, EE_9346CR);
|
||||||
@ -157,24 +157,24 @@ void eeprom_clean(_adapter * padapter)
|
|||||||
{
|
{
|
||||||
u16 x;
|
u16 x;
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
x = rtw_read8(padapter, EE_9346CR);
|
x = rtw_read8(padapter, EE_9346CR);
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
x &= ~(_EECS | _EEDI);
|
x &= ~(_EECS | _EEDI);
|
||||||
rtw_write8(padapter, EE_9346CR, (u8)x);
|
rtw_write8(padapter, EE_9346CR, (u8)x);
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
up_clk(padapter, &x);
|
up_clk(padapter, &x);
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
down_clk(padapter, &x);
|
down_clk(padapter, &x);
|
||||||
@ -288,15 +288,15 @@ u16 eeprom_read16(_adapter * padapter, u16 reg) //ReadEEprom
|
|||||||
#endif
|
#endif
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
// select EEPROM, reset bits, set _EECS
|
// select EEPROM, reset bits, set _EECS
|
||||||
x = rtw_read8(padapter, EE_9346CR);
|
x = rtw_read8(padapter, EE_9346CR);
|
||||||
|
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,15 +337,15 @@ void eeprom_read_sz(_adapter * padapter, u16 reg, u8* data, u32 sz)
|
|||||||
u16 x, data16;
|
u16 x, data16;
|
||||||
u32 i;
|
u32 i;
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
// select EEPROM, reset bits, set _EECS
|
// select EEPROM, reset bits, set _EECS
|
||||||
x = rtw_read8(padapter, EE_9346CR);
|
x = rtw_read8(padapter, EE_9346CR);
|
||||||
|
|
||||||
if(padapter->bSurpriseRemoved==_TRUE){
|
if (rtw_is_surprise_removed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_eeprom_c_,_drv_err_,("padapter->bSurpriseRemoved==_TRUE"));
|
RT_TRACE(_module_rtl871x_eeprom_c_, _drv_err_, ("padapter->bSurpriseRemoved==_TRUE"));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1217
core/rtw_ieee80211.c
1217
core/rtw_ieee80211.c
File diff suppressed because it is too large
Load Diff
248
core/rtw_io.c
248
core/rtw_io.c
@ -50,6 +50,7 @@ jackson@realtek.com.tw
|
|||||||
#define _RTW_IO_C_
|
#define _RTW_IO_C_
|
||||||
|
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
#include <hal_data.h>
|
||||||
|
|
||||||
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||||
#error "Shall be Linux or Windows, but not both!\n"
|
#error "Shall be Linux or Windows, but not both!\n"
|
||||||
@ -197,6 +198,111 @@ u8 _rtw_sd_f0_read8(_adapter *adapter, u32 addr)
|
|||||||
_func_exit_;
|
_func_exit_;
|
||||||
return r_val;
|
return r_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SDIO_INDIRECT_ACCESS
|
||||||
|
u8 _rtw_sd_iread8(_adapter *adapter, u32 addr)
|
||||||
|
{
|
||||||
|
u8 r_val = 0x00;
|
||||||
|
struct io_priv *pio_priv = &adapter->iopriv;
|
||||||
|
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||||
|
u8 (*_sd_iread8)(struct intf_hdl *pintfhdl, u32 addr);
|
||||||
|
|
||||||
|
_sd_iread8 = pintfhdl->io_ops._sd_iread8;
|
||||||
|
|
||||||
|
if (_sd_iread8)
|
||||||
|
r_val = _sd_iread8(pintfhdl, addr);
|
||||||
|
else
|
||||||
|
DBG_871X_LEVEL(_drv_err_, FUNC_ADPT_FMT" _sd_iread8 callback is NULL\n", FUNC_ADPT_ARG(adapter));
|
||||||
|
|
||||||
|
return r_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 _rtw_sd_iread16(_adapter *adapter, u32 addr)
|
||||||
|
{
|
||||||
|
u16 r_val = 0x00;
|
||||||
|
struct io_priv *pio_priv = &adapter->iopriv;
|
||||||
|
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||||
|
u16 (*_sd_iread16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||||
|
|
||||||
|
_sd_iread16 = pintfhdl->io_ops._sd_iread16;
|
||||||
|
|
||||||
|
if (_sd_iread16)
|
||||||
|
r_val = _sd_iread16(pintfhdl, addr);
|
||||||
|
else
|
||||||
|
DBG_871X_LEVEL(_drv_err_, FUNC_ADPT_FMT" _sd_iread16 callback is NULL\n", FUNC_ADPT_ARG(adapter));
|
||||||
|
|
||||||
|
return r_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 _rtw_sd_iread32(_adapter *adapter, u32 addr)
|
||||||
|
{
|
||||||
|
u32 r_val = 0x00;
|
||||||
|
struct io_priv *pio_priv = &adapter->iopriv;
|
||||||
|
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||||
|
u32 (*_sd_iread32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||||
|
|
||||||
|
_sd_iread32 = pintfhdl->io_ops._sd_iread32;
|
||||||
|
|
||||||
|
if (_sd_iread32)
|
||||||
|
r_val = _sd_iread32(pintfhdl, addr);
|
||||||
|
else
|
||||||
|
DBG_871X_LEVEL(_drv_err_, FUNC_ADPT_FMT" _sd_iread32 callback is NULL\n", FUNC_ADPT_ARG(adapter));
|
||||||
|
|
||||||
|
return r_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _rtw_sd_iwrite8(_adapter *adapter, u32 addr, u8 val)
|
||||||
|
{
|
||||||
|
struct io_priv *pio_priv = &adapter->iopriv;
|
||||||
|
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||||
|
int (*_sd_iwrite8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
|
_sd_iwrite8 = pintfhdl->io_ops._sd_iwrite8;
|
||||||
|
|
||||||
|
if (_sd_iwrite8)
|
||||||
|
ret = _sd_iwrite8(pintfhdl, addr, val);
|
||||||
|
else
|
||||||
|
DBG_871X_LEVEL(_drv_err_, FUNC_ADPT_FMT" _sd_iwrite8 callback is NULL\n", FUNC_ADPT_ARG(adapter));
|
||||||
|
|
||||||
|
return RTW_STATUS_CODE(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
int _rtw_sd_iwrite16(_adapter *adapter, u32 addr, u16 val)
|
||||||
|
{
|
||||||
|
struct io_priv *pio_priv = &adapter->iopriv;
|
||||||
|
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||||
|
int (*_sd_iwrite16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
|
_sd_iwrite16 = pintfhdl->io_ops._sd_iwrite16;
|
||||||
|
|
||||||
|
if (_sd_iwrite16)
|
||||||
|
ret = _sd_iwrite16(pintfhdl, addr, val);
|
||||||
|
else
|
||||||
|
DBG_871X_LEVEL(_drv_err_, FUNC_ADPT_FMT" _sd_iwrite16 callback is NULL\n", FUNC_ADPT_ARG(adapter));
|
||||||
|
|
||||||
|
return RTW_STATUS_CODE(ret);
|
||||||
|
}
|
||||||
|
int _rtw_sd_iwrite32(_adapter *adapter, u32 addr, u32 val)
|
||||||
|
{
|
||||||
|
struct io_priv *pio_priv = &adapter->iopriv;
|
||||||
|
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||||
|
int (*_sd_iwrite32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
|
_sd_iwrite32 = pintfhdl->io_ops._sd_iwrite32;
|
||||||
|
|
||||||
|
if (_sd_iwrite32)
|
||||||
|
ret = _sd_iwrite32(pintfhdl, addr, val);
|
||||||
|
else
|
||||||
|
DBG_871X_LEVEL(_drv_err_, FUNC_ADPT_FMT" _sd_iwrite32 callback is NULL\n", FUNC_ADPT_ARG(adapter));
|
||||||
|
|
||||||
|
return RTW_STATUS_CODE(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_SDIO_INDIRECT_ACCESS */
|
||||||
|
|
||||||
#endif /* CONFIG_SDIO_HCI */
|
#endif /* CONFIG_SDIO_HCI */
|
||||||
|
|
||||||
int _rtw_write8_async(_adapter *adapter, u32 addr, u8 val)
|
int _rtw_write8_async(_adapter *adapter, u32 addr, u8 val)
|
||||||
@ -254,9 +360,10 @@ void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
if (RTW_CANNOT_RUN(adapter)) {
|
||||||
{
|
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_mem:bDriverStopped(%s) OR bSurpriseRemoved(%s)"
|
||||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
, rtw_is_drv_stopped(adapter)?"True":"False"
|
||||||
|
, rtw_is_surprise_removed(adapter)?"True":"False"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,9 +401,10 @@ void _rtw_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
if( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
if (RTW_CANNOT_RUN(adapter)) {
|
||||||
{
|
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_port:bDriverStopped(%s) OR bSurpriseRemoved(%s)"
|
||||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
, rtw_is_drv_stopped(adapter)?"True":"False"
|
||||||
|
, rtw_is_surprise_removed(adapter)?"True":"False"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -416,19 +524,19 @@ void rtw_reset_continual_io_error(struct dvobj_priv *dvobj)
|
|||||||
|
|
||||||
#ifdef DBG_IO
|
#ifdef DBG_IO
|
||||||
|
|
||||||
u16 read_sniff_ranges[][2] = {
|
u32 read_sniff_ranges[][2] = {
|
||||||
//{0x520, 0x523},
|
//{0x520, 0x523},
|
||||||
};
|
};
|
||||||
|
|
||||||
u16 write_sniff_ranges[][2] = {
|
u32 write_sniff_ranges[][2] = {
|
||||||
//{0x520, 0x523},
|
//{0x520, 0x523},
|
||||||
//{0x4c, 0x4c},
|
//{0x4c, 0x4c},
|
||||||
};
|
};
|
||||||
|
|
||||||
int read_sniff_num = sizeof(read_sniff_ranges)/sizeof(u16)/2;
|
int read_sniff_num = sizeof(read_sniff_ranges)/sizeof(u32)/2;
|
||||||
int write_sniff_num = sizeof(write_sniff_ranges)/sizeof(u16)/2;
|
int write_sniff_num = sizeof(write_sniff_ranges)/sizeof(u32)/2;
|
||||||
|
|
||||||
bool match_read_sniff_ranges(u16 addr, u16 len)
|
bool match_read_sniff_ranges(u32 addr, u16 len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i<read_sniff_num; i++) {
|
for (i = 0; i<read_sniff_num; i++) {
|
||||||
@ -439,7 +547,7 @@ bool match_read_sniff_ranges(u16 addr, u16 len)
|
|||||||
return _FALSE;
|
return _FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool match_write_sniff_ranges(u16 addr, u16 len)
|
bool match_write_sniff_ranges(u32 addr, u16 len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i<write_sniff_num; i++) {
|
for (i = 0; i<write_sniff_num; i++) {
|
||||||
@ -450,6 +558,51 @@ bool match_write_sniff_ranges(u16 addr, u16 len)
|
|||||||
return _FALSE;
|
return _FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct rf_sniff_ent {
|
||||||
|
u8 path;
|
||||||
|
u16 reg;
|
||||||
|
u32 mask;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct rf_sniff_ent rf_read_sniff_ranges[] = {
|
||||||
|
/* example for all path addr 0x55 with all RF Reg mask */
|
||||||
|
/* {MAX_RF_PATH, 0x55, bRFRegOffsetMask}, */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct rf_sniff_ent rf_write_sniff_ranges[] = {
|
||||||
|
/* example for all path addr 0x55 with all RF Reg mask */
|
||||||
|
/* {MAX_RF_PATH, 0x55, bRFRegOffsetMask}, */
|
||||||
|
};
|
||||||
|
|
||||||
|
int rf_read_sniff_num = sizeof(rf_read_sniff_ranges)/sizeof(struct rf_sniff_ent);
|
||||||
|
int rf_write_sniff_num = sizeof(rf_write_sniff_ranges)/sizeof(struct rf_sniff_ent);
|
||||||
|
|
||||||
|
bool match_rf_read_sniff_ranges(u8 path, u32 addr, u32 mask)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < rf_read_sniff_num; i++) {
|
||||||
|
if (rf_read_sniff_ranges[i].path == MAX_RF_PATH || rf_read_sniff_ranges[i].path == path)
|
||||||
|
if (addr == rf_read_sniff_ranges[i].reg && (mask & rf_read_sniff_ranges[i].mask))
|
||||||
|
return _TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool match_rf_write_sniff_ranges(u8 path, u32 addr, u32 mask)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < rf_write_sniff_num; i++) {
|
||||||
|
if (rf_write_sniff_ranges[i].path == MAX_RF_PATH || rf_write_sniff_ranges[i].path == path)
|
||||||
|
if (addr == rf_write_sniff_ranges[i].reg && (mask & rf_write_sniff_ranges[i].mask))
|
||||||
|
return _TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line)
|
u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||||
{
|
{
|
||||||
u8 val = _rtw_read8(adapter, addr);
|
u8 val = _rtw_read8(adapter, addr);
|
||||||
@ -508,6 +661,77 @@ int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, const cha
|
|||||||
|
|
||||||
return _rtw_writeN(adapter, addr, length, data);
|
return _rtw_writeN(adapter, addr, length, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SDIO_HCI
|
||||||
|
u8 dbg_rtw_sd_f0_read8(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||||
|
{
|
||||||
|
u8 val = _rtw_sd_f0_read8(adapter, addr);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if (match_read_sniff_ranges(addr, 1))
|
||||||
|
DBG_871X("DBG_IO %s:%d rtw_sd_f0_read8(0x%04x) return 0x%02x\n", caller, line, addr, val);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SDIO_INDIRECT_ACCESS
|
||||||
|
u8 dbg_rtw_sd_iread8(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||||
|
{
|
||||||
|
u8 val = rtw_sd_iread8(adapter, addr);
|
||||||
|
|
||||||
|
if (match_read_sniff_ranges(addr, 1))
|
||||||
|
DBG_871X("DBG_IO %s:%d rtw_sd_iread8(0x%04x) return 0x%02x\n", caller, line, addr, val);
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 dbg_rtw_sd_iread16(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||||
|
{
|
||||||
|
u16 val = _rtw_sd_iread16(adapter, addr);
|
||||||
|
|
||||||
|
if (match_read_sniff_ranges(addr, 2))
|
||||||
|
DBG_871X("DBG_IO %s:%d rtw_sd_iread16(0x%04x) return 0x%04x\n", caller, line, addr, val);
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 dbg_rtw_sd_iread32(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||||
|
{
|
||||||
|
u32 val = _rtw_sd_iread32(adapter, addr);
|
||||||
|
|
||||||
|
if (match_read_sniff_ranges(addr, 4))
|
||||||
|
DBG_871X("DBG_IO %s:%d rtw_sd_iread32(0x%04x) return 0x%08x\n", caller, line, addr, val);
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
int dbg_rtw_sd_iwrite8(_adapter *adapter, u32 addr, u8 val, const char *caller, const int line)
|
||||||
|
{
|
||||||
|
if (match_write_sniff_ranges(addr, 1))
|
||||||
|
DBG_871X("DBG_IO %s:%d rtw_sd_iwrite8(0x%04x, 0x%02x)\n", caller, line, addr, val);
|
||||||
|
|
||||||
|
return _rtw_sd_iwrite8(adapter, addr, val);
|
||||||
|
}
|
||||||
|
int dbg_rtw_sd_iwrite16(_adapter *adapter, u32 addr, u16 val, const char *caller, const int line)
|
||||||
|
{
|
||||||
|
if (match_write_sniff_ranges(addr, 2))
|
||||||
|
DBG_871X("DBG_IO %s:%d rtw_sd_iwrite16(0x%04x, 0x%04x)\n", caller, line, addr, val);
|
||||||
|
|
||||||
|
return _rtw_sd_iwrite16(adapter, addr, val);
|
||||||
|
}
|
||||||
|
int dbg_rtw_sd_iwrite32(_adapter *adapter, u32 addr, u32 val, const char *caller, const int line)
|
||||||
|
{
|
||||||
|
if (match_write_sniff_ranges(addr, 4))
|
||||||
|
DBG_871X("DBG_IO %s:%d rtw_sd_iwrite32(0x%04x, 0x%08x)\n", caller, line, addr, val);
|
||||||
|
|
||||||
|
return _rtw_sd_iwrite32(adapter, addr, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_SDIO_INDIRECT_ACCESS */
|
||||||
|
|
||||||
|
#endif /* CONFIG_SDIO_HCI */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||||||
struct wlan_network *tgt_network;
|
struct wlan_network *tgt_network;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct security_priv *psecuritypriv=&(padapter->securitypriv);
|
struct security_priv *psecuritypriv=&(padapter->securitypriv);
|
||||||
WLAN_BSSID_EX *psecnetwork=(WLAN_BSSID_EX*)&(psecuritypriv->sec_bss);
|
WLAN_BSSID_EX *psecnetwork = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network;
|
||||||
u8 * pDest = (u8 *)pAssocInfo + sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
u8 * pDest = (u8 *)pAssocInfo + sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||||
unsigned char i,*auth_ie,*supp_ie;
|
unsigned char i,*auth_ie,*supp_ie;
|
||||||
|
|
||||||
|
@ -492,7 +492,6 @@ NDIS_STATUS oid_rt_get_channelplan_hdl(struct oid_par_priv* poid_par_priv)
|
|||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||||
struct eeprom_priv* peeprompriv = &padapter->eeprompriv;
|
|
||||||
|
|
||||||
if(poid_par_priv->type_of_oid != QUERY_OID)
|
if(poid_par_priv->type_of_oid != QUERY_OID)
|
||||||
{
|
{
|
||||||
@ -500,7 +499,7 @@ NDIS_STATUS oid_rt_get_channelplan_hdl(struct oid_par_priv* poid_par_priv)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
*(u16 *)poid_par_priv->information_buf = peeprompriv->channel_plan ;
|
*(u16 *)poid_par_priv->information_buf = padapter->mlmepriv.ChannelPlan ;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -508,7 +507,6 @@ NDIS_STATUS oid_rt_set_channelplan_hdl(struct oid_par_priv* poid_par_priv)
|
|||||||
{
|
{
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||||
struct eeprom_priv* peeprompriv = &padapter->eeprompriv;
|
|
||||||
|
|
||||||
if(poid_par_priv->type_of_oid != SET_OID)
|
if(poid_par_priv->type_of_oid != SET_OID)
|
||||||
{
|
{
|
||||||
@ -516,7 +514,7 @@ NDIS_STATUS oid_rt_set_channelplan_hdl(struct oid_par_priv* poid_par_priv)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
peeprompriv->channel_plan = *(u16 *)poid_par_priv->information_buf ;
|
padapter->mlmepriv.ChannelPlan = *(u16 *)poid_par_priv->information_buf ;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#define _RTW_IOCTL_SET_C_
|
#define _RTW_IOCTL_SET_C_
|
||||||
|
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
#include <hal_data.h>
|
||||||
|
|
||||||
|
|
||||||
extern void indicate_wx_scan_complete_event(_adapter *padapter);
|
extern void indicate_wx_scan_complete_event(_adapter *padapter);
|
||||||
@ -159,9 +160,8 @@ _func_enter_;
|
|||||||
|
|
||||||
rtw_generate_random_ibss(pibss);
|
rtw_generate_random_ibss(pibss);
|
||||||
|
|
||||||
if(rtw_createbss_cmd(padapter)!=_SUCCESS)
|
if (rtw_create_ibss_cmd(padapter, 0) != _SUCCESS) {
|
||||||
{
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("***Error=>do_goin: rtw_create_ibss_cmd status FAIL***\n"));
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("***Error=>do_goin: rtw_createbss_cmd status FAIL*** \n "));
|
|
||||||
ret = _FALSE;
|
ret = _FALSE;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -361,7 +361,7 @@ _func_enter_;
|
|||||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
rtw_indicate_disconnect(padapter);
|
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||||
|
|
||||||
rtw_free_assoc_resources(padapter, 1);
|
rtw_free_assoc_resources(padapter, 1);
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ _func_enter_;
|
|||||||
DBG_871X_LEVEL(_drv_always_, "set ssid [%s] fw_state=0x%08x\n",
|
DBG_871X_LEVEL(_drv_always_, "set ssid [%s] fw_state=0x%08x\n",
|
||||||
ssid->Ssid, get_fwstate(pmlmepriv));
|
ssid->Ssid, get_fwstate(pmlmepriv));
|
||||||
|
|
||||||
if(padapter->hw_init_completed==_FALSE){
|
if (!rtw_is_hw_init_completed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||||
("set_ssid: hw_init_completed==_FALSE=>exit!!!\n"));
|
("set_ssid: hw_init_completed==_FALSE=>exit!!!\n"));
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
@ -451,7 +451,7 @@ _func_enter_;
|
|||||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
rtw_indicate_disconnect(padapter);
|
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||||
|
|
||||||
rtw_free_assoc_resources(padapter, 1);
|
rtw_free_assoc_resources(padapter, 1);
|
||||||
|
|
||||||
@ -480,7 +480,7 @@ _func_enter_;
|
|||||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
rtw_indicate_disconnect(padapter);
|
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||||
|
|
||||||
rtw_free_assoc_resources(padapter, 1);
|
rtw_free_assoc_resources(padapter, 1);
|
||||||
|
|
||||||
@ -549,7 +549,7 @@ _func_enter_;
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(padapter->hw_init_completed==_FALSE){
|
if (!rtw_is_hw_init_completed(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||||
("set_ssid: hw_init_completed==_FALSE=>exit!!!\n"));
|
("set_ssid: hw_init_completed==_FALSE=>exit!!!\n"));
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
@ -644,7 +644,7 @@ _func_enter_;
|
|||||||
{
|
{
|
||||||
if(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
{
|
{
|
||||||
rtw_indicate_disconnect(padapter); //will clr Linked_state; before this function, we must have chked whether issue dis-assoc_cmd or not
|
rtw_indicate_disconnect(padapter, 0, _FALSE); /*will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,6 +674,9 @@ _func_enter_;
|
|||||||
case Ndis802_11AutoUnknown:
|
case Ndis802_11AutoUnknown:
|
||||||
case Ndis802_11InfrastructureMax:
|
case Ndis802_11InfrastructureMax:
|
||||||
break;
|
break;
|
||||||
|
case Ndis802_11Monitor:
|
||||||
|
set_fwstate(pmlmepriv, WIFI_MONITOR_STATE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//SecClearAllKeys(adapter);
|
//SecClearAllKeys(adapter);
|
||||||
@ -704,7 +707,7 @@ _func_enter_;
|
|||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_disassociate: rtw_indicate_disconnect\n"));
|
||||||
|
|
||||||
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
rtw_disassoc_cmd(padapter, 0, _TRUE);
|
||||||
rtw_indicate_disconnect(padapter);
|
rtw_indicate_disconnect(padapter, 0, _FALSE);
|
||||||
//modify for CONFIG_IEEE80211W, none 11w can use it
|
//modify for CONFIG_IEEE80211W, none 11w can use it
|
||||||
rtw_free_assoc_resources_cmd(padapter);
|
rtw_free_assoc_resources_cmd(padapter);
|
||||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||||
@ -732,7 +735,7 @@ _func_enter_;
|
|||||||
res=_FALSE;
|
res=_FALSE;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (padapter->hw_init_completed==_FALSE){
|
if (!rtw_is_hw_init_completed(padapter)) {
|
||||||
res = _FALSE;
|
res = _FALSE;
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n===rtw_set_802_11_bssid_list_scan:hw_init_completed==_FALSE===\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n===rtw_set_802_11_bssid_list_scan:hw_init_completed==_FALSE===\n"));
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -996,8 +999,8 @@ _func_enter_;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko.
|
/* Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko. -> modify checking condition*/
|
||||||
if( (encryptionalgo== _WEP40_|| encryptionalgo== _WEP104_) && (key->KeyLength != 5 || key->KeyLength != 13)) {
|
if (((encryptionalgo == _WEP40_) && (key->KeyLength != 5)) || ((encryptionalgo == _WEP104_) && (key->KeyLength != 13))) {
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("WEP KeyLength:0x%x != 5 or 13\n", key->KeyLength));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("WEP KeyLength:0x%x != 5 or 13\n", key->KeyLength));
|
||||||
ret=_FAIL;
|
ret=_FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
@ -1252,15 +1255,21 @@ _func_enter_;
|
|||||||
|
|
||||||
|
|
||||||
//Set key to CAM through H2C command
|
//Set key to CAM through H2C command
|
||||||
|
#if 0
|
||||||
if(bgrouptkey)//never go to here
|
if(bgrouptkey)//never go to here
|
||||||
{
|
{
|
||||||
res=rtw_setstakey_cmd(padapter, stainfo, _FALSE, _TRUE);
|
res=rtw_setstakey_cmd(padapter, stainfo, GROUP_KEY, _TRUE);
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(group)\n"));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
res=rtw_setstakey_cmd(padapter, stainfo, _TRUE, _TRUE);
|
res=rtw_setstakey_cmd(padapter, stainfo, UNICAST_KEY, _TRUE);
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
res = rtw_setstakey_cmd(padapter, stainfo, UNICAST_KEY, _TRUE);
|
||||||
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n rtw_set_802_11_add_key:rtw_setstakey_cmd(unicast)\n"));
|
||||||
|
#endif
|
||||||
|
|
||||||
if(res ==_FALSE)
|
if(res ==_FALSE)
|
||||||
ret= _FAIL;
|
ret= _FAIL;
|
||||||
@ -1428,7 +1437,7 @@ int rtw_set_channel_plan(_adapter *adapter, u8 channel_plan)
|
|||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
|
|
||||||
//handle by cmd_thread to sync with scan operation
|
//handle by cmd_thread to sync with scan operation
|
||||||
return rtw_set_chplan_cmd(adapter, channel_plan, 1, 1);
|
return rtw_set_chplan_cmd(adapter, RTW_CMDF_WAIT_ACK, channel_plan, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1440,26 +1449,11 @@ int rtw_set_channel_plan(_adapter *adapter, u8 channel_plan)
|
|||||||
*/
|
*/
|
||||||
int rtw_set_country(_adapter *adapter, const char *country_code)
|
int rtw_set_country(_adapter *adapter, const char *country_code)
|
||||||
{
|
{
|
||||||
int channel_plan = RT_CHANNEL_DOMAIN_WORLD_WIDE_5G;
|
#ifdef CONFIG_RTW_IOCTL_SET_COUNTRY
|
||||||
|
return rtw_set_country_cmd(adapter, RTW_CMDF_WAIT_ACK, country_code, 1);
|
||||||
DBG_871X("%s country_code:%s\n", __func__, country_code);
|
#else
|
||||||
|
return _FAIL;
|
||||||
//TODO: should have a table to match country code and RT_CHANNEL_DOMAIN
|
#endif
|
||||||
//TODO: should consider 2-character and 3-character country code
|
|
||||||
if(0 == strcmp(country_code, "US"))
|
|
||||||
channel_plan = RT_CHANNEL_DOMAIN_FCC;
|
|
||||||
else if(0 == strcmp(country_code, "EU"))
|
|
||||||
channel_plan = RT_CHANNEL_DOMAIN_ETSI;
|
|
||||||
else if(0 == strcmp(country_code, "JP"))
|
|
||||||
channel_plan = RT_CHANNEL_DOMAIN_MKK;
|
|
||||||
else if(0 == strcmp(country_code, "CN"))
|
|
||||||
channel_plan = RT_CHANNEL_DOMAIN_CHINA;
|
|
||||||
else if(0 == strcmp(country_code, "IN"))
|
|
||||||
channel_plan = RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN;
|
|
||||||
else
|
|
||||||
DBG_871X("%s unknown country_code:%s\n", __FUNCTION__, country_code);
|
|
||||||
|
|
||||||
return rtw_set_channel_plan(adapter, channel_plan);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1469,7 +1463,7 @@ int rtw_set_country(_adapter *adapter, const char *country_code)
|
|||||||
*
|
*
|
||||||
* Return _SUCCESS or _FAIL
|
* Return _SUCCESS or _FAIL
|
||||||
*/
|
*/
|
||||||
int rtw_set_band(_adapter *adapter, enum _BAND band)
|
int rtw_set_band(_adapter *adapter, u8 band)
|
||||||
{
|
{
|
||||||
if (rtw_band_valid(band)) {
|
if (rtw_band_valid(band)) {
|
||||||
DBG_871X(FUNC_ADPT_FMT" band:%d\n", FUNC_ADPT_ARG(adapter), band);
|
DBG_871X(FUNC_ADPT_FMT" band:%d\n", FUNC_ADPT_ARG(adapter), band);
|
||||||
|
@ -16,10 +16,28 @@ struct u8 * rtw_get_buf_premem(int index)
|
|||||||
return rtk_buf_mem[index];
|
return rtk_buf_mem[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sk_buff *rtw_alloc_skb_premem(void)
|
u16 rtw_rtkm_get_buff_size(void)
|
||||||
|
{
|
||||||
|
return MAX_RTKM_RECVBUF_SZ;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(rtw_rtkm_get_buff_size);
|
||||||
|
|
||||||
|
u8 rtw_rtkm_get_nr_recv_skb(void)
|
||||||
|
{
|
||||||
|
return MAX_RTKM_NR_PREALLOC_RECV_SKB;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(rtw_rtkm_get_nr_recv_skb);
|
||||||
|
|
||||||
|
struct sk_buff *rtw_alloc_skb_premem(u16 in_size)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb = NULL;
|
struct sk_buff *skb = NULL;
|
||||||
|
|
||||||
|
if (in_size > MAX_RTKM_RECVBUF_SZ) {
|
||||||
|
pr_info("warning %s: driver buffer size(%d) > rtkm buffer size(%d)\n", __func__, in_size, MAX_RTKM_RECVBUF_SZ);
|
||||||
|
WARN_ON(1);
|
||||||
|
return skb;
|
||||||
|
}
|
||||||
|
|
||||||
skb = skb_dequeue(&rtk_skb_mem_q);
|
skb = skb_dequeue(&rtk_skb_mem_q);
|
||||||
|
|
||||||
printk("%s, rtk_skb_mem_q len : %d\n", __func__, skb_queue_len(&rtk_skb_mem_q));
|
printk("%s, rtk_skb_mem_q len : %d\n", __func__, skb_queue_len(&rtk_skb_mem_q));
|
||||||
@ -33,7 +51,7 @@ int rtw_free_skb_premem(struct sk_buff *pskb)
|
|||||||
if(!pskb)
|
if(!pskb)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(skb_queue_len(&rtk_skb_mem_q) >= NR_PREALLOC_RECV_SKB)
|
if (skb_queue_len(&rtk_skb_mem_q) >= MAX_RTKM_NR_PREALLOC_RECV_SKB)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
skb_queue_tail(&rtk_skb_mem_q, pskb);
|
skb_queue_tail(&rtk_skb_mem_q, pskb);
|
||||||
@ -52,6 +70,8 @@ static int __init rtw_mem_init(void)
|
|||||||
struct sk_buff *pskb=NULL;
|
struct sk_buff *pskb=NULL;
|
||||||
|
|
||||||
printk("%s\n", __func__);
|
printk("%s\n", __func__);
|
||||||
|
pr_info("MAX_RTKM_NR_PREALLOC_RECV_SKB: %d\n", MAX_RTKM_NR_PREALLOC_RECV_SKB);
|
||||||
|
pr_info("MAX_RTKM_RECVBUF_SZ: %d\n", MAX_RTKM_RECVBUF_SZ);
|
||||||
|
|
||||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
|
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||||
for(i=0; i<NR_RECVBUFF; i++)
|
for(i=0; i<NR_RECVBUFF; i++)
|
||||||
@ -62,9 +82,9 @@ static int __init rtw_mem_init(void)
|
|||||||
|
|
||||||
skb_queue_head_init(&rtk_skb_mem_q);
|
skb_queue_head_init(&rtk_skb_mem_q);
|
||||||
|
|
||||||
for(i=0; i<NR_PREALLOC_RECV_SKB; i++)
|
for(i=0; i<MAX_RTKM_NR_PREALLOC_RECV_SKB; i++)
|
||||||
{
|
{
|
||||||
pskb = __dev_alloc_skb(MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
pskb = __dev_alloc_skb(MAX_RTKM_RECVBUF_SZ + RECVBUFF_ALIGN_SZ, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||||
if(pskb)
|
if(pskb)
|
||||||
{
|
{
|
||||||
tmpaddr = (SIZE_PTR)pskb->data;
|
tmpaddr = (SIZE_PTR)pskb->data;
|
||||||
@ -100,4 +120,3 @@ static void __exit rtw_mem_exit(void)
|
|||||||
|
|
||||||
module_init(rtw_mem_init);
|
module_init(rtw_mem_init);
|
||||||
module_exit(rtw_mem_exit);
|
module_exit(rtw_mem_exit);
|
||||||
|
|
||||||
|
911
core/rtw_mlme.c
911
core/rtw_mlme.c
File diff suppressed because it is too large
Load Diff
6775
core/rtw_mlme_ext.c
6775
core/rtw_mlme_ext.c
File diff suppressed because it is too large
Load Diff
1774
core/rtw_mp.c
1774
core/rtw_mp.c
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
#include <rtw_mp_ioctl.h>
|
#include <rtw_mp_ioctl.h>
|
||||||
#include "../hal/OUTSRC/odm_precomp.h"
|
#include "../hal/phydm/phydm_precomp.h"
|
||||||
|
|
||||||
//**************** oid_rtl_seg_81_85 section start ****************
|
//**************** oid_rtl_seg_81_85 section start ****************
|
||||||
NDIS_STATUS oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv)
|
NDIS_STATUS oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
@ -2237,8 +2237,6 @@ NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_err_, ("Query Information, OID_RT_PRO_RX_PACKET_TYPE:%d \n",\
|
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_err_, ("Query Information, OID_RT_PRO_RX_PACKET_TYPE:%d \n",\
|
||||||
Adapter->mppriv.rx_with_status));
|
Adapter->mppriv.rx_with_status));
|
||||||
|
|
||||||
//*(u32 *)&Adapter->eeprompriv.mac_addr[0]=rtw_read32(Adapter, 0x10250050);
|
|
||||||
//*(u16 *)&Adapter->eeprompriv.mac_addr[4]=rtw_read16(Adapter, 0x10250054);
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_err_,("MAC addr=0x%x:0x%x:0x%x:0x%x:0x%x:0x%x \n",
|
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_err_,("MAC addr=0x%x:0x%x:0x%x:0x%x:0x%x:0x%x \n",
|
||||||
Adapter->eeprompriv.mac_addr[0],Adapter->eeprompriv.mac_addr[1],Adapter->eeprompriv.mac_addr[2],\
|
Adapter->eeprompriv.mac_addr[0],Adapter->eeprompriv.mac_addr[1],Adapter->eeprompriv.mac_addr[2],\
|
||||||
Adapter->eeprompriv.mac_addr[3],Adapter->eeprompriv.mac_addr[4],Adapter->eeprompriv.mac_addr[5]));
|
Adapter->eeprompriv.mac_addr[3],Adapter->eeprompriv.mac_addr[4],Adapter->eeprompriv.mac_addr[5]));
|
||||||
|
178
core/rtw_odm.c
178
core/rtw_odm.c
@ -40,23 +40,25 @@ const char *odm_comp_str[] = {
|
|||||||
/* BIT15 */"ODM_COMP_CFO_TRACKING",
|
/* BIT15 */"ODM_COMP_CFO_TRACKING",
|
||||||
/* BIT16 */"ODM_COMP_ACS",
|
/* BIT16 */"ODM_COMP_ACS",
|
||||||
/* BIT17 */"PHYDM_COMP_ADAPTIVITY",
|
/* BIT17 */"PHYDM_COMP_ADAPTIVITY",
|
||||||
/* BIT18 */NULL,
|
/* BIT18 */"PHYDM_COMP_RA_DBG",
|
||||||
/* BIT19 */NULL,
|
/* BIT19 */"PHYDM_COMP_TXBF",
|
||||||
/* BIT20 */"ODM_COMP_EDCA_TURBO",
|
/* BIT20 */"ODM_COMP_EDCA_TURBO",
|
||||||
/* BIT21 */"ODM_COMP_EARLY_MODE",
|
/* BIT21 */"ODM_COMP_EARLY_MODE",
|
||||||
/* BIT22 */NULL,
|
/* BIT22 */"ODM_FW_DEBUG_TRACE",
|
||||||
/* BIT23 */NULL,
|
/* BIT23 */NULL,
|
||||||
/* BIT24 */"ODM_COMP_TX_PWR_TRACK",
|
/* BIT24 */"ODM_COMP_TX_PWR_TRACK",
|
||||||
/* BIT25 */"ODM_COMP_RX_GAIN_TRACK",
|
/* BIT25 */"ODM_COMP_RX_GAIN_TRACK",
|
||||||
/* BIT26 */"ODM_COMP_CALIBRATION",
|
/* BIT26 */"ODM_COMP_CALIBRATION",
|
||||||
/* BIT27 */NULL,
|
/* BIT27 */NULL,
|
||||||
/* BIT28 */NULL,
|
/* BIT28 */"ODM_PHY_CONFIG",
|
||||||
/* BIT29 */NULL,
|
/* BIT29 */"BEAMFORMING_DEBUG",
|
||||||
/* BIT30 */"ODM_COMP_COMMON",
|
/* BIT30 */"ODM_COMP_COMMON",
|
||||||
/* BIT31 */"ODM_COMP_INIT",
|
/* BIT31 */"ODM_COMP_INIT",
|
||||||
|
/* BIT32 */"ODM_COMP_NOISY_DETECT",
|
||||||
|
/* BIT33 */"ODM_COMP_DFS",
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RTW_ODM_COMP_MAX 32
|
#define RTW_ODM_COMP_MAX 34
|
||||||
|
|
||||||
const char *odm_ability_str[] = {
|
const char *odm_ability_str[] = {
|
||||||
/* BIT0 */"ODM_BB_DIG",
|
/* BIT0 */"ODM_BB_DIG",
|
||||||
@ -76,7 +78,7 @@ const char *odm_ability_str[] = {
|
|||||||
/* BIT14 */"ODM_BB_CFO_TRACKING",
|
/* BIT14 */"ODM_BB_CFO_TRACKING",
|
||||||
/* BIT15 */"ODM_BB_NHM_CNT",
|
/* BIT15 */"ODM_BB_NHM_CNT",
|
||||||
/* BIT16 */"ODM_BB_PRIMARY_CCA",
|
/* BIT16 */"ODM_BB_PRIMARY_CCA",
|
||||||
/* BIT17 */NULL,
|
/* BIT17 */"ODM_BB_TXBF",
|
||||||
/* BIT18 */NULL,
|
/* BIT18 */NULL,
|
||||||
/* BIT19 */NULL,
|
/* BIT19 */NULL,
|
||||||
/* BIT20 */"ODM_MAC_EDCA_TURBO",
|
/* BIT20 */"ODM_MAC_EDCA_TURBO",
|
||||||
@ -106,21 +108,22 @@ void rtw_odm_dbg_comp_msg(void *sel, _adapter *adapter)
|
|||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
||||||
DM_ODM_T *odm = &pHalData->odmpriv;
|
DM_ODM_T *odm = &pHalData->odmpriv;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
u64 dbg_comp;
|
u64 dbg_comp = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
rtw_hal_get_def_var(adapter, HW_DEF_ODM_DBG_FLAG, &dbg_comp);
|
rtw_hal_get_odm_var(adapter, HAL_ODM_DBG_FLAG, &dbg_comp, NULL);
|
||||||
DBG_871X_SEL_NL(sel, "odm.DebugComponents = 0x%016llx \n", dbg_comp);
|
|
||||||
|
DBG_871X_SEL_NL(sel, "odm.DebugComponents = 0x%016llx\n", dbg_comp);
|
||||||
for (i=0;i<RTW_ODM_COMP_MAX;i++) {
|
for (i=0;i<RTW_ODM_COMP_MAX;i++) {
|
||||||
if (odm_comp_str[i])
|
if (odm_comp_str[i])
|
||||||
DBG_871X_SEL_NL(sel, "%cBIT%-2d %s\n",
|
DBG_871X_SEL_NL(sel, "%cBIT%-2d %s\n",
|
||||||
(BIT0 << i) & dbg_comp ? '+' : ' ', i, odm_comp_str[i]);
|
(BIT0 & (dbg_comp >> i)) ? '+' : ' ', i, odm_comp_str[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void rtw_odm_dbg_comp_set(_adapter *adapter, u64 comps)
|
inline void rtw_odm_dbg_comp_set(_adapter *adapter, u64 comps)
|
||||||
{
|
{
|
||||||
rtw_hal_set_def_var(adapter, HW_DEF_ODM_DBG_FLAG, &comps);
|
rtw_hal_set_odm_var(adapter, HAL_ODM_DBG_FLAG, &comps, _FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_odm_dbg_level_msg(void *sel, _adapter *adapter)
|
void rtw_odm_dbg_level_msg(void *sel, _adapter *adapter)
|
||||||
@ -128,10 +131,10 @@ void rtw_odm_dbg_level_msg(void *sel, _adapter *adapter)
|
|||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
||||||
DM_ODM_T *odm = &pHalData->odmpriv;
|
DM_ODM_T *odm = &pHalData->odmpriv;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
u32 dbg_level;
|
u32 dbg_level = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
rtw_hal_get_def_var(adapter, HW_DEF_ODM_DBG_LEVEL, &dbg_level);
|
rtw_hal_get_odm_var(adapter, HAL_ODM_DBG_LEVEL, &dbg_level, NULL);
|
||||||
DBG_871X_SEL_NL(sel, "odm.DebugLevel = %u\n", dbg_level);
|
DBG_871X_SEL_NL(sel, "odm.DebugLevel = %u\n", dbg_level);
|
||||||
for (i=0;i<RTW_ODM_DBG_LEVEL_NUM;i++) {
|
for (i=0;i<RTW_ODM_DBG_LEVEL_NUM;i++) {
|
||||||
if (odm_dbg_level_str[i])
|
if (odm_dbg_level_str[i])
|
||||||
@ -141,7 +144,7 @@ void rtw_odm_dbg_level_msg(void *sel, _adapter *adapter)
|
|||||||
|
|
||||||
inline void rtw_odm_dbg_level_set(_adapter *adapter, u32 level)
|
inline void rtw_odm_dbg_level_set(_adapter *adapter, u32 level)
|
||||||
{
|
{
|
||||||
rtw_hal_set_def_var(adapter, HW_DEF_ODM_DBG_LEVEL, &level);
|
rtw_hal_set_odm_var(adapter, HAL_ODM_DBG_LEVEL, &level, _FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_odm_ability_msg(void *sel, _adapter *adapter)
|
void rtw_odm_ability_msg(void *sel, _adapter *adapter)
|
||||||
@ -152,7 +155,7 @@ void rtw_odm_ability_msg(void *sel, _adapter *adapter)
|
|||||||
u32 ability = 0;
|
u32 ability = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
rtw_hal_get_hwreg(adapter, HW_VAR_DM_FLAG, (u8*)&ability);
|
ability = rtw_phydm_ability_get(adapter);
|
||||||
DBG_871X_SEL_NL(sel, "odm.SupportAbility = 0x%08x\n", ability);
|
DBG_871X_SEL_NL(sel, "odm.SupportAbility = 0x%08x\n", ability);
|
||||||
for (i=0;i<RTW_ODM_ABILITY_MAX;i++) {
|
for (i=0;i<RTW_ODM_ABILITY_MAX;i++) {
|
||||||
if (odm_ability_str[i])
|
if (odm_ability_str[i])
|
||||||
@ -163,7 +166,33 @@ void rtw_odm_ability_msg(void *sel, _adapter *adapter)
|
|||||||
|
|
||||||
inline void rtw_odm_ability_set(_adapter *adapter, u32 ability)
|
inline void rtw_odm_ability_set(_adapter *adapter, u32 ability)
|
||||||
{
|
{
|
||||||
rtw_hal_set_hwreg(adapter, HW_VAR_DM_FLAG, (u8*)&ability);
|
rtw_phydm_ability_set(adapter, ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* set ODM_CMNINFO_IC_TYPE based on chip_type */
|
||||||
|
void rtw_odm_init_ic_type(_adapter *adapter)
|
||||||
|
{
|
||||||
|
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter);
|
||||||
|
DM_ODM_T *odm = &hal_data->odmpriv;
|
||||||
|
u4Byte ic_type = chip_type_to_odm_ic_type(rtw_get_chip_type(adapter));
|
||||||
|
|
||||||
|
rtw_warn_on(!ic_type);
|
||||||
|
|
||||||
|
ODM_CmnInfoInit(odm, ODM_CMNINFO_IC_TYPE, ic_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void rtw_odm_set_force_igi_lb(_adapter *adapter, u8 lb)
|
||||||
|
{
|
||||||
|
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter);
|
||||||
|
|
||||||
|
hal_data->u1ForcedIgiLb = lb;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline u8 rtw_odm_get_force_igi_lb(_adapter *adapter)
|
||||||
|
{
|
||||||
|
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter);
|
||||||
|
|
||||||
|
return hal_data->u1ForcedIgiLb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_odm_adaptivity_ver_msg(void *sel, _adapter *adapter)
|
void rtw_odm_adaptivity_ver_msg(void *sel, _adapter *adapter)
|
||||||
@ -173,7 +202,6 @@ void rtw_odm_adaptivity_ver_msg(void *sel, _adapter *adapter)
|
|||||||
|
|
||||||
#define RTW_ADAPTIVITY_EN_DISABLE 0
|
#define RTW_ADAPTIVITY_EN_DISABLE 0
|
||||||
#define RTW_ADAPTIVITY_EN_ENABLE 1
|
#define RTW_ADAPTIVITY_EN_ENABLE 1
|
||||||
#define RTW_ADAPTIVITY_EN_AUTO 2
|
|
||||||
|
|
||||||
void rtw_odm_adaptivity_en_msg(void *sel, _adapter *adapter)
|
void rtw_odm_adaptivity_en_msg(void *sel, _adapter *adapter)
|
||||||
{
|
{
|
||||||
@ -188,9 +216,6 @@ void rtw_odm_adaptivity_en_msg(void *sel, _adapter *adapter)
|
|||||||
DBG_871X_SEL(sel, "DISABLE\n");
|
DBG_871X_SEL(sel, "DISABLE\n");
|
||||||
} else if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE) {
|
} else if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE) {
|
||||||
DBG_871X_SEL(sel, "ENABLE\n");
|
DBG_871X_SEL(sel, "ENABLE\n");
|
||||||
} else if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_AUTO) {
|
|
||||||
DBG_871X_SEL(sel, "AUTO, chplan:0x%02x, Regulation:%u,%u\n"
|
|
||||||
, mlme->ChannelPlan, odm->odm_Regulation2_4G, odm->odm_Regulation5G);
|
|
||||||
} else {
|
} else {
|
||||||
DBG_871X_SEL(sel, "INVALID\n");
|
DBG_871X_SEL(sel, "INVALID\n");
|
||||||
}
|
}
|
||||||
@ -214,41 +239,49 @@ void rtw_odm_adaptivity_mode_msg(void *sel, _adapter *adapter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RTW_NHM_EN_DISABLE 0
|
#define RTW_ADAPTIVITY_DML_DISABLE 0
|
||||||
#define RTW_NHM_EN_ENABLE 1
|
#define RTW_ADAPTIVITY_DML_ENABLE 1
|
||||||
|
|
||||||
void rtw_odm_nhm_en_msg(void *sel, _adapter *adapter)
|
void rtw_odm_adaptivity_dml_msg(void *sel, _adapter *adapter)
|
||||||
{
|
{
|
||||||
struct registry_priv *regsty = &adapter->registrypriv;
|
struct registry_priv *regsty = &adapter->registrypriv;
|
||||||
|
|
||||||
DBG_871X_SEL_NL(sel, "RTW_NHM_EN_");
|
DBG_871X_SEL_NL(sel, "RTW_ADAPTIVITY_DML_");
|
||||||
|
|
||||||
if (regsty->nhm_en == RTW_NHM_EN_DISABLE) {
|
if (regsty->adaptivity_dml == RTW_ADAPTIVITY_DML_DISABLE) {
|
||||||
DBG_871X_SEL(sel, "DISABLE\n");
|
DBG_871X_SEL(sel, "DISABLE\n");
|
||||||
} else if (regsty->nhm_en == RTW_NHM_EN_ENABLE) {
|
} else if (regsty->adaptivity_dml == RTW_ADAPTIVITY_DML_ENABLE) {
|
||||||
DBG_871X_SEL(sel, "ENABLE\n");
|
DBG_871X_SEL(sel, "ENABLE\n");
|
||||||
} else {
|
} else {
|
||||||
DBG_871X_SEL(sel, "INVALID\n");
|
DBG_871X_SEL(sel, "INVALID\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rtw_odm_adaptivity_dc_backoff_msg(void *sel, _adapter *adapter)
|
||||||
|
{
|
||||||
|
struct registry_priv *regsty = &adapter->registrypriv;
|
||||||
|
|
||||||
|
DBG_871X_SEL_NL(sel, "RTW_ADAPTIVITY_DC_BACKOFF:%u\n", regsty->adaptivity_dc_backoff);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rtw_odm_adaptivity_config_msg(void *sel, _adapter *adapter)
|
||||||
|
{
|
||||||
|
rtw_odm_adaptivity_ver_msg(sel, adapter);
|
||||||
|
rtw_odm_adaptivity_en_msg(sel, adapter);
|
||||||
|
rtw_odm_adaptivity_mode_msg(sel, adapter);
|
||||||
|
rtw_odm_adaptivity_dml_msg(sel, adapter);
|
||||||
|
rtw_odm_adaptivity_dc_backoff_msg(sel, adapter);
|
||||||
|
}
|
||||||
|
|
||||||
bool rtw_odm_adaptivity_needed(_adapter *adapter)
|
bool rtw_odm_adaptivity_needed(_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct registry_priv *regsty = &adapter->registrypriv;
|
struct registry_priv *regsty = &adapter->registrypriv;
|
||||||
struct mlme_priv *mlme = &adapter->mlmepriv;
|
struct mlme_priv *mlme = &adapter->mlmepriv;
|
||||||
bool ret = _FALSE;
|
bool ret = _FALSE;
|
||||||
|
|
||||||
if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE
|
if (regsty->adaptivity_en == RTW_ADAPTIVITY_EN_ENABLE)
|
||||||
|| regsty->adaptivity_en == RTW_ADAPTIVITY_EN_AUTO)
|
|
||||||
ret = _TRUE;
|
ret = _TRUE;
|
||||||
|
|
||||||
if (ret == _TRUE) {
|
|
||||||
rtw_odm_adaptivity_ver_msg(RTW_DBGDUMP, adapter);
|
|
||||||
rtw_odm_adaptivity_en_msg(RTW_DBGDUMP, adapter);
|
|
||||||
rtw_odm_adaptivity_mode_msg(RTW_DBGDUMP, adapter);
|
|
||||||
rtw_odm_nhm_en_msg(RTW_DBGDUMP, adapter);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,43 +290,35 @@ void rtw_odm_adaptivity_parm_msg(void *sel, _adapter *adapter)
|
|||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
||||||
DM_ODM_T *odm = &pHalData->odmpriv;
|
DM_ODM_T *odm = &pHalData->odmpriv;
|
||||||
|
|
||||||
rtw_odm_adaptivity_ver_msg(sel, adapter);
|
rtw_odm_adaptivity_config_msg(sel, adapter);
|
||||||
rtw_odm_adaptivity_en_msg(sel, adapter);
|
|
||||||
rtw_odm_adaptivity_mode_msg(sel, adapter);
|
|
||||||
rtw_odm_nhm_en_msg(sel, adapter);
|
|
||||||
|
|
||||||
DBG_871X_SEL_NL(sel, "%10s %16s %8s %10s %11s %14s\n"
|
DBG_871X_SEL_NL(sel, "%10s %16s %16s %22s %12s\n"
|
||||||
, "TH_L2H_ini", "TH_EDCCA_HL_diff", "IGI_Base", "ForceEDCCA", "AdapEn_RSSI", "IGI_LowerBound");
|
, "TH_L2H_ini", "TH_EDCCA_HL_diff", "TH_L2H_ini_mode2", "TH_EDCCA_HL_diff_mode2", "EDCCA_enable");
|
||||||
DBG_871X_SEL_NL(sel, "0x%-8x %-16d 0x%-6x %-10d %-11u %-14u\n"
|
DBG_871X_SEL_NL(sel, "0x%-8x %-16d 0x%-14x %-22d %-12d\n"
|
||||||
, (u8)odm->TH_L2H_ini
|
, (u8)odm->TH_L2H_ini
|
||||||
, odm->TH_EDCCA_HL_diff
|
, odm->TH_EDCCA_HL_diff
|
||||||
, odm->IGI_Base
|
, (u8)odm->TH_L2H_ini_mode2
|
||||||
, odm->ForceEDCCA
|
, odm->TH_EDCCA_HL_diff_mode2
|
||||||
, odm->AdapEn_RSSI
|
, odm->EDCCA_enable
|
||||||
, odm->IGI_LowerBound
|
|
||||||
);
|
);
|
||||||
|
|
||||||
DBG_871X_SEL_NL(sel, "%8s %9s\n", "EDCCA_ES","Adap_Flag");
|
DBG_871X_SEL_NL(sel, "%15s %9s\n", "AdapEnableState", "Adap_Flag");
|
||||||
DBG_871X_SEL_NL(sel, "%-8x %-9x \n"
|
DBG_871X_SEL_NL(sel, "%-15x %-9x\n"
|
||||||
, odm->EDCCA_enable_state
|
, odm->Adaptivity_enable
|
||||||
, odm->adaptivity_flag
|
, odm->adaptivity_flag
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_odm_adaptivity_parm_set(_adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff,
|
void rtw_odm_adaptivity_parm_set(_adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff, s8 TH_L2H_ini_mode2, s8 TH_EDCCA_HL_diff_mode2, u8 EDCCA_enable)
|
||||||
s8 IGI_Base, bool ForceEDCCA, u8 AdapEn_RSSI, u8 IGI_LowerBound)
|
|
||||||
{
|
{
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(adapter);
|
||||||
DM_ODM_T *odm = &pHalData->odmpriv;
|
DM_ODM_T *odm = &pHalData->odmpriv;
|
||||||
|
|
||||||
odm->TH_L2H_ini = TH_L2H_ini;
|
odm->TH_L2H_ini = TH_L2H_ini;
|
||||||
odm->TH_EDCCA_HL_diff = TH_EDCCA_HL_diff;
|
odm->TH_EDCCA_HL_diff = TH_EDCCA_HL_diff;
|
||||||
odm->IGI_Base = IGI_Base;
|
odm->TH_L2H_ini_mode2 = TH_L2H_ini_mode2;
|
||||||
odm->ForceEDCCA = ForceEDCCA;
|
odm->TH_EDCCA_HL_diff_mode2 = TH_EDCCA_HL_diff_mode2;
|
||||||
odm->AdapEn_RSSI = AdapEn_RSSI;
|
odm->EDCCA_enable = EDCCA_enable;
|
||||||
odm->IGI_LowerBound = IGI_LowerBound;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_odm_get_perpkt_rssi(void *sel, _adapter *adapter)
|
void rtw_odm_get_perpkt_rssi(void *sel, _adapter *adapter)
|
||||||
@ -309,13 +334,12 @@ void rtw_odm_get_perpkt_rssi(void *sel, _adapter *adapter)
|
|||||||
void rtw_odm_acquirespinlock(_adapter *adapter, RT_SPINLOCK_TYPE type)
|
void rtw_odm_acquirespinlock(_adapter *adapter, RT_SPINLOCK_TYPE type)
|
||||||
{
|
{
|
||||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(adapter);
|
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(adapter);
|
||||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case RT_IQK_SPINLOCK:
|
case RT_IQK_SPINLOCK:
|
||||||
_enter_critical_bh(&pdmpriv->IQKSpinLock, &irqL);
|
_enter_critical_bh(&pHalData->IQKSpinLock, &irqL);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -324,15 +348,45 @@ void rtw_odm_acquirespinlock(_adapter *adapter, RT_SPINLOCK_TYPE type)
|
|||||||
void rtw_odm_releasespinlock(_adapter *adapter, RT_SPINLOCK_TYPE type)
|
void rtw_odm_releasespinlock(_adapter *adapter, RT_SPINLOCK_TYPE type)
|
||||||
{
|
{
|
||||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(adapter);
|
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(adapter);
|
||||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case RT_IQK_SPINLOCK:
|
case RT_IQK_SPINLOCK:
|
||||||
_exit_critical_bh(&pdmpriv->IQKSpinLock, &irqL);
|
_exit_critical_bh(&pHalData->IQKSpinLock, &irqL);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_DFS_MASTER
|
||||||
|
inline u8 rtw_odm_get_dfs_domain(_adapter *adapter)
|
||||||
|
{
|
||||||
|
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter);
|
||||||
|
PDM_ODM_T pDM_Odm = &(hal_data->odmpriv);
|
||||||
|
|
||||||
|
return pDM_Odm->DFS_RegionDomain;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline VOID rtw_odm_radar_detect_reset(_adapter *adapter)
|
||||||
|
{
|
||||||
|
phydm_radar_detect_reset(GET_ODM(adapter));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline VOID rtw_odm_radar_detect_disable(_adapter *adapter)
|
||||||
|
{
|
||||||
|
phydm_radar_detect_disable(GET_ODM(adapter));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* called after ch, bw is set */
|
||||||
|
inline VOID rtw_odm_radar_detect_enable(_adapter *adapter)
|
||||||
|
{
|
||||||
|
phydm_radar_detect_enable(GET_ODM(adapter));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline BOOLEAN rtw_odm_radar_detect(_adapter *adapter)
|
||||||
|
{
|
||||||
|
return phydm_radar_detect(GET_ODM(adapter));
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_DFS_MASTER */
|
||||||
|
|
||||||
|
642
core/rtw_p2p.c
642
core/rtw_p2p.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1025
core/rtw_recv.c
1025
core/rtw_recv.c
File diff suppressed because it is too large
Load Diff
742
core/rtw_rf.c
742
core/rtw_rf.c
File diff suppressed because it is too large
Load Diff
@ -1733,8 +1733,9 @@ _func_enter_;
|
|||||||
prwskey=pattrib->dot118021x_UncstKey.skey;
|
prwskey=pattrib->dot118021x_UncstKey.skey;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_TDLS //swencryption
|
#ifdef CONFIG_TDLS
|
||||||
{
|
{
|
||||||
|
/* Swencryption */
|
||||||
struct sta_info *ptdls_sta;
|
struct sta_info *ptdls_sta;
|
||||||
ptdls_sta=rtw_get_stainfo(&padapter->stapriv ,&pattrib->dst[0] );
|
ptdls_sta=rtw_get_stainfo(&padapter->stapriv ,&pattrib->dst[0] );
|
||||||
if((ptdls_sta != NULL) && (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) )
|
if((ptdls_sta != NULL) && (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) )
|
||||||
@ -2213,8 +2214,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *precvframe)
|
|||||||
_rtw_memcpy(&temp_ipn, p+4, 6);
|
_rtw_memcpy(&temp_ipn, p+4, 6);
|
||||||
temp_ipn = le64_to_cpu(temp_ipn);
|
temp_ipn = le64_to_cpu(temp_ipn);
|
||||||
//BIP packet number should bigger than previous BIP packet
|
//BIP packet number should bigger than previous BIP packet
|
||||||
if(temp_ipn <= pmlmeext->mgnt_80211w_IPN_rx)
|
if (temp_ipn < pmlmeext->mgnt_80211w_IPN_rx) {
|
||||||
{
|
|
||||||
DBG_871X("replay BIP packet\n");
|
DBG_871X("replay BIP packet\n");
|
||||||
goto BIP_exit;
|
goto BIP_exit;
|
||||||
}
|
}
|
||||||
@ -3029,12 +3029,12 @@ void wpa_tdls_generate_tpk(_adapter *padapter, PVOID sta)
|
|||||||
* added by the KDF anyway..
|
* added by the KDF anyway..
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (os_memcmp(myid(&(padapter->eeprompriv)), psta->hwaddr, ETH_ALEN) < 0) {
|
if (os_memcmp(adapter_mac_addr(padapter), psta->hwaddr, ETH_ALEN) < 0) {
|
||||||
_rtw_memcpy(data, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
_rtw_memcpy(data, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy(data + ETH_ALEN, psta->hwaddr, ETH_ALEN);
|
_rtw_memcpy(data + ETH_ALEN, psta->hwaddr, ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
_rtw_memcpy(data, psta->hwaddr, ETH_ALEN);
|
_rtw_memcpy(data, psta->hwaddr, ETH_ALEN);
|
||||||
_rtw_memcpy(data + ETH_ALEN, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
_rtw_memcpy(data + ETH_ALEN, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
}
|
}
|
||||||
_rtw_memcpy(data + 2 * ETH_ALEN, get_bssid(pmlmepriv), ETH_ALEN);
|
_rtw_memcpy(data + 2 * ETH_ALEN, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
|
|
||||||
@ -3101,6 +3101,55 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wpa_tdls_teardown_ftie_mic - Calculate TDLS TEARDOWN FTIE MIC
|
||||||
|
* @kck: TPK-KCK
|
||||||
|
* @lnkid: Pointer to the beginning of Link Identifier IE
|
||||||
|
* @reason: Reason code of TDLS Teardown
|
||||||
|
* @dialog_token: Dialog token that was used in the MIC calculation for TPK Handshake Message 3
|
||||||
|
* @trans_seq: Transaction Sequence number (1 octet) which shall be set to the value 4
|
||||||
|
* @ftie: Pointer to the beginning of FT IE
|
||||||
|
* @mic: Pointer for writing MIC
|
||||||
|
*
|
||||||
|
* Calculate MIC for TDLS TEARDOWN frame according to Section 10.22.5 in IEEE 802.11 - 2012.
|
||||||
|
*/
|
||||||
|
int wpa_tdls_teardown_ftie_mic(u8 *kck, u8 *lnkid, u16 reason,
|
||||||
|
u8 dialog_token, u8 trans_seq, u8 *ftie, u8 *mic)
|
||||||
|
{
|
||||||
|
u8 *buf, *pos;
|
||||||
|
struct wpa_tdls_ftie *_ftie;
|
||||||
|
int ret;
|
||||||
|
int len = 2 + lnkid[1] + 2 + 1 + 1 + 2 + ftie[1];
|
||||||
|
|
||||||
|
buf = rtw_zmalloc(len);
|
||||||
|
if (!buf) {
|
||||||
|
DBG_871X("TDLS: No memory for MIC calculation\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
pos = buf;
|
||||||
|
/* 1) Link Identifier IE */
|
||||||
|
_rtw_memcpy(pos, lnkid, 2 + lnkid[1]);
|
||||||
|
pos += 2 + lnkid[1];
|
||||||
|
/* 2) Reason Code */
|
||||||
|
_rtw_memcpy(pos, (u8 *)&reason, 2);
|
||||||
|
pos += 2;
|
||||||
|
/* 3) Dialog Token */
|
||||||
|
*pos++ = dialog_token;
|
||||||
|
/* 4) Transaction Sequence number */
|
||||||
|
*pos++ = trans_seq;
|
||||||
|
/* 5) FTIE, with the MIC field of the FTIE set to 0 */
|
||||||
|
_rtw_memcpy(pos, ftie, 2 + ftie[1]);
|
||||||
|
_ftie = (struct wpa_tdls_ftie *) pos;
|
||||||
|
_rtw_memset(_ftie->mic, 0, TDLS_MIC_LEN);
|
||||||
|
pos += 2 + ftie[1];
|
||||||
|
|
||||||
|
ret = omac1_aes_128(kck, buf, pos - buf, mic);
|
||||||
|
rtw_mfree(buf, len);
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
||||||
u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie)
|
u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie)
|
||||||
{
|
{
|
||||||
@ -3112,14 +3161,14 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
|||||||
|
|
||||||
if (lnkid == NULL || rsnie == NULL ||
|
if (lnkid == NULL || rsnie == NULL ||
|
||||||
timeoutie == NULL || ftie == NULL){
|
timeoutie == NULL || ftie == NULL){
|
||||||
return 0;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = 2 * ETH_ALEN + 1 + 2 + 18 + 2 + *(rsnie+1) + 2 + *(timeoutie+1) + 2 + *(ftie+1);
|
len = 2 * ETH_ALEN + 1 + 2 + 18 + 2 + *(rsnie+1) + 2 + *(timeoutie+1) + 2 + *(ftie+1);
|
||||||
|
|
||||||
buf = rtw_zmalloc(len);
|
buf = rtw_zmalloc(len);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return 0;
|
return _FAIL;
|
||||||
|
|
||||||
pos = buf;
|
pos = buf;
|
||||||
/* 1) TDLS initiator STA MAC address */
|
/* 1) TDLS initiator STA MAC address */
|
||||||
@ -3149,17 +3198,17 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
|||||||
ret = omac1_aes_128(kck, buf, pos - buf, mic);
|
ret = omac1_aes_128(kck, buf, pos - buf, mic);
|
||||||
rtw_mfree(buf, len);
|
rtw_mfree(buf, len);
|
||||||
if (ret)
|
if (ret)
|
||||||
return 0;
|
return _FAIL;
|
||||||
rx_ftie = ftie+4;
|
rx_ftie = ftie+4;
|
||||||
|
|
||||||
if (os_memcmp(mic, rx_ftie, 16) == 0) {
|
if (os_memcmp(mic, rx_ftie, 16) == 0) {
|
||||||
//Valid MIC
|
//Valid MIC
|
||||||
return 1;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Invalid MIC
|
//Invalid MIC
|
||||||
DBG_871X( "[%s] Invalid MIC\n", __FUNCTION__);
|
DBG_871X( "[%s] Invalid MIC\n", __FUNCTION__);
|
||||||
return 0;
|
return _FAIL;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
@ -3173,8 +3222,10 @@ _func_enter_;
|
|||||||
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler ^^^\n"));
|
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler ^^^\n"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if(padapter->bDriverStopped ||padapter->bSurpriseRemoved){
|
if (RTW_CANNOT_RUN(padapter)) {
|
||||||
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler (padapter->bDriverStopped %d)(padapter->bSurpriseRemoved %d)^^^\n",padapter->bDriverStopped,padapter->bSurpriseRemoved));
|
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler (padapter->bDriverStopped %s)(padapter->bSurpriseRemoved %s)^^^\n"
|
||||||
|
, rtw_is_drv_stopped(padapter)?"True":"False"
|
||||||
|
, rtw_is_surprise_removed(padapter)?"True":"False"));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3228,3 +3279,68 @@ u8 rtw_handle_tkip_countermeasure(_adapter* adapter, const char *caller)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_WOWLAN
|
||||||
|
u16 rtw_cal_crc16(u8 data, u16 crc)
|
||||||
|
{
|
||||||
|
u8 shift_in, data_bit;
|
||||||
|
u8 crc_bit4, crc_bit11, crc_bit15;
|
||||||
|
u16 crc_result;
|
||||||
|
int index;
|
||||||
|
|
||||||
|
for (index = 0; index < 8; index++) {
|
||||||
|
crc_bit15 = ((crc & BIT15) ? 1 : 0);
|
||||||
|
data_bit = (data & (BIT0 << index) ? 1 : 0);
|
||||||
|
shift_in = crc_bit15 ^ data_bit;
|
||||||
|
/*printf("crc_bit15=%d, DataBit=%d, shift_in=%d\n",
|
||||||
|
* crc_bit15, data_bit, shift_in);*/
|
||||||
|
|
||||||
|
crc_result = crc << 1;
|
||||||
|
|
||||||
|
if (shift_in == 0)
|
||||||
|
crc_result &= (~BIT0);
|
||||||
|
else
|
||||||
|
crc_result |= BIT0;
|
||||||
|
/*printf("CRC =%x\n",CRC_Result);*/
|
||||||
|
|
||||||
|
crc_bit11 = ((crc & BIT11) ? 1 : 0) ^ shift_in;
|
||||||
|
|
||||||
|
if (crc_bit11 == 0)
|
||||||
|
crc_result &= (~BIT12);
|
||||||
|
else
|
||||||
|
crc_result |= BIT12;
|
||||||
|
|
||||||
|
/*printf("bit12 CRC =%x\n",CRC_Result);*/
|
||||||
|
|
||||||
|
crc_bit4 = ((crc & BIT4) ? 1 : 0) ^ shift_in;
|
||||||
|
|
||||||
|
if (crc_bit4 == 0)
|
||||||
|
crc_result &= (~BIT5);
|
||||||
|
else
|
||||||
|
crc_result |= BIT5;
|
||||||
|
|
||||||
|
/* printf("bit5 CRC =%x\n",CRC_Result); */
|
||||||
|
/* repeat using the last result*/
|
||||||
|
crc = crc_result;
|
||||||
|
}
|
||||||
|
return crc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* function name :rtw_calc_crc
|
||||||
|
*
|
||||||
|
* input: char* pattern , pattern size
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
u16 rtw_calc_crc(u8 *pdata, int length)
|
||||||
|
{
|
||||||
|
u16 crc = 0xffff;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < length; i++)
|
||||||
|
crc = rtw_cal_crc16(pdata[i], crc);
|
||||||
|
/* get 1' complement */
|
||||||
|
crc = ~crc;
|
||||||
|
|
||||||
|
return crc;
|
||||||
|
}
|
||||||
|
#endif /*CONFIG_WOWLAN*/
|
||||||
|
@ -162,7 +162,7 @@ void sreset_restore_security_station(_adapter *padapter)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//pairwise key
|
//pairwise key
|
||||||
rtw_setstakey_cmd(padapter, psta, _TRUE,_FALSE);
|
rtw_setstakey_cmd(padapter, psta, UNICAST_KEY,_FALSE);
|
||||||
//group key
|
//group key
|
||||||
rtw_set_key(padapter,&padapter->securitypriv,padapter->securitypriv.dot118021XGrpKeyid, 0,_FALSE);
|
rtw_set_key(padapter,&padapter->securitypriv,padapter->securitypriv.dot118021XGrpKeyid, 0,_FALSE);
|
||||||
}
|
}
|
||||||
@ -174,6 +174,7 @@ void sreset_restore_network_station(_adapter *padapter)
|
|||||||
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
|
u8 doiqk = _FALSE;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
@ -214,12 +215,15 @@ void sreset_restore_network_station(_adapter *padapter)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_DO_IQK, NULL);
|
doiqk = _TRUE;
|
||||||
|
rtw_hal_set_hwreg(padapter, HW_VAR_DO_IQK , &doiqk);
|
||||||
|
|
||||||
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||||
|
|
||||||
|
doiqk = _FALSE;
|
||||||
|
rtw_hal_set_hwreg(padapter , HW_VAR_DO_IQK , &doiqk);
|
||||||
//disable dynamic functions, such as high power, DIG
|
//disable dynamic functions, such as high power, DIG
|
||||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
/*rtw_phydm_func_disable_all(padapter);*/
|
||||||
|
|
||||||
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
|
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
|
||||||
|
|
||||||
@ -232,7 +236,7 @@ void sreset_restore_network_station(_adapter *padapter)
|
|||||||
|
|
||||||
mlmeext_joinbss_event_callback(padapter, 1);
|
mlmeext_joinbss_event_callback(padapter, 1);
|
||||||
//restore Sequence No.
|
//restore Sequence No.
|
||||||
rtw_write8(padapter,0x4dc,padapter->xmitpriv.nqos_ssn);
|
rtw_hal_set_hwreg(padapter, HW_VAR_RESTORE_HW_SEQ, 0);
|
||||||
|
|
||||||
sreset_restore_security_station(padapter);
|
sreset_restore_security_station(padapter);
|
||||||
}
|
}
|
||||||
@ -267,7 +271,6 @@ void sreset_stop_adapter(_adapter *padapter)
|
|||||||
|
|
||||||
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
|
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
|
||||||
|
|
||||||
if (!rtw_netif_queue_stopped(padapter->pnetdev))
|
|
||||||
rtw_netif_stop_queue(padapter->pnetdev);
|
rtw_netif_stop_queue(padapter->pnetdev);
|
||||||
|
|
||||||
rtw_cancel_all_timer(padapter);
|
rtw_cancel_all_timer(padapter);
|
||||||
@ -307,11 +310,10 @@ void sreset_start_adapter(_adapter *padapter)
|
|||||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (is_primary_adapter(padapter))
|
||||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||||
|
|
||||||
if (rtw_netif_queue_stopped(padapter->pnetdev))
|
|
||||||
rtw_netif_wake_queue(padapter->pnetdev);
|
rtw_netif_wake_queue(padapter->pnetdev);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sreset_reset(_adapter *padapter)
|
void sreset_reset(_adapter *padapter)
|
||||||
|
@ -28,6 +28,140 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||||
|
{
|
||||||
|
if (ntohs(*((u16 *)local_port)) == 5001 || ntohs(*((u16 *)remote_port)) == 5001)
|
||||||
|
return _TRUE;
|
||||||
|
return _FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct st_register test_st_reg = {
|
||||||
|
.s_proto = 0x06,
|
||||||
|
.rule = test_st_match_rule,
|
||||||
|
};
|
||||||
|
|
||||||
|
inline void rtw_st_ctl_init(struct st_ctl_t *st_ctl)
|
||||||
|
{
|
||||||
|
_rtw_memset(st_ctl->reg, 0 , sizeof(struct st_register) * SESSION_TRACKER_REG_ID_NUM);
|
||||||
|
_rtw_init_queue(&st_ctl->tracker_q);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void rtw_st_ctl_clear_tracker_q(struct st_ctl_t *st_ctl)
|
||||||
|
{
|
||||||
|
_irqL irqL;
|
||||||
|
_list *plist, *phead;
|
||||||
|
struct session_tracker *st;
|
||||||
|
|
||||||
|
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||||
|
phead = &st_ctl->tracker_q.queue;
|
||||||
|
plist = get_next(phead);
|
||||||
|
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||||
|
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||||
|
plist = get_next(plist);
|
||||||
|
rtw_list_delete(&st->list);
|
||||||
|
rtw_mfree((u8 *)st, sizeof(struct session_tracker));
|
||||||
|
}
|
||||||
|
_exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void rtw_st_ctl_deinit(struct st_ctl_t *st_ctl)
|
||||||
|
{
|
||||||
|
rtw_st_ctl_clear_tracker_q(st_ctl);
|
||||||
|
_rtw_deinit_queue(&st_ctl->tracker_q);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void rtw_st_ctl_register(struct st_ctl_t *st_ctl, u8 st_reg_id, struct st_register *reg)
|
||||||
|
{
|
||||||
|
if (st_reg_id >= SESSION_TRACKER_REG_ID_NUM) {
|
||||||
|
rtw_warn_on(1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
st_ctl->reg[st_reg_id].s_proto = reg->s_proto;
|
||||||
|
st_ctl->reg[st_reg_id].rule = reg->rule;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void rtw_st_ctl_unregister(struct st_ctl_t *st_ctl, u8 st_reg_id)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (st_reg_id >= SESSION_TRACKER_REG_ID_NUM) {
|
||||||
|
rtw_warn_on(1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
st_ctl->reg[st_reg_id].s_proto = 0;
|
||||||
|
st_ctl->reg[st_reg_id].rule = NULL;
|
||||||
|
|
||||||
|
/* clear tracker queue if no session trecker registered */
|
||||||
|
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++)
|
||||||
|
if (st_ctl->reg[i].s_proto != 0)
|
||||||
|
break;
|
||||||
|
if (i >= SESSION_TRACKER_REG_ID_NUM)
|
||||||
|
rtw_st_ctl_clear_tracker_q(st_ctl);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool rtw_st_ctl_chk_reg_s_proto(struct st_ctl_t *st_ctl, u8 s_proto)
|
||||||
|
{
|
||||||
|
bool ret = _FALSE;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) {
|
||||||
|
if (st_ctl->reg[i].s_proto == s_proto) {
|
||||||
|
ret = _TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool rtw_st_ctl_chk_reg_rule(struct st_ctl_t *st_ctl, _adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||||
|
{
|
||||||
|
bool ret = _FALSE;
|
||||||
|
int i;
|
||||||
|
st_match_rule rule;
|
||||||
|
|
||||||
|
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++) {
|
||||||
|
rule = st_ctl->reg[i].rule;
|
||||||
|
if (rule && rule(adapter, local_naddr, local_port, remote_naddr, remote_port) == _TRUE) {
|
||||||
|
ret = _TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SESSION_TRACKER_FMT IP_FMT":"PORT_FMT" "IP_FMT":"PORT_FMT" %u %d"
|
||||||
|
#define SESSION_TRACKER_ARG(st) IP_ARG(&(st)->local_naddr), PORT_ARG(&(st)->local_port), IP_ARG(&(st)->remote_naddr), PORT_ARG(&(st)->remote_port), (st)->status, rtw_get_passing_time_ms((st)->set_time)
|
||||||
|
|
||||||
|
void dump_st_ctl(void *sel, struct st_ctl_t *st_ctl)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
_irqL irqL;
|
||||||
|
_list *plist, *phead;
|
||||||
|
struct session_tracker *st;
|
||||||
|
|
||||||
|
if (!DBG_SESSION_TRACKER)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; i < SESSION_TRACKER_REG_ID_NUM; i++)
|
||||||
|
DBG_871X_SEL_NL(sel, "reg%d: %u %p\n", i, st_ctl->reg[i].s_proto, st_ctl->reg[i].rule);
|
||||||
|
|
||||||
|
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||||
|
phead = &st_ctl->tracker_q.queue;
|
||||||
|
plist = get_next(phead);
|
||||||
|
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||||
|
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||||
|
plist = get_next(plist);
|
||||||
|
|
||||||
|
DBG_871X_SEL_NL(sel, SESSION_TRACKER_FMT"\n", SESSION_TRACKER_ARG(st));
|
||||||
|
}
|
||||||
|
_exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void _rtw_init_stainfo(struct sta_info *psta);
|
void _rtw_init_stainfo(struct sta_info *psta);
|
||||||
void _rtw_init_stainfo(struct sta_info *psta)
|
void _rtw_init_stainfo(struct sta_info *psta)
|
||||||
{
|
{
|
||||||
@ -71,6 +205,7 @@ _func_enter_;
|
|||||||
psta->no_ht_gf_set = 0;
|
psta->no_ht_gf_set = 0;
|
||||||
psta->no_ht_set = 0;
|
psta->no_ht_set = 0;
|
||||||
psta->ht_20mhz_set = 0;
|
psta->ht_20mhz_set = 0;
|
||||||
|
psta->ht_40mhz_intolerant = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_TX_MCAST2UNI
|
#ifdef CONFIG_TX_MCAST2UNI
|
||||||
@ -81,6 +216,8 @@ _func_enter_;
|
|||||||
|
|
||||||
#endif // CONFIG_AP_MODE
|
#endif // CONFIG_AP_MODE
|
||||||
|
|
||||||
|
rtw_st_ctl_init(&psta->st_ctl);
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -123,7 +260,7 @@ _func_enter_;
|
|||||||
psta++;
|
psta++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pstapriv->adhoc_expire_to = 4; /* 4 * 2 = 8 sec */
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
|
||||||
@ -390,7 +527,9 @@ _func_enter_;
|
|||||||
pstapriv->asoc_sta_count , hwaddr[0], hwaddr[1], hwaddr[2],hwaddr[3],hwaddr[4],hwaddr[5]));
|
pstapriv->asoc_sta_count , hwaddr[0], hwaddr[1], hwaddr[2],hwaddr[3],hwaddr[4],hwaddr[5]));
|
||||||
|
|
||||||
init_addba_retry_timer(pstapriv->padapter, psta);
|
init_addba_retry_timer(pstapriv->padapter, psta);
|
||||||
|
#ifdef CONFIG_IEEE80211W
|
||||||
|
init_dot11w_expire_timer(pstapriv->padapter, psta);
|
||||||
|
#endif /* CONFIG_IEEE80211W */
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
rtw_init_tdls_timer(pstapriv->padapter, psta);
|
rtw_init_tdls_timer(pstapriv->padapter, psta);
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
@ -412,6 +551,7 @@ _func_enter_;
|
|||||||
preorder_ctrl->wend_b= 0xffff;
|
preorder_ctrl->wend_b= 0xffff;
|
||||||
//preorder_ctrl->wsize_b = (NR_RECVBUFF-2);
|
//preorder_ctrl->wsize_b = (NR_RECVBUFF-2);
|
||||||
preorder_ctrl->wsize_b = 64;//64;
|
preorder_ctrl->wsize_b = 64;//64;
|
||||||
|
preorder_ctrl->ampdu_size = RX_AMPDU_SIZE_INVALID;
|
||||||
|
|
||||||
_rtw_init_queue(&preorder_ctrl->pending_recvframe_queue);
|
_rtw_init_queue(&preorder_ctrl->pending_recvframe_queue);
|
||||||
|
|
||||||
@ -427,6 +567,7 @@ _func_enter_;
|
|||||||
#endif
|
#endif
|
||||||
/* init for the sequence number of received management frame */
|
/* init for the sequence number of received management frame */
|
||||||
psta->RxMgmtFrameSeqNum = 0xffff;
|
psta->RxMgmtFrameSeqNum = 0xffff;
|
||||||
|
psta->ra_rpt_linked = _FALSE;
|
||||||
|
|
||||||
//alloc mac id for non-bc/mc station,
|
//alloc mac id for non-bc/mc station,
|
||||||
rtw_alloc_macid(pstapriv->padapter, psta);
|
rtw_alloc_macid(pstapriv->padapter, psta);
|
||||||
@ -536,10 +677,13 @@ _func_enter_;
|
|||||||
// re-init sta_info; 20061114 // will be init in alloc_stainfo
|
// re-init sta_info; 20061114 // will be init in alloc_stainfo
|
||||||
//_rtw_init_sta_xmit_priv(&psta->sta_xmitpriv);
|
//_rtw_init_sta_xmit_priv(&psta->sta_xmitpriv);
|
||||||
//_rtw_init_sta_recv_priv(&psta->sta_recvpriv);
|
//_rtw_init_sta_recv_priv(&psta->sta_recvpriv);
|
||||||
|
#ifdef CONFIG_IEEE80211W
|
||||||
|
_cancel_timer_ex(&psta->dot11w_expire_timer);
|
||||||
|
#endif /* CONFIG_IEEE80211W */
|
||||||
_cancel_timer_ex(&psta->addba_retry_timer);
|
_cancel_timer_ex(&psta->addba_retry_timer);
|
||||||
|
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
|
psta->tdls_sta_state = TDLS_STATE_NONE;
|
||||||
rtw_free_tdls_timer(psta);
|
rtw_free_tdls_timer(psta);
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
|
|
||||||
@ -636,6 +780,8 @@ _func_enter_;
|
|||||||
|
|
||||||
#endif // CONFIG_AP_MODE
|
#endif // CONFIG_AP_MODE
|
||||||
|
|
||||||
|
rtw_st_ctl_deinit(&psta->st_ctl);
|
||||||
|
|
||||||
_rtw_spinlock_free(&psta->lock);
|
_rtw_spinlock_free(&psta->lock);
|
||||||
|
|
||||||
//_enter_critical_bh(&(pfree_sta_queue->lock), &irqL0);
|
//_enter_critical_bh(&(pfree_sta_queue->lock), &irqL0);
|
||||||
@ -788,7 +934,10 @@ _func_enter_;
|
|||||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("rtw_alloc_stainfo fail"));
|
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("rtw_alloc_stainfo fail"));
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_BEAMFORMING
|
||||||
|
psta->txbf_gid = 63;
|
||||||
|
psta->txbf_paid = 0;
|
||||||
|
#endif
|
||||||
ptxservq= &(psta->sta_xmitpriv.be_q);
|
ptxservq= &(psta->sta_xmitpriv.be_q);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
2766
core/rtw_tdls.c
2766
core/rtw_tdls.c
File diff suppressed because it is too large
Load Diff
171
core/rtw_vht.c
171
core/rtw_vht.c
@ -38,10 +38,10 @@ const u16 VHT_MCS_DATA_RATE[3][2][30] =
|
|||||||
90, 180, 270, 360, 540, 720, 810, 900, 1080, 1200}}, // Short GI, 40MHz
|
90, 180, 270, 360, 540, 720, 810, 900, 1080, 1200}}, // Short GI, 40MHz
|
||||||
{ {59, 117, 176, 234, 351, 468, 527, 585, 702, 780,
|
{ {59, 117, 176, 234, 351, 468, 527, 585, 702, 780,
|
||||||
117, 234, 351, 468, 702, 936, 1053, 1170, 1404, 1560,
|
117, 234, 351, 468, 702, 936, 1053, 1170, 1404, 1560,
|
||||||
176, 351, 527, 702, 1053, 1404, 1580, 1755, 2106, 2106}, // Long GI, 80MHz
|
176, 351, 527, 702, 1053, 1404, 1580, 1755, 2106, 2340}, /* Long GI, 80MHz */
|
||||||
{65, 130, 195, 260, 390, 520, 585, 650, 780, 867,
|
{65, 130, 195, 260, 390, 520, 585, 650, 780, 867,
|
||||||
130, 260, 390, 520, 780, 1040, 1170, 1300, 1560,1734,
|
130, 260, 390, 520, 780, 1040, 1170, 1300, 1560,1734,
|
||||||
195, 390, 585, 780, 1170, 1560, 1755, 1950, 2340, 2340} } // Short GI, 80MHz
|
195, 390, 585, 780, 1170, 1560, 1755, 1950, 2340, 2600} } /* Short GI, 80MHz */
|
||||||
};
|
};
|
||||||
|
|
||||||
u8 rtw_get_vht_highest_rate(u8 *pvht_mcs_map)
|
u8 rtw_get_vht_highest_rate(u8 *pvht_mcs_map)
|
||||||
@ -64,7 +64,7 @@ u8 rtw_get_vht_highest_rate(u8 *pvht_mcs_map)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//DBG_871X("HighestVHTMCSRate is %x\n", vht_mcs_rate);
|
/* DBG_871X("HighestVHTMCSRate is %x\n", vht_mcs_rate); */
|
||||||
return vht_mcs_rate;
|
return vht_mcs_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ u8 rtw_vht_mcsmap_to_nss(u8 *pvht_mcs_map)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//DBG_871X("%s : %dSS\n", __FUNCTION__, nss);
|
/* DBG_871X("%s : %dSS\n", __FUNCTION__, nss); */
|
||||||
return nss;
|
return nss;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,9 +119,9 @@ void rtw_vht_nss_to_mcsmap(u8 nss, u8 *target_mcs_map, u8 *cur_mcs_map)
|
|||||||
|
|
||||||
u16 rtw_vht_mcs_to_data_rate(u8 bw, u8 short_GI, u8 vht_mcs_rate)
|
u16 rtw_vht_mcs_to_data_rate(u8 bw, u8 short_GI, u8 vht_mcs_rate)
|
||||||
{
|
{
|
||||||
if(vht_mcs_rate > MGN_VHT2SS_MCS9)
|
if(vht_mcs_rate > MGN_VHT3SS_MCS9)
|
||||||
vht_mcs_rate = MGN_VHT2SS_MCS9;
|
vht_mcs_rate = MGN_VHT3SS_MCS9;
|
||||||
|
/* DBG_871X("bw=%d, short_GI=%d, ((vht_mcs_rate - MGN_VHT1SS_MCS0)&0x3f)=%d\n", bw, short_GI, ((vht_mcs_rate - MGN_VHT1SS_MCS0)&0x3f)); */
|
||||||
return VHT_MCS_DATA_RATE[bw][short_GI][((vht_mcs_rate - MGN_VHT1SS_MCS0)&0x3f)];
|
return VHT_MCS_DATA_RATE[bw][short_GI][((vht_mcs_rate - MGN_VHT1SS_MCS0)&0x3f)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,8 @@ void rtw_vht_use_default_setting(_adapter *padapter)
|
|||||||
BOOLEAN bHwLDPCSupport = _FALSE, bHwSTBCSupport = _FALSE;
|
BOOLEAN bHwLDPCSupport = _FALSE, bHwSTBCSupport = _FALSE;
|
||||||
BOOLEAN bHwSupportBeamformer = _FALSE, bHwSupportBeamformee = _FALSE;
|
BOOLEAN bHwSupportBeamformer = _FALSE, bHwSupportBeamformee = _FALSE;
|
||||||
u8 rf_type = 0;
|
u8 rf_type = 0;
|
||||||
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
pvhtpriv->sgi_80m = TEST_FLAG(pregistrypriv->short_gi, BIT2) ? _TRUE : _FALSE;
|
pvhtpriv->sgi_80m = TEST_FLAG(pregistrypriv->short_gi, BIT2) ? _TRUE : _FALSE;
|
||||||
|
|
||||||
// LDPC support
|
// LDPC support
|
||||||
@ -174,10 +175,17 @@ void rtw_vht_use_default_setting(_adapter *padapter)
|
|||||||
rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMER, (u8 *)&bHwSupportBeamformer);
|
rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMER, (u8 *)&bHwSupportBeamformer);
|
||||||
rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMEE, (u8 *)&bHwSupportBeamformee);
|
rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMEE, (u8 *)&bHwSupportBeamformee);
|
||||||
CLEAR_FLAGS(pvhtpriv->beamform_cap);
|
CLEAR_FLAGS(pvhtpriv->beamform_cap);
|
||||||
if(TEST_FLAG(pregistrypriv->beamform_cap, BIT0) && bHwSupportBeamformer)
|
if (TEST_FLAG(pregistrypriv->beamform_cap, BIT0) && bHwSupportBeamformer) {
|
||||||
{
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
|
if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
|
||||||
|
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
|
||||||
|
DBG_871X("[VHT] CONCURRENT AP Support Beamformer\n");
|
||||||
|
} else
|
||||||
|
DBG_871X("[VHT] CONCURRENT not AP ;not allow Support Beamformer\n");
|
||||||
|
#else
|
||||||
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
|
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
|
||||||
DBG_871X("[VHT] Support Beamformer\n");
|
DBG_871X("[VHT] Support Beamformer\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if(TEST_FLAG(pregistrypriv->beamform_cap, BIT1) && bHwSupportBeamformee)
|
if(TEST_FLAG(pregistrypriv->beamform_cap, BIT1) && bHwSupportBeamformee)
|
||||||
{
|
{
|
||||||
@ -189,10 +197,12 @@ void rtw_vht_use_default_setting(_adapter *padapter)
|
|||||||
|
|
||||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||||
|
|
||||||
if (rf_type == RF_1T1R)
|
if (rf_type == RF_3T3R)
|
||||||
pvhtpriv->vht_mcs_map[0] = 0xfe; // Only support 1SS MCS 0~9;
|
pvhtpriv->vht_mcs_map[0] = 0xea; /* support 1SS MCS 0~9 2SS MCS 0~9 3SS MCS 0~9 */
|
||||||
|
else if(rf_type == RF_2T2R)
|
||||||
|
pvhtpriv->vht_mcs_map[0] = 0xfa; /* support 1SS MCS 0~9 2SS MCS 0~9 */
|
||||||
else
|
else
|
||||||
pvhtpriv->vht_mcs_map[0] = 0xfa; //support 1SS MCS 0~9 2SS MCS 0~9
|
pvhtpriv->vht_mcs_map[0] = 0xfe; /* Only support 1SS MCS 0~9; */
|
||||||
pvhtpriv->vht_mcs_map[1] = 0xff;
|
pvhtpriv->vht_mcs_map[1] = 0xff;
|
||||||
|
|
||||||
if(pregistrypriv->vht_rate_sel == 1)
|
if(pregistrypriv->vht_rate_sel == 1)
|
||||||
@ -235,14 +245,16 @@ void rtw_vht_use_default_setting(_adapter *padapter)
|
|||||||
pvhtpriv->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv->vht_mcs_map);
|
pvhtpriv->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv->vht_mcs_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 rtw_vht_rate_to_bitmap(u8 *pVHTRate)
|
u64 rtw_vht_rate_to_bitmap(u8 *pVHTRate)
|
||||||
{
|
{
|
||||||
|
|
||||||
u8 i,j , tmpRate;
|
u8 i,j , tmpRate;
|
||||||
u32 RateBitmap = 0;
|
u64 RateBitmap = 0;
|
||||||
|
u8 Bits_3ss = 6;
|
||||||
|
|
||||||
for(i = j= 0; i < 4; i+=2, j+=10)
|
for(i = j= 0; i < Bits_3ss; i+=2, j+=10)
|
||||||
{
|
{
|
||||||
|
/* every two bits means single sptial stream */
|
||||||
tmpRate = (pVHTRate[0] >> i) & 3;
|
tmpRate = (pVHTRate[0] >> i) & 3;
|
||||||
|
|
||||||
switch(tmpRate){
|
switch(tmpRate){
|
||||||
@ -261,7 +273,7 @@ u32 rtw_vht_rate_to_bitmap(u8 *pVHTRate)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DBG_871X("RateBitmap=%016llx , pVHTRate[0]=%02x, pVHTRate[1]=%02x\n", RateBitmap, pVHTRate[0], pVHTRate[1]);
|
||||||
return RateBitmap;
|
return RateBitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +285,8 @@ void update_sta_vht_info_apmode(_adapter *padapter, PVOID sta)
|
|||||||
struct vht_priv *pvhtpriv_ap = &pmlmepriv->vhtpriv;
|
struct vht_priv *pvhtpriv_ap = &pmlmepriv->vhtpriv;
|
||||||
struct vht_priv *pvhtpriv_sta = &psta->vhtpriv;
|
struct vht_priv *pvhtpriv_sta = &psta->vhtpriv;
|
||||||
struct ht_priv *phtpriv_sta = &psta->htpriv;
|
struct ht_priv *phtpriv_sta = &psta->htpriv;
|
||||||
u8 cur_ldpc_cap=0, cur_stbc_cap=0, cur_beamform_cap=0, bw_mode = 0;
|
u8 cur_ldpc_cap = 0, cur_stbc_cap = 0, bw_mode = 0;
|
||||||
|
u16 cur_beamform_cap = 0;
|
||||||
u8 *pcap_mcs;
|
u8 *pcap_mcs;
|
||||||
|
|
||||||
if (pvhtpriv_sta->vht_option == _FALSE) {
|
if (pvhtpriv_sta->vht_option == _FALSE) {
|
||||||
@ -316,11 +329,14 @@ void update_sta_vht_info_apmode(_adapter *padapter, PVOID sta)
|
|||||||
}
|
}
|
||||||
pvhtpriv_sta->stbc_cap = cur_stbc_cap;
|
pvhtpriv_sta->stbc_cap = cur_stbc_cap;
|
||||||
|
|
||||||
|
#ifdef CONFIG_BEAMFORMING
|
||||||
// B11 SU Beamformer Capable, the target supports Beamformer and we are Beamformee
|
// B11 SU Beamformer Capable, the target supports Beamformer and we are Beamformee
|
||||||
if (TEST_FLAG(pvhtpriv_ap->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) &&
|
if (TEST_FLAG(pvhtpriv_ap->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) &&
|
||||||
GET_VHT_CAPABILITY_ELE_SU_BFEE(pvhtpriv_sta->vht_cap))
|
GET_VHT_CAPABILITY_ELE_SU_BFEE(pvhtpriv_sta->vht_cap))
|
||||||
{
|
{
|
||||||
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
|
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
|
||||||
|
/*Shift to BEAMFORMING_VHT_BEAMFORMER_STS_CAP*/
|
||||||
|
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFEE_STS_CAP(pvhtpriv_sta->vht_cap)<<8);
|
||||||
}
|
}
|
||||||
|
|
||||||
// B12 SU Beamformee Capable, the target supports Beamformee and we are Beamformer
|
// B12 SU Beamformee Capable, the target supports Beamformee and we are Beamformer
|
||||||
@ -328,11 +344,14 @@ void update_sta_vht_info_apmode(_adapter *padapter, PVOID sta)
|
|||||||
GET_VHT_CAPABILITY_ELE_SU_BFER(pvhtpriv_sta->vht_cap))
|
GET_VHT_CAPABILITY_ELE_SU_BFER(pvhtpriv_sta->vht_cap))
|
||||||
{
|
{
|
||||||
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
|
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
|
||||||
|
/*Shit to BEAMFORMING_VHT_BEAMFORMEE_SOUND_DIM*/
|
||||||
|
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFER_SOUND_DIM_NUM(pvhtpriv_sta->vht_cap)<<12);
|
||||||
}
|
}
|
||||||
pvhtpriv_sta->beamform_cap = cur_beamform_cap;
|
pvhtpriv_sta->beamform_cap = cur_beamform_cap;
|
||||||
if (cur_beamform_cap) {
|
if (cur_beamform_cap) {
|
||||||
DBG_871X("Current STA(%d) VHT Beamforming Setting = %02X\n", psta->aid, cur_beamform_cap);
|
DBG_871X("Current STA(%d) VHT Beamforming Setting = %02X\n", psta->aid, cur_beamform_cap);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// B23 B24 B25 Maximum A-MPDU Length Exponent
|
// B23 B24 B25 Maximum A-MPDU Length Exponent
|
||||||
pvhtpriv_sta->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pvhtpriv_sta->vht_cap);
|
pvhtpriv_sta->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pvhtpriv_sta->vht_cap);
|
||||||
@ -364,7 +383,8 @@ void VHT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
|
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
u8 cur_ldpc_cap=0, cur_stbc_cap=0, cur_beamform_cap=0, rf_type = RF_1T1R;
|
u8 cur_ldpc_cap = 0, cur_stbc_cap = 0, rf_type = RF_1T1R;
|
||||||
|
u16 cur_beamform_cap = 0;
|
||||||
u8 *pcap_mcs;
|
u8 *pcap_mcs;
|
||||||
u8 vht_mcs[2];
|
u8 vht_mcs[2];
|
||||||
|
|
||||||
@ -395,12 +415,14 @@ void VHT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
DBG_871X("Current VHT STBC Setting = %02X\n", cur_stbc_cap);
|
DBG_871X("Current VHT STBC Setting = %02X\n", cur_stbc_cap);
|
||||||
}
|
}
|
||||||
pvhtpriv->stbc_cap = cur_stbc_cap;
|
pvhtpriv->stbc_cap = cur_stbc_cap;
|
||||||
|
#ifdef CONFIG_BEAMFORMING
|
||||||
// B11 SU Beamformer Capable, the target supports Beamformer and we are Beamformee
|
// B11 SU Beamformer Capable, the target supports Beamformer and we are Beamformee
|
||||||
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) &&
|
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) &&
|
||||||
GET_VHT_CAPABILITY_ELE_SU_BFEE(pIE->data))
|
GET_VHT_CAPABILITY_ELE_SU_BFEE(pIE->data))
|
||||||
{
|
{
|
||||||
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
|
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
|
||||||
|
/*Shift to BEAMFORMING_VHT_BEAMFORMER_STS_CAP*/
|
||||||
|
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFEE_STS_CAP(pIE->data)<<8);
|
||||||
}
|
}
|
||||||
|
|
||||||
// B12 SU Beamformee Capable, the target supports Beamformee and we are Beamformer
|
// B12 SU Beamformee Capable, the target supports Beamformee and we are Beamformer
|
||||||
@ -408,12 +430,15 @@ void VHT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
GET_VHT_CAPABILITY_ELE_SU_BFER(pIE->data))
|
GET_VHT_CAPABILITY_ELE_SU_BFER(pIE->data))
|
||||||
{
|
{
|
||||||
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
|
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
|
||||||
|
/*Shit to BEAMFORMING_VHT_BEAMFORMEE_SOUND_DIM*/
|
||||||
|
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFER_SOUND_DIM_NUM(pIE->data)<<12);
|
||||||
|
|
||||||
}
|
}
|
||||||
pvhtpriv->beamform_cap = cur_beamform_cap;
|
pvhtpriv->beamform_cap = cur_beamform_cap;
|
||||||
if (cur_beamform_cap) {
|
if (cur_beamform_cap) {
|
||||||
DBG_871X("Current VHT Beamforming Setting = %02X\n", cur_beamform_cap);
|
DBG_871X("Current VHT Beamforming Setting = %02X\n", cur_beamform_cap);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// B23 B24 B25 Maximum A-MPDU Length Exponent
|
// B23 B24 B25 Maximum A-MPDU Length Exponent
|
||||||
pvhtpriv->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pIE->data);
|
pvhtpriv->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pIE->data);
|
||||||
|
|
||||||
@ -425,6 +450,8 @@ void VHT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
vht_mcs[0] |= 0xfc;
|
vht_mcs[0] |= 0xfc;
|
||||||
else if (rf_type == RF_2T2R)
|
else if (rf_type == RF_2T2R)
|
||||||
vht_mcs[0] |= 0xf0;
|
vht_mcs[0] |= 0xf0;
|
||||||
|
else if (rf_type == RF_3T3R)
|
||||||
|
vht_mcs[0] |= 0xc0;
|
||||||
|
|
||||||
_rtw_memcpy(pvhtpriv->vht_mcs_map, vht_mcs, 2);
|
_rtw_memcpy(pvhtpriv->vht_mcs_map, vht_mcs, 2);
|
||||||
|
|
||||||
@ -447,6 +474,7 @@ void rtw_process_vht_op_mode_notify(_adapter *padapter, u8 *pframe, PVOID sta)
|
|||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
|
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
struct registry_priv *regsty = adapter_to_regsty(padapter);
|
||||||
u8 target_bw;
|
u8 target_bw;
|
||||||
u8 target_rxss, current_rxss;
|
u8 target_rxss, current_rxss;
|
||||||
u8 update_ra = _FALSE;
|
u8 update_ra = _FALSE;
|
||||||
@ -459,7 +487,9 @@ void rtw_process_vht_op_mode_notify(_adapter *padapter, u8 *pframe, PVOID sta)
|
|||||||
target_rxss = (GET_VHT_OPERATING_MODE_FIELD_RX_NSS(pframe)+1);
|
target_rxss = (GET_VHT_OPERATING_MODE_FIELD_RX_NSS(pframe)+1);
|
||||||
|
|
||||||
if (target_bw != psta->bw_mode) {
|
if (target_bw != psta->bw_mode) {
|
||||||
if (target_bw <= (padapter->registrypriv.bw_mode >> 4)) {
|
if (hal_is_bw_support(padapter, target_bw)
|
||||||
|
&& REGSTY_IS_BW_5G_SUPPORT(regsty, target_bw)
|
||||||
|
) {
|
||||||
update_ra = _TRUE;
|
update_ra = _TRUE;
|
||||||
psta->bw_mode = target_bw;
|
psta->bw_mode = target_bw;
|
||||||
}
|
}
|
||||||
@ -486,21 +516,22 @@ u32 rtw_build_vht_operation_ie(_adapter *padapter, u8 *pbuf, u8 channel)
|
|||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
|
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
|
||||||
//struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
//struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
u8 ChnlWidth, center_freq, bw_mode;
|
u8 ChnlWidth, center_freq, bw_mode, rf_type = 0;
|
||||||
u32 len = 0;
|
u32 len = 0;
|
||||||
u8 operation[5];
|
u8 operation[5];
|
||||||
|
|
||||||
|
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||||
|
|
||||||
_rtw_memset(operation, 0, 5);
|
_rtw_memset(operation, 0, 5);
|
||||||
|
|
||||||
bw_mode = pregistrypriv->bw_mode >> 4;
|
bw_mode = REGSTY_BW_5G(pregistrypriv); /* TODO: control op bw with other info */
|
||||||
|
|
||||||
if (bw_mode >= CHANNEL_WIDTH_80)
|
if (hal_chk_bw_cap(padapter, BW_CAP_80M | BW_CAP_160M)
|
||||||
{
|
&& REGSTY_BW_5G(pregistrypriv) >= CHANNEL_WIDTH_80
|
||||||
|
) {
|
||||||
center_freq = rtw_get_center_ch(channel, bw_mode, HAL_PRIME_CHNL_OFFSET_LOWER);
|
center_freq = rtw_get_center_ch(channel, bw_mode, HAL_PRIME_CHNL_OFFSET_LOWER);
|
||||||
ChnlWidth = 1;
|
ChnlWidth = 1;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
center_freq = 0;
|
center_freq = 0;
|
||||||
ChnlWidth = 0;
|
ChnlWidth = 0;
|
||||||
}
|
}
|
||||||
@ -510,8 +541,35 @@ u32 rtw_build_vht_operation_ie(_adapter *padapter, u8 *pbuf, u8 channel)
|
|||||||
//center frequency
|
//center frequency
|
||||||
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(operation, center_freq);//Todo: need to set correct center channel
|
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(operation, center_freq);//Todo: need to set correct center channel
|
||||||
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(operation,0);
|
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(operation,0);
|
||||||
operation[3] = 0xff;
|
|
||||||
|
if (padapter->registrypriv.rf_config != RF_MAX_TYPE)
|
||||||
|
rf_type = padapter->registrypriv.rf_config;
|
||||||
|
|
||||||
|
switch (rf_type) {
|
||||||
|
case RF_1T1R:
|
||||||
|
operation[3] = 0xfe;
|
||||||
operation[4] = 0xff;
|
operation[4] = 0xff;
|
||||||
|
break;
|
||||||
|
case RF_1T2R:
|
||||||
|
case RF_2T2R:
|
||||||
|
case RF_2T2R_GREEN:
|
||||||
|
operation[3] = 0xfa;
|
||||||
|
operation[4] = 0xff;
|
||||||
|
break;
|
||||||
|
case RF_2T3R:
|
||||||
|
case RF_2T4R:
|
||||||
|
case RF_3T3R:
|
||||||
|
case RF_3T4R:
|
||||||
|
operation[3] = 0xea;
|
||||||
|
operation[4] = 0xff;
|
||||||
|
break;
|
||||||
|
case RF_4T4R:
|
||||||
|
operation[3] = 0xaa;
|
||||||
|
operation[4] = 0xff;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DBG_871X("%s, %d, unknown rf type\n", __func__, __LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len);
|
rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len);
|
||||||
|
|
||||||
@ -530,10 +588,12 @@ u32 rtw_build_vht_op_mode_notify_ie(_adapter *padapter, u8 *pbuf, u8 bw)
|
|||||||
chnl_width = bw;
|
chnl_width = bw;
|
||||||
|
|
||||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||||
if(rf_type == RF_1T1R)
|
if(rf_type == RF_3T3R)
|
||||||
rx_nss = 1;
|
rx_nss = 3;
|
||||||
else
|
else if(rf_type == RF_2T2R)
|
||||||
rx_nss = 2;
|
rx_nss = 2;
|
||||||
|
else
|
||||||
|
rx_nss = 1;
|
||||||
|
|
||||||
SET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(&opmode, chnl_width);
|
SET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(&opmode, chnl_width);
|
||||||
SET_VHT_OPERATING_MODE_FIELD_RX_NSS(&opmode, (rx_nss-1));
|
SET_VHT_OPERATING_MODE_FIELD_RX_NSS(&opmode, (rx_nss-1));
|
||||||
@ -548,7 +608,7 @@ u32 rtw_build_vht_op_mode_notify_ie(_adapter *padapter, u8 *pbuf, u8 bw)
|
|||||||
|
|
||||||
u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
|
u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
u8 bw, rf_type;
|
u8 bw, rf_type, rf_num, rx_stbc_nss = 0;
|
||||||
u16 HighestRate;
|
u16 HighestRate;
|
||||||
u8 *pcap, *pcap_mcs;
|
u8 *pcap, *pcap_mcs;
|
||||||
u32 len = 0;
|
u32 len = 0;
|
||||||
@ -559,8 +619,18 @@ u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
|
|||||||
pcap = pvhtpriv->vht_cap;
|
pcap = pvhtpriv->vht_cap;
|
||||||
_rtw_memset(pcap, 0, 32);
|
_rtw_memset(pcap, 0, 32);
|
||||||
|
|
||||||
// B2 B3 Supported Channel Width Set
|
/* B0 B1 Maximum MPDU Length */
|
||||||
SET_VHT_CAPABILITY_ELE_CHL_WIDTH(pcap, 0); //indicate we don't support neither 160M nor 80+80M bandwidth.
|
SET_VHT_CAPABILITY_ELE_MAX_MPDU_LENGTH(pcap, 2);
|
||||||
|
|
||||||
|
/* B2 B3 Supported Channel Width Set */
|
||||||
|
if (hal_chk_bw_cap(padapter, BW_CAP_160M) && REGSTY_IS_BW_5G_SUPPORT(pregistrypriv, CHANNEL_WIDTH_160)) {
|
||||||
|
if (hal_chk_bw_cap(padapter, BW_CAP_80_80M) && REGSTY_IS_BW_5G_SUPPORT(pregistrypriv, CHANNEL_WIDTH_80_80))
|
||||||
|
SET_VHT_CAPABILITY_ELE_CHL_WIDTH(pcap, 2);
|
||||||
|
else
|
||||||
|
SET_VHT_CAPABILITY_ELE_CHL_WIDTH(pcap, 1);
|
||||||
|
} else {
|
||||||
|
SET_VHT_CAPABILITY_ELE_CHL_WIDTH(pcap, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// B4 Rx LDPC
|
// B4 Rx LDPC
|
||||||
if(TEST_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_RX))
|
if(TEST_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_RX))
|
||||||
@ -583,29 +653,25 @@ u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
|
|||||||
// B8 B9 B10 Rx STBC
|
// B8 B9 B10 Rx STBC
|
||||||
if(TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_RX))
|
if(TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_RX))
|
||||||
{
|
{
|
||||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
rtw_hal_get_def_var(padapter, HAL_DEF_RX_STBC, (u8 *)(&rx_stbc_nss));
|
||||||
if ((rf_type == RF_2T2R) || (rf_type == RF_1T2R)) {
|
|
||||||
SET_VHT_CAPABILITY_ELE_RX_STBC(pcap, 2);
|
SET_VHT_CAPABILITY_ELE_RX_STBC(pcap, rx_stbc_nss);
|
||||||
}
|
|
||||||
else if (rf_type == RF_1T1R) {
|
|
||||||
SET_VHT_CAPABILITY_ELE_RX_STBC(pcap, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// B11 SU Beamformer Capable
|
// B11 SU Beamformer Capable
|
||||||
if(TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE))
|
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE)) {
|
||||||
{
|
|
||||||
SET_VHT_CAPABILITY_ELE_SU_BFER(pcap, 1);
|
SET_VHT_CAPABILITY_ELE_SU_BFER(pcap, 1);
|
||||||
// B16 17 18 Number of Sounding Dimensions
|
// B16 17 18 Number of Sounding Dimensions
|
||||||
SET_VHT_CAPABILITY_ELE_SOUNDING_DIMENSIONS(pcap, 1);
|
rtw_hal_get_def_var(padapter, HAL_DEF_BEAMFORMER_CAP, (u8 *)&rf_num);
|
||||||
|
SET_VHT_CAPABILITY_ELE_SOUNDING_DIMENSIONS(pcap, rf_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
// B12 SU Beamformee Capable
|
// B12 SU Beamformee Capable
|
||||||
if(TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE))
|
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE)) {
|
||||||
{
|
|
||||||
SET_VHT_CAPABILITY_ELE_SU_BFEE(pcap, 1);
|
SET_VHT_CAPABILITY_ELE_SU_BFEE(pcap, 1);
|
||||||
// B13 14 15 Compressed Steering Number of Beamformer Antennas Supported
|
// B13 14 15 Compressed Steering Number of Beamformer Antennas Supported
|
||||||
SET_VHT_CAPABILITY_ELE_BFER_ANT_SUPP(pcap, 1);
|
rtw_hal_get_def_var(padapter, HAL_DEF_BEAMFORMEE_CAP, (u8 *)&rf_num);
|
||||||
|
SET_VHT_CAPABILITY_ELE_BFER_ANT_SUPP(pcap, rf_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
// B19 MU Beamformer Capable
|
// B19 MU Beamformer Capable
|
||||||
@ -634,7 +700,9 @@ u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
|
|||||||
pcap_mcs = GET_VHT_CAPABILITY_ELE_TX_MCS(pcap);
|
pcap_mcs = GET_VHT_CAPABILITY_ELE_TX_MCS(pcap);
|
||||||
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
|
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
|
||||||
|
|
||||||
bw = (pregistrypriv->bw_mode >> 4);
|
/* find the largest bw supported by both registry and hal */
|
||||||
|
bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv));
|
||||||
|
|
||||||
HighestRate = VHT_MCS_DATA_RATE[bw][pvhtpriv->sgi_80m][((pvhtpriv->vht_highest_rate - MGN_VHT1SS_MCS0)&0x3f)];
|
HighestRate = VHT_MCS_DATA_RATE[bw][pvhtpriv->sgi_80m][((pvhtpriv->vht_highest_rate - MGN_VHT1SS_MCS0)&0x3f)];
|
||||||
HighestRate = (HighestRate+1) >> 1;
|
HighestRate = (HighestRate+1) >> 1;
|
||||||
|
|
||||||
@ -690,7 +758,8 @@ u32 rtw_restructure_vht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_le
|
|||||||
pframe = rtw_set_ie(out_ie+out_len, EID_VHTOperation, ielen, p+2 , pout_len);
|
pframe = rtw_set_ie(out_ie+out_len, EID_VHTOperation, ielen, p+2 , pout_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_bw = pregistrypriv->bw_mode >> 4;
|
/* find the largest bw supported by both registry and hal */
|
||||||
|
notify_bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv));
|
||||||
|
|
||||||
if (notify_bw > operation_bw)
|
if (notify_bw > operation_bw)
|
||||||
notify_bw = operation_bw;
|
notify_bw = operation_bw;
|
||||||
|
1406
core/rtw_wlan_util.c
1406
core/rtw_wlan_util.c
File diff suppressed because it is too large
Load Diff
549
core/rtw_xmit.c
549
core/rtw_xmit.c
File diff suppressed because it is too large
Load Diff
@ -147,7 +147,7 @@ u8 HalPwrSeqCmdParsing(
|
|||||||
rtw_udelay_os(10);
|
rtw_udelay_os(10);
|
||||||
|
|
||||||
if (pollingCount++ > maxPollingCnt) {
|
if (pollingCount++ > maxPollingCnt) {
|
||||||
DBG_871X_LEVEL(_drv_always_, "HalPwrSeqCmdParsing: Fail to polling Offset[%#x]=%02x\n", offset, value);
|
DBG_871X_LEVEL(_drv_err_, "HalPwrSeqCmdParsing: Fail to polling Offset[%#x]=%02x\n", offset, value);
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
}
|
}
|
||||||
} while (!bPollingBit);
|
} while (!bPollingBit);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,214 +0,0 @@
|
|||||||
//===========================================
|
|
||||||
// The following is for 8192E_1ANT BT Co-exist definition
|
|
||||||
//===========================================
|
|
||||||
#define BT_AUTO_REPORT_ONLY_8192E_1ANT 0
|
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
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
|
|
||||||
u1Byte preBtDecPwrLvl;
|
|
||||||
u1Byte curBtDecPwrLvl;
|
|
||||||
u1Byte preFwDacSwingLvl;
|
|
||||||
u1Byte curFwDacSwingLvl;
|
|
||||||
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;
|
|
||||||
BOOLEAN bPreDacSwingOn;
|
|
||||||
u4Byte preDacSwingLvl;
|
|
||||||
BOOLEAN bCurDacSwingOn;
|
|
||||||
u4Byte curDacSwingLvl;
|
|
||||||
u4Byte preVal0x6c0;
|
|
||||||
u4Byte curVal0x6c0;
|
|
||||||
u4Byte preVal0x6c4;
|
|
||||||
u4Byte curVal0x6c4;
|
|
||||||
u4Byte preVal0x6c8;
|
|
||||||
u4Byte curVal0x6c8;
|
|
||||||
u1Byte preVal0x6cc;
|
|
||||||
u1Byte curVal0x6cc;
|
|
||||||
|
|
||||||
// algorithm related
|
|
||||||
u1Byte preAlgorithm;
|
|
||||||
u1Byte curAlgorithm;
|
|
||||||
u1Byte btStatus;
|
|
||||||
u1Byte wifiChnlInfo[3];
|
|
||||||
|
|
||||||
u1Byte preSsType;
|
|
||||||
u1Byte curSsType;
|
|
||||||
|
|
||||||
u4Byte preRaMask;
|
|
||||||
u4Byte curRaMask;
|
|
||||||
|
|
||||||
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 highPriorityTx;
|
|
||||||
u4Byte highPriorityRx;
|
|
||||||
u4Byte lowPriorityTx;
|
|
||||||
u4Byte lowPriorityRx;
|
|
||||||
u1Byte btRssi;
|
|
||||||
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;
|
|
||||||
u1Byte btRetryCnt;
|
|
||||||
u1Byte btInfoExt;
|
|
||||||
}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_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_HaltNotify(
|
|
||||||
IN PBTC_COEXIST pBtCoexist
|
|
||||||
);
|
|
||||||
VOID
|
|
||||||
EXhalbtc8192e1ant_PnpNotify(
|
|
||||||
IN PBTC_COEXIST pBtCoexist,
|
|
||||||
IN u1Byte pnpState
|
|
||||||
);
|
|
||||||
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,206 +0,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 BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT 2
|
|
||||||
|
|
||||||
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 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 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;
|
|
||||||
}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,250 +0,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 30 //max: 255
|
|
||||||
|
|
||||||
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 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 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_8723B_1ANT, *PCOEX_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
|
|
||||||
);
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,201 +0,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
|
|
||||||
|
|
||||||
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;
|
|
||||||
} 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 bC2hBtInquiryPage;
|
|
||||||
u1Byte btRetryCnt;
|
|
||||||
u1Byte btInfoExt;
|
|
||||||
}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,206 +0,0 @@
|
|||||||
//===========================================
|
|
||||||
// The following is for 8812A_1ANT BT Co-exist definition
|
|
||||||
//===========================================
|
|
||||||
#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 BTC_8812A_1ANT_SWITCH_TO_WIFI 0
|
|
||||||
#define BTC_8812A_1ANT_SWITCH_TO_BT 1
|
|
||||||
|
|
||||||
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{
|
|
||||||
// fw mechanism
|
|
||||||
BOOLEAN bCurIgnoreWlanAct;
|
|
||||||
BOOLEAN bPreIgnoreWlanAct;
|
|
||||||
u1Byte prePsTdma;
|
|
||||||
u1Byte curPsTdma;
|
|
||||||
u1Byte psTdmaPara[5];
|
|
||||||
u1Byte psTdmaDuAdjType;
|
|
||||||
BOOLEAN bResetTdmaAdjust;
|
|
||||||
BOOLEAN bPrePsTdmaOn;
|
|
||||||
BOOLEAN bCurPsTdmaOn;
|
|
||||||
BOOLEAN bPreBtAutoReport;
|
|
||||||
BOOLEAN bCurBtAutoReport;
|
|
||||||
u1Byte preLps;
|
|
||||||
u1Byte curLps;
|
|
||||||
u1Byte preRpwm;
|
|
||||||
u1Byte curRpwm;
|
|
||||||
|
|
||||||
// sw mechanism
|
|
||||||
BOOLEAN bPreLowPenaltyRa;
|
|
||||||
BOOLEAN bCurLowPenaltyRa;
|
|
||||||
BOOLEAN bPreDacSwingOn;
|
|
||||||
u4Byte preVal0x6c0;
|
|
||||||
u4Byte curVal0x6c0;
|
|
||||||
u4Byte preVal0x6c4;
|
|
||||||
u4Byte curVal0x6c4;
|
|
||||||
u4Byte preVal0x6c8;
|
|
||||||
u4Byte curVal0x6c8;
|
|
||||||
u1Byte preVal0x6cc;
|
|
||||||
u1Byte curVal0x6cc;
|
|
||||||
|
|
||||||
// algorithm related
|
|
||||||
u1Byte preAlgorithm;
|
|
||||||
u1Byte curAlgorithm;
|
|
||||||
u1Byte btStatus;
|
|
||||||
u1Byte wifiChnlInfo[3];
|
|
||||||
|
|
||||||
u4Byte preRaMask;
|
|
||||||
u4Byte curRaMask;
|
|
||||||
|
|
||||||
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 highPriorityTx;
|
|
||||||
u4Byte highPriorityRx;
|
|
||||||
u4Byte lowPriorityTx;
|
|
||||||
u4Byte lowPriorityRx;
|
|
||||||
u1Byte btRssi;
|
|
||||||
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;
|
|
||||||
u1Byte btRetryCnt;
|
|
||||||
u1Byte btInfoExt;
|
|
||||||
}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_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_HaltNotify(
|
|
||||||
IN PBTC_COEXIST pBtCoexist
|
|
||||||
);
|
|
||||||
VOID
|
|
||||||
EXhalbtc8812a1ant_PnpNotify(
|
|
||||||
IN PBTC_COEXIST pBtCoexist,
|
|
||||||
IN u1Byte pnpState
|
|
||||||
);
|
|
||||||
VOID
|
|
||||||
EXhalbtc8812a1ant_Periodical(
|
|
||||||
IN PBTC_COEXIST pBtCoexist
|
|
||||||
);
|
|
||||||
VOID
|
|
||||||
EXhalbtc8812a1ant_DisplayCoexInfo(
|
|
||||||
IN PBTC_COEXIST pBtCoexist
|
|
||||||
);
|
|
||||||
VOID
|
|
||||||
EXhalbtc8812a1ant_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,218 +0,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
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
// 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 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_8812A_2ANT_MAX][10];
|
|
||||||
u4Byte btInfoC2hCnt[BT_INFO_SRC_8812A_2ANT_MAX];
|
|
||||||
u4Byte btInfoQueryCnt;
|
|
||||||
BOOLEAN bC2hBtInquiryPage;
|
|
||||||
u1Byte btRetryCnt;
|
|
||||||
u1Byte btInfoExt;
|
|
||||||
}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
|
|
||||||
);
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,213 +0,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,186 +0,0 @@
|
|||||||
//===========================================
|
|
||||||
// The following is for 8821A 2Ant BT Co-exist definition
|
|
||||||
//===========================================
|
|
||||||
#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
|
|
||||||
|
|
||||||
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_IDLE = 0x0,
|
|
||||||
BT_8821A_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
|
||||||
BT_8821A_2ANT_BT_STATUS_NON_IDLE = 0x2,
|
|
||||||
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
|
|
||||||
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;
|
|
||||||
u1Byte preVal0x6cc;
|
|
||||||
u1Byte curVal0x6cc;
|
|
||||||
BOOLEAN bLimitedDig;
|
|
||||||
|
|
||||||
// algorithm related
|
|
||||||
u1Byte preAlgorithm;
|
|
||||||
u1Byte curAlgorithm;
|
|
||||||
u1Byte btStatus;
|
|
||||||
u1Byte wifiChnlInfo[3];
|
|
||||||
} 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;
|
|
||||||
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 bC2hBtInquiryPage;
|
|
||||||
u1Byte btRetryCnt;
|
|
||||||
u1Byte btInfoExt;
|
|
||||||
}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_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,207 +0,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
|
|
||||||
);
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,213 +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 files
|
|
||||||
//============================================================
|
|
||||||
#include "Mp_Precomp.h"
|
|
||||||
#include "odm_precomp.h"
|
|
||||||
|
|
||||||
|
|
||||||
u1Byte
|
|
||||||
ODM_GetAutoChannelSelectResult(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN u1Byte Band
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
|
|
||||||
PACS pACS = &pDM_Odm->DM_ACS;
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
if(Band == ODM_BAND_2_4G)
|
|
||||||
{
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("[ACS] ODM_GetAutoChannelSelectResult(): CleanChannel_2G(%d)\n", pACS->CleanChannel_2G));
|
|
||||||
return (u1Byte)pACS->CleanChannel_2G;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("[ACS] ODM_GetAutoChannelSelectResult(): CleanChannel_5G(%d)\n", pACS->CleanChannel_5G));
|
|
||||||
return (u1Byte)pACS->CleanChannel_5G;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return (u1Byte)pACS->CleanChannel_2G;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AutoChannelSelectSetting(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN BOOLEAN IsEnable
|
|
||||||
)
|
|
||||||
{
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
|
|
||||||
u2Byte period = 0x2710;// 40ms in default
|
|
||||||
u2Byte NHMType = 0x7;
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("odm_AutoChannelSelectSetting()=========> \n"));
|
|
||||||
|
|
||||||
if(IsEnable)
|
|
||||||
{//20 ms
|
|
||||||
period = 0x1388;
|
|
||||||
NHMType = 0x1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pDM_Odm->SupportICType & ODM_IC_11AC_SERIES)
|
|
||||||
{
|
|
||||||
//PHY parameters initialize for ac series
|
|
||||||
ODM_Write2Byte(pDM_Odm, ODM_REG_NHM_TIMER_11AC+2, period); //0x990[31:16]=0x2710 Time duration for NHM unit: 4us, 0x2710=40ms
|
|
||||||
//ODM_SetBBReg(pDM_Odm, ODM_REG_NHM_TH9_TH10_11AC, BIT8|BIT9|BIT10, NHMType); //0x994[9:8]=3 enable CCX
|
|
||||||
}
|
|
||||||
else if (pDM_Odm->SupportICType & ODM_IC_11N_SERIES)
|
|
||||||
{
|
|
||||||
//PHY parameters initialize for n series
|
|
||||||
ODM_Write2Byte(pDM_Odm, ODM_REG_NHM_TIMER_11N+2, period); //0x894[31:16]=0x2710 Time duration for NHM unit: 4us, 0x2710=40ms
|
|
||||||
//ODM_SetBBReg(pDM_Odm, ODM_REG_NHM_TH9_TH10_11N, BIT10|BIT9|BIT8, NHMType); //0x890[9:8]=3 enable CCX
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AutoChannelSelectInit(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
|
|
||||||
PACS pACS = &pDM_Odm->DM_ACS;
|
|
||||||
u1Byte i;
|
|
||||||
|
|
||||||
if(!(pDM_Odm->SupportAbility & ODM_BB_NHM_CNT))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(pACS->bForceACSResult)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("odm_AutoChannelSelectInit()=========> \n"));
|
|
||||||
|
|
||||||
pACS->CleanChannel_2G = 1;
|
|
||||||
pACS->CleanChannel_5G = 36;
|
|
||||||
|
|
||||||
for (i = 0; i < ODM_MAX_CHANNEL_2G; ++i)
|
|
||||||
{
|
|
||||||
pACS->Channel_Info_2G[0][i] = 0;
|
|
||||||
pACS->Channel_Info_2G[1][i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pDM_Odm->SupportICType & (ODM_IC_11AC_SERIES|ODM_RTL8192D))
|
|
||||||
{
|
|
||||||
for (i = 0; i < ODM_MAX_CHANNEL_5G; ++i)
|
|
||||||
{
|
|
||||||
pACS->Channel_Info_5G[0][i] = 0;
|
|
||||||
pACS->Channel_Info_5G[1][i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AutoChannelSelectReset(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
|
|
||||||
PACS pACS = &pDM_Odm->DM_ACS;
|
|
||||||
|
|
||||||
if(!(pDM_Odm->SupportAbility & ODM_BB_NHM_CNT))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(pACS->bForceACSResult)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("odm_AutoChannelSelectReset()=========> \n"));
|
|
||||||
|
|
||||||
odm_AutoChannelSelectSetting(pDM_Odm,TRUE);// for 20ms measurement
|
|
||||||
Phydm_NHMCounterStatisticsReset(pDM_Odm);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AutoChannelSelect(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN u1Byte Channel
|
|
||||||
)
|
|
||||||
{
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
|
|
||||||
PACS pACS = &pDM_Odm->DM_ACS;
|
|
||||||
u1Byte ChannelIDX = 0, SearchIDX = 0;
|
|
||||||
u2Byte MaxScore=0;
|
|
||||||
|
|
||||||
if(!(pDM_Odm->SupportAbility & ODM_BB_NHM_CNT))
|
|
||||||
{
|
|
||||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_AutoChannelSelect(): Return: SupportAbility ODM_BB_NHM_CNT is disabled\n"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pACS->bForceACSResult)
|
|
||||||
{
|
|
||||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_AutoChannelSelect(): Force 2G clean channel = %d, 5G clean channel = %d\n",
|
|
||||||
pACS->CleanChannel_2G, pACS->CleanChannel_5G));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("odm_AutoChannelSelect(): Channel = %d=========> \n", Channel));
|
|
||||||
|
|
||||||
Phydm_GetNHMCounterStatistics(pDM_Odm);
|
|
||||||
odm_AutoChannelSelectSetting(pDM_Odm,FALSE);
|
|
||||||
|
|
||||||
if(Channel >=1 && Channel <=14)
|
|
||||||
{
|
|
||||||
ChannelIDX = Channel - 1;
|
|
||||||
pACS->Channel_Info_2G[1][ChannelIDX]++;
|
|
||||||
|
|
||||||
if(pACS->Channel_Info_2G[1][ChannelIDX] >= 2)
|
|
||||||
pACS->Channel_Info_2G[0][ChannelIDX] = (pACS->Channel_Info_2G[0][ChannelIDX] >> 1) +
|
|
||||||
(pACS->Channel_Info_2G[0][ChannelIDX] >> 2) + (pDM_Odm->NHM_cnt_0>>2);
|
|
||||||
else
|
|
||||||
pACS->Channel_Info_2G[0][ChannelIDX] = pDM_Odm->NHM_cnt_0;
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("odm_AutoChannelSelect(): NHM_cnt_0 = %d \n", pDM_Odm->NHM_cnt_0));
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("odm_AutoChannelSelect(): Channel_Info[0][%d] = %d, Channel_Info[1][%d] = %d\n", ChannelIDX, pACS->Channel_Info_2G[0][ChannelIDX], ChannelIDX, pACS->Channel_Info_2G[1][ChannelIDX]));
|
|
||||||
|
|
||||||
for(SearchIDX = 0; SearchIDX < ODM_MAX_CHANNEL_2G; SearchIDX++)
|
|
||||||
{
|
|
||||||
if(pACS->Channel_Info_2G[1][SearchIDX] != 0)
|
|
||||||
{
|
|
||||||
if(pACS->Channel_Info_2G[0][SearchIDX] >= MaxScore)
|
|
||||||
{
|
|
||||||
MaxScore = pACS->Channel_Info_2G[0][SearchIDX];
|
|
||||||
pACS->CleanChannel_2G = SearchIDX+1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ACS, ODM_DBG_LOUD, ("(1)odm_AutoChannelSelect(): 2G: CleanChannel_2G = %d, MaxScore = %d \n",
|
|
||||||
pACS->CleanChannel_2G, MaxScore));
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(Channel >= 36)
|
|
||||||
{
|
|
||||||
// Need to do
|
|
||||||
pACS->CleanChannel_5G = Channel;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
@ -1,60 +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 __ODMACS_H__
|
|
||||||
#define __ODMACS_H__
|
|
||||||
|
|
||||||
|
|
||||||
#define ODM_MAX_CHANNEL_2G 14
|
|
||||||
#define ODM_MAX_CHANNEL_5G 24
|
|
||||||
|
|
||||||
typedef struct _ACS_
|
|
||||||
{
|
|
||||||
BOOLEAN bForceACSResult;
|
|
||||||
u1Byte CleanChannel_2G;
|
|
||||||
u1Byte CleanChannel_5G;
|
|
||||||
u2Byte Channel_Info_2G[2][ODM_MAX_CHANNEL_2G]; //Channel_Info[1]: Channel Score, Channel_Info[2]:Channel_Scan_Times
|
|
||||||
u2Byte Channel_Info_5G[2][ODM_MAX_CHANNEL_5G];
|
|
||||||
}ACS, *PACS;
|
|
||||||
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AutoChannelSelectInit(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AutoChannelSelectReset(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AutoChannelSelect(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN u1Byte Channel
|
|
||||||
);
|
|
||||||
|
|
||||||
u1Byte
|
|
||||||
ODM_GetAutoChannelSelectResult(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN u1Byte Band
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,217 +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 __ODMANTDIV_H__
|
|
||||||
#define __ODMANTDIV_H__
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ANT1_2G 0 // = ANT2_5G
|
|
||||||
#define ANT2_2G 1 // = ANT1_5G
|
|
||||||
|
|
||||||
//Antenna Diversty Control Type
|
|
||||||
#define ODM_AUTO_ANT 0
|
|
||||||
#define ODM_FIX_MAIN_ANT 1
|
|
||||||
#define ODM_FIX_AUX_ANT 2
|
|
||||||
|
|
||||||
#define TX_BY_REG 0
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE != ODM_AP)
|
|
||||||
#define ODM_RTL8881A 0 //Just for windows driver to jointly use ODM-driver
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ODM_ANTDIV_SUPPORT (ODM_RTL8188E|ODM_RTL8192E|ODM_RTL8723B|ODM_RTL8821|ODM_RTL8881A|ODM_RTL8812)
|
|
||||||
#define ODM_N_ANTDIV_SUPPORT (ODM_RTL8188E|ODM_RTL8192E|ODM_RTL8723B)
|
|
||||||
#define ODM_AC_ANTDIV_SUPPORT (ODM_RTL8821|ODM_RTL8881A|ODM_RTL8812)
|
|
||||||
#define ODM_SMART_ANT_SUPPORT (ODM_RTL8188E|ODM_RTL8192E)
|
|
||||||
|
|
||||||
#define ODM_OLD_IC_ANTDIV_SUPPORT (ODM_RTL8723A|ODM_RTL8192C|ODM_RTL8192D)
|
|
||||||
|
|
||||||
#define ODM_ANTDIV_2G_SUPPORT_IC (ODM_RTL8188E|ODM_RTL8192E|ODM_RTL8723B|ODM_RTL8881A)
|
|
||||||
#define ODM_ANTDIV_5G_SUPPORT_IC (ODM_RTL8821|ODM_RTL8881A|ODM_RTL8812)
|
|
||||||
#define ODM_ANTDIV_2G BIT0
|
|
||||||
#define ODM_ANTDIV_5G BIT1
|
|
||||||
|
|
||||||
#define ANTDIV_ON 1
|
|
||||||
#define ANTDIV_OFF 0
|
|
||||||
|
|
||||||
#define INIT_ANTDIV_TIMMER 0
|
|
||||||
#define CANCEL_ANTDIV_TIMMER 1
|
|
||||||
#define RELEASE_ANTDIV_TIMMER 2
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_StopAntennaSwitchDm(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
VOID
|
|
||||||
ODM_SetAntConfig(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN u1Byte antSetting // 0=A, 1=B, 2=C, ....
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SwAntDivRestAfterLink ODM_SwAntDivRestAfterLink
|
|
||||||
VOID ODM_SwAntDivRestAfterLink( IN PDM_ODM_T pDM_Odm);
|
|
||||||
|
|
||||||
#if (defined(CONFIG_HW_ANTENNA_DIVERSITY))
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_UpdateRxIdleAnt(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN u1Byte Ant
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AntselStatistics(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN u1Byte antsel_tr_mux,
|
|
||||||
IN u4Byte MacId,
|
|
||||||
IN u4Byte RxPWDBAll
|
|
||||||
);
|
|
||||||
|
|
||||||
#if (RTL8723B_SUPPORT == 1)||(RTL8821A_SUPPORT == 1)
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
|
||||||
VOID
|
|
||||||
ODM_SW_AntDiv_Callback(
|
|
||||||
IN PRT_TIMER pTimer
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_SW_AntDiv_WorkitemCallback(
|
|
||||||
IN PVOID pContext
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_SW_AntDiv_Callback(void *FunctionContext);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
VOID
|
|
||||||
odm_S0S1_SwAntDivByCtrlFrame(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN u1Byte Step
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_AntselStatisticsOfCtrlFrame(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN u1Byte antsel_tr_mux,
|
|
||||||
IN u4Byte RxPWDBAll
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_S0S1_SwAntDivByCtrlFrame_ProcessRSSI(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN PODM_PHY_INFO_T pPhyInfo,
|
|
||||||
IN PODM_PACKET_INFO_T pPktinfo
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif //#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(RTL8188E_SUPPORT == 1 || RTL8192E_SUPPORT == 1)
|
|
||||||
#if ( !(DM_ODM_SUPPORT_TYPE == ODM_CE))
|
|
||||||
VOID
|
|
||||||
odm_FastAntTraining(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_FastAntTrainingCallback(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_FastAntTrainingWorkItemCallback(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_AntDivInit(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_AntDivReset(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_AntDiv(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_Process_RSSIForAntDiv(
|
|
||||||
IN OUT PDM_ODM_T pDM_Odm,
|
|
||||||
IN PODM_PHY_INFO_T pPhyInfo,
|
|
||||||
IN PODM_PACKET_INFO_T pPktinfo
|
|
||||||
);
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
VOID
|
|
||||||
ODM_SetTxAntByTxInfo(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN pu1Byte pDesc,
|
|
||||||
IN u1Byte macId
|
|
||||||
);
|
|
||||||
|
|
||||||
#else// (DM_ODM_SUPPORT_TYPE == ODM_AP)
|
|
||||||
VOID
|
|
||||||
ODM_SetTxAntByTxInfo(
|
|
||||||
//IN PDM_ODM_T pDM_Odm,
|
|
||||||
struct rtl8192cd_priv *priv,
|
|
||||||
struct tx_desc *pdesc,
|
|
||||||
struct tx_insn *txcfg,
|
|
||||||
unsigned short aid
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_AntDiv_Config(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_UpdateRxIdleAnt_8723B(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN u1Byte Ant,
|
|
||||||
IN u4Byte DefaultAnt,
|
|
||||||
IN u4Byte OptionalAnt
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_AntDivTimers(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN u1Byte state
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif //#if (defined(CONFIG_HW_ANTENNA_DIVERSITY))
|
|
||||||
#endif //#ifndef __ODMANTDIV_H__
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,237 +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 __HALHWOUTSRC_H__
|
|
||||||
#define __HALHWOUTSRC_H__
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------Define -------------------------------------------*/
|
|
||||||
//#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0)
|
|
||||||
#define AGC_DIFF_CONFIG_MP(ic, band) (ODM_ReadAndConfig_MP_##ic##_AGC_TAB_DIFF(pDM_Odm, Array_MP_##ic##_AGC_TAB_DIFF_##band, \
|
|
||||||
sizeof(Array_MP_##ic##_AGC_TAB_DIFF_##band)/sizeof(u4Byte)))
|
|
||||||
#define AGC_DIFF_CONFIG_TC(ic, band) (ODM_ReadAndConfig_TC_##ic##_AGC_TAB_DIFF(pDM_Odm, Array_TC_##ic##_AGC_TAB_DIFF_##band, \
|
|
||||||
sizeof(Array_TC_##ic##_AGC_TAB_DIFF_##band)/sizeof(u4Byte)))
|
|
||||||
|
|
||||||
#define AGC_DIFF_CONFIG(ic, band) do {\
|
|
||||||
if (pDM_Odm->bIsMPChip)\
|
|
||||||
AGC_DIFF_CONFIG_MP(ic,band);\
|
|
||||||
else\
|
|
||||||
AGC_DIFF_CONFIG_TC(ic,band);\
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
|
|
||||||
//============================================================
|
|
||||||
// structure and define
|
|
||||||
//============================================================
|
|
||||||
|
|
||||||
typedef struct _Phy_Rx_AGC_Info
|
|
||||||
{
|
|
||||||
#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
|
|
||||||
u1Byte gain:7,trsw:1;
|
|
||||||
#else
|
|
||||||
u1Byte trsw:1,gain:7;
|
|
||||||
#endif
|
|
||||||
} PHY_RX_AGC_INFO_T,*pPHY_RX_AGC_INFO_T;
|
|
||||||
|
|
||||||
typedef struct _Phy_Status_Rpt_8192cd
|
|
||||||
{
|
|
||||||
PHY_RX_AGC_INFO_T path_agc[2];
|
|
||||||
u1Byte ch_corr[2];
|
|
||||||
u1Byte cck_sig_qual_ofdm_pwdb_all;
|
|
||||||
u1Byte cck_agc_rpt_ofdm_cfosho_a;
|
|
||||||
u1Byte cck_rpt_b_ofdm_cfosho_b;
|
|
||||||
u1Byte rsvd_1;//ch_corr_msb;
|
|
||||||
u1Byte noise_power_db_msb;
|
|
||||||
s1Byte path_cfotail[2];
|
|
||||||
u1Byte pcts_mask[2];
|
|
||||||
s1Byte stream_rxevm[2];
|
|
||||||
u1Byte path_rxsnr[2];
|
|
||||||
u1Byte noise_power_db_lsb;
|
|
||||||
u1Byte rsvd_2[3];
|
|
||||||
u1Byte stream_csi[2];
|
|
||||||
u1Byte stream_target_csi[2];
|
|
||||||
s1Byte sig_evm;
|
|
||||||
u1Byte rsvd_3;
|
|
||||||
|
|
||||||
#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
|
|
||||||
u1Byte antsel_rx_keep_2:1; //ex_intf_flg:1;
|
|
||||||
u1Byte sgi_en:1;
|
|
||||||
u1Byte rxsc:2;
|
|
||||||
u1Byte idle_long:1;
|
|
||||||
u1Byte r_ant_train_en:1;
|
|
||||||
u1Byte ant_sel_b:1;
|
|
||||||
u1Byte ant_sel:1;
|
|
||||||
#else // _BIG_ENDIAN_
|
|
||||||
u1Byte ant_sel:1;
|
|
||||||
u1Byte ant_sel_b:1;
|
|
||||||
u1Byte r_ant_train_en:1;
|
|
||||||
u1Byte idle_long:1;
|
|
||||||
u1Byte rxsc:2;
|
|
||||||
u1Byte sgi_en:1;
|
|
||||||
u1Byte antsel_rx_keep_2:1; //ex_intf_flg:1;
|
|
||||||
#endif
|
|
||||||
} PHY_STATUS_RPT_8192CD_T,*PPHY_STATUS_RPT_8192CD_T;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _Phy_Status_Rpt_8812
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
PHY_RX_AGC_INFO_T path_agc[2];
|
|
||||||
u1Byte ch_num[2];
|
|
||||||
u1Byte cck_sig_qual_ofdm_pwdb_all;
|
|
||||||
u1Byte cck_agc_rpt_ofdm_cfosho_a;
|
|
||||||
u1Byte cck_bb_pwr_ofdm_cfosho_b;
|
|
||||||
u1Byte cck_rx_path; //CCK_RX_PATH [3:0] (with regA07[3:0] definition)
|
|
||||||
u1Byte rsvd_1;
|
|
||||||
u1Byte path_cfotail[2];
|
|
||||||
u1Byte pcts_mask[2];
|
|
||||||
s1Byte stream_rxevm[2];
|
|
||||||
u1Byte path_rxsnr[2];
|
|
||||||
u1Byte rsvd_2[2];
|
|
||||||
u1Byte stream_snr[2];
|
|
||||||
u1Byte stream_csi[2];
|
|
||||||
u1Byte rsvd_3[2];
|
|
||||||
s1Byte sig_evm;
|
|
||||||
u1Byte rsvd_4;
|
|
||||||
#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
|
|
||||||
u1Byte antidx_anta:3;
|
|
||||||
u1Byte antidx_antb:3;
|
|
||||||
u1Byte rsvd_5:2;
|
|
||||||
#else // _BIG_ENDIAN_
|
|
||||||
u1Byte rsvd_5:2;
|
|
||||||
u1Byte antidx_antb:3;
|
|
||||||
u1Byte antidx_anta:3;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//2012.05.24 LukeLee: This structure should take big/little endian in consideration later.....
|
|
||||||
|
|
||||||
//DWORD 0
|
|
||||||
u1Byte gain_trsw[2];
|
|
||||||
#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
|
|
||||||
u2Byte chl_num:10;
|
|
||||||
u2Byte sub_chnl:4;
|
|
||||||
u2Byte r_RFMOD:2;
|
|
||||||
#else // _BIG_ENDIAN_
|
|
||||||
u2Byte r_RFMOD:2;
|
|
||||||
u2Byte sub_chnl:4;
|
|
||||||
u2Byte chl_num:10;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//DWORD 1
|
|
||||||
u1Byte pwdb_all;
|
|
||||||
u1Byte cfosho[4]; // DW 1 byte 1 DW 2 byte 0
|
|
||||||
|
|
||||||
//DWORD 2
|
|
||||||
s1Byte cfotail[4]; // DW 2 byte 1 DW 3 byte 0
|
|
||||||
|
|
||||||
//DWORD 3
|
|
||||||
s1Byte rxevm[2]; // DW 3 byte 1 DW 3 byte 2
|
|
||||||
s1Byte rxsnr[2]; // DW 3 byte 3 DW 4 byte 0
|
|
||||||
|
|
||||||
//DWORD 4
|
|
||||||
u1Byte PCTS_MSK_RPT[2];
|
|
||||||
u1Byte pdsnr[2]; // DW 4 byte 3 DW 5 Byte 0
|
|
||||||
|
|
||||||
//DWORD 5
|
|
||||||
u1Byte csi_current[2];
|
|
||||||
u1Byte rx_gain_c;
|
|
||||||
|
|
||||||
//DWORD 6
|
|
||||||
u1Byte rx_gain_d;
|
|
||||||
s1Byte sigevm;
|
|
||||||
u1Byte resvd_0;
|
|
||||||
u1Byte antidx_anta:3;
|
|
||||||
u1Byte antidx_antb:3;
|
|
||||||
u1Byte resvd_1:2;
|
|
||||||
} PHY_STATUS_RPT_8812_T,*PPHY_STATUS_RPT_8812_T;
|
|
||||||
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_Init_RSSIForDM(
|
|
||||||
IN OUT PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_PhyStatusQuery(
|
|
||||||
IN OUT PDM_ODM_T pDM_Odm,
|
|
||||||
OUT PODM_PHY_INFO_T pPhyInfo,
|
|
||||||
IN pu1Byte pPhyStatus,
|
|
||||||
IN PODM_PACKET_INFO_T pPktinfo
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_MacStatusQuery(
|
|
||||||
IN OUT PDM_ODM_T pDM_Odm,
|
|
||||||
IN pu1Byte pMacStatus,
|
|
||||||
IN u1Byte MacID,
|
|
||||||
IN BOOLEAN bPacketMatchBSSID,
|
|
||||||
IN BOOLEAN bPacketToSelf,
|
|
||||||
IN BOOLEAN bPacketBeacon
|
|
||||||
);
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE|ODM_AP))
|
|
||||||
|
|
||||||
HAL_STATUS
|
|
||||||
ODM_ConfigRFWithTxPwrTrackHeaderFile(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
HAL_STATUS
|
|
||||||
ODM_ConfigRFWithHeaderFile(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN ODM_RF_Config_Type ConfigType,
|
|
||||||
IN ODM_RF_RADIO_PATH_E eRFPath
|
|
||||||
);
|
|
||||||
|
|
||||||
HAL_STATUS
|
|
||||||
ODM_ConfigBBWithHeaderFile(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN ODM_BB_Config_Type ConfigType
|
|
||||||
);
|
|
||||||
|
|
||||||
HAL_STATUS
|
|
||||||
ODM_ConfigMACWithHeaderFile(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
HAL_STATUS
|
|
||||||
ODM_ConfigFWWithHeaderFile(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN ODM_FW_Config_Type ConfigType,
|
|
||||||
OUT u1Byte *pFirmware,
|
|
||||||
OUT u4Byte *pSize
|
|
||||||
);
|
|
||||||
|
|
||||||
u4Byte
|
|
||||||
ODM_GetHWImgVersion(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
);
|
|
||||||
|
|
||||||
s4Byte
|
|
||||||
odm_SignalScaleMapping(
|
|
||||||
IN OUT PDM_ODM_T pDM_Odm,
|
|
||||||
IN s4Byte CurrSig
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,165 +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 __ODMRAINFO_H__
|
|
||||||
#define __ODMRAINFO_H__
|
|
||||||
|
|
||||||
#define AP_InitRateAdaptiveState ODM_RateAdaptiveStateApInit
|
|
||||||
|
|
||||||
#define DM_RATR_STA_INIT 0
|
|
||||||
#define DM_RATR_STA_HIGH 1
|
|
||||||
#define DM_RATR_STA_MIDDLE 2
|
|
||||||
#define DM_RATR_STA_LOW 3
|
|
||||||
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
|
|
||||||
#define DM_RATR_STA_ULTRA_LOW 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
typedef struct _Rate_Adaptive_Table_{
|
|
||||||
u1Byte firstconnect;
|
|
||||||
#if(DM_ODM_SUPPORT_TYPE==ODM_WIN)
|
|
||||||
BOOLEAN PT_collision_pre;
|
|
||||||
#endif
|
|
||||||
}RA_T, *pRA_T;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct _ODM_RATE_ADAPTIVE
|
|
||||||
{
|
|
||||||
u1Byte Type; // DM_Type_ByFW/DM_Type_ByDriver
|
|
||||||
u1Byte HighRSSIThresh; // if RSSI > HighRSSIThresh => RATRState is DM_RATR_STA_HIGH
|
|
||||||
u1Byte LowRSSIThresh; // if RSSI <= LowRSSIThresh => RATRState is DM_RATR_STA_LOW
|
|
||||||
u1Byte RATRState; // Current RSSI level, DM_RATR_STA_HIGH/DM_RATR_STA_MIDDLE/DM_RATR_STA_LOW
|
|
||||||
|
|
||||||
#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
|
||||||
u1Byte LdpcThres; // if RSSI > LdpcThres => switch from LPDC to BCC
|
|
||||||
BOOLEAN bLowerRtsRate;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
|
||||||
u1Byte RtsThres;
|
|
||||||
#elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
|
|
||||||
BOOLEAN bUseLdpc;
|
|
||||||
#else
|
|
||||||
u1Byte UltraLowRSSIThresh;
|
|
||||||
u4Byte LastRATR; // RATR Register Content
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} ODM_RATE_ADAPTIVE, *PODM_RATE_ADAPTIVE;
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RSSIMonitorInit(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RSSIMonitorCheck(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
#if(DM_ODM_SUPPORT_TYPE==ODM_WIN)
|
|
||||||
VOID
|
|
||||||
odm_RSSIDumpToRegister(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RSSIMonitorCheckMP(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RSSIMonitorCheckCE(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RSSIMonitorCheckAP(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RateAdaptiveMaskInit(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RefreshRateAdaptiveMask(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RefreshRateAdaptiveMaskMP(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RefreshRateAdaptiveMaskCE(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RefreshRateAdaptiveMaskAPADSL(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
ODM_RAStateCheck(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN s4Byte RSSI,
|
|
||||||
IN BOOLEAN bForceUpdate,
|
|
||||||
OUT pu1Byte pRATRState
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
odm_RefreshBasicRateMask(
|
|
||||||
IN PVOID pDM_VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
|
||||||
VOID
|
|
||||||
ODM_DynamicARFBSelect(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN u1Byte rate,
|
|
||||||
IN BOOLEAN Collision_State
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
ODM_RateAdaptiveStateApInit(
|
|
||||||
IN PVOID PADAPTER_VOID,
|
|
||||||
IN PRT_WLAN_STA pEntry
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
|
||||||
u4Byte
|
|
||||||
ODM_Get_Rate_Bitmap(
|
|
||||||
IN PVOID pDM_VOID,
|
|
||||||
IN u4Byte macid,
|
|
||||||
IN u4Byte ra_mask,
|
|
||||||
IN u1Byte rssi_level
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif //#ifndef __ODMRAINFO_H__
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,313 +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 __ODM_PRECOMP_H__
|
|
||||||
#define __ODM_PRECOMP_H__
|
|
||||||
|
|
||||||
#include "odm_types.h"
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
|
||||||
#include "Precomp.h" // We need to include mp_precomp.h due to batch file setting.
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define TEST_FALG___ 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//2 Config Flags and Structs - defined by each ODM Type
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
|
|
||||||
#include "../8192cd_cfg.h"
|
|
||||||
#include "../odm_inc.h"
|
|
||||||
|
|
||||||
#include "../8192cd.h"
|
|
||||||
#include "../8192cd_util.h"
|
|
||||||
#ifdef _BIG_ENDIAN_
|
|
||||||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG
|
|
||||||
#else
|
|
||||||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AP_BUILD_WORKAROUND
|
|
||||||
#include "../8192cd_headers.h"
|
|
||||||
#include "../8192cd_debug.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_ADSL)
|
|
||||||
// Flags
|
|
||||||
#include "../8192cd_cfg.h" // OUTSRC needs ADSL config flags.
|
|
||||||
#include "../odm_inc.h" // OUTSRC needs some extra flags.
|
|
||||||
// Data Structure
|
|
||||||
#include "../common_types.h" // OUTSRC and rtl8192cd both needs basic type such as UINT8 and BIT0.
|
|
||||||
#include "../8192cd.h" // OUTSRC needs basic ADSL struct definition.
|
|
||||||
#include "../8192cd_util.h" // OUTSRC needs basic I/O function.
|
|
||||||
#ifdef _BIG_ENDIAN_
|
|
||||||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG
|
|
||||||
#else
|
|
||||||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ADSL_AP_BUILD_WORKAROUND
|
|
||||||
// NESTED_INC: Functions defined outside should not be included!! Marked by Annie, 2011-10-14.
|
|
||||||
#include "../8192cd_headers.h"
|
|
||||||
#include "../8192cd_debug.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE ==ODM_CE)
|
|
||||||
//#include <drv_conf.h>
|
|
||||||
//#include <basic_types.h>
|
|
||||||
//#include <osdep_service.h>
|
|
||||||
//#include <drv_types.h>
|
|
||||||
//#include <rtw_byteorder.h>
|
|
||||||
//#include <hal_intf.h>
|
|
||||||
#define BEAMFORMING_SUPPORT 0
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
|
||||||
#include "Mp_Precomp.h"
|
|
||||||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//2 Hardware Parameter Files
|
|
||||||
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
|
|
||||||
#if (RTL8192C_SUPPORT==1)
|
|
||||||
#include "rtl8192c/Hal8192CEFWImg_AP.h"
|
|
||||||
#include "rtl8192c/Hal8192CEPHYImg_AP.h"
|
|
||||||
#include "rtl8192c/Hal8192CEMACImg_AP.h"
|
|
||||||
#endif
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_ADSL)
|
|
||||||
#include "rtl8192c/Hal8192CEFWImg_ADSL.h"
|
|
||||||
#include "rtl8192c/Hal8192CEPHYImg_ADSL.h"
|
|
||||||
#include "rtl8192c/Hal8192CEMACImg_ADSL.h"
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
|
||||||
#if(RTL8192CE_SUPPORT ==1)
|
|
||||||
#include "rtl8192c/Hal8192CEFWImg_CE.h"
|
|
||||||
#include "rtl8192c/Hal8192CEPHYImg_CE.h"
|
|
||||||
#include "rtl8192c/Hal8192CEMACImg_CE.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(RTL8192CU_SUPPORT ==1)
|
|
||||||
#include "rtl8192c/Hal8192CUFWImg_CE.h"
|
|
||||||
#include "rtl8192c/Hal8192CUPHYImg_CE.h"
|
|
||||||
#include "rtl8192c/Hal8192CUMACImg_CE.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(RTL8192DE_SUPPORT ==1)
|
|
||||||
#include "rtl8192d/Hal8192DEFWImg_CE.h"
|
|
||||||
#include "rtl8192d/Hal8192DEPHYImg_CE.h"
|
|
||||||
#include "rtl8192d/Hal8192DEMACImg_CE.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(RTL8192DU_SUPPORT ==1)
|
|
||||||
#include "rtl8192d/Hal8192DUFWImg_CE.h"
|
|
||||||
#include "rtl8192d/Hal8192DUPHYImg_CE.h"
|
|
||||||
#include "rtl8192d/Hal8192DUMACImg_CE.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(RTL8723AS_SUPPORT==1)
|
|
||||||
#include "rtl8723a/Hal8723SHWImg_CE.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if(RTL8723AU_SUPPORT==1)
|
|
||||||
#include "rtl8723a/Hal8723UHWImg_CE.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//2 OutSrc Header Files
|
|
||||||
|
|
||||||
#include "odm.h"
|
|
||||||
#include "odm_HWConfig.h"
|
|
||||||
#include "odm_debug.h"
|
|
||||||
#include "odm_RegDefine11AC.h"
|
|
||||||
#include "odm_RegDefine11N.h"
|
|
||||||
#include "odm_AntDiv.h"
|
|
||||||
#include "odm_EdcaTurboCheck.h"
|
|
||||||
#include "odm_DIG.h"
|
|
||||||
#include "odm_PathDiv.h"
|
|
||||||
#include "odm_DynamicBBPowerSaving.h"
|
|
||||||
#include "odm_PowerTracking.h"
|
|
||||||
#include "odm_RaInfo.h"
|
|
||||||
#include "odm_DynamicTxPower.h"
|
|
||||||
#include "odm_CfoTracking.h"
|
|
||||||
#include "odm_ACS.h"
|
|
||||||
#include "odm_PowerTracking.h"
|
|
||||||
#include "odm_NoiseMonitor.h"
|
|
||||||
#include "PhyDM_Adaptivity.h"
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
|
||||||
#include "odm_RXHP.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
|
|
||||||
#if (RTL8192C_SUPPORT==1)
|
|
||||||
#include "rtl8192c/HalDMOutSrc8192C_AP.h"
|
|
||||||
#endif
|
|
||||||
#if (RTL8188E_SUPPORT==1)
|
|
||||||
#include "rtl8188e/Hal8188ERateAdaptive.h"//for RA,Power training
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_ADSL)
|
|
||||||
#include "rtl8192c/HalDMOutSrc8192C_ADSL.h"
|
|
||||||
|
|
||||||
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
|
||||||
//#include "hal_com.h"
|
|
||||||
#include "HalPhyRf.h"
|
|
||||||
#if (RTL8192C_SUPPORT==1)
|
|
||||||
#ifdef CONFIG_INTEL_PROXIM
|
|
||||||
#include "../proxim/intel_proxim.h"
|
|
||||||
#endif
|
|
||||||
#include "rtl8192c/HalDMOutSrc8192C_CE.h"
|
|
||||||
#include <rtl8192c_hal.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8192D_SUPPORT==1)
|
|
||||||
#include "rtl8192d/HalDMOutSrc8192D_CE.h"
|
|
||||||
#include "rtl8192d_hal.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8723A_SUPPORT==1)
|
|
||||||
#include "rtl8192c/HalDMOutSrc8192C_CE.h" //for IQK,LCK,Power-tracking
|
|
||||||
#include "rtl8723a_hal.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8188E_SUPPORT==1)
|
|
||||||
#include "rtl8188e/HalPhyRf_8188e.h"//for IQK,LCK,Power-tracking
|
|
||||||
#include "rtl8188e/Hal8188ERateAdaptive.h"//for RA,Power training
|
|
||||||
#include "rtl8188e_hal.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8192E_SUPPORT==1)
|
|
||||||
#include "rtl8192e/HalPhyRf_8192e.h"//for IQK,LCK,Power-tracking
|
|
||||||
#include "rtl8192e_hal.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8812A_SUPPORT==1)
|
|
||||||
#include "rtl8812a/HalPhyRf_8812A.h"//for IQK,LCK,Power-tracking
|
|
||||||
#include "rtl8812a_hal.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8821A_SUPPORT==1)
|
|
||||||
#include "rtl8821a/HalPhyRf_8821A.h"//for IQK,LCK,Power-tracking
|
|
||||||
#include "rtl8812a/HalPhyRf_8812A.h"//for IQK,LCK,Power-tracking
|
|
||||||
#include "rtl8812a_hal.h"
|
|
||||||
#include "rtl8821a/PhyDM_IQK_8821A.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8723B_SUPPORT==1)
|
|
||||||
#include "rtl8723b/HalPhyRf_8723B.h"//for IQK,LCK,Power-tracking
|
|
||||||
#include "rtl8723b_hal.h"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "odm_interface.h"
|
|
||||||
#include "odm_reg.h"
|
|
||||||
|
|
||||||
#if (RTL8192C_SUPPORT==1)
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
|
|
||||||
#include "rtl8192c/Hal8192CHWImg_MAC.h"
|
|
||||||
#include "rtl8192c/Hal8192CHWImg_RF.h"
|
|
||||||
#include "rtl8192c/Hal8192CHWImg_BB.h"
|
|
||||||
#include "rtl8192c/Hal8192CHWImg_FW.h"
|
|
||||||
#endif
|
|
||||||
#include "rtl8192c/odm_RTL8192C.h"
|
|
||||||
#endif
|
|
||||||
#if (RTL8192D_SUPPORT==1)
|
|
||||||
#include "rtl8192d/odm_RTL8192D.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8723A_SUPPORT==1)
|
|
||||||
#include "rtl8723a/HalHWImg8723A_MAC.h"
|
|
||||||
#include "rtl8723a/HalHWImg8723A_RF.h"
|
|
||||||
#include "rtl8723a/HalHWImg8723A_BB.h"
|
|
||||||
#include "rtl8723a/HalHWImg8723A_FW.h"
|
|
||||||
#include "rtl8723a/odm_RegConfig8723A.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8188E_SUPPORT==1)
|
|
||||||
#include "rtl8188e/HalHWImg8188E_MAC.h"
|
|
||||||
#include "rtl8188e/HalHWImg8188E_RF.h"
|
|
||||||
#include "rtl8188e/HalHWImg8188E_BB.h"
|
|
||||||
#include "rtl8188e/HalHWImg8188E_FW.h"
|
|
||||||
#include "rtl8188e/Hal8188EReg.h"
|
|
||||||
|
|
||||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
|
||||||
#include "rtl8188e/HalPhyRf_8188e.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (TESTCHIP_SUPPORT == 1)
|
|
||||||
#include "rtl8188e/HalHWImg8188E_TestChip_MAC.h"
|
|
||||||
#include "rtl8188e/HalHWImg8188E_TestChip_RF.h"
|
|
||||||
#include "rtl8188e/HalHWImg8188E_TestChip_BB.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include "rtl8188e/odm_RegConfig8188E.h"
|
|
||||||
#include "rtl8188e/odm_RTL8188E.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8192E_SUPPORT==1)
|
|
||||||
#include "rtl8192e/HalHWImg8192E_MAC.h"
|
|
||||||
#include "rtl8192e/HalHWImg8192E_RF.h"
|
|
||||||
#include "rtl8192e/HalHWImg8192E_BB.h"
|
|
||||||
#include "rtl8192e/HalHWImg8192E_FW.h"
|
|
||||||
#include "rtl8192e/Hal8192EReg.h"
|
|
||||||
#include "rtl8192e/odm_RegConfig8192E.h"
|
|
||||||
#include "rtl8192e/odm_RTL8192E.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8723B_SUPPORT==1)
|
|
||||||
#include "rtl8723b/HalHWImg8723B_MAC.h"
|
|
||||||
#include "rtl8723b/HalHWImg8723B_RF.h"
|
|
||||||
#include "rtl8723b/HalHWImg8723B_BB.h"
|
|
||||||
#include "rtl8723b/HalHWImg8723B_FW.h"
|
|
||||||
#include "rtl8723b/HalHWImg8723B_MP.h"
|
|
||||||
#include "rtl8723b/Hal8723BReg.h"
|
|
||||||
#include "rtl8723b/odm_RTL8723B.h"
|
|
||||||
#include "rtl8723b/odm_RegConfig8723B.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (RTL8812A_SUPPORT==1)
|
|
||||||
#include "rtl8812a/HalHWImg8812A_MAC.h"
|
|
||||||
#include "rtl8812a/HalHWImg8812A_RF.h"
|
|
||||||
#include "rtl8812a/HalHWImg8812A_BB.h"
|
|
||||||
#include "rtl8812a/HalHWImg8812A_FW.h"
|
|
||||||
#include "rtl8812a/odm_RegConfig8812A.h"
|
|
||||||
#include "rtl8812a/odm_RTL8812A.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if (RTL8821A_SUPPORT==1)
|
|
||||||
#include "rtl8821a/HalHWImg8821A_MAC.h"
|
|
||||||
#include "rtl8821a/HalHWImg8821A_RF.h"
|
|
||||||
#include "rtl8821a/HalHWImg8821A_BB.h"
|
|
||||||
#include "rtl8821a/HalHWImg8821A_FW.h"
|
|
||||||
#include "rtl8821a/odm_RegConfig8821A.h"
|
|
||||||
#include "rtl8821a/odm_RTL8821A.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __ODM_PRECOMP_H__
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,291 +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 "../odm_precomp.h"
|
|
||||||
|
|
||||||
#if (RTL8192E_SUPPORT == 1)
|
|
||||||
static BOOLEAN
|
|
||||||
CheckPositive(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN const u4Byte Condition1,
|
|
||||||
IN const u4Byte Condition2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
u1Byte _BoardType = ((pDM_Odm->BoardType & BIT4) >> 4) << 0 | // _GLNA
|
|
||||||
((pDM_Odm->BoardType & BIT3) >> 3) << 1 | // _GPA
|
|
||||||
((pDM_Odm->BoardType & BIT7) >> 7) << 2 | // _ALNA
|
|
||||||
((pDM_Odm->BoardType & BIT6) >> 6) << 3 | // _APA
|
|
||||||
((pDM_Odm->BoardType & BIT2) >> 2) << 4; // _BT
|
|
||||||
|
|
||||||
u4Byte cond1 = Condition1, cond2 = Condition2;
|
|
||||||
u4Byte driver1 = pDM_Odm->CutVersion << 24 |
|
|
||||||
pDM_Odm->SupportPlatform << 16 |
|
|
||||||
pDM_Odm->PackageType << 12 |
|
|
||||||
pDM_Odm->SupportInterface << 8 |
|
|
||||||
_BoardType;
|
|
||||||
|
|
||||||
u4Byte driver2 = pDM_Odm->TypeGLNA << 0 |
|
|
||||||
pDM_Odm->TypeGPA << 8 |
|
|
||||||
pDM_Odm->TypeALNA << 16 |
|
|
||||||
pDM_Odm->TypeAPA << 24;
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
|
|
||||||
("===> [8812A] CheckPositive (cond1, cond2) = (0x%X 0x%X)\n", cond1, cond2));
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
|
|
||||||
("===> [8812A] CheckPositive (driver1, driver2) = (0x%X 0x%X)\n", driver1, driver2));
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
|
|
||||||
(" (Platform, Interface) = (0x%X, 0x%X)\n", pDM_Odm->SupportPlatform, pDM_Odm->SupportInterface));
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
|
|
||||||
(" (Board, Package) = (0x%X, 0x%X)\n", pDM_Odm->BoardType, pDM_Odm->PackageType));
|
|
||||||
|
|
||||||
|
|
||||||
//============== Value Defined Check ===============//
|
|
||||||
//QFN Type [15:12] and Cut Version [27:24] need to do value check
|
|
||||||
|
|
||||||
if(((cond1 & 0x0000F000) != 0) &&((cond1 & 0x0000F000) != (driver1 & 0x0000F000)))
|
|
||||||
return FALSE;
|
|
||||||
if(((cond1 & 0x0F000000) != 0) &&((cond1 & 0x0F000000) != (driver1 & 0x0F000000)))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
//=============== Bit Defined Check ================//
|
|
||||||
// We don't care [31:28] and [23:20]
|
|
||||||
//
|
|
||||||
cond1 &= 0x000F0FFF;
|
|
||||||
driver1 &= 0x000F0FFF;
|
|
||||||
|
|
||||||
if ((cond1 & driver1) == cond1)
|
|
||||||
{
|
|
||||||
u4Byte bitMask = 0;
|
|
||||||
if ((cond1 & 0x0F) == 0) // BoardType is DONTCARE
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
if ((cond1 & BIT0) != 0) //GLNA
|
|
||||||
bitMask |= 0x000000FF;
|
|
||||||
if ((cond1 & BIT1) != 0) //GPA
|
|
||||||
bitMask |= 0x0000FF00;
|
|
||||||
if ((cond1 & BIT2) != 0) //ALNA
|
|
||||||
bitMask |= 0x00FF0000;
|
|
||||||
if ((cond1 & BIT3) != 0) //APA
|
|
||||||
bitMask |= 0xFF000000;
|
|
||||||
|
|
||||||
if ((cond2 & bitMask) == (driver2 & bitMask)) // BoardType of each RF path is matched
|
|
||||||
return TRUE;
|
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static BOOLEAN
|
|
||||||
CheckNegative(
|
|
||||||
IN PDM_ODM_T pDM_Odm,
|
|
||||||
IN const u4Byte Condition1,
|
|
||||||
IN const u4Byte Condition2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* MAC_REG.TXT
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
u4Byte Array_MP_8192E_MAC_REG[] = {
|
|
||||||
0x011, 0x000000EB,
|
|
||||||
0x012, 0x00000007,
|
|
||||||
0x014, 0x00000075,
|
|
||||||
0x303, 0x000000A7,
|
|
||||||
0x428, 0x0000000A,
|
|
||||||
0x429, 0x00000010,
|
|
||||||
0x430, 0x00000000,
|
|
||||||
0x431, 0x00000000,
|
|
||||||
0x432, 0x00000000,
|
|
||||||
0x433, 0x00000001,
|
|
||||||
0x434, 0x00000004,
|
|
||||||
0x435, 0x00000005,
|
|
||||||
0x436, 0x00000007,
|
|
||||||
0x437, 0x00000008,
|
|
||||||
0x43C, 0x00000004,
|
|
||||||
0x43D, 0x00000005,
|
|
||||||
0x43E, 0x00000007,
|
|
||||||
0x43F, 0x00000008,
|
|
||||||
0x440, 0x0000005D,
|
|
||||||
0x441, 0x00000001,
|
|
||||||
0x442, 0x00000000,
|
|
||||||
0x444, 0x00000010,
|
|
||||||
0x445, 0x00000000,
|
|
||||||
0x446, 0x00000000,
|
|
||||||
0x447, 0x00000000,
|
|
||||||
0x448, 0x00000000,
|
|
||||||
0x449, 0x000000F0,
|
|
||||||
0x44A, 0x0000000F,
|
|
||||||
0x44B, 0x0000003E,
|
|
||||||
0x44C, 0x00000010,
|
|
||||||
0x44D, 0x00000000,
|
|
||||||
0x44E, 0x00000000,
|
|
||||||
0x44F, 0x00000000,
|
|
||||||
0x450, 0x00000000,
|
|
||||||
0x451, 0x000000F0,
|
|
||||||
0x452, 0x0000000F,
|
|
||||||
0x453, 0x00000000,
|
|
||||||
0x456, 0x0000005E,
|
|
||||||
0x460, 0x00000066,
|
|
||||||
0x461, 0x00000066,
|
|
||||||
0x4C8, 0x000000FF,
|
|
||||||
0x4C9, 0x00000008,
|
|
||||||
0x4CC, 0x000000FF,
|
|
||||||
0x4CD, 0x000000FF,
|
|
||||||
0x4CE, 0x00000001,
|
|
||||||
0x500, 0x00000026,
|
|
||||||
0x501, 0x000000A2,
|
|
||||||
0x502, 0x0000002F,
|
|
||||||
0x503, 0x00000000,
|
|
||||||
0x504, 0x00000028,
|
|
||||||
0x505, 0x000000A3,
|
|
||||||
0x506, 0x0000005E,
|
|
||||||
0x507, 0x00000000,
|
|
||||||
0x508, 0x0000002B,
|
|
||||||
0x509, 0x000000A4,
|
|
||||||
0x50A, 0x0000005E,
|
|
||||||
0x50B, 0x00000000,
|
|
||||||
0x50C, 0x0000004F,
|
|
||||||
0x50D, 0x000000A4,
|
|
||||||
0x50E, 0x00000000,
|
|
||||||
0x50F, 0x00000000,
|
|
||||||
0x512, 0x0000001C,
|
|
||||||
0x514, 0x0000000A,
|
|
||||||
0x516, 0x0000000A,
|
|
||||||
0x525, 0x0000004F,
|
|
||||||
0x540, 0x00000012,
|
|
||||||
0x541, 0x00000064,
|
|
||||||
0x550, 0x00000010,
|
|
||||||
0x551, 0x00000010,
|
|
||||||
0x559, 0x00000002,
|
|
||||||
0x55C, 0x00000050,
|
|
||||||
0x55D, 0x000000FF,
|
|
||||||
0x605, 0x00000030,
|
|
||||||
0x608, 0x0000000E,
|
|
||||||
0x609, 0x0000002A,
|
|
||||||
0x620, 0x000000FF,
|
|
||||||
0x621, 0x000000FF,
|
|
||||||
0x622, 0x000000FF,
|
|
||||||
0x623, 0x000000FF,
|
|
||||||
0x624, 0x000000FF,
|
|
||||||
0x625, 0x000000FF,
|
|
||||||
0x626, 0x000000FF,
|
|
||||||
0x627, 0x000000FF,
|
|
||||||
0x638, 0x00000050,
|
|
||||||
0x63C, 0x0000000A,
|
|
||||||
0x63D, 0x0000000A,
|
|
||||||
0x63E, 0x0000000E,
|
|
||||||
0x63F, 0x0000000E,
|
|
||||||
0x640, 0x00000040,
|
|
||||||
0x642, 0x00000040,
|
|
||||||
0x643, 0x00000000,
|
|
||||||
0x652, 0x0000002B,
|
|
||||||
0x66E, 0x00000005,
|
|
||||||
0x700, 0x00000021,
|
|
||||||
0x701, 0x00000043,
|
|
||||||
0x702, 0x00000065,
|
|
||||||
0x703, 0x00000087,
|
|
||||||
0x708, 0x00000021,
|
|
||||||
0x709, 0x00000043,
|
|
||||||
0x70A, 0x00000065,
|
|
||||||
0x70B, 0x00000087,
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
void
|
|
||||||
ODM_ReadAndConfig_MP_8192E_MAC_REG(
|
|
||||||
IN PDM_ODM_T pDM_Odm
|
|
||||||
)
|
|
||||||
{
|
|
||||||
u4Byte i = 0;
|
|
||||||
u1Byte cCond;
|
|
||||||
BOOLEAN bMatched = TRUE, bSkipped = FALSE;
|
|
||||||
//ask by Luke.Lee
|
|
||||||
u4Byte ArrayLen = sizeof(Array_MP_8192E_MAC_REG)/sizeof(u4Byte);
|
|
||||||
pu4Byte Array = Array_MP_8192E_MAC_REG;
|
|
||||||
|
|
||||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD, ("===> ODM_ReadAndConfig_MP_8192E_MAC_REG\n"));
|
|
||||||
|
|
||||||
while(( i+1) < ArrayLen)
|
|
||||||
{
|
|
||||||
u4Byte v1 = Array[i];
|
|
||||||
u4Byte v2 = Array[i+1];
|
|
||||||
|
|
||||||
if(v1 & (BIT31|BIT30)) //positive & negative condition
|
|
||||||
{
|
|
||||||
if(v1 & BIT31) // positive condition
|
|
||||||
{
|
|
||||||
cCond = (u1Byte)((v1 & (BIT29|BIT28)) >> 28);
|
|
||||||
if(cCond == COND_ENDIF) //end
|
|
||||||
{
|
|
||||||
bMatched = TRUE;
|
|
||||||
bSkipped = FALSE;
|
|
||||||
}
|
|
||||||
else if(cCond == COND_ELSE) //else
|
|
||||||
{
|
|
||||||
bMatched = bSkipped?FALSE:TRUE;
|
|
||||||
}
|
|
||||||
else //if , else if
|
|
||||||
{
|
|
||||||
if(bSkipped)
|
|
||||||
bMatched = FALSE;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(CheckPositive(pDM_Odm, v1, v2))
|
|
||||||
{
|
|
||||||
bMatched = TRUE;
|
|
||||||
bSkipped = TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bMatched = FALSE;
|
|
||||||
bSkipped = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(v1 & BIT30){ //negative condition
|
|
||||||
//do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(bMatched)
|
|
||||||
odm_ConfigMAC_8192E(pDM_Odm, v1, (u1Byte)v2);
|
|
||||||
}
|
|
||||||
i = i + 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
u4Byte
|
|
||||||
ODM_GetVersion_MP_8192E_MAC_REG(void)
|
|
||||||
{
|
|
||||||
return 36;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // end of HWIMG_SUPPORT
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,24 +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 <Precomp.h>
|
|
||||||
//#include "odm_precomp.h"
|
|
||||||
//#include "../odm_precomp.h"
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3417
hal/btc/HalBtc8192e1Ant.c
Normal file
3417
hal/btc/HalBtc8192e1Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
226
hal/btc/HalBtc8192e1Ant.h
Normal file
226
hal/btc/HalBtc8192e1Ant.h
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8192E_SUPPORT == 1)
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8192E_1ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8192E_1ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8192E_1ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8192E_1ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8192E_1ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8192E_1ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8192E_1ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BT_INFO_8192E_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||||
|
(((_BT_INFO_EXT_&BIT(0))) ? true : false)
|
||||||
|
|
||||||
|
#define BTC_RSSI_COEX_THRESH_TOL_8192E_1ANT 2
|
||||||
|
|
||||||
|
#define BT_8192E_1ANT_WIFI_NOISY_THRESH 30 /* max: 255 */
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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_SPECIFIC_PKT = 0x3,
|
||||||
|
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||||
|
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||||
|
BT_8192E_1ANT_WIFI_STATUS_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8192e_1ant {
|
||||||
|
/* fw mechanism */
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
|
||||||
|
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
u32 arp_cnt;
|
||||||
|
|
||||||
|
u8 error_condition;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8192e_1ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 specific_pkt_period_cnt;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
s8 bt_rssi;
|
||||||
|
boolean bt_tx_rx_mask;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8192E_1ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8192E_1ANT_MAX];
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
boolean c2h_bt_page; /* Add for win8.1 page out issue */
|
||||||
|
boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
u32 pop_event_cnt;
|
||||||
|
u8 scan_ap_num;
|
||||||
|
|
||||||
|
u32 crc_ok_cck;
|
||||||
|
u32 crc_ok_11g;
|
||||||
|
u32 crc_ok_11n;
|
||||||
|
u32 crc_ok_11n_agg;
|
||||||
|
|
||||||
|
u32 crc_err_cck;
|
||||||
|
u32 crc_err_11g;
|
||||||
|
u32 crc_err_11n;
|
||||||
|
u32 crc_err_11n_agg;
|
||||||
|
|
||||||
|
boolean cck_lock;
|
||||||
|
boolean pre_ccklock;
|
||||||
|
u8 coex_table_type;
|
||||||
|
|
||||||
|
boolean force_lps_on;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8192e1ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e1ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e1ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8192e1ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e1ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e1ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e1ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e1ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e1ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e1ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e1ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8192e1ant_rf_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e1ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e1ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8192e1ant_coex_dm_reset(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e1ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e1ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e1ant_dbg_control(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 op_code, IN u8 op_len, IN u8 *pdata);
|
||||||
|
|
||||||
|
#else /* #if (RTL8192E_SUPPORT == 1) */
|
||||||
|
#define ex_halbtc8192e1ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8192e1ant_pre_load_firmware(btcoexist)
|
||||||
|
#define ex_halbtc8192e1ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8192e1ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8192e1ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e1ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e1ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e1ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e1ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e1ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e1ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8192e1ant_rf_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e1ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8192e1ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8192e1ant_coex_dm_reset(btcoexist)
|
||||||
|
#define ex_halbtc8192e1ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8192e1ant_display_coex_info(btcoexist)
|
||||||
|
#define ex_halbtc8192e1ant_dbg_control(btcoexist, op_code, op_len, pdata)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
4068
hal/btc/HalBtc8192e2Ant.c
Normal file
4068
hal/btc/HalBtc8192e2Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
199
hal/btc/HalBtc8192e2Ant.h
Normal file
199
hal/btc/HalBtc8192e2Ant.h
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8192E_SUPPORT == 1)
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8192E_2ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8192E_2ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8192E_2ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8192E_2ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8192E_2ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8192E_2ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8192E_2ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT 2
|
||||||
|
#define NOISY_AP_NUM_THRESH_8192E 10
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8192e_2ant {
|
||||||
|
/* fw mechanism */
|
||||||
|
u8 pre_bt_dec_pwr_lvl;
|
||||||
|
u8 cur_bt_dec_pwr_lvl;
|
||||||
|
u8 pre_fw_dac_swing_lvl;
|
||||||
|
u8 cur_fw_dac_swing_lvl;
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean reset_tdma_adjust;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean auto_tdma_adjust_low_rssi;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_rf_rx_lpf_shrink;
|
||||||
|
boolean cur_rf_rx_lpf_shrink;
|
||||||
|
u32 bt_rf_0x1e_backup;
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
boolean pre_dac_swing_on;
|
||||||
|
u32 pre_dac_swing_lvl;
|
||||||
|
boolean cur_dac_swing_on;
|
||||||
|
u32 cur_dac_swing_lvl;
|
||||||
|
boolean pre_adc_back_off;
|
||||||
|
boolean cur_adc_back_off;
|
||||||
|
boolean pre_agc_table_en;
|
||||||
|
boolean cur_agc_table_en;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
|
||||||
|
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
u8 pre_ss_type;
|
||||||
|
u8 cur_ss_type;
|
||||||
|
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
u8 cur_ra_mask_type;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8192e_2ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
u8 bt_rssi;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8192E_2ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8192E_2ANT_MAX];
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
u8 scan_ap_num;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8192e2ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e2ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8192e2ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e2ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e2ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e2ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e2ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e2ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e2ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8192e2ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8192e2ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e2ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8192e2ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else /* #if (RTL8192E_SUPPORT == 1) */
|
||||||
|
#define ex_halbtc8192e2ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8192e2ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8192e2ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8192e2ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e2ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e2ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e2ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e2ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e2ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8192e2ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8192e2ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8192e2ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8192e2ant_display_coex_info(btcoexist)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
4623
hal/btc/HalBtc8703b1Ant.c
Normal file
4623
hal/btc/HalBtc8703b1Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
343
hal/btc/HalBtc8703b1Ant.h
Normal file
343
hal/btc/HalBtc8703b1Ant.h
Normal file
@ -0,0 +1,343 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8703B_SUPPORT == 1)
|
||||||
|
/* *******************************************
|
||||||
|
* The following is for 8703B 1ANT BT Co-exist definition
|
||||||
|
* ******************************************* */
|
||||||
|
#define BT_AUTO_REPORT_ONLY_8703B_1ANT 1
|
||||||
|
#define BT_8703B_1ANT_ENABLE_GNTBT_TO_GPIO14 0
|
||||||
|
|
||||||
|
#define BT_INFO_8703B_1ANT_B_FTP BIT(7)
|
||||||
|
#define BT_INFO_8703B_1ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8703B_1ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8703B_1ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8703B_1ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8703B_1ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8703B_1ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8703B_1ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BT_INFO_8703B_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||||
|
(((_BT_INFO_EXT_&BIT(0))) ? true : false)
|
||||||
|
|
||||||
|
#define BTC_RSSI_COEX_THRESH_TOL_8703B_1ANT 2
|
||||||
|
|
||||||
|
#define BT_8703B_1ANT_WIFI_NOISY_THRESH 50 /* 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
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
enum bt_8703b_1ant_path_ctrl_owner {
|
||||||
|
BT_8703B_1ANT_PCO_BTSIDE = 0x0,
|
||||||
|
BT_8703B_1ANT_PCO_WLSIDE = 0x1,
|
||||||
|
BT_8703B_1ANT_PCO_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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_SPECIFIC_PKT = 0x3,
|
||||||
|
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||||
|
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||||
|
BT_8703B_1ANT_WIFI_STATUS_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8703b_1ant {
|
||||||
|
/* hw setting */
|
||||||
|
u8 pre_ant_pos_type;
|
||||||
|
u8 cur_ant_pos_type;
|
||||||
|
/* fw mechanism */
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
|
||||||
|
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
u32 arp_cnt;
|
||||||
|
|
||||||
|
u8 error_condition;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8703b_1ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
boolean bt_hi_pri_link_exist;
|
||||||
|
u8 num_of_profile;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 specific_pkt_period_cnt;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
s8 bt_rssi;
|
||||||
|
boolean bt_tx_rx_mask;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8703B_1ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8703B_1ANT_MAX];
|
||||||
|
boolean bt_whck_test;
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
boolean c2h_bt_page; /* Add for win8.1 page out issue */
|
||||||
|
boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
u32 pop_event_cnt;
|
||||||
|
u8 scan_ap_num;
|
||||||
|
|
||||||
|
u32 crc_ok_cck;
|
||||||
|
u32 crc_ok_11g;
|
||||||
|
u32 crc_ok_11n;
|
||||||
|
u32 crc_ok_11n_agg;
|
||||||
|
|
||||||
|
u32 crc_err_cck;
|
||||||
|
u32 crc_err_11g;
|
||||||
|
u32 crc_err_11n;
|
||||||
|
u32 crc_err_11n_agg;
|
||||||
|
|
||||||
|
boolean cck_lock;
|
||||||
|
boolean pre_ccklock;
|
||||||
|
boolean cck_ever_lock;
|
||||||
|
u8 coex_table_type;
|
||||||
|
|
||||||
|
boolean force_lps_on;
|
||||||
|
u32 wrong_profile_notification;
|
||||||
|
|
||||||
|
boolean concurrent_rx_mode_on;
|
||||||
|
|
||||||
|
u16 score_board;
|
||||||
|
};
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
struct psdscan_sta_8703b_1ant {
|
||||||
|
|
||||||
|
u32 ant_det_bt_le_channel; /* BT LE Channel ex:2412 */
|
||||||
|
u32 ant_det_bt_tx_time;
|
||||||
|
u32 ant_det_pre_psdscan_peak_val;
|
||||||
|
boolean ant_det_is_ant_det_available;
|
||||||
|
u32 ant_det_psd_scan_peak_val;
|
||||||
|
boolean ant_det_is_btreply_available;
|
||||||
|
u32 ant_det_psd_scan_peak_freq;
|
||||||
|
|
||||||
|
u8 ant_det_result;
|
||||||
|
u8 ant_det_peak_val[BT_8703B_1ANT_ANTDET_BUF_LEN];
|
||||||
|
u8 ant_det_peak_freq[BT_8703B_1ANT_ANTDET_BUF_LEN];
|
||||||
|
u32 ant_det_try_count;
|
||||||
|
u32 ant_det_fail_count;
|
||||||
|
u32 ant_det_inteval_count;
|
||||||
|
u32 ant_det_thres_offset;
|
||||||
|
|
||||||
|
u32 real_cent_freq;
|
||||||
|
s32 real_offset;
|
||||||
|
u32 real_span;
|
||||||
|
|
||||||
|
u32 psd_band_width; /* unit: Hz */
|
||||||
|
u32 psd_point; /* 128/256/512/1024 */
|
||||||
|
u32 psd_report[1024]; /* unit:dB (20logx), 0~255 */
|
||||||
|
u32 psd_report_max_hold[1024]; /* unit:dB (20logx), 0~255 */
|
||||||
|
u32 psd_start_point;
|
||||||
|
u32 psd_stop_point;
|
||||||
|
u32 psd_max_value_point;
|
||||||
|
u32 psd_max_value;
|
||||||
|
u32 psd_start_base;
|
||||||
|
u32 psd_avg_num; /* 1/8/16/32 */
|
||||||
|
u32 psd_gen_count;
|
||||||
|
boolean is_psd_running;
|
||||||
|
boolean is_psd_show_max_only;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8703b1ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8703b1ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8703b1ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8703b1ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8703b1ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8703b1ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8703b1ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8703b1ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8703b1ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8703b1ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8703b1ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8703b1ant_rf_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8703b1ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8703b1ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8703b1ant_ScoreBoardStatusNotify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8703b1ant_coex_dm_reset(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8703b1ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8703b1ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8703b1ant_antenna_detection(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds);
|
||||||
|
void ex_halbtc8703b1ant_antenna_isolation(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds);
|
||||||
|
|
||||||
|
void ex_halbtc8703b1ant_psd_scan(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds);
|
||||||
|
void ex_halbtc8703b1ant_display_ant_detection(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8703b1ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8703b1ant_pre_load_firmware(btcoexist)
|
||||||
|
#define ex_halbtc8703b1ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8703b1ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8703b1ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8703b1ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8703b1ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8703b1ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8703b1ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8703b1ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8703b1ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8703b1ant_rf_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8703b1ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8703b1ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8703b1ant_ScoreBoardStatusNotify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8703b1ant_coex_dm_reset(btcoexist)
|
||||||
|
#define ex_halbtc8703b1ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8703b1ant_display_coex_info(btcoexist)
|
||||||
|
#define ex_halbtc8703b1ant_antenna_detection(btcoexist, cent_freq, offset, span, seconds)
|
||||||
|
#define ex_halbtc8703b1ant_antenna_isolation(btcoexist, cent_freq, offset, span, seconds)
|
||||||
|
#define ex_halbtc8703b1ant_psd_scan(btcoexist, cent_freq, offset, span, seconds)
|
||||||
|
#define ex_halbtc8703b1ant_display_ant_detection(btcoexist)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
4845
hal/btc/HalBtc8723b1Ant.c
Normal file
4845
hal/btc/HalBtc8723b1Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
288
hal/btc/HalBtc8723b1Ant.h
Normal file
288
hal/btc/HalBtc8723b1Ant.h
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8723B_SUPPORT == 1)
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8723B_1ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8723B_1ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8723B_1ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8723B_1ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8723B_1ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8723B_1ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8723B_1ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BT_INFO_8723B_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||||
|
(((_BT_INFO_EXT_&BIT(0))) ? 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 32
|
||||||
|
#define BT_8723B_1ANT_ANTDET_RETRY_INTERVAL 10 /* retry timer if ant det is fail, unit: second */
|
||||||
|
#define BT_8723B_1ANT_ANTDET_SWEEPPOINT_DELAY 40000
|
||||||
|
#define BT_8723B_1ANT_ANTDET_ENABLE 1
|
||||||
|
#define BT_8723B_1ANT_ANTDET_COEXMECHANISMSWITCH_ENABLE 1
|
||||||
|
#define BT_8723B_1ANT_ANTDET_BTTXTIME 100
|
||||||
|
#define BT_8723B_1ANT_ANTDET_BTTXCHANNEL 39
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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_SPECIFIC_PKT = 0x3,
|
||||||
|
BT_8723B_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||||
|
BT_8723B_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||||
|
BT_8723B_1ANT_WIFI_STATUS_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8723b_1ant {
|
||||||
|
/* hw setting */
|
||||||
|
u8 pre_ant_pos_type;
|
||||||
|
u8 cur_ant_pos_type;
|
||||||
|
/* fw mechanism */
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
|
||||||
|
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
u32 arp_cnt;
|
||||||
|
|
||||||
|
u8 error_condition;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8723b_1ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
boolean bt_hi_pri_link_exist;
|
||||||
|
u8 num_of_profile;
|
||||||
|
boolean bt_abnormal_scan;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 specific_pkt_period_cnt;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
s8 bt_rssi;
|
||||||
|
boolean bt_tx_rx_mask;
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8723B_1ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8723B_1ANT_MAX];
|
||||||
|
boolean bt_whck_test;
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
boolean c2h_bt_remote_name_req;
|
||||||
|
boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
u32 pop_event_cnt;
|
||||||
|
u8 scan_ap_num;
|
||||||
|
|
||||||
|
u32 crc_ok_cck;
|
||||||
|
u32 crc_ok_11g;
|
||||||
|
u32 crc_ok_11n;
|
||||||
|
u32 crc_ok_11n_agg;
|
||||||
|
|
||||||
|
u32 crc_err_cck;
|
||||||
|
u32 crc_err_11g;
|
||||||
|
u32 crc_err_11n;
|
||||||
|
u32 crc_err_11n_agg;
|
||||||
|
|
||||||
|
boolean cck_lock;
|
||||||
|
boolean pre_ccklock;
|
||||||
|
boolean cck_ever_lock;
|
||||||
|
u8 coex_table_type;
|
||||||
|
|
||||||
|
boolean force_lps_on;
|
||||||
|
u32 wrong_profile_notification;
|
||||||
|
|
||||||
|
u8 a2dp_bit_pool;
|
||||||
|
u8 cut_version;
|
||||||
|
};
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
struct psdscan_sta_8723b_1ant {
|
||||||
|
|
||||||
|
u32 ant_det_bt_le_channel; /* BT LE Channel ex:2412 */
|
||||||
|
u32 ant_det_bt_tx_time;
|
||||||
|
u32 ant_det_pre_psdscan_peak_val;
|
||||||
|
boolean ant_det_is_ant_det_available;
|
||||||
|
u32 ant_det_psd_scan_peak_val;
|
||||||
|
boolean ant_det_is_btreply_available;
|
||||||
|
u32 ant_det_psd_scan_peak_freq;
|
||||||
|
|
||||||
|
u8 ant_det_result;
|
||||||
|
u8 ant_det_peak_val[BT_8723B_1ANT_ANTDET_BUF_LEN];
|
||||||
|
u8 ant_det_peak_freq[BT_8723B_1ANT_ANTDET_BUF_LEN];
|
||||||
|
u32 ant_det_try_count;
|
||||||
|
u32 ant_det_fail_count;
|
||||||
|
u32 ant_det_inteval_count;
|
||||||
|
u32 ant_det_thres_offset;
|
||||||
|
|
||||||
|
u32 real_cent_freq;
|
||||||
|
s32 real_offset;
|
||||||
|
u32 real_span;
|
||||||
|
|
||||||
|
u32 psd_band_width; /* unit: Hz */
|
||||||
|
u32 psd_point; /* 128/256/512/1024 */
|
||||||
|
u32 psd_report[1024]; /* unit:dB (20logx), 0~255 */
|
||||||
|
u32 psd_report_max_hold[1024]; /* unit:dB (20logx), 0~255 */
|
||||||
|
u32 psd_start_point;
|
||||||
|
u32 psd_stop_point;
|
||||||
|
u32 psd_max_value_point;
|
||||||
|
u32 psd_max_value;
|
||||||
|
u32 psd_start_base;
|
||||||
|
u32 psd_avg_num; /* 1/8/16/32 */
|
||||||
|
u32 psd_gen_count;
|
||||||
|
boolean is_psd_running;
|
||||||
|
boolean is_psd_show_max_only;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8723b1ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b1ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b1ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8723b1ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b1ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b1ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b1ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b1ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b1ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b1ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b1ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8723b1ant_rf_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b1ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b1ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8723b1ant_coex_dm_reset(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b1ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b1ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b1ant_antenna_detection(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds);
|
||||||
|
|
||||||
|
void ex_halbtc8723b1ant_display_ant_detection(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8723b1ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8723b1ant_pre_load_firmware(btcoexist)
|
||||||
|
#define ex_halbtc8723b1ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8723b1ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8723b1ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b1ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b1ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b1ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b1ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b1ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b1ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8723b1ant_rf_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b1ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8723b1ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8723b1ant_coex_dm_reset(btcoexist)
|
||||||
|
#define ex_halbtc8723b1ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8723b1ant_display_coex_info(btcoexist)
|
||||||
|
#define ex_halbtc8723b1ant_antenna_detection(btcoexist, cent_freq, offset, span, seconds)
|
||||||
|
#define ex_halbtc8723b1ant_display_ant_detection(btcoexist)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
4829
hal/btc/HalBtc8723b2Ant.c
Normal file
4829
hal/btc/HalBtc8723b2Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
214
hal/btc/HalBtc8723b2Ant.h
Normal file
214
hal/btc/HalBtc8723b2Ant.h
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8723B_SUPPORT == 1)
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8723B_2ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8723B_2ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8723B_2ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8723B_2ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8723B_2ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8723B_2ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8723B_2ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#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 */
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8723b_2ant {
|
||||||
|
/* fw mechanism */
|
||||||
|
u8 pre_bt_dec_pwr_lvl;
|
||||||
|
u8 cur_bt_dec_pwr_lvl;
|
||||||
|
u8 pre_fw_dac_swing_lvl;
|
||||||
|
u8 cur_fw_dac_swing_lvl;
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean reset_tdma_adjust;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_rf_rx_lpf_shrink;
|
||||||
|
boolean cur_rf_rx_lpf_shrink;
|
||||||
|
u32 bt_rf_0x1e_backup;
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
boolean pre_dac_swing_on;
|
||||||
|
u32 pre_dac_swing_lvl;
|
||||||
|
boolean cur_dac_swing_on;
|
||||||
|
u32 cur_dac_swing_lvl;
|
||||||
|
boolean pre_adc_back_off;
|
||||||
|
boolean cur_adc_back_off;
|
||||||
|
boolean pre_agc_table_en;
|
||||||
|
boolean cur_agc_table_en;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
boolean need_recover0x948;
|
||||||
|
u32 backup0x948;
|
||||||
|
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
boolean is_switch_to_1dot5_ant;
|
||||||
|
u8 switch_thres_offset;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8723b_2ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
boolean bt_abnormal_scan;
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
u8 bt_rssi;
|
||||||
|
boolean bt_tx_rx_mask;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8723B_2ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8723B_2ANT_MAX];
|
||||||
|
boolean bt_whck_test;
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
boolean c2h_bt_remote_name_req;
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
u32 pop_event_cnt;
|
||||||
|
u8 scan_ap_num;
|
||||||
|
|
||||||
|
u32 crc_ok_cck;
|
||||||
|
u32 crc_ok_11g;
|
||||||
|
u32 crc_ok_11n;
|
||||||
|
u32 crc_ok_11n_agg;
|
||||||
|
|
||||||
|
u32 crc_err_cck;
|
||||||
|
u32 crc_err_11g;
|
||||||
|
u32 crc_err_11n;
|
||||||
|
u32 crc_err_11n_agg;
|
||||||
|
|
||||||
|
u8 coex_table_type;
|
||||||
|
boolean force_lps_on;
|
||||||
|
|
||||||
|
u8 dis_ver_info_cnt;
|
||||||
|
|
||||||
|
u8 a2dp_bit_pool;
|
||||||
|
u8 cut_version;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8723b2ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b2ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b2ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8723b2ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b2ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b2ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b2ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b2ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b2ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b2ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8723b2ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8723b2ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b2ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8723b2ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8723b2ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8723b2ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8723b2ant_pre_load_firmware(btcoexist)
|
||||||
|
#define ex_halbtc8723b2ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8723b2ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8723b2ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b2ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b2ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b2ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b2ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b2ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8723b2ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8723b2ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8723b2ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8723b2ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8723b2ant_display_coex_info(btcoexist)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
3457
hal/btc/HalBtc8812a1Ant.c
Normal file
3457
hal/btc/HalBtc8812a1Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
230
hal/btc/HalBtc8812a1Ant.h
Normal file
230
hal/btc/HalBtc8812a1Ant.h
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8812A_SUPPORT == 1)
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8812A_1ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8812A_1ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8812A_1ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8812A_1ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8812A_1ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8812A_1ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8812A_1ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BT_INFO_8812A_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||||
|
(((_BT_INFO_EXT_&BIT(0))) ? true : false)
|
||||||
|
|
||||||
|
#define BTC_RSSI_COEX_THRESH_TOL_8812A_1ANT 2
|
||||||
|
|
||||||
|
#define BT_8812A_1ANT_WIFI_NOISY_THRESH 30 /* max: 255 */
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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_SPECIFIC_PKT = 0x3,
|
||||||
|
BT_8812A_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||||
|
BT_8812A_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||||
|
BT_8812A_1ANT_WIFI_STATUS_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8812a_1ant {
|
||||||
|
/* hw setting */
|
||||||
|
u8 pre_ant_pos_type;
|
||||||
|
u8 cur_ant_pos_type;
|
||||||
|
/* fw mechanism */
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
|
||||||
|
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
u32 arp_cnt;
|
||||||
|
|
||||||
|
u8 error_condition;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8812a_1ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 specific_pkt_period_cnt;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
s8 bt_rssi;
|
||||||
|
boolean bt_tx_rx_mask;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8812A_1ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8812A_1ANT_MAX];
|
||||||
|
u32 bt_info_query_cnt;
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
boolean c2h_bt_page; /* Add for win8.1 page out issue */
|
||||||
|
boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
u32 pop_event_cnt;
|
||||||
|
u8 scan_ap_num;
|
||||||
|
|
||||||
|
u32 crc_ok_cck;
|
||||||
|
u32 crc_ok_11g;
|
||||||
|
u32 crc_ok_11n;
|
||||||
|
u32 crc_ok_11n_agg;
|
||||||
|
|
||||||
|
u32 crc_err_cck;
|
||||||
|
u32 crc_err_11g;
|
||||||
|
u32 crc_err_11n;
|
||||||
|
u32 crc_err_11n_agg;
|
||||||
|
|
||||||
|
boolean cck_lock;
|
||||||
|
boolean pre_ccklock;
|
||||||
|
u8 coex_table_type;
|
||||||
|
|
||||||
|
boolean force_lps_on;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8812a1ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a1ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a1ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8812a1ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a1ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a1ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a1ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a1ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a1ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a1ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a1ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8812a1ant_rf_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a1ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a1ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8812a1ant_coex_dm_reset(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a1ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a1ant_dbg_control(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 op_code, IN u8 op_len, IN u8 *pdata);
|
||||||
|
void ex_halbtc8812a1ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8812a1ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8812a1ant_pre_load_firmware(btcoexist)
|
||||||
|
#define ex_halbtc8812a1ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8812a1ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8812a1ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a1ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a1ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a1ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a1ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a1ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a1ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8812a1ant_rf_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a1ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8812a1ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8812a1ant_coex_dm_reset(btcoexist)
|
||||||
|
#define ex_halbtc8812a1ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8812a1ant_dbg_control(btcoexist, op_code, op_len, pdata)
|
||||||
|
#define ex_halbtc8812a1ant_display_coex_info(btcoexist)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
4782
hal/btc/HalBtc8812a2Ant.c
Normal file
4782
hal/btc/HalBtc8812a2Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
202
hal/btc/HalBtc8812a2Ant.h
Normal file
202
hal/btc/HalBtc8812a2Ant.h
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8812A_SUPPORT == 1)
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8812A_2ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8812A_2ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8812A_2ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8812A_2ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8812A_2ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8812A_2ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8812A_2ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BT_INFO_8812A_2ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||||
|
(((_BT_INFO_EXT_&BIT(0))) ? true : false)
|
||||||
|
|
||||||
|
#define BTC_RSSI_COEX_THRESH_TOL_8812A_2ANT 2
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8812a_2ant {
|
||||||
|
/* fw mechanism */
|
||||||
|
u8 pre_bt_dec_pwr_lvl;
|
||||||
|
u8 cur_bt_dec_pwr_lvl;
|
||||||
|
u8 pre_fw_dac_swing_lvl;
|
||||||
|
u8 cur_fw_dac_swing_lvl;
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean auto_tdma_adjust_low_rssi;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_rf_rx_lpf_shrink;
|
||||||
|
boolean cur_rf_rx_lpf_shrink;
|
||||||
|
u32 bt_rf_0x1e_backup;
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
boolean pre_dac_swing_on;
|
||||||
|
u32 pre_dac_swing_lvl;
|
||||||
|
boolean cur_dac_swing_on;
|
||||||
|
u32 cur_dac_swing_lvl;
|
||||||
|
boolean pre_adc_back_off;
|
||||||
|
boolean cur_adc_back_off;
|
||||||
|
boolean pre_agc_table_en;
|
||||||
|
boolean cur_agc_table_en;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
u8 cur_ra_mask_type;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8812a_2ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
boolean acl_busy;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
u8 bt_rssi;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8812A_2ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8812A_2ANT_MAX];
|
||||||
|
u32 bt_info_query_cnt;
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8812a2ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a2ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8812a2ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a2ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a2ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a2ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a2ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a2ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a2ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8812a2ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8812a2ant_rf_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
|
||||||
|
void ex_halbtc8812a2ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a2ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a2ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8812a2ant_dbg_control(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 op_code, IN u8 op_len, IN u8 *pdata);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8812a2ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8812a2ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8812a2ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8812a2ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a2ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a2ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a2ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a2ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a2ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a2ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8812a2ant_rf_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8812a2ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8812a2ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8812a2ant_display_coex_info(btcoexist)
|
||||||
|
#define ex_halbtc8812a2ant_dbg_control(btcoexist, op_code, op_len, pdata)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
3100
hal/btc/HalBtc8821a1Ant.c
Normal file
3100
hal/btc/HalBtc8821a1Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
197
hal/btc/HalBtc8821a1Ant.h
Normal file
197
hal/btc/HalBtc8821a1Ant.h
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8821A_SUPPORT == 1)
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8821A_1ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8821A_1ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8821A_1ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8821A_1ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8821A_1ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8821A_1ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8821A_1ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BT_INFO_8821A_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||||
|
(((_BT_INFO_EXT_&BIT(0))) ? true : false)
|
||||||
|
|
||||||
|
#define BTC_RSSI_COEX_THRESH_TOL_8821A_1ANT 2
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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_SPECIFIC_PKT = 0x3,
|
||||||
|
BT_8821A_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||||
|
BT_8821A_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||||
|
BT_8821A_1ANT_WIFI_STATUS_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8821a_1ant {
|
||||||
|
/* fw mechanism */
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
|
||||||
|
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
u32 arp_cnt;
|
||||||
|
|
||||||
|
u8 error_condition;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8821a_1ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 specific_pkt_period_cnt;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
u8 bt_rssi;
|
||||||
|
boolean bt_tx_rx_mask;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8821A_1ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8821A_1ANT_MAX];
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
boolean c2h_bt_page; /* Add for win8.1 page out issue */
|
||||||
|
boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
boolean
|
||||||
|
bt_whck_test; /* Add for ASUS WHQL TEST that enable wifi test bt */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8821a1ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a1ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8821a1ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a1ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a1ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a1ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a1ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a1ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a1ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a1ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8821a1ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a1ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8821a1ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a1ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8821a1ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8821a1ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8821a1ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8821a1ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a1ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a1ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a1ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a1ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a1ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a1ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8821a1ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8821a1ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8821a1ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8821a1ant_display_coex_info(btcoexist)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
4560
hal/btc/HalBtc8821a2Ant.c
Normal file
4560
hal/btc/HalBtc8821a2Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
205
hal/btc/HalBtc8821a2Ant.h
Normal file
205
hal/btc/HalBtc8821a2Ant.h
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8821A_SUPPORT == 1)
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* 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 BIT(7)
|
||||||
|
#define BT_INFO_8821A_2ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8821A_2ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8821A_2ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8821A_2ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8821A_2ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8821A_2ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8821A_2ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#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 */
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8821a_2ant {
|
||||||
|
/* fw mechanism */
|
||||||
|
u8 pre_bt_dec_pwr_lvl;
|
||||||
|
u8 cur_bt_dec_pwr_lvl;
|
||||||
|
u8 pre_fw_dac_swing_lvl;
|
||||||
|
u8 cur_fw_dac_swing_lvl;
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[5];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean reset_tdma_adjust;
|
||||||
|
boolean auto_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_rf_rx_lpf_shrink;
|
||||||
|
boolean cur_rf_rx_lpf_shrink;
|
||||||
|
u32 bt_rf_0x1e_backup;
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
boolean pre_dac_swing_on;
|
||||||
|
u32 pre_dac_swing_lvl;
|
||||||
|
boolean cur_dac_swing_on;
|
||||||
|
u32 cur_dac_swing_lvl;
|
||||||
|
boolean pre_adc_back_off;
|
||||||
|
boolean cur_adc_back_off;
|
||||||
|
boolean pre_agc_table_en;
|
||||||
|
boolean cur_agc_table_en;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
|
||||||
|
boolean need_recover0x948;
|
||||||
|
u32 backup0x948;
|
||||||
|
|
||||||
|
u8 pre_lps;
|
||||||
|
u8 cur_lps;
|
||||||
|
u8 pre_rpwm;
|
||||||
|
u8 cur_rpwm;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8821a_2ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
u8 bt_rssi;
|
||||||
|
boolean bt_tx_rx_mask;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8821A_2ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8821A_2ANT_MAX];
|
||||||
|
boolean bt_whck_test;
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
|
||||||
|
u32 crc_ok_cck;
|
||||||
|
u32 crc_ok_11g;
|
||||||
|
u32 crc_ok_11n;
|
||||||
|
u32 crc_ok_11n_agg;
|
||||||
|
|
||||||
|
u32 crc_err_cck;
|
||||||
|
u32 crc_err_11g;
|
||||||
|
u32 crc_err_11n;
|
||||||
|
u32 crc_err_11n_agg;
|
||||||
|
|
||||||
|
u8 coex_table_type;
|
||||||
|
boolean force_lps_on;
|
||||||
|
|
||||||
|
u8 dis_ver_info_cnt;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8821a2ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a2ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a2ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8821a2ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a2ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a2ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a2ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a2ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a2ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a2ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821a2ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8821a2ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a2ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8821a2ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821a2ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8821a2ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8821a2ant_pre_load_firmware(btcoexist)
|
||||||
|
#define ex_halbtc8821a2ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8821a2ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8821a2ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a2ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a2ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a2ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a2ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a2ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821a2ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8821a2ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8821a2ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8821a2ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8821a2ant_display_coex_info(btcoexist)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
3997
hal/btc/HalBtc8821aCsr2Ant.c
Normal file
3997
hal/btc/HalBtc8821aCsr2Ant.c
Normal file
File diff suppressed because it is too large
Load Diff
188
hal/btc/HalBtc8821aCsr2Ant.h
Normal file
188
hal/btc/HalBtc8821aCsr2Ant.h
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
|
||||||
|
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||||
|
|
||||||
|
#if (RTL8821A_SUPPORT == 1)
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is for 8821A_CSR 2Ant BT Co-exist definition
|
||||||
|
* ******************************************* */
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_FTP BIT(7)
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_A2DP BIT(6)
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_HID BIT(5)
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_SCO_BUSY BIT(4)
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_ACL_BUSY BIT(3)
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_INQ_PAGE BIT(2)
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_SCO_ESCO BIT(1)
|
||||||
|
#define BT_INFO_8821A_CSR_2ANT_B_CONNECTION BIT(0)
|
||||||
|
|
||||||
|
#define BTC_RSSI_COEX_THRESH_TOL_8821A_CSR_2ANT 2
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_dm_8821a_csr_2ant {
|
||||||
|
/* fw mechanism */
|
||||||
|
boolean pre_dec_bt_pwr;
|
||||||
|
boolean cur_dec_bt_pwr;
|
||||||
|
u8 pre_fw_dac_swing_lvl;
|
||||||
|
u8 cur_fw_dac_swing_lvl;
|
||||||
|
boolean cur_ignore_wlan_act;
|
||||||
|
boolean pre_ignore_wlan_act;
|
||||||
|
u8 pre_ps_tdma;
|
||||||
|
u8 cur_ps_tdma;
|
||||||
|
u8 ps_tdma_para[6];
|
||||||
|
u8 ps_tdma_du_adj_type;
|
||||||
|
boolean reset_tdma_adjust;
|
||||||
|
boolean pre_ps_tdma_on;
|
||||||
|
boolean cur_ps_tdma_on;
|
||||||
|
boolean pre_bt_auto_report;
|
||||||
|
boolean cur_bt_auto_report;
|
||||||
|
|
||||||
|
/* sw mechanism */
|
||||||
|
boolean pre_rf_rx_lpf_shrink;
|
||||||
|
boolean cur_rf_rx_lpf_shrink;
|
||||||
|
u32 bt_rf_0x1e_backup;
|
||||||
|
boolean pre_low_penalty_ra;
|
||||||
|
boolean cur_low_penalty_ra;
|
||||||
|
boolean pre_dac_swing_on;
|
||||||
|
u32 pre_dac_swing_lvl;
|
||||||
|
boolean cur_dac_swing_on;
|
||||||
|
u32 cur_dac_swing_lvl;
|
||||||
|
boolean pre_adc_back_off;
|
||||||
|
boolean cur_adc_back_off;
|
||||||
|
boolean pre_agc_table_en;
|
||||||
|
boolean cur_agc_table_en;
|
||||||
|
u32 pre_val0x6c0;
|
||||||
|
u32 cur_val0x6c0;
|
||||||
|
u32 pre_val0x6c4;
|
||||||
|
u32 cur_val0x6c4;
|
||||||
|
u32 pre_val0x6c8;
|
||||||
|
u32 cur_val0x6c8;
|
||||||
|
u8 pre_val0x6cc;
|
||||||
|
u8 cur_val0x6cc;
|
||||||
|
boolean limited_dig;
|
||||||
|
|
||||||
|
u32 pre_ra_mask;
|
||||||
|
u32 cur_ra_mask;
|
||||||
|
|
||||||
|
u8 cur_ampdu_num_type;
|
||||||
|
u8 pre_ampdu_num_type;
|
||||||
|
u16 backup_ampdu_max_num;
|
||||||
|
|
||||||
|
u8 cur_ampdu_time_type;
|
||||||
|
u8 pre_ampdu_time_type;
|
||||||
|
u8 backup_ampdu_max_time;
|
||||||
|
|
||||||
|
u8 cur_arfr_type;
|
||||||
|
u8 pre_arfr_type;
|
||||||
|
u32 backup_arfr_cnt1;
|
||||||
|
u32 backup_arfr_cnt2;
|
||||||
|
|
||||||
|
u8 cur_retry_limit_type;
|
||||||
|
u8 pre_retry_limit_type;
|
||||||
|
u16 backup_retry_limit;
|
||||||
|
|
||||||
|
/* algorithm related */
|
||||||
|
u8 pre_algorithm;
|
||||||
|
u8 cur_algorithm;
|
||||||
|
u8 bt_status;
|
||||||
|
u8 wifi_chnl_info[3];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct coex_sta_8821a_csr_2ant {
|
||||||
|
boolean bt_disabled;
|
||||||
|
boolean bt_link_exist;
|
||||||
|
boolean sco_exist;
|
||||||
|
boolean a2dp_exist;
|
||||||
|
boolean slave;
|
||||||
|
boolean hid_exist;
|
||||||
|
boolean pan_exist;
|
||||||
|
|
||||||
|
boolean under_lps;
|
||||||
|
boolean under_ips;
|
||||||
|
u32 high_priority_tx;
|
||||||
|
u32 high_priority_rx;
|
||||||
|
u32 low_priority_tx;
|
||||||
|
u32 low_priority_rx;
|
||||||
|
u8 bt_rssi;
|
||||||
|
u8 pre_bt_rssi_state;
|
||||||
|
u8 pre_wifi_rssi_state[4];
|
||||||
|
boolean c2h_bt_info_req_sent;
|
||||||
|
u8 bt_info_c2h[BT_INFO_SRC_8821A_CSR_2ANT_MAX][10];
|
||||||
|
u32 bt_info_c2h_cnt[BT_INFO_SRC_8821A_CSR_2ANT_MAX];
|
||||||
|
boolean c2h_bt_inquiry_page;
|
||||||
|
u8 bt_retry_cnt;
|
||||||
|
u8 bt_info_ext;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* *******************************************
|
||||||
|
* The following is interface which will notify coex module.
|
||||||
|
* ******************************************* */
|
||||||
|
void ex_halbtc8821aCsr2ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821aCsr2ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||||
|
IN boolean wifi_only);
|
||||||
|
void ex_halbtc8821aCsr2ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821aCsr2ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821aCsr2ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821aCsr2ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821aCsr2ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821aCsr2ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 type);
|
||||||
|
void ex_halbtc8821aCsr2ant_specific_packet_notify(IN struct btc_coexist
|
||||||
|
*btcoexist, IN u8 type);
|
||||||
|
void ex_halbtc8821aCsr2ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 *tmp_buf, IN u8 length);
|
||||||
|
void ex_halbtc8821aCsr2ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821aCsr2ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||||
|
IN u8 pnp_state);
|
||||||
|
void ex_halbtc8821aCsr2ant_periodical(IN struct btc_coexist *btcoexist);
|
||||||
|
void ex_halbtc8821aCsr2ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define ex_halbtc8821aCsr2ant_power_on_setting(btcoexist)
|
||||||
|
#define ex_halbtc8821aCsr2ant_init_hw_config(btcoexist, wifi_only)
|
||||||
|
#define ex_halbtc8821aCsr2ant_init_coex_dm(btcoexist)
|
||||||
|
#define ex_halbtc8821aCsr2ant_ips_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821aCsr2ant_lps_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821aCsr2ant_scan_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821aCsr2ant_connect_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821aCsr2ant_media_status_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821aCsr2ant_specific_packet_notify(btcoexist, type)
|
||||||
|
#define ex_halbtc8821aCsr2ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||||
|
#define ex_halbtc8821aCsr2ant_halt_notify(btcoexist)
|
||||||
|
#define ex_halbtc8821aCsr2ant_pnp_notify(btcoexist, pnp_state)
|
||||||
|
#define ex_halbtc8821aCsr2ant_periodical(btcoexist)
|
||||||
|
#define ex_halbtc8821aCsr2ant_display_coex_info(btcoexist)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load Diff
@ -39,6 +39,46 @@
|
|||||||
#undef bEnable
|
#undef bEnable
|
||||||
#endif
|
#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
|
||||||
|
|
||||||
|
#ifdef CONFIG_BT_COEXIST
|
||||||
|
#define BT_SUPPORT 1
|
||||||
|
#define COEX_SUPPORT 1
|
||||||
|
#define HS_SUPPORT 1
|
||||||
|
#else
|
||||||
|
#define BT_SUPPORT 0
|
||||||
|
#define COEX_SUPPORT 0
|
||||||
|
#define HS_SUPPORT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "HalBtcOutSrc.h"
|
#include "HalBtcOutSrc.h"
|
||||||
#include "HalBtc8188c2Ant.h"
|
#include "HalBtc8188c2Ant.h"
|
||||||
#include "HalBtc8192d2Ant.h"
|
#include "HalBtc8192d2Ant.h"
|
||||||
@ -53,5 +93,6 @@
|
|||||||
#include "HalBtc8821a1Ant.h"
|
#include "HalBtc8821a1Ant.h"
|
||||||
#include "HalBtc8821a2Ant.h"
|
#include "HalBtc8821a2Ant.h"
|
||||||
#include "HalBtc8821aCsr2Ant.h"
|
#include "HalBtc8821aCsr2Ant.h"
|
||||||
|
#include "HalBtc8703b1Ant.h"
|
||||||
|
|
||||||
#endif // __MP_PRECOMP_H__
|
#endif // __MP_PRECOMP_H__
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user