]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
staging: rtl8723bs: Remove rtw_btcoex_IsBtControlLps()
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Mon, 1 Jul 2019 09:18:12 +0000 (14:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 16:34:08 +0000 (18:34 +0200)
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>
drivers/staging/rtl8723bs/core/rtw_btcoex.c
drivers/staging/rtl8723bs/core/rtw_cmd.c
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
drivers/staging/rtl8723bs/include/rtw_btcoex.h

index 9a6e0cb9f1cc2f134a49fa7bd1a60920f0efd5fd..bcbe8a44107440cdb0a4a3564866258053c8f99b 100644 (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);
index 77d22f403b52e17528907cecff4269b2bb012f58..41346b101f1db432e0b4a75b7e5ae2e401eb110b 100644 (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);
index 542a5fe33f1dc089d5e3460e62091c1ba71e1091..1ebde6e8880a8a88c2865c0c82b7ba9c424902ec 100644 (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;
 
index 09e064f1211b807af57c26ce83516c2beea75742..3fb8c65fb72a7ce92b6538170734038f4a0827f1 100644 (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);
index 87e85968d2e14001c51dc407bf2177f300e2bf06..080e974914b65b7188b1b9ffb6f9546ca4e55f4d 100644 (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);
 
index 73864262f9bccc1ca05e08d096323e036b2159b1..7b4cc8505a38eace56c5add057ff0aee11270343 100644 (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);