Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aef9ae46 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo
Browse files

rtlwifi: btcoex: Remove 21a 1ant configuration parameter



In file halbtc8821a1ant.c, there are directives that depend on an
undocumented configuration parameter BT_AUTO_REPORT_ONLY_8821A_1ANT
that cannot be set from Kconfig. This parameter is replaced by a
boolean in the main structure used by all routines. It still cannot
be changed dynamically, but it is easier to document.

Using a suggestion from Realtek, the auto report is turned on with this
patch.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Pkshih <pkshih@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 6a01d48d
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -2116,6 +2116,7 @@ static void btc8821a1ant_init_hw_config(struct btc_coexist *btcoexist,
void ex_btc8821a1ant_init_hwconfig(struct btc_coexist *btcoexist, bool wifionly)
{
	btc8821a1ant_init_hw_config(btcoexist, true, wifionly);
	btcoexist->auto_report_1ant = true;
}

void ex_btc8821a1ant_init_coex_dm(struct btc_coexist *btcoexist)
@@ -2406,9 +2407,8 @@ void ex_btc8821a1ant_display_coex_info(struct btc_coexist *btcoexist)
	RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
		 "\r\n %-35s = %d/ %d", "0x774(low-pri rx/tx)",
		 coex_sta->low_priority_rx, coex_sta->low_priority_tx);
#if (BT_AUTO_REPORT_ONLY_8821A_1ANT == 1)
	if (btcoexist->auto_report_1ant)
		btc8821a1ant_monitor_bt_ctr(btcoexist);
#endif
	btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS);
}

@@ -2964,10 +2964,10 @@ void ex_btc8821a1ant_periodical(struct btc_coexist *btcoexist)
			 "[BTCoex], ****************************************************************\n");
	}

#if (BT_AUTO_REPORT_ONLY_8821A_1ANT == 0)
	if (!btcoexist->auto_report_1ant) {
		btc8821a1ant_query_bt_info(btcoexist);
		btc8821a1ant_monitor_bt_ctr(btcoexist);
#else
	} else {
		coex_sta->special_pkt_period_cnt++;
#endif
	}
}
+0 −2
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@
 * The following is for 8821A 1ANT BT Co-exist definition
 *===========================================
 */
#define	BT_AUTO_REPORT_ONLY_8821A_1ANT				0

#define	BT_INFO_8821A_1ANT_B_FTP	BIT7
#define	BT_INFO_8821A_1ANT_B_A2DP	BIT6
#define	BT_INFO_8821A_1ANT_B_HID	BIT5
+5 −0
Original line number Diff line number Diff line
@@ -496,6 +496,11 @@ struct btc_coexist {
	enum btc_chip_interface	chip_interface;
	struct btc_bt_link_info bt_link_info;

	/* boolean variables to replace BT_AUTO_REPORT_ONLY_XXXXY_ZANT
	 * configuration parameters
	 */
	bool auto_report_1ant;
	bool auto_report_2ant;
	bool initilized;
	bool stop_coex_dm;
	bool manual_control;