Commit 3a159d9a authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Create rtl8723au_bt_intf.h

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: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 983ebef5
......@@ -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);
......
......@@ -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 */
......
......@@ -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__);
......
......@@ -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 */
......
......@@ -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 */
......
......@@ -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 ===== */
......
/******************************************************************************
*
* 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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment