rtlwifi: btcoex: rtl8723be: fix ant_sel not work
authorPing-Ke Shih <pkshih@realtek.com>
Sun, 18 Jun 2017 16:12:41 +0000 (11:12 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 21 Jun 2017 15:28:00 +0000 (18:28 +0300)
To make ant_sel work, we should call power_on_setting to set antenna
correctly.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@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>
drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
drivers/net/wireless/realtek/rtlwifi/wifi.h

index a79f936bb3947d4bb3f6967dbf89fbda040cb006..0ce2900722f463e0f57c031eb34df4e09bfc0956 100644 (file)
@@ -846,6 +846,9 @@ static bool _rtl8723be_init_mac(struct ieee80211_hw *hw)
                return false;
        }
 
+       if (rtlpriv->cfg->ops->get_btc_status())
+               rtlpriv->btcoexist.btc_ops->btc_power_on_setting(rtlpriv);
+
        bytetmp = rtl_read_byte(rtlpriv, REG_MULTI_FUNC_CTRL);
        rtl_write_byte(rtlpriv, REG_MULTI_FUNC_CTRL, bytetmp | BIT(3));
 
index c0d2601bc55fbb337ea854afd4207b1e67b073eb..31fcf43e24c1a07592a60178e0de1cefd6d45d58 100644 (file)
@@ -2534,6 +2534,7 @@ struct bt_coexist_info {
 struct rtl_btc_ops {
        void (*btc_init_variables) (struct rtl_priv *rtlpriv);
        void (*btc_init_hal_vars) (struct rtl_priv *rtlpriv);
+       void (*btc_power_on_setting)(struct rtl_priv *rtlpriv);
        void (*btc_init_hw_config) (struct rtl_priv *rtlpriv);
        void (*btc_ips_notify) (struct rtl_priv *rtlpriv, u8 type);
        void (*btc_lps_notify)(struct rtl_priv *rtlpriv, u8 type);