]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8723au: Move rtl8723a_dual_antenna_detection() to rtl8723a_bt-coexist.c
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 25 May 2014 20:43:38 +0000 (22:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 May 2014 22:14:44 +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/rtl8723a_bt-coexist.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/include/rtl8723a_bt_intf.h
drivers/staging/rtl8723au/include/rtl8723a_hal.h

index 4d94b4b99d60549dc5259aa7063cac6c9154291c..48c16f4b235552fb30bcdebaaefb92f637261e2e 100644 (file)
@@ -11341,3 +11341,49 @@ void HALBT_SetRtsCtsNoLenLimit(struct rtw_adapter *padapter)
 }
 
 /*  ===== End of sync from SD7 driver HAL/HalBT.c ===== */
+
+void rtl8723a_dual_antenna_detection(struct rtw_adapter *padapter)
+{
+       struct hal_data_8723a *pHalData;
+       struct dm_odm_t *pDM_Odm;
+       struct sw_ant_sw *pDM_SWAT_Table;
+       u8 i;
+
+       pHalData = GET_HAL_DATA(padapter);
+       pDM_Odm = &pHalData->odmpriv;
+       pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table;
+
+       /*  */
+       /*  <Roger_Notes> RTL8723A Single and Dual antenna dynamic detection
+           mechanism when RF power state is on. */
+       /*  We should take power tracking, IQK, LCK, RCK RF read/write
+           operation into consideration. */
+       /*  2011.12.15. */
+       /*  */
+       if (!pHalData->bAntennaDetected) {
+               u8 btAntNum = BT_GetPGAntNum(padapter);
+
+               /*  Set default antenna B status */
+               if (btAntNum == Ant_x2)
+                       pDM_SWAT_Table->ANTB_ON = true;
+               else if (btAntNum == Ant_x1)
+                       pDM_SWAT_Table->ANTB_ON = false;
+               else
+                       pDM_SWAT_Table->ANTB_ON = true;
+
+               if (pHalData->CustomerID != RT_CID_TOSHIBA) {
+                       for (i = 0; i < MAX_ANTENNA_DETECTION_CNT; i++) {
+                               if (ODM_SingleDualAntennaDetection
+                                   (&pHalData->odmpriv, ANTTESTALL) == true)
+                                       break;
+                       }
+
+                       /*  Set default antenna number for BT coexistence */
+                       if (btAntNum == Ant_x2)
+                               BT_SetBtCoexCurrAntNum(padapter,
+                                                      pDM_SWAT_Table->
+                                                      ANTB_ON ? 2 : 1);
+               }
+               pHalData->bAntennaDetected = true;
+       }
+}
index 20c93e471adc079d81e2d749ffd23a9ecbc8e82c..970b5858aad011f074ffab43c379e0d8fc9343b6 100644 (file)
@@ -2575,52 +2575,3 @@ void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type)
        }
 #endif
 }
-
-#ifdef CONFIG_8723AU_BT_COEXIST
-
-void rtl8723a_SingleDualAntennaDetection(struct rtw_adapter *padapter)
-{
-       struct hal_data_8723a *pHalData;
-       struct dm_odm_t *pDM_Odm;
-       struct sw_ant_sw *pDM_SWAT_Table;
-       u8 i;
-
-       pHalData = GET_HAL_DATA(padapter);
-       pDM_Odm = &pHalData->odmpriv;
-       pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table;
-
-       /*  */
-       /*  <Roger_Notes> RTL8723A Single and Dual antenna dynamic detection
-           mechanism when RF power state is on. */
-       /*  We should take power tracking, IQK, LCK, RCK RF read/write
-           operation into consideration. */
-       /*  2011.12.15. */
-       /*  */
-       if (!pHalData->bAntennaDetected) {
-               u8 btAntNum = BT_GetPGAntNum(padapter);
-
-               /*  Set default antenna B status */
-               if (btAntNum == Ant_x2)
-                       pDM_SWAT_Table->ANTB_ON = true;
-               else if (btAntNum == Ant_x1)
-                       pDM_SWAT_Table->ANTB_ON = false;
-               else
-                       pDM_SWAT_Table->ANTB_ON = true;
-
-               if (pHalData->CustomerID != RT_CID_TOSHIBA) {
-                       for (i = 0; i < MAX_ANTENNA_DETECTION_CNT; i++) {
-                               if (ODM_SingleDualAntennaDetection
-                                   (&pHalData->odmpriv, ANTTESTALL) == true)
-                                       break;
-                       }
-
-                       /*  Set default antenna number for BT coexistence */
-                       if (btAntNum == Ant_x2)
-                               BT_SetBtCoexCurrAntNum(padapter,
-                                                      pDM_SWAT_Table->
-                                                      ANTB_ON ? 2 : 1);
-               }
-               pHalData->bAntennaDetected = true;
-       }
-}
-#endif /*  CONFIG_8723AU_BT_COEXIST */
index d30ba1b022ed43d8144d382fb9689dbd66218a0d..cbd5a8ce45c15daa67b1d6e82a96e4bb38db0d08 100644 (file)
@@ -831,9 +831,7 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter)
        HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_LCK);
                        rtl8723a_phy_lc_calibrate(Adapter);
 
-#ifdef CONFIG_8723AU_BT_COEXIST
-                       rtl8723a_SingleDualAntennaDetection(Adapter);
-#endif
+                       rtl8723a_dual_antenna_detection(Adapter);
                }
 
        HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC21);
index 5de42b0f97ad0a704ab8c809df450b6346e0cc19..7cf4de62c9870986bc0274342bc10127a35c735f 100644 (file)
@@ -31,6 +31,7 @@ void rtl8723a_BT_specialpacket_notify(struct rtw_adapter *padapter);
 void rtl8723a_BT_lps_leave(struct rtw_adapter *padapter);
 void rtl8723a_BT_disable_coexist(struct rtw_adapter *padapter);
 bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter);
+void rtl8723a_dual_antenna_detection(struct rtw_adapter *padapter);
 #else
 static inline bool rtl8723a_BT_using_antenna_1(struct rtw_adapter *padapter)
 {
@@ -54,6 +55,7 @@ static inline bool rtl8723a_BT_disable_EDCA_turbo(struct rtw_adapter *padapter)
 {
        return false;
 }
+#define rtl8723a_dual_antenna_detection(padapter)              do {} while(0)
 #endif
 
 #endif
index 33ad2b7ee69e8725f2b52dbdf5608da38b8d829d..344b7085f877ec58e8470676db8039e883fe519a 100644 (file)
@@ -529,10 +529,6 @@ void Hal_EfuseParseThermalMeter_8723A(struct rtw_adapter *padapter, u8 *hwinfo,
 
 void Hal_InitChannelPlan23a(struct rtw_adapter *padapter);
 
-#ifdef CONFIG_8723AU_BT_COEXIST
-void rtl8723a_SingleDualAntennaDetection(struct rtw_adapter *padapter);
-#endif
-
 /*  register */
 void SetBcnCtrlReg23a(struct rtw_adapter *padapter, u8 SetBits, u8 ClearBits);
 void rtl8723a_InitBeaconParameters(struct rtw_adapter *padapter);