mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
rtlwifi: btcoex: 21a 2ant: settings before wifi firmware is ready
Before firmware is ready, set GNT_BT to high to let bt transmit. Routine ex_btc8821a2ant_pre_load_firmware() restored. 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>
This commit is contained in:
parent
be04040108
commit
4a279c2b73
@ -3609,6 +3609,43 @@ void ex_btc8821a2ant_init_hwconfig(struct btc_coexist *btcoexist)
|
||||
btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1);
|
||||
}
|
||||
|
||||
void ex_btc8821a2ant_pre_load_firmware(struct btc_coexist *btcoexist)
|
||||
{
|
||||
struct btc_board_info *board_info = &btcoexist->board_info;
|
||||
u8 u8tmp = 0x4; /* Set BIT2 by default since it's 2ant case */
|
||||
|
||||
/**
|
||||
* S0 or S1 setting and Local register setting(By the setting fw can get
|
||||
* ant number, S0/S1, ... info)
|
||||
*
|
||||
* Local setting bit define
|
||||
* BIT0: "0" for no antenna inverse; "1" for antenna inverse
|
||||
* BIT1: "0" for internal switch; "1" for external switch
|
||||
* BIT2: "0" for one antenna; "1" for two antenna
|
||||
* NOTE: here default all internal switch and 1-antenna ==> BIT1=0 and
|
||||
* BIT2=0
|
||||
*/
|
||||
if (btcoexist->chip_interface == BTC_INTF_USB) {
|
||||
/* fixed at S0 for USB interface */
|
||||
u8tmp |= 0x1; /* antenna inverse */
|
||||
btcoexist->btc_write_local_reg_1byte(btcoexist, 0xfe08, u8tmp);
|
||||
} else {
|
||||
/* for PCIE and SDIO interface, we check efuse 0xc3[6] */
|
||||
if (board_info->single_ant_path == 0) {
|
||||
} else if (board_info->single_ant_path == 1) {
|
||||
/* set to S0 */
|
||||
u8tmp |= 0x1; /* antenna inverse */
|
||||
}
|
||||
|
||||
if (btcoexist->chip_interface == BTC_INTF_PCI)
|
||||
btcoexist->btc_write_local_reg_1byte(btcoexist, 0x384,
|
||||
u8tmp);
|
||||
else if (btcoexist->chip_interface == BTC_INTF_SDIO)
|
||||
btcoexist->btc_write_local_reg_1byte(btcoexist, 0x60,
|
||||
u8tmp);
|
||||
}
|
||||
}
|
||||
|
||||
void ex_btc8821a2ant_init_coex_dm(struct btc_coexist *btcoexist)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = btcoexist->adapter;
|
||||
|
Loading…
Reference in New Issue
Block a user