|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
From c18d8f5095715c56bb3cd9cba64242542632054b Mon Sep 17 00:00:00 2001
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
From: Larry Finger <Larry.Finger@lwfinger.net>
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Date: Wed, 16 Mar 2016 13:33:34 -0500
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Subject: rtlwifi: rtl8723be: Add antenna select module parameter
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
A number of new laptops have been delivered with only a single antenna.
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
In principle, this is OK; however, a problem arises when the on-board
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
EEPROM is programmed to use the other antenna connection. The option
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
of opening the computer and moving the connector is not always possible
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
as it will void the warranty in some cases. In addition, this solution
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
breaks the Windows driver when the box dual boots Linux and Windows.
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
A fix involving a new module parameter has been developed. This commit
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
adds the new parameter and implements the changes needed for the driver.
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Cc: Stable <stable@vger.kernel.org> [V4.0+]
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
---
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 5 +++++
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 3 +++
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 +++
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
3 files changed, 11 insertions(+)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
index c983d2f..5a3df91 100644
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -2684,6 +2684,7 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
bool auto_load_fail, u8 *hwinfo)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
{
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
u8 value;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
u32 tmpu_32;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -2702,6 +2703,10 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
rtlpriv->btcoexist.btc_info.ant_num = ANT_X2;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ /* override ant_num / ant_path */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ if (mod_params->ant_sel)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ rtlpriv->btcoexist.btc_info.ant_num =
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
void rtl8723be_bt_reg_init(struct ieee80211_hw *hw)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
index a78eaed..2101793 100644
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -273,6 +273,7 @@ static struct rtl_mod_params rtl8723be_mod_params = {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
.msi_support = false,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
.disable_watchdog = false,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
.debug = DBG_EMERG,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ .ant_sel = 0,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
};
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
static struct rtl_hal_cfg rtl8723be_hal_cfg = {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -394,6 +395,7 @@ module_param_named(fwlps, rtl8723be_mod_params.fwctrl_lps, bool, 0444);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
module_param_named(msi, rtl8723be_mod_params.msi_support, bool, 0444);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
module_param_named(disable_watchdog, rtl8723be_mod_params.disable_watchdog,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
bool, 0444);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+module_param_named(ant_sel, rtl8723be_mod_params.ant_sel, int, 0444);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -402,6 +404,7 @@ MODULE_PARM_DESC(msi, "Set to 1 to use MSI interrupts mode (default 0)\n");
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
MODULE_PARM_DESC(disable_watchdog,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
"Set to 1 to disable the watchdog (default 0)\n");
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+MODULE_PARM_DESC(ant_sel, "Set to 1 or 2 to force antenna number (default 0)\n");
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
index 554d814..93bd7fc 100644
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -2246,6 +2246,9 @@ struct rtl_mod_params {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
/* default 0: 1 means do not disable interrupts */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
bool int_clear;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ /* select antenna */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ int ant_sel;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
};
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
struct rtl_hal_usbint_cfg {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
cgit v0.12
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
From baa1702290953295e421f0f433e2b1ff4815827c Mon Sep 17 00:00:00 2001
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
From: Larry Finger <Larry.Finger@lwfinger.net>
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Date: Wed, 16 Mar 2016 13:33:35 -0500
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Subject: rtlwifi: btcoexist: Implement antenna selection
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
The previous patch added an option to rtl8723be to manually select the
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
antenna for those cases when only a single antenna is present, and the
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
on-board EEPROM is incorrectly programmed. This patch implements the
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
necessary changes in the Bluetooth coexistence driver.
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Cc: Stable <stable@vger.kernel.org> [V4.0+]
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
---
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
.../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 9 ++++++--
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
.../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 27 +++++++++++++++++++++-
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
.../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 +-
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
.../wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 5 +++-
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
4 files changed, 38 insertions(+), 5 deletions(-)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
index c43ab59..77cbd10 100644
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -1203,7 +1203,6 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
/* Force GNT_BT to low */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
btcoexist->btc_write_1byte_bitmask(btcoexist, 0x765, 0x18, 0x0);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
- btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT) {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
/* tell firmware "no antenna inverse" */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -1211,19 +1210,25 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
h2c_parameter[1] = 1; /* ext switch type */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
btcoexist->btc_fill_h2c(btcoexist, 0x65, 2,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
h2c_parameter);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
} else {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
/* tell firmware "antenna inverse" */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
h2c_parameter[0] = 1;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
h2c_parameter[1] = 1; /* ext switch type */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
btcoexist->btc_fill_h2c(btcoexist, 0x65, 2,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
h2c_parameter);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
/* ext switch setting */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
if (use_ext_switch) {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
/* fixed internal switch S1->WiFi, S0->BT */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
- btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ else
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
switch (antpos_type) {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
case BTC_ANT_WIFI_AT_MAIN:
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
/* ext switch main at wifi */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
index b2791c8..babd149 100644
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -965,13 +965,38 @@ void exhalbtc_set_chip_type(u8 chip_type)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
-void exhalbtc_set_ant_num(u8 type, u8 ant_num)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8 ant_num)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
{
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
if (BT_COEX_ANT_TYPE_PG == type) {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
gl_bt_coexist.board_info.pg_ant_num = ant_num;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
gl_bt_coexist.board_info.btdm_ant_num = ant_num;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ /* The antenna position:
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ * Main (default) or Aux for pgAntNum=2 && btdmAntNum =1.
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ * The antenna position should be determined by
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ * auto-detect mechanism.
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ * The following is assumed to main,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ * and those must be modified
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ * if y auto-detect mechanism is ready
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ */
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ if ((gl_bt_coexist.board_info.pg_ant_num == 2) &&
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ (gl_bt_coexist.board_info.btdm_ant_num == 1))
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ BTC_ANTENNA_AT_MAIN_PORT;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ else
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ BTC_ANTENNA_AT_MAIN_PORT;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
} else if (BT_COEX_ANT_TYPE_ANTDIV == type) {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
gl_bt_coexist.board_info.btdm_ant_num = ant_num;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ BTC_ANTENNA_AT_MAIN_PORT;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ } else if (type == BT_COEX_ANT_TYPE_DETECTED) {
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ gl_bt_coexist.board_info.btdm_ant_num = ant_num;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ if (rtlpriv->cfg->mod_params->ant_sel == 1)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ BTC_ANTENNA_AT_AUX_PORT;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ else
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ BTC_ANTENNA_AT_MAIN_PORT;
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
index 0a903ea..f41ca57 100644
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -535,7 +535,7 @@ void exhalbtc_set_bt_patch_version(u16 bt_hci_version, u16 bt_patch_version);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
void exhalbtc_update_min_bt_rssi(char bt_rssi);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
void exhalbtc_set_bt_exist(bool bt_exist);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
void exhalbtc_set_chip_type(u8 chip_type);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
-void exhalbtc_set_ant_num(u8 type, u8 ant_num);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8 ant_num);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
void exhalbtc_display_bt_coex_info(struct btc_coexist *btcoexist);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
void exhalbtc_signal_compensation(struct btc_coexist *btcoexist,
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
u8 *rssi_wifi, u8 *rssi_bt);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
index b9b0cb7..d3fd921 100644
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
@@ -72,7 +72,10 @@ void rtl_btc_init_hal_vars(struct rtl_priv *rtlpriv)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
__func__, bt_type);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
exhalbtc_set_chip_type(bt_type);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
- exhalbtc_set_ant_num(BT_COEX_ANT_TYPE_PG, ant_num);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ if (rtlpriv->cfg->mod_params->ant_sel == 1)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_DETECTED, 1);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ else
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
+ exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_PG, ant_num);
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
}
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
void rtl_btc_init_hw_config(struct rtl_priv *rtlpriv)
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
--
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
cgit v0.12
|
|
![](https://seccdn.libravatar.org/avatar/8fa9922ab9e43f028e7d892ae8332cd1187e5074c14af0b8b82c52fc6b1435fb?s=16&d=retro) |
59c5151 |
|