/* Global variables, these are static variables */
static struct COEX_DM_8723B_1ANT GLCoexDm8723b1Ant;
-static struct COEX_DM_8723B_1ANT * pCoexDm = &GLCoexDm8723b1Ant;
+static struct COEX_DM_8723B_1ANT *pCoexDm = &GLCoexDm8723b1Ant;
static struct COEX_STA_8723B_1ANT GLCoexSta8723b1Ant;
-static struct COEX_STA_8723B_1ANT * pCoexSta = &GLCoexSta8723b1Ant;
+static struct COEX_STA_8723B_1ANT *pCoexSta = &GLCoexSta8723b1Ant;
static const char *const GLBtInfoSrc8723b1Ant[] = {
"BT Info[wifi fw]",
}
static void halbtc8723b1ant_UpdateRaMask(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u32 disRateMask
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u32 disRateMask
)
{
pCoexDm->curRaMask = disRateMask;
}
static void halbtc8723b1ant_AutoRateFallbackRetry(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
)
{
bool bWifiUnderBMode = false;
}
static void halbtc8723b1ant_RetryLimit(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
)
{
pCoexDm->curRetryLimitType = type;
}
static void halbtc8723b1ant_AmpduMaxTime(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
)
{
pCoexDm->curAmpduTimeType = type;
}
static void halbtc8723b1ant_LimitedTx(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bForceExec,
u8 raMaskType,
u8 arfrType,
}
static void halbtc8723b1ant_LimitedRx(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bForceExec,
bool bRejApAggPkt,
bool bBtCtrlAggBufSize,
}
-static void halbtc8723b1ant_QueryBtInfo(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_QueryBtInfo(struct BTC_COEXIST *pBtCoexist)
{
u8 H2C_Parameter[1] = {0};
pBtCoexist->fBtcFillH2c(pBtCoexist, 0x61, 1, H2C_Parameter);
}
-static void halbtc8723b1ant_MonitorBtCtr(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_MonitorBtCtr(struct BTC_COEXIST *pBtCoexist)
{
u32 regHPTxRx, regLPTxRx, u4Tmp;
u32 regHPTx = 0, regHPRx = 0, regLPTx = 0, regLPRx = 0;
}
-static void halbtc8723b1ant_MonitorWiFiCtr(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_MonitorWiFiCtr(struct BTC_COEXIST *pBtCoexist)
{
s32 wifiRssi = 0;
bool bWifiBusy = false, bWifiUnderBMode = false;
}
-static bool halbtc8723b1ant_IsWifiStatusChanged(struct BTC_COEXIST * pBtCoexist)
+static bool halbtc8723b1ant_IsWifiStatusChanged(struct BTC_COEXIST *pBtCoexist)
{
static bool bPreWifiBusy, bPreUnder4way, bPreBtHsOn;
bool bWifiBusy = false, bUnder4way = false, bBtHsOn = false;
return false;
}
-static void halbtc8723b1ant_UpdateBtLinkInfo(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_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 halbtc8723b1ant_ActionAlgorithm(struct BTC_COEXIST * pBtCoexist)
+static u8 halbtc8723b1ant_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_1ANT_COEX_ALGO_UNDEFINED;
u8 numOfDiffProfile = 0;
}
static void halbtc8723b1ant_SetSwPenaltyTxRateAdaptive(
- struct BTC_COEXIST * pBtCoexist, bool bLowPenaltyRa
+ struct BTC_COEXIST *pBtCoexist, bool bLowPenaltyRa
)
{
u8 H2C_Parameter[6] = {0};
}
static void halbtc8723b1ant_LowPenaltyRa(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bLowPenaltyRa
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bLowPenaltyRa
)
{
pCoexDm->bCurLowPenaltyRa = bLowPenaltyRa;
}
static void halbtc8723b1ant_SetCoexTable(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
u32 val0x6c0,
u32 val0x6c4,
u32 val0x6c8,
}
static void halbtc8723b1ant_CoexTable(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bForceExec,
u32 val0x6c0,
u32 val0x6c4,
}
static void halbtc8723b1ant_CoexTableWithType(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 type
)
{
BTC_PRINT(
}
static void halbtc8723b1ant_SetFwIgnoreWlanAct(
- struct BTC_COEXIST * pBtCoexist, bool bEnable
+ struct BTC_COEXIST *pBtCoexist, bool bEnable
)
{
u8 H2C_Parameter[1] = {0};
}
static void halbtc8723b1ant_IgnoreWlanAct(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bEnable
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bEnable
)
{
BTC_PRINT(
}
static void halbtc8723b1ant_SetLpsRpwm(
- struct BTC_COEXIST * pBtCoexist, u8 lpsVal, u8 rpwmVal
+ struct BTC_COEXIST *pBtCoexist, u8 lpsVal, u8 rpwmVal
)
{
u8 lps = lpsVal;
}
static void halbtc8723b1ant_LpsRpwm(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 lpsVal, u8 rpwmVal
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, u8 lpsVal, u8 rpwmVal
)
{
BTC_PRINT(
}
static void halbtc8723b1ant_SwMechanism(
- struct BTC_COEXIST * pBtCoexist, bool bLowPenaltyRA
+ struct BTC_COEXIST *pBtCoexist, bool bLowPenaltyRA
)
{
BTC_PRINT(
}
static void halbtc8723b1ant_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, cntBtCalChk = 0;
bool bPgExtSwitch = false;
bool bUseExtSwitch = false;
}
static void halbtc8723b1ant_SetFwPstdma(
- struct BTC_COEXIST * pBtCoexist, u8 byte1, u8 byte2, u8 byte3, u8 byte4, u8 byte5
+ struct BTC_COEXIST *pBtCoexist, u8 byte1, u8 byte2, u8 byte3, u8 byte4, u8 byte5
)
{
u8 H2C_Parameter[5] = {0};
static void halbtc8723b1ant_PsTdma(
- struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bTurnOn, u8 type
+ struct BTC_COEXIST *pBtCoexist, bool bForceExec, bool bTurnOn, u8 type
)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bWifiBusy = false;
u8 rssiAdjustVal = 0;
u8 psTdmaByte4Val = 0x50, psTdmaByte0Val = 0x51, psTdmaByte3Val = 0x10;
pCoexDm->prePsTdma = pCoexDm->curPsTdma;
}
-static bool halbtc8723b1ant_IsCommonAction(struct BTC_COEXIST * pBtCoexist)
+static bool halbtc8723b1ant_IsCommonAction(struct BTC_COEXIST *pBtCoexist)
{
bool bCommon = false, bWifiConnected = false, bWifiBusy = false;
static void halbtc8723b1ant_TdmaDurationAdjustForAcl(
- struct BTC_COEXIST * pBtCoexist, u8 wifiStatus
+ struct BTC_COEXIST *pBtCoexist, u8 wifiStatus
)
{
static s32 up, dn, m, n, WaitCount;
}
static void halbtc8723b1ant_PsTdmaCheckForPowerSaveState(
- struct BTC_COEXIST * pBtCoexist, bool bNewPsState
+ struct BTC_COEXIST *pBtCoexist, bool bNewPsState
)
{
u8 lpsMode = 0x0;
}
static void halbtc8723b1ant_PowerSaveState(
- struct BTC_COEXIST * pBtCoexist, u8 psType, u8 lpsVal, u8 rpwmVal
+ struct BTC_COEXIST *pBtCoexist, u8 psType, u8 lpsVal, u8 rpwmVal
)
{
bool bLowPwrDisable = false;
/* Non-Software Coex Mechanism start */
/* */
/* */
-static void halbtc8723b1ant_ActionWifiMultiPort(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_ActionWifiMultiPort(struct BTC_COEXIST *pBtCoexist)
{
halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0);
halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2);
}
-static void halbtc8723b1ant_ActionHs(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_ActionHs(struct BTC_COEXIST *pBtCoexist)
{
halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 5);
halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2);
}
-static void halbtc8723b1ant_ActionBtInquiry(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_ActionBtInquiry(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bWifiConnected = false;
bool bApEnable = false;
bool bWifiBusy = false;
}
static void halbtc8723b1ant_ActionBtScoHidOnlyBusy(
- struct BTC_COEXIST * pBtCoexist, u8 wifiStatus
+ struct BTC_COEXIST *pBtCoexist, u8 wifiStatus
)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bWifiConnected = false;
pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnected);
}
static void halbtc8723b1ant_ActionWifiConnectedBtAclBusy(
- struct BTC_COEXIST * pBtCoexist, u8 wifiStatus
+ struct BTC_COEXIST *pBtCoexist, u8 wifiStatus
)
{
u8 btRssiState;
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
btRssiState = halbtc8723b1ant_BtRssiState(2, 28, 0);
if ((pCoexSta->lowPriorityRx >= 1000) && (pCoexSta->lowPriorityRx != 65535))
}
}
-static void halbtc8723b1ant_ActionWifiNotConnected(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_ActionWifiNotConnected(struct BTC_COEXIST *pBtCoexist)
{
/* power save state */
halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0);
}
static void halbtc8723b1ant_ActionWifiNotConnectedScan(
- struct BTC_COEXIST * pBtCoexist
+ struct BTC_COEXIST *pBtCoexist
)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0);
}
static void halbtc8723b1ant_ActionWifiNotConnectedAssoAuth(
- struct BTC_COEXIST * pBtCoexist
+ struct BTC_COEXIST *pBtCoexist
)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0);
}
}
-static void halbtc8723b1ant_ActionWifiConnectedScan(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_ActionWifiConnectedScan(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0);
}
static void halbtc8723b1ant_ActionWifiConnectedSpecialPacket(
- struct BTC_COEXIST * pBtCoexist
+ struct BTC_COEXIST *pBtCoexist
)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0);
}
}
-static void halbtc8723b1ant_ActionWifiConnected(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_ActionWifiConnected(struct BTC_COEXIST *pBtCoexist)
{
bool bWifiBusy = false;
bool bScan = false, bLink = false, bRoam = false;
}
}
-static void halbtc8723b1ant_RunSwCoexistMechanism(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_RunSwCoexistMechanism(struct BTC_COEXIST *pBtCoexist)
{
u8 algorithm = 0;
}
}
-static void halbtc8723b1ant_RunCoexistMechanism(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_RunCoexistMechanism(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ struct BTC_BT_LINK_INFO *pBtLinkInfo = &pBtCoexist->btLinkInfo;
bool bWifiConnected = false, bBtHsOn = false;
bool bIncreaseScanDevNum = false;
bool bBtCtrlAggBufSize = false;
halbtc8723b1ant_ActionWifiConnected(pBtCoexist);
}
-static void halbtc8723b1ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist)
+static void halbtc8723b1ant_InitCoexDm(struct BTC_COEXIST *pBtCoexist)
{
/* force to reset coex mechanism */
}
static void halbtc8723b1ant_InitHwConfig(
- struct BTC_COEXIST * pBtCoexist,
+ struct BTC_COEXIST *pBtCoexist,
bool bBackUp,
bool bWifiOnly
)
/* */
/* extern function start with EXhalbtc8723b1ant_ */
/* */
-void EXhalbtc8723b1ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b1ant_PowerOnSetting(struct BTC_COEXIST *pBtCoexist)
{
- struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo;
+ struct BTC_BOARD_INFO *pBoardInfo = &pBtCoexist->boardInfo;
u8 u1Tmp = 0x0;
u16 u2Tmp = 0x0;
}
}
-void EXhalbtc8723b1ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly)
+void EXhalbtc8723b1ant_InitHwConfig(struct BTC_COEXIST *pBtCoexist, bool bWifiOnly)
{
halbtc8723b1ant_InitHwConfig(pBtCoexist, true, bWifiOnly);
}
-void EXhalbtc8723b1ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b1ant_InitCoexDm(struct BTC_COEXIST *pBtCoexist)
{
BTC_PRINT(
BTC_MSG_INTERFACE,
halbtc8723b1ant_QueryBtInfo(pBtCoexist);
}
-void EXhalbtc8723b1ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b1ant_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;
u16 u2Tmp[4];
}
-void EXhalbtc8723b1ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b1ant_IpsNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
if (pBtCoexist->bManualControl || pBtCoexist->bStopCoexDm)
return;
}
}
-void EXhalbtc8723b1ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b1ant_LpsNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
if (pBtCoexist->bManualControl || pBtCoexist->bStopCoexDm)
return;
}
}
-void EXhalbtc8723b1ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b1ant_ScanNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
bool bWifiConnected = false, bBtHsOn = false;
u32 wifiLinkStatus = 0;
}
}
-void EXhalbtc8723b1ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b1ant_ConnectNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
bool bWifiConnected = false, bBtHsOn = false;
u32 wifiLinkStatus = 0;
}
}
-void EXhalbtc8723b1ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b1ant_MediaStatusNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
u8 H2C_Parameter[3] = {0};
u32 wifiBw;
pBtCoexist->fBtcFillH2c(pBtCoexist, 0x66, 3, H2C_Parameter);
}
-void EXhalbtc8723b1ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type)
+void EXhalbtc8723b1ant_SpecialPacketNotify(struct BTC_COEXIST *pBtCoexist, u8 type)
{
bool bBtHsOn = false;
u32 wifiLinkStatus = 0;
}
void EXhalbtc8723b1ant_BtInfoNotify(
- struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length
+ struct BTC_COEXIST *pBtCoexist, u8 *tmpBuf, u8 length
)
{
u8 btInfo = 0;
halbtc8723b1ant_RunCoexistMechanism(pBtCoexist);
}
-void EXhalbtc8723b1ant_HaltNotify(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b1ant_HaltNotify(struct BTC_COEXIST *pBtCoexist)
{
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], Halt notify\n"));
pBtCoexist->bStopCoexDm = true;
}
-void EXhalbtc8723b1ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState)
+void EXhalbtc8723b1ant_PnpNotify(struct BTC_COEXIST *pBtCoexist, u8 pnpState)
{
BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], Pnp notify\n"));
}
}
-void EXhalbtc8723b1ant_Periodical(struct BTC_COEXIST * pBtCoexist)
+void EXhalbtc8723b1ant_Periodical(struct BTC_COEXIST *pBtCoexist)
{
static u8 disVerInfoCnt;
u32 fwVer = 0, btPatchVer = 0;