staging: rtl8723au: Create rtl8723au_bt_intf.h
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 25 May 2014 20:43:23 +0000 (22:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 May 2014 22:14:41 +0000 (15:14 -0700)
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.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_pwrctrl.c
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 [new file with mode: 0644]
drivers/staging/rtl8723au/include/rtl8723a_hal.h

index 1768a94f8f7908bae04aeb08ce82fc2900c51127..db97ffb989c1e3ff9f2dfc4a182a95d9adafab6e 100644 (file)
@@ -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);
index aaadd8d19df310618b78f03b081b1c9768671fe8..def329923fb42efc58f931556ea2647062d35ff3 100644 (file)
@@ -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 */
index 79cc729cdae6a4507b9490dfafec1c76320fc858..f4e32d9efb8b5ad6dab8b6f9bd3c9e6079563c0a 100644 (file)
@@ -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__);
index d2ee240496cc36a40846a6eca60bbf2860a7abbc..dc4dfe9626c9b23098077b10bcab02f1c8e81469 100644 (file)
@@ -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 */
index a0ab7abf67c83b9e3576a685464b9bff165fcf5d..4c4f0bf12605432fc8661b9491e2fa253ed3ef4b 100644 (file)
@@ -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 */
index 6151019188658aefe0a334df21671dd60d2f652d..bb6790713b7ec468af36ff2fb5e7d7048b26a41c 100644 (file)
@@ -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 (file)
index 0000000..66a3f18
--- /dev/null
@@ -0,0 +1,30 @@
+/******************************************************************************
+ *
+ * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
+ * Copyright(c) 2014, Jes Sorensen <Jes.Sorensen@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
index 2dc7c93df62e67b635b44d7f93947287ba0af8ce..33ad2b7ee69e8725f2b52dbdf5608da38b8d829d 100644 (file)
@@ -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
This page took 0.048108 seconds and 5 git commands to generate.