diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/hal/hal_btcoex.c')
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_btcoex.c | 111 |
1 files changed, 2 insertions, 109 deletions
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c index 3b0573885dce..f4b3e8b28712 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -4,7 +4,6 @@ * Copyright(c) 2013 Realtek Corporation. All rights reserved. * ******************************************************************************/ -#define __HAL_BTCOEX_C__ #include <hal_data.h> #include <rtw_debug.h> @@ -17,52 +16,6 @@ struct btc_coexist GLBtCoexist; static u8 GLBtcWiFiInScanState; static u8 GLBtcWiFiInIQKState; -static u8 GLBtcDbgBuf[BT_TMP_BUF_SIZE]; - -struct btcdbginfo { /* _btcoexdbginfo */ - u8 *info; - u32 size; /* buffer total size */ - u32 len; /* now used length */ -}; - -static struct btcdbginfo GLBtcDbgInfo; - -#define BT_Operation(Adapter) false - -static void DBG_BT_INFO_INIT(struct btcdbginfo *pinfo, u8 *pbuf, u32 size) -{ - if (!pinfo) - return; - - memset(pinfo, 0, sizeof(struct btcdbginfo)); - - if (pbuf && size) { - pinfo->info = pbuf; - pinfo->size = size; - } -} - -void DBG_BT_INFO(u8 *dbgmsg) -{ - struct btcdbginfo *pinfo; - u32 msglen; - u8 *pbuf; - - - pinfo = &GLBtcDbgInfo; - - if (!pinfo->info) - return; - - msglen = strlen(dbgmsg); - if (pinfo->len + msglen > pinfo->size) - return; - - pbuf = pinfo->info + pinfo->len; - memcpy(pbuf, dbgmsg, msglen); - pinfo->len += msglen; -} - /* */ /* Debug related function */ /* */ @@ -401,7 +354,7 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) break; case BTC_GET_U4_WIFI_BW: - if (IsLegacyOnly(mlmeext->cur_wireless_mode)) + if (is_legacy_only(mlmeext->cur_wireless_mode)) *pU4Tmp = BTC_WIFI_BW_LEGACY; else if (pHalData->CurrentChannelBW == CHANNEL_WIDTH_20) *pU4Tmp = BTC_WIFI_BW_HT20; @@ -580,7 +533,7 @@ static u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) struct wlan_bssid_ex *cur_network; cur_network = &padapter->mlmeextpriv.mlmext_info.network; - psta = rtw_get_stainfo(&padapter->stapriv, cur_network->MacAddress); + psta = rtw_get_stainfo(&padapter->stapriv, cur_network->mac_address); rtw_hal_update_ra_mask(psta, 0); } break; @@ -608,17 +561,6 @@ static u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) return ret; } -static void halbtcoutsrc_DisplayFwPwrModeCmd(struct btc_coexist *pBtCoexist) -{ - u8 *cliBuf = pBtCoexist->cliBuf; - - CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x %02x ", "Power mode cmd ", \ - pBtCoexist->pwrModeVal[0], pBtCoexist->pwrModeVal[1], - pBtCoexist->pwrModeVal[2], pBtCoexist->pwrModeVal[3], - pBtCoexist->pwrModeVal[4], pBtCoexist->pwrModeVal[5]); - CL_PRINTF(cliBuf); -} - /* */ /* IO related function */ /* */ @@ -830,25 +772,6 @@ static void halbtcoutsrc_FillH2cCmd(void *pBtcContext, u8 elementId, u32 cmdLen, rtw_hal_fill_h2c_cmd(padapter, elementId, cmdLen, pCmdBuffer); } -static void halbtcoutsrc_DisplayDbgMsg(void *pBtcContext, u8 dispType) -{ - struct btc_coexist *pBtCoexist; - - - pBtCoexist = (struct btc_coexist *)pBtcContext; - switch (dispType) { - case BTC_DBG_DISP_COEX_STATISTICS: - break; - case BTC_DBG_DISP_BT_LINK_INFO: - break; - case BTC_DBG_DISP_FW_PWR_MODE_CMD: - halbtcoutsrc_DisplayFwPwrModeCmd(pBtCoexist); - break; - default: - break; - } -} - /* */ /* Extern functions called by other module */ /* */ @@ -908,15 +831,12 @@ void hal_btcoex_Initialize(void *padapter) pBtCoexist->fBtcGetRfReg = halbtcoutsrc_GetRfReg; pBtCoexist->fBtcFillH2c = halbtcoutsrc_FillH2cCmd; - pBtCoexist->fBtcDispDbgMsg = halbtcoutsrc_DisplayDbgMsg; pBtCoexist->fBtcGet = halbtcoutsrc_Get; pBtCoexist->fBtcSet = halbtcoutsrc_Set; pBtCoexist->fBtcGetBtReg = halbtcoutsrc_GetBtReg; pBtCoexist->fBtcSetBtReg = halbtcoutsrc_SetBtReg; - pBtCoexist->cliBuf = &GLBtcDbgBuf[0]; - pBtCoexist->boardInfo.singleAntPath = 0; GLBtcWiFiInScanState = false; @@ -1220,21 +1140,6 @@ void EXhalbtcoutsrc_SetSingleAntPath(u8 singleAntPath) GLBtCoexist.boardInfo.singleAntPath = singleAntPath; } -void EXhalbtcoutsrc_DisplayBtCoexInfo(struct btc_coexist *pBtCoexist) -{ - if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) - return; - - halbtcoutsrc_LeaveLowPower(pBtCoexist); - - if (pBtCoexist->boardInfo.btdmAntNum == 2) - EXhalbtc8723b2ant_DisplayCoexInfo(pBtCoexist); - else if (pBtCoexist->boardInfo.btdmAntNum == 1) - EXhalbtc8723b1ant_DisplayCoexInfo(pBtCoexist); - - halbtcoutsrc_NormalLowPower(pBtCoexist); -} - /* * Description: *Run BT-Coexist mechanism or not @@ -1447,15 +1352,3 @@ void hal_btcoex_RecordPwrMode(struct adapter *padapter, u8 *pCmdBuf, u8 cmdLen) { memcpy(GLBtCoexist.pwrModeVal, pCmdBuf, cmdLen); } - -void hal_btcoex_DisplayBtCoexInfo(struct adapter *padapter, u8 *pbuf, u32 bufsize) -{ - struct btcdbginfo *pinfo; - - - pinfo = &GLBtcDbgInfo; - DBG_BT_INFO_INIT(pinfo, pbuf, bufsize); - EXhalbtcoutsrc_DisplayBtCoexInfo(&GLBtCoexist); - DBG_BT_INFO_INIT(pinfo, NULL, 0); -} - |