staging: rtl8723bs: Remove rtw_btcoex_IsBtControlLps()

Remove function rtw_btcoex_IsBtControlLps as it does nothing except call
hal_btcoex_IsBtControlLps.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-5-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nishka Dasgupta 2019-07-01 14:48:12 +05:30 committed by Greg Kroah-Hartman
parent a158111d54
commit 606e33cead
6 changed files with 16 additions and 21 deletions

View File

@ -67,11 +67,6 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *padapter)
return coexctrl;
}
u8 rtw_btcoex_IsBtControlLps(struct adapter *padapter)
{
return hal_btcoex_IsBtControlLps(padapter);
}
void rtw_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist)
{
hal_btcoex_SetBTCoexist(padapter, bBtExist);

View File

@ -1595,7 +1595,7 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
if (dtim <= 0 || dtim > 16)
return;
if (rtw_btcoex_IsBtControlLps(padapter) == true)
if (hal_btcoex_IsBtControlLps(padapter) == true)
return;
mutex_lock(&pwrpriv->lock);

View File

@ -9,6 +9,7 @@
#include <linux/etherdevice.h>
#include <drv_types.h>
#include <rtw_debug.h>
#include <hal_btcoex.h>
#include <linux/jiffies.h>
extern u8 rtw_do_join(struct adapter *padapter);
@ -1888,10 +1889,10 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
return;
if (is_primary_adapter(adapter))
DBG_871X("IsBtDisabled =%d, IsBtControlLps =%d\n", rtw_btcoex_IsBtDisabled(adapter), rtw_btcoex_IsBtControlLps(adapter));
DBG_871X("IsBtDisabled =%d, IsBtControlLps =%d\n", rtw_btcoex_IsBtDisabled(adapter), hal_btcoex_IsBtControlLps(adapter));
if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode == true)
&& (rtw_btcoex_IsBtControlLps(adapter) == false)
&& (hal_btcoex_IsBtControlLps(adapter) == false)
) {
u8 bEnterPS;

View File

@ -221,7 +221,7 @@ void traffic_check_for_leave_lps(struct adapter *padapter, u8 tx, u32 tx_packets
if (xmit_cnt > 8) {
if ((adapter_to_pwrctl(padapter)->bLeisurePs)
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
&& (rtw_btcoex_IsBtControlLps(padapter) == false)
&& (hal_btcoex_IsBtControlLps(padapter) == false)
) {
DBG_871X("leave lps via Tx = %d\n", xmit_cnt);
bLeaveLPS = true;
@ -236,7 +236,7 @@ void traffic_check_for_leave_lps(struct adapter *padapter, u8 tx, u32 tx_packets
if (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 4/*2*/) {
if ((adapter_to_pwrctl(padapter)->bLeisurePs)
&& (adapter_to_pwrctl(padapter)->pwr_mode != PS_MODE_ACTIVE)
&& (rtw_btcoex_IsBtControlLps(padapter) == false)
&& (hal_btcoex_IsBtControlLps(padapter) == false)
) {
DBG_871X("leave lps via Rx = %d\n", pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod);
bLeaveLPS = true;
@ -418,9 +418,9 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
/* if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) */
if (ps_mode == PS_MODE_ACTIVE) {
if (1
&& (((rtw_btcoex_IsBtControlLps(padapter) == false)
&& (((hal_btcoex_IsBtControlLps(padapter) == false)
)
|| ((rtw_btcoex_IsBtControlLps(padapter) == true)
|| ((hal_btcoex_IsBtControlLps(padapter) == true)
&& (hal_btcoex_IsLpsOn(padapter) == false))
)
) {
@ -461,7 +461,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
}
} else {
if ((PS_RDY_CHECK(padapter) && check_fwstate(&padapter->mlmepriv, WIFI_ASOC_STATE))
|| ((rtw_btcoex_IsBtControlLps(padapter) == true)
|| ((hal_btcoex_IsBtControlLps(padapter) == true)
&& (hal_btcoex_IsLpsOn(padapter) == true))
) {
u8 pslv;
@ -482,7 +482,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
pslv = PS_STATE_S0;
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
&& (hal_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8;
val8 = hal_btcoex_LpsVal(padapter);
@ -544,7 +544,7 @@ void LPS_Enter(struct adapter *padapter, const char *msg)
int n_assoc_iface = 0;
char buf[32] = {0};
if (rtw_btcoex_IsBtControlLps(padapter) == true)
if (hal_btcoex_IsBtControlLps(padapter) == true)
return;
/* Skip lps enter request if number of assocated adapters is not 1 */
@ -589,7 +589,7 @@ void LPS_Leave(struct adapter *padapter, const char *msg)
/* DBG_871X("+LeisurePSLeave\n"); */
if (rtw_btcoex_IsBtControlLps(padapter) == true)
if (hal_btcoex_IsBtControlLps(padapter) == true)
return;
if (pwrpriv->bLeisurePs) {
@ -911,7 +911,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
pslv = PS_STATE_S0;
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
&& (hal_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8;
val8 = hal_btcoex_LpsVal(padapter);
@ -1052,7 +1052,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
pslv = PS_STATE_S0;
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
&& (hal_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8;
val8 = hal_btcoex_LpsVal(padapter);
@ -1094,7 +1094,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
pslv = PS_STATE_S0;
if ((rtw_btcoex_IsBtDisabled(padapter) == false)
&& (rtw_btcoex_IsBtControlLps(padapter) == true)) {
&& (hal_btcoex_IsBtControlLps(padapter) == true)) {
u8 val8;
val8 = hal_btcoex_LpsVal(padapter);

View File

@ -1044,7 +1044,7 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode)
}
if (psmode > 0) {
if (rtw_btcoex_IsBtControlLps(padapter) == true) {
if (hal_btcoex_IsBtControlLps(padapter) == true) {
PowerState = hal_btcoex_RpwmVal(padapter);
byte5 = hal_btcoex_LpsVal(padapter);

View File

@ -22,7 +22,6 @@ void rtw_btcoex_BtInfoNotify(struct adapter *, u8 length, u8 *tmpBuf);
void rtw_btcoex_HaltNotify(struct adapter *);
u8 rtw_btcoex_IsBtDisabled(struct adapter *);
s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *);
u8 rtw_btcoex_IsBtControlLps(struct adapter *);
void rtw_btcoex_SetBTCoexist(struct adapter *, u8 bBtExist);
void rtw_btcoex_SetChipType(struct adapter *, u8 chipType);
void rtw_btcoex_SetPGAntNum(struct adapter *, u8 antNum);