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

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
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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__);
+1 −1
Original line number Diff line number Diff line
@@ -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 */
+4 −4
Original line number Diff line number Diff line
@@ -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 */
Loading