Skip to content

Commit 0de9b5d

Browse files
Ping-Ke ShihKalle Valo
authored andcommitted
rtlwifi: move btcoex's ant_num declaration
File halbtcoutsrc.c is a better place for routine rtl_get_hwpg_ant_num() than file rtl_btc.c. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent db8cb00 commit 0de9b5d

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@ u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv)
151151
return rtlpriv->btcoexist.btc_info.single_ant_path;
152152
}
153153

154+
u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
155+
{
156+
u8 num;
157+
158+
if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2)
159+
num = 2;
160+
else
161+
num = 1;
162+
163+
return num;
164+
}
165+
154166
static void halbtc_leave_lps(struct btc_coexist *btcoexist)
155167
{
156168
struct rtl_priv *rtlpriv;

drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,6 @@ struct rtl_btc_ops *rtl_btc_get_ops_pointer(void)
178178
}
179179
EXPORT_SYMBOL(rtl_btc_get_ops_pointer);
180180

181-
u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
182-
{
183-
u8 num;
184-
185-
if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2)
186-
num = 2;
187-
else
188-
num = 1;
189-
190-
return num;
191-
}
192181

193182
enum rt_media_status mgnt_link_status_query(struct ieee80211_hw *hw)
194183
{

drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ void rtl_btc_special_packet_notify(struct rtl_priv *rtlpriv, u8 pkt_type);
4646

4747
struct rtl_btc_ops *rtl_btc_get_ops_pointer(void);
4848

49-
u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv);
5049
u8 rtl_get_hwpg_bt_exist(struct rtl_priv *rtlpriv);
5150
u8 rtl_get_hwpg_bt_type(struct rtl_priv *rtlpriv);
51+
u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv);
5252
u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv);
5353
enum rt_media_status mgnt_link_status_query(struct ieee80211_hw *hw);
5454

drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,6 +2653,8 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
26532653
value = hwinfo[EEPROM_RF_BT_SETTING_8723B];
26542654
rtlpriv->btcoexist.btc_info.bt_type = BT_RTL8723B;
26552655
rtlpriv->btcoexist.btc_info.ant_num = (value & 0x1);
2656+
rtlpriv->btcoexist.btc_info.single_ant_path =
2657+
(value & 0x40); /*0xc3[6]*/
26562658
} else {
26572659
rtlpriv->btcoexist.btc_info.btcoexist = 0;
26582660
rtlpriv->btcoexist.btc_info.bt_type = BT_RTL8723B;

0 commit comments

Comments
 (0)