staging: rtl8723au: Convert BT_IsBtDisabled() into rtl8723a_BT_enabled()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 25 May 2014 20:43:24 +0000 (22:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 May 2014 22:14:42 +0000 (15:14 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/hal_com.c
drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h
drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h

index dc4dfe9626c9b23098077b10bcab02f1c8e81469..09e888aaef716f4ab0a44cf20a5fd9ff3f7ad994 100644 (file)
@@ -455,15 +455,12 @@ void rtl8723a_set_ampdu_factor(struct rtw_adapter *padapter, u8 FactorToSet)
        u8 index = 0;
 
        pRegToSet = RegToSet_Normal;    /*  0xb972a841; */
-#ifdef CONFIG_8723AU_BT_COEXIST
-       if ((BT_IsBtDisabled(padapter) == false) &&
-           rtl8723a_BT_using_antenna_1(padapter)) {
+
+       if (rtl8723a_BT_enabled(padapter) &&
+           rtl8723a_BT_using_antenna_1(padapter))
                MaxAggNum = 0x8;
-       } else
-#endif /*  CONFIG_8723AU_BT_COEXIST */
-       {
+       else
                MaxAggNum = 0xF;
-       }
 
        if (FactorToSet <= 3) {
                FactorToSet = (1 << (FactorToSet + 2));
index 4c4f0bf12605432fc8661b9491e2fa253ed3ef4b..b28dc1ae904704202f1bb2ba3c4c94d1e3d5cb71 100644 (file)
@@ -5519,7 +5519,7 @@ _btdm_1AntSetPSTDMA(struct rtw_adapter *padapter, u8 bPSEn, u8 smartps,
                        if (!bTDMAOn) {
                                btdm_1AntPsTdma(padapter, false, tdmaType);
                        } else {
-                               if ((BT_IsBtDisabled(padapter)) ||
+                               if (!rtl8723a_BT_enabled(padapter) ||
                                    (pHalData->bt_coexist.halCoex8723.c2hBtInfo == BT_INFO_STATE_NO_CONNECTION) ||
                                    (pHalData->bt_coexist.halCoex8723.c2hBtInfo == BT_INFO_STATE_CONNECT_IDLE) ||
                                    (tdmaType == 29))
@@ -6064,7 +6064,7 @@ static void btdm_1AntBtCoexistHandler(struct rtw_adapter *padapter)
        pBtCoex8723 = &pHalData->bt_coexist.halCoex8723;
        pBtdm8723 = &pBtCoex8723->btdm1Ant;
        padapter->pwrctrlpriv.btcoex_rfon = false;
-       if (BT_IsBtDisabled(padapter)) {
+       if (!rtl8723a_BT_enabled(padapter)) {
                RTPRINT(FBT, BT_TRACE, ("[BTCoex], BT is disabled\n"));
 
                if (BTDM_IsWifiConnectionExist(padapter)) {
@@ -6243,7 +6243,7 @@ static void BTDM_1AntWifiAssociateNotify(struct rtw_adapter *padapter, u8 type)
 
        if (type) {
                rtl8723a_CheckAntenna_Selection(padapter);
-               if (BT_IsBtDisabled(padapter))
+               if (!rtl8723a_BT_enabled(padapter))
                        btdm_1AntSetPSTDMA(padapter, false, 0, false, 9);
                else {
                        struct bt_coexist_8723a *pBtCoex;
@@ -6275,7 +6275,7 @@ static void BTDM_1AntWifiAssociateNotify(struct rtw_adapter *padapter, u8 type)
                        }
                }
        } else {
-               if (BT_IsBtDisabled(padapter)) {
+               if (!rtl8723a_BT_enabled(padapter)) {
                        if (!BTDM_IsWifiConnectionExist(padapter)) {
                                btdm_1AntPsTdma(padapter, false, 0);
                                btdm_1AntTSFSwitch(padapter, false);
@@ -6360,7 +6360,7 @@ static void BTDM_1AntWifiScanNotify(struct rtw_adapter *padapter, u8 scanType)
 
        if (scanType) {
                rtl8723a_CheckAntenna_Selection(padapter);
-               if (BT_IsBtDisabled(padapter)) {
+               if (!rtl8723a_BT_enabled(padapter)) {
                        btdm_1AntSetPSTDMA(padapter, false, 0, false, 9);
                } else if (BTDM_IsWifiConnectionExist(padapter) == false) {
                        BTDM_1AntWifiAssociateNotify(padapter, true);
@@ -9306,7 +9306,7 @@ void BTDM_QueryBtInformation(struct rtw_adapter *padapter)
        pHalData = GET_HAL_DATA(padapter);
        pBtCoex = &pHalData->bt_coexist.halCoex8723;
 
-       if (BT_IsBtDisabled(padapter)) {
+       if (!rtl8723a_BT_enabled(padapter)) {
                pBtCoex->c2hBtInfo = BT_INFO_STATE_DISABLED;
                pBtCoex->bC2hBtInfoReqSent = false;
                return;
@@ -9851,7 +9851,7 @@ static void BTDM_BTCoexist8723A(struct rtw_adapter *padapter)
        }
 
        if (pBtCoex->bC2hBtInfoReqSent) {
-               if (BT_IsBtDisabled(padapter)) {
+               if (!rtl8723a_BT_enabled(padapter)) {
                        pBtCoex->c2hBtInfo = BT_INFO_STATE_DISABLED;
                } else {
                        if (pBtCoex->c2hBtInfo == BT_INFO_STATE_DISABLED)
@@ -9859,7 +9859,7 @@ static void BTDM_BTCoexist8723A(struct rtw_adapter *padapter)
                }
 
                btdm_BTCoexist8723AHandler(padapter);
-       } else if (BT_IsBtDisabled(padapter) == true) {
+       } else if (!rtl8723a_BT_enabled(padapter)) {
                pBtCoex->c2hBtInfo = BT_INFO_STATE_DISABLED;
                btdm_BTCoexist8723AHandler(padapter);
        }
@@ -11236,14 +11236,14 @@ u8 BTDM_IsActionPANA2DP(struct rtw_adapter *padapter)
        return bRet;
 }
 
-u8 BTDM_IsBtDisabled(struct rtw_adapter *padapter)
+bool rtl8723a_BT_enabled(struct rtw_adapter *padapter)
 {
        struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
 
        if (pHalData->bt_coexist.bCurBtDisabled)
-               return true;
-       else
                return false;
+       else
+               return true;
 }
 
 /*  ===== End of sync from SD7 driver HAL/BTCoexist/HalBtCoexist.c ===== */
index bb6790713b7ec468af36ff2fb5e7d7048b26a41c..d8a324484b5501de8427441af98c5c0a08655845 100644 (file)
@@ -1601,8 +1601,6 @@ u8 BTDM_IsActionPAN(struct rtw_adapter * padapter);
 u8 BTDM_IsActionHIDA2DP(struct rtw_adapter * padapter);
 u8 BTDM_IsActionHIDPAN(struct rtw_adapter * padapter);
 u8 BTDM_IsActionPANA2DP(struct rtw_adapter * padapter);
-u8 BTDM_IsBtDisabled(struct rtw_adapter * padapter);
-#define BT_IsBtDisabled BTDM_IsBtDisabled
 u32 BTDM_BtTxRxCounterH(struct rtw_adapter * padapter);
 u32 BTDM_BtTxRxCounterL(struct rtw_adapter * padapter);
 
index 66a3f184354534eed2def8659b569c334de097a6..653af15d5ec3ea158dd9a4616ebda0bf82eff665 100644 (file)
 
 #ifdef CONFIG_8723AU_BT_COEXIST
 bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter);
+bool rtl8723a_BT_enabled(struct rtw_adapter *padapter);
 #else
 static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter)
 {
        return false;
 }
+static inline bool rtl8723a_BT_enabled(struct rtw_adapter *padapter)
+{
+       return false;
+}
 #endif
 
 #endif
This page took 0.034654 seconds and 5 git commands to generate.