/* Global variables, these are static variables */
static struct COEX_DM_8723B_2ANT GLCoexDm8723b2Ant;
-static struct COEX_DM_8723B_2ANT * pCoexDm = &GLCoexDm8723b2Ant;
+static struct COEX_DM_8723B_2ANT *pCoexDm = &GLCoexDm8723b2Ant;
static struct COEX_STA_8723B_2ANT GLCoexSta8723b2Ant;
-static struct COEX_STA_8723B_2ANT * pCoexSta = &GLCoexSta8723b2Ant;
+static struct COEX_STA_8723B_2ANT *pCoexSta = &GLCoexSta8723b2Ant;
static const char *const GLBtInfoSrc8723b2Ant[] = {
"BT Info[wifi fw]",
}
static u8 halbtc8723b2ant_WifiRssiState(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
u8 index,
u8 levelNum,
u8 rssiThresh,
}
static void halbtc8723b2ant_LimitedRx(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bForceExec,
bool bRejApAggPkt,
bool bBtCtrlAggBufSize,
pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL);
}
-static void halbtc8723b2ant_MonitorBtCtr(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_MonitorBtCtr(struct BTC_COEXIST *pBtCoexist)
{
u32 regHPTxRx, regLPTxRx, u4Tmp;
u32 regHPTx = 0, regHPRx = 0, regLPTx = 0, regLPRx = 0;
pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x76e, 0xc);
}
-static void halbtc8723b2ant_QueryBtInfo(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_QueryBtInfo(struct BTC_COEXIST *pBtCoexist)
{
u8 H2C_Parameter[1] = {0};
pBtCoexist->fBtcFillH2c(pBtCoexist, 0x61, 1, H2C_Parameter);
}
-static bool halbtc8723b2ant_IsWifiStatusChanged(struct BTC_COEXIST * pBtCoexist)
+static bool halbtc8723b2ant_IsWifiStatusChanged(struct BTC_COEXIST *pBtCoexist)
{
static bool bPreWifiBusy, bPreUnder4way, bPreBtHsOn;
bool bWifiBusy = false, bUnder4way = false, bBtHsOn = false;
return false;
}
-static void halbtc8723b2ant_UpdateBtLinkInfo(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_UpdateBtLinkInfo(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bBtHsOn = false;
pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn);
pBtLinkInfo->bHidOnly = false;
}
-static u8 halbtc8723b2ant_ActionAlgorithm(struct BTC_COEXIST * pBtCoexist)
+static u8 halbtc8723b2ant_ActionAlgorithm(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bBtHsOn = false;
u8 algorithm = BT_8723B_2ANT_COEX_ALGO_UNDEFINED;
u8 numOfDiffProfile = 0;
}
static void halbtc8723b2ant_SetFwDacSwingLevel(
- struct BTC_COEXIST * pBtCoexist, u8 dacSwingLvl
+ struct BTC_COEXIST *pBtCoexist, u8 dacSwingLvl
)
{
u8 H2C_Parameter[1] = {0};
}
static void halbtc8723b2ant_SetFwDecBtPwr(
- struct BTC_COEXIST * pBtCoexist, u8 decBtPwrLvl
+ struct BTC_COEXIST *pBtCoexist, u8 decBtPwrLvl
)
{
u8 H2C_Parameter[1] = {0};
}
static void halbtc8723b2ant_DecBtPwr(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 decBtPwrLvl
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 decBtPwrLvl
)
{
BTC_PRINT(
}
static void halbtc8723b2ant_FwDacSwingLvl(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 fwDacSwingLvl
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 fwDacSwingLvl
)
{
BTC_PRINT(
}
static void halbtc8723b2ant_SetSwRfRxLpfCorner(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bRxRfShrinkOn
)
{
}
static void halbtc8723b2ant_RfShrink(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bRxRfShrinkOn
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bRxRfShrinkOn
)
{
BTC_PRINT(
}
static void halbtc8723b2ant_SetSwPenaltyTxRateAdaptive(
- struct BTC_COEXIST * pBtCoexist, bool bLowPenaltyRa
+ struct BTC_COEXIST *pBtCoexist, bool bLowPenaltyRa
)
{
u8 H2C_Parameter[6] = {0};
}
static void halbtc8723b2ant_LowPenaltyRa(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bLowPenaltyRa
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bLowPenaltyRa
)
{
/* return; */
pCoexDm->bPreLowPenaltyRa = pCoexDm->bCurLowPenaltyRa;
}
-static void halbtc8723b2ant_SetDacSwingReg(struct BTC_COEXIST * pBtCoexist, u32 level)
+static void halbtc8723b2ant_SetDacSwingReg(struct BTC_COEXIST *pBtCoexist, u32 level)
{
u8 val = (u8)level;
}
static void halbtc8723b2ant_SetSwFullTimeDacSwing(
- struct BTC_COEXIST * pBtCoexist, bool bSwDacSwingOn, u32 swDacSwingLvl
+ struct BTC_COEXIST *pBtCoexist, bool bSwDacSwingOn, u32 swDacSwingLvl
)
{
if (bSwDacSwingOn)
static void halbtc8723b2ant_DacSwing(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bForceExec,
bool bDacSwingOn,
u32 dacSwingLvl
}
static void halbtc8723b2ant_SetAgcTable(
- struct BTC_COEXIST * pBtCoexist, bool bAgcTableEn
+ struct BTC_COEXIST *pBtCoexist, bool bAgcTableEn
)
{
u8 rssiAdjustVal = 0;
}
static void halbtc8723b2ant_AgcTable(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bAgcTableEn
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bAgcTableEn
)
{
BTC_PRINT(
}
static void halbtc8723b2ant_SetCoexTable(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
u32 val0x6c0,
u32 val0x6c4,
u32 val0x6c8,
}
static void halbtc8723b2ant_CoexTable(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bForceExec,
u32 val0x6c0,
u32 val0x6c4,
}
static void halbtc8723b2ant_CoexTableWithType(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
)
{
switch (type) {
}
static void halbtc8723b2ant_SetFwIgnoreWlanAct(
- struct BTC_COEXIST * pBtCoexist, bool bEnable
+ struct BTC_COEXIST *pBtCoexist, bool bEnable
)
{
u8 H2C_Parameter[1] = {0};
}
static void halbtc8723b2ant_IgnoreWlanAct(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bEnable
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bEnable
)
{
BTC_PRINT(
}
static void halbtc8723b2ant_SetFwPstdma(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
u8 byte1,
u8 byte2,
u8 byte3,
}
static void halbtc8723b2ant_SwMechanism1(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bShrinkRxLPF,
bool bLowPenaltyRA,
bool bLimitedDIG,
}
static void halbtc8723b2ant_SwMechanism2(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bAGCTableShift,
bool bADCBackOff,
bool bSWDACSwing,
}
static void halbtc8723b2ant_SetAntPath(
- struct BTC_COEXIST * pBtCoexist, u8 antPosType, bool bInitHwCfg, bool bWifiOff
+ struct BTC_COEXIST *pBtCoexist, u8 antPosType, bool bInitHwCfg, bool bWifiOff
)
{
- struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo;
+ struct BTC_BOARD_INFO *pBoardInfo = &pBtCoexist->boardInfo;
u32 fwVer = 0, u4Tmp = 0;
bool bPgExtSwitch = false;
bool bUseExtSwitch = false;
}
static void halbtc8723b2ant_PsTdma(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bTurnOn, u8 type
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bTurnOn, u8 type
)
{
BTC_PRINT(
pCoexDm->prePsTdma = pCoexDm->curPsTdma;
}
-static void halbtc8723b2ant_CoexAllOff(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_CoexAllOff(struct BTC_COEXIST *pBtCoexist)
{
/* fw all off */
halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 1);
halbtc8723b2ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 0);
}
-static void halbtc8723b2ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_InitCoexDm(struct BTC_COEXIST *pBtCoexist)
{
/* force to reset coex mechanism */
halbtc8723b2ant_SwMechanism2(pBtCoexist, false, false, false, 0x18);
}
-static void halbtc8723b2ant_ActionBtInquiry(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionBtInquiry(struct BTC_COEXIST *pBtCoexist)
{
bool bWifiConnected = false;
bool bLowPwrDisable = true;
halbtc8723b2ant_SetAntPath(pBtCoexist, BTC_ANT_WIFI_AT_AUX, false, false);
}
-static bool halbtc8723b2ant_IsCommonAction(struct BTC_COEXIST * pBtCoexist)
+static bool halbtc8723b2ant_IsCommonAction(struct BTC_COEXIST *pBtCoexist)
{
u8 btRssiState = BTC_RSSI_STATE_HIGH;
bool bCommon = false, bWifiConnected = false, bWifiBusy = false;
}
static void halbtc8723b2ant_TdmaDurationAdjust(
- struct BTC_COEXIST * pBtCoexist, bool bScoHid, bool bTxPause, u8 maxInterval
+ struct BTC_COEXIST *pBtCoexist, bool bScoHid, bool bTxPause, u8 maxInterval
)
{
static s32 up, dn, m, n, WaitCount;
}
/* SCO only or SCO+PAN(HS) */
-static void halbtc8723b2ant_ActionSco(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionSco(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
-static void halbtc8723b2ant_ActionHid(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionHid(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
/* A2DP only / PAN(EDR) only/ A2DP+PAN(HS) */
-static void halbtc8723b2ant_ActionA2dp(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionA2dp(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, wifiRssiState1, btRssiState;
u32 wifiBw;
}
}
-static void halbtc8723b2ant_ActionA2dpPanHs(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionA2dpPanHs(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
}
-static void halbtc8723b2ant_ActionPanEdr(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionPanEdr(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
/* PAN(HS) only */
-static void halbtc8723b2ant_ActionPanHs(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionPanHs(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
/* PAN(EDR)+A2DP */
-static void halbtc8723b2ant_ActionPanEdrA2dp(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionPanEdrA2dp(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
}
-static void halbtc8723b2ant_ActionPanEdrHid(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionPanEdrHid(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
/* HID+A2DP+PAN(EDR) */
-static void halbtc8723b2ant_ActionHidA2dpPanEdr(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionHidA2dpPanEdr(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
}
-static void halbtc8723b2ant_ActionHidA2dp(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_ActionHidA2dp(struct BTC_COEXIST *pBtCoexist)
{
u8 wifiRssiState, btRssiState;
u32 wifiBw;
}
}
-static void halbtc8723b2ant_RunCoexistMechanism(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_RunCoexistMechanism(struct BTC_COEXIST *pBtCoexist)
{
u8 algorithm = 0;
}
}
-static void halbtc8723b2ant_WifiOffHwCfg(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b2ant_WifiOffHwCfg(struct BTC_COEXIST *pBtCoexist)
{
bool bIsInMpMode = false;
u8 H2C_Parameter[2] = {0};
pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x67, 0x20, 0x1); /* BT select s0/s1 is controlled by WiFi */
}
-static void halbtc8723b2ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bBackUp)
+static void halbtc8723b2ant_InitHwConfig(struct BTC_COEXIST *pBtCoexist, bool bBackUp)
{
u8 u1Tmp = 0;
/* */
/* extern function start with EXhalbtc8723b2ant_ */
/* */
-void EXhalbtc8723b2ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b2ant_PowerOnSetting(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo;
+ struct BTC_BOARD_INFO *pBoardInfo = &pBtCoexist->boardInfo;
u8 u1Tmp = 0x4; /* Set BIT2 by default since it's 2ant case */
u16 u2Tmp = 0x0;
}
}
-void EXhalbtc8723b2ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly)
+void EXhalbtc8723b2ant_InitHwConfig(struct BTC_COEXIST *pBtCoexist, bool bWifiOnly)
{
halbtc8723b2ant_InitHwConfig(pBtCoexist, true);
}
-void EXhalbtc8723b2ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b2ant_InitCoexDm(struct BTC_COEXIST *pBtCoexist)
{
BTC_PRINT(BTC_MSG_INTERFACE, INTF_INIT, ("[BTCoex], Coex Mechanism Init!!\n"));
halbtc8723b2ant_InitCoexDm(pBtCoexist);
}
-void EXhalbtc8723b2ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b2ant_DisplayCoexInfo(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo;
- struct BTC_STACK_INFO * pStackInfo = &pBtCoexist->stackInfo;
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BOARD_INFO *pBoardInfo = &pBtCoexist->boardInfo;
+ struct BTC_STACK_INFO *pStackInfo = &pBtCoexist->stackInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
u8 *cliBuf = pBtCoexist->cliBuf;
u8 u1Tmp[4], i, btInfoExt, psTdmaCase = 0;
u32 u4Tmp[4];
}
-void EXhalbtc8723b2ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b2ant_IpsNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
if (BTC_IPS_ENTER == type) {
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], IPS ENTER notify\n"));
}
}
-void EXhalbtc8723b2ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b2ant_LpsNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
if (BTC_LPS_ENABLE == type) {
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], LPS ENABLE notify\n"));
}
}
-void EXhalbtc8723b2ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b2ant_ScanNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
if (BTC_SCAN_START == type) {
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], SCAN START notify\n"));
}
}
-void EXhalbtc8723b2ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b2ant_ConnectNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
if (BTC_ASSOCIATE_START == type) {
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], CONNECT START notify\n"));
}
}
-void EXhalbtc8723b2ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b2ant_MediaStatusNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
u8 H2C_Parameter[3] = {0};
u32 wifiBw;
pBtCoexist->fBtcFillH2c(pBtCoexist, 0x66, 3, H2C_Parameter);
}
-void EXhalbtc8723b2ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b2ant_SpecialPacketNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
if (type == BTC_PACKET_DHCP) {
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], DHCP Packet notify\n"));
}
void EXhalbtc8723b2ant_BtInfoNotify(
- struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length
+ struct BTC_COEXIST *pBtCoexist, u8 *tmpBuf, u8 length
)
{
u8 btInfo = 0;
halbtc8723b2ant_RunCoexistMechanism(pBtCoexist);
}
-void EXhalbtc8723b2ant_HaltNotify(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b2ant_HaltNotify(struct BTC_COEXIST *pBtCoexist)
{
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], Halt notify\n"));
EXhalbtc8723b2ant_MediaStatusNotify(pBtCoexist, BTC_MEDIA_DISCONNECT);
}
-void EXhalbtc8723b2ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState)
+void EXhalbtc8723b2ant_PnpNotify(struct BTC_COEXIST *pBtCoexist, u8 pnpState)
{
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], Pnp notify\n"));
}
}
-void EXhalbtc8723b2ant_Periodical(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b2ant_Periodical(struct BTC_COEXIST *pBtCoexist)
{
static u8 disVerInfoCnt;
u32 fwVer = 0, btPatchVer = 0;