VOID EXhalbtc8723a1ant_ScanNotify( IN PBTC_COEXIST pBtCoexist, IN u1Byte type ) { BOOLEAN bWifiConnected=FALSE; halbtc8723a1ant_NotifyFwScan(pBtCoexist, type); if(pBtCoexist->btInfo.bBtDisabled) { halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, FALSE, 9); } else { pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnected); if(BTC_SCAN_START == type) { BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], SCAN START notify\n")); if(!bWifiConnected) { // non-connected scan //set 0x550[3]=1 before PsTdma halbtc8723a1ant_Reg0x550Bit3(pBtCoexist, TRUE); } halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, TRUE, 4); } else if(BTC_SCAN_FINISH == type) { BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], SCAN FINISH notify\n")); if(!bWifiConnected) { // non-connected scan halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, FALSE, 0); } else { halbtc8723a1ant_CoexForWifiConnect(pBtCoexist); } } } }
VOID EXhalbtc8723a1ant_ConnectNotify( IN PBTC_COEXIST pBtCoexist, IN u1Byte type ) { BOOLEAN bWifiConnected=FALSE; if(pBtCoexist->btInfo.bBtDisabled) { halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, FALSE, 9); } else { if(BTC_ASSOCIATE_START == type) { BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], CONNECT START notify\n")); //set 0x550[3]=1 before PsTdma halbtc8723a1ant_Reg0x550Bit3(pBtCoexist, TRUE); halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, TRUE, 8); // extend wifi slot } else if(BTC_ASSOCIATE_FINISH == type) { BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], CONNECT FINISH notify\n")); pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnected); if(!bWifiConnected) { // non-connected scan halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, FALSE, 0); } else { halbtc8723a1ant_CoexForWifiConnect(pBtCoexist); } } } }
VOID EXhalbtc8723a1ant_Periodical( IN PBTC_COEXIST pBtCoexist ) { BOOLEAN bScan=FALSE, bLink=FALSE, bRoam=FALSE, bWifiConnected=FALSE; BTC_PRINT(BTC_MSG_INTERFACE, INTF_NOTIFY, ("[BTCoex], 1Ant Periodical!!\n")); pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_SCAN, &bScan); pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_LINK, &bLink); pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_ROAM, &bRoam); pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnected); // work around for c2h hang wa_halbtc8723a1ant_MonitorC2h(pBtCoexist); halbtc8723a1ant_QueryBtInfo(pBtCoexist); halbtc8723a1ant_MonitorBtCtr(pBtCoexist); halbtc8723a1ant_MonitorBtEnableDisable(pBtCoexist); if(bScan) return; if(bLink) return; if(bWifiConnected) { if(pBtCoexist->btInfo.bBtDisabled) { halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, FALSE, 9); halbtc8723a1ant_LowPenaltyRa(pBtCoexist, NORMAL_EXEC, FALSE); halbtc8723a1ant_RfShrink(pBtCoexist, NORMAL_EXEC, FALSE); } else { halbtc8723a1ant_LowPenaltyRa(pBtCoexist, NORMAL_EXEC, TRUE); halbtc8723a1ant_RfShrink(pBtCoexist, NORMAL_EXEC, FALSE); halbtc8723a1ant_CoexForWifiConnect(pBtCoexist); } } else { halbtc8723a1ant_PsTdma(pBtCoexist, NORMAL_EXEC, FALSE, 0); halbtc8723a1ant_LowPenaltyRa(pBtCoexist, NORMAL_EXEC, FALSE); halbtc8723a1ant_RfShrink(pBtCoexist, NORMAL_EXEC, FALSE); } }