diff options
author | Yan-Hsuan Chuang <yhchuang@realtek.com> | 2017-04-04 11:50:02 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-04-13 17:08:38 +0300 |
commit | 3b4fa04d8efdf24f331e1d590090b8cfe9007182 (patch) | |
tree | 5fe84034c18f92d5336e1bc71ac0f3649a050409 /drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | |
parent | a0f430b3eaefc180b9b04f3579ed90a354765f39 (diff) | |
download | linux-3b4fa04d8efdf24f331e1d590090b8cfe9007182.tar.bz2 |
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: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Larry 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: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c index 55dabe050f87..ec95f0097dfc 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c @@ -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) { /* tell firmware "no antenna inverse" */ 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 { /* tell firmware "antenna inverse" */ 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 { if (fw_ver >= 0x180000) { /* Use H2C to set GNT_BT to "Control by PTA"*/ |