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

Commit 3b4fa04d authored by Yan-Hsuan Chuang's avatar Yan-Hsuan Chuang Committed by Kalle Valo
Browse files

rtlwifi: btcoex: 23b 2ant: tell fw if external or internal switch is used



Some chips use an external antenna switch, but fw may not realize it.
Here we tell fw exactly that which type of switch we are using.

Signed-off-by: default avatarYan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
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 a0f430b3
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -1106,14 +1106,19 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist,
		if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT) {
		if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT) {
			/* tell firmware "no antenna inverse" */
			/* tell firmware "no antenna inverse" */
			h2c_parameter[0] = 0;
			h2c_parameter[0] = 0;
			h2c_parameter[1] = 1;  /* ext switch type */
			btcoexist->btc_fill_h2c(btcoexist, 0x65, 2,
						h2c_parameter);
			btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
		} else {
		} else {
			/* tell firmware "antenna inverse" */
			/* tell firmware "antenna inverse" */
			h2c_parameter[0] = 1;
			h2c_parameter[0] = 1;
		}
		}

		if (use_ext_switch) {
			/* ext switch type */
			h2c_parameter[1] = 1;
		} else {
			/* int switch type */
			h2c_parameter[1] = 0;
		}
		btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, h2c_parameter);
	} else {
	} else {
		if (fw_ver >= 0x180000) {
		if (fw_ver >= 0x180000) {
			/* Use H2C to set GNT_BT to "Control by PTA"*/
			/* Use H2C to set GNT_BT to "Control by PTA"*/