Commit 274f4e78 authored by Fabio Aiuto's avatar Fabio Aiuto Committed by Greg Kroah-Hartman

staging: rtl8723bs: remove BT debug code

remove BT dead debug code, probably it was intended
for a specific command line interface.
Signed-off-by: default avatarFabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210728141858.13024-1-fabioaiuto83@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8133ef6
......@@ -182,4 +182,3 @@ void EXhalbtc8723b1ant_BtInfoNotify(
void EXhalbtc8723b1ant_HaltNotify(struct btc_coexist *pBtCoexist);
void EXhalbtc8723b1ant_PnpNotify(struct btc_coexist *pBtCoexist, u8 pnpState);
void EXhalbtc8723b1ant_Periodical(struct btc_coexist *pBtCoexist);
void EXhalbtc8723b1ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist);
......@@ -144,4 +144,3 @@ void EXhalbtc8723b2ant_BtInfoNotify(
void EXhalbtc8723b2ant_HaltNotify(struct btc_coexist *pBtCoexist);
void EXhalbtc8723b2ant_PnpNotify(struct btc_coexist *pBtCoexist, u8 pnpState);
void EXhalbtc8723b2ant_Periodical(struct btc_coexist *pBtCoexist);
void EXhalbtc8723b2ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist);
......@@ -85,10 +85,6 @@ enum {
#define WIFI_P2P_GO_CONNECTED BIT3
#define WIFI_P2P_GC_CONNECTED BIT4
/* following is for command line utility */
#define CL_SPRINTF snprintf
#define CL_PRINTF DCMD_Printf
struct btc_board_info {
/* The following is some board information */
u8 btChipType;
......@@ -384,7 +380,6 @@ struct btc_coexist {
bool bInitilized;
bool bStopCoexDm;
bool bManualControl;
u8 *cliBuf;
struct btc_statistics statistics;
u8 pwrModeVal[10];
......@@ -408,8 +403,6 @@ struct btc_coexist {
/* fill h2c related */
BFP_BTC_FILL_H2C fBtcFillH2c;
/* other */
BFP_BTC_DISP_DBG_MSG fBtcDispDbgMsg;
/* normal get/set related */
BFP_BTC_GET fBtcGet;
BFP_BTC_SET fBtcSet;
......@@ -440,6 +433,5 @@ void EXhalbtcoutsrc_Periodical(struct btc_coexist *pBtCoexist);
void EXhalbtcoutsrc_SetChipType(u8 chipType);
void EXhalbtcoutsrc_SetAntNum(u8 type, u8 antNum);
void EXhalbtcoutsrc_SetSingleAntPath(u8 singleAntPath);
void EXhalbtcoutsrc_DisplayBtCoexInfo(struct btc_coexist *pBtCoexist);
#endif
......@@ -12,8 +12,6 @@
#define BT_TMP_BUF_SIZE 100
#define DCMD_Printf DBG_BT_INFO
#ifdef bEnable
#undef bEnable
#endif
......
......@@ -17,52 +17,8 @@ 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 */
/* */
......@@ -608,17 +564,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 +775,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 +834,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 +1143,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 +1355,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);
}
......@@ -20,8 +20,6 @@ struct bt_coexist {
u8 bInitlized;
};
void DBG_BT_INFO(u8 *dbgmsg);
void hal_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist);
bool hal_btcoex_IsBtExist(struct adapter *padapter);
bool hal_btcoex_IsBtDisabled(struct adapter *);
......@@ -54,6 +52,5 @@ u8 hal_btcoex_RpwmVal(struct adapter *);
u8 hal_btcoex_LpsVal(struct adapter *);
u32 hal_btcoex_GetRaMask(struct adapter *);
void hal_btcoex_RecordPwrMode(struct adapter *padapter, u8 *pCmdBuf, u8 cmdLen);
void hal_btcoex_DisplayBtCoexInfo(struct adapter *, u8 *pbuf, u32 bufsize);
#endif /* !__HAL_BTCOEX_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment