rtlwifi: rtl8723be: btcoexist: Add single_ant_path
authorPing-Ke Shih <pkshih@realtek.com>
Tue, 7 Feb 2017 03:30:03 +0000 (21:30 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 7 Feb 2017 07:25:08 +0000 (09:25 +0200)
Some devices with RTL8732BE wifi/Bluetooth adapters are shipped with only
a single antenna. On a subset of these, the EEPROM is incorectly coded
to indicate the wrong connection. The resulting problems have been fixed
for wifi. This change handles them for BT.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
drivers/net/wireless/realtek/rtlwifi/wifi.h

index 8a0e773..8e382a8 100644 (file)
@@ -146,6 +146,11 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist *btcoexist)
        return chnl;
 }
 
+u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv)
+{
+       return rtlpriv->btcoexist.btc_info.single_ant_path;
+}
+
 static void halbtc_leave_lps(struct btc_coexist *btcoexist)
 {
        struct rtl_priv *rtlpriv;
index ccd5a0f..65c1c52 100644 (file)
@@ -49,6 +49,7 @@ struct rtl_btc_ops *rtl_btc_get_ops_pointer(void);
 u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv);
 u8 rtl_get_hwpg_bt_exist(struct rtl_priv *rtlpriv);
 u8 rtl_get_hwpg_bt_type(struct rtl_priv *rtlpriv);
+u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv);
 enum rt_media_status mgnt_link_status_query(struct ieee80211_hw *hw);
 
 #endif
index ae2a38e..5ef2b96 100644 (file)
@@ -2657,6 +2657,7 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
                rtlpriv->btcoexist.btc_info.btcoexist = 0;
                rtlpriv->btcoexist.btc_info.bt_type = BT_RTL8723B;
                rtlpriv->btcoexist.btc_info.ant_num = ANT_X2;
+               rtlpriv->btcoexist.btc_info.single_ant_path = 0;
        }
 
        /* override ant_num / ant_path */
index 310fa90..9a5a8a9 100644 (file)
@@ -2454,6 +2454,7 @@ struct rtl_btc_info {
        u8 bt_type;
        u8 btcoexist;
        u8 ant_num;
+       u8 single_ant_path;
 };
 
 struct bt_coexist_info {