From: Jes Sorensen <[email protected]>
Signed-off-by: Jes Sorensen <[email protected]>
---
drivers/staging/rtl8723au/hal/hal_com.c | 11 ++++-------
.../staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 22 +++++++++++-----------
.../rtl8723au/include/rtl8723a_bt-coexist.h | 2 --
.../staging/rtl8723au/include/rtl8723a_bt_intf.h | 5 +++++
4 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/rtl8723au/hal/hal_com.c
b/drivers/staging/rtl8723au/hal/hal_com.c
index dc4dfe9..09e888a 100644
--- a/drivers/staging/rtl8723au/hal/hal_com.c
+++ b/drivers/staging/rtl8723au/hal/hal_com.c
@@ -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));
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index 4c4f0bf..b28dc1a 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -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 ===== */
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h
b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h
index bb67907..d8a3244 100644
--- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h
+++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h
@@ -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);
diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h
b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h
index 66a3f18..653af15 100644
--- a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h
+++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h
@@ -20,11 +20,16 @@
#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
--
1.9.3
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel