From: Jes Sorensen <jes.soren...@redhat.com> Use this header for declaring functions that are currently #ifdef'ed out in the general code.
Start by moving BTDM_1Ant8723A() there and renaming it appropriately. Signed-off-by: Jes Sorensen <jes.soren...@redhat.com> --- drivers/staging/rtl8723au/core/rtw_cmd.c | 10 ++++---- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 6 ++--- drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 2 +- drivers/staging/rtl8723au/hal/hal_com.c | 2 +- .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 8 +++--- .../rtl8723au/include/rtl8723a_bt-coexist.h | 2 -- .../staging/rtl8723au/include/rtl8723a_bt_intf.h | 30 ++++++++++++++++++++++ drivers/staging/rtl8723au/include/rtl8723a_hal.h | 1 + 8 files changed, 45 insertions(+), 16 deletions(-) create mode 100644 drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 1768a94..db97ffb 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -991,7 +991,7 @@ static void traffic_status_watchdog(struct rtw_adapter *padapter) } #ifdef CONFIG_8723AU_BT_COEXIST - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { /* check traffic for powersaving. */ @@ -1064,7 +1064,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) case LPS_CTRL_SCAN: #ifdef CONFIG_8723AU_BT_COEXIST BT_WifiScanNotify(padapter, true); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { if (check_fwstate(pmlmepriv, _FW_LINKED)) @@ -1087,7 +1087,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) mstatus = 0;/* disconnect */ #ifdef CONFIG_8723AU_BT_COEXIST BT_WifiMediaStatusNotify(padapter, mstatus); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { LPS_Leave23a(padapter); @@ -1098,7 +1098,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) pwrpriv->DelayLPSLastTimeStamp = jiffies; #ifdef CONFIG_8723AU_BT_COEXIST BT_SpecialPacketNotify(padapter); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { LPS_Leave23a(padapter); @@ -1107,7 +1107,7 @@ static void lps_ctrl_wk_hdl(struct rtw_adapter *padapter, u8 lps_ctrl_type) case LPS_CTRL_LEAVE: #ifdef CONFIG_8723AU_BT_COEXIST BT_LpsLeave(padapter); - if (BT_1Ant(padapter) == false) + if (rtl8723a_BT_using_antenna_1(padapter) == false) #endif { LPS_Leave23a(padapter); diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index aaadd8d..def3299 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -3479,7 +3479,7 @@ static void issue_assocreq(struct rtw_adapter *padapter) cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info); #ifdef CONFIG_8723AU_BT_COEXIST - if (BT_1Ant(padapter) == true) { + if (rtl8723a_BT_using_antenna_1(padapter)) { /* set to 8K */ pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para &= (u8)~IEEE80211_HT_AMPDU_PARM_FACTOR; /* pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para |= MAX_AMPDU_FACTOR_8K */ @@ -4038,7 +4038,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter, &pattrib->pktlen); #ifdef CONFIG_8723AU_BT_COEXIST - if ((BT_1Ant(padapter) == true) && + if (rtl8723a_BT_using_antenna_1(padapter) && ((pmlmeinfo->assoc_AP_vendor != broadcomAP) || memcmp(raddr, tendaAPMac, 3))) { /* A-MSDU NOT Supported */ @@ -4105,7 +4105,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter, BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */ #ifdef CONFIG_8723AU_BT_COEXIST - if ((BT_1Ant(padapter) == true) && + if (rtl8723a_BT_using_antenna_1(padapter) && ((pmlmeinfo->assoc_AP_vendor != broadcomAP) || memcmp(raddr, tendaAPMac, 3))) { /* max buffer size is 8 MSDU */ diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index 79cc729..f4e32d9 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -352,7 +352,7 @@ void rtw_set_ps_mode23a(struct rtw_adapter *padapter, u8 ps_mode, } else { if (PS_RDY_CHECK(padapter) #ifdef CONFIG_8723AU_BT_COEXIST - || (BT_1Ant(padapter) == true) + || (rtl8723a_BT_using_antenna_1(padapter)) #endif ) { DBG_8723A("%s: Enter 802.11 power save\n", __func__); diff --git a/drivers/staging/rtl8723au/hal/hal_com.c b/drivers/staging/rtl8723au/hal/hal_com.c index d2ee240..dc4dfe9 100644 --- a/drivers/staging/rtl8723au/hal/hal_com.c +++ b/drivers/staging/rtl8723au/hal/hal_com.c @@ -457,7 +457,7 @@ void rtl8723a_set_ampdu_factor(struct rtw_adapter *padapter, u8 FactorToSet) pRegToSet = RegToSet_Normal; /* 0xb972a841; */ #ifdef CONFIG_8723AU_BT_COEXIST if ((BT_IsBtDisabled(padapter) == false) && - (BT_1Ant(padapter) == true)) { + rtl8723a_BT_using_antenna_1(padapter)) { MaxAggNum = 0x8; } else #endif /* CONFIG_8723AU_BT_COEXIST */ diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index a0ab7ab..4c4f0bf 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -9262,7 +9262,7 @@ void BTDM_SetFw3a( { u8 H2C_Parameter[5] = {0}; - if (BTDM_1Ant8723A(padapter)) { + if (rtl8723a_BT_using_antenna_1(padapter)) { if ((!check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE)) && (get_fwstate(&padapter->mlmepriv) != WIFI_NULL_STATE)) { /* for softap mode */ @@ -9818,7 +9818,7 @@ static void BTDM_ForDhcp8723A(struct rtw_adapter *padapter) BTDM_1AntForDhcp(padapter); } -u8 BTDM_1Ant8723A(struct rtw_adapter *padapter) +bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) { if (btdm_BtWifiAntNum(padapter) == Ant_x1) return true; @@ -10572,7 +10572,7 @@ u8 BTDM_DisableEDCATurbo(struct rtw_adapter *padapter) return bRet; } - if (BT_1Ant(padapter)) { + if (rtl8723a_BT_using_antenna_1(padapter)) { bRet = false; pHalData->bt_coexist.lastBtEdca = 0; return bRet; @@ -10750,7 +10750,7 @@ void BTDM_TurnOffBtCoexistBeforeEnterIPS(struct rtw_adapter *padapter) return; /* 8723 1Ant doesn't need to turn off bt coexist mechanism. */ - if (BTDM_1Ant8723A(padapter)) + if (rtl8723a_BT_using_antenna_1(padapter)) return; /* Before enter IPS, turn off FW BT Co-exist mechanism */ diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h index 6151019..bb67907 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt-coexist.h @@ -1330,8 +1330,6 @@ void BTDM_SetSwPenaltyTxRateAdaptive(struct rtw_adapter * padapter, u8 raType); void BTDM_SetFwDecBtPwr(struct rtw_adapter * padapter, u8 bDecBtPwr); u8 BTDM_BtProfileSupport(struct rtw_adapter * padapter); void BTDM_LpsLeave(struct rtw_adapter * padapter); -u8 BTDM_1Ant8723A(struct rtw_adapter * padapter); -#define BT_1Ant BTDM_1Ant8723A /* ===== End of sync from SD7 driver HAL/BTCoexist/HalBtc8723.h ===== */ diff --git a/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h new file mode 100644 index 0000000..66a3f18 --- /dev/null +++ b/drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h @@ -0,0 +1,30 @@ +/****************************************************************************** + * + * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved. + * Copyright(c) 2014, Jes Sorensen <jes.soren...@redhat.com> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + ******************************************************************************/ +#ifndef __RTL8723A_BT_INTF_H__ +#define __RTL8723A_BT_INTF_H__ + +#include <drv_types.h> + +#ifdef CONFIG_8723AU_BT_COEXIST +bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter); +#else +static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter) +{ + return false; +} +#endif + +#endif diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h index 2dc7c93..33ad2b7 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h @@ -20,6 +20,7 @@ #include "Hal8723APhyReg.h" #include "Hal8723APhyCfg.h" #include "rtl8723a_rf.h" +#include "rtl8723a_bt_intf.h" #ifdef CONFIG_8723AU_BT_COEXIST #include "rtl8723a_bt-coexist.h" #endif -- 1.9.3 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel