All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH 07/11 V4] rtlwifi: move btcoex's ant_num declaration
Date: Mon,  6 Feb 2017 21:30:04 -0600	[thread overview]
Message-ID: <20170120212716.29887-8-Larry.Finger@lwfinger.net> (raw)
In-Reply-To: <20170120212716.29887-1-Larry.Finger@lwfinger.net>
In-Reply-To: <20170120212716.29887-1-Larry.Finger@lwfinger.net>
In-Reply-To: <20170120212716.29887-1-Larry.Finger@lwfinger.net>
In-Reply-To: <20170120212716.29887-1-Larry.Finger@lwfinger.net>

From: Ping-Ke Shih <pkshih@realtek.com>

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 <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
V2 - no changes
V3 - no changes
V4 - no changes
---
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c    | 12 ++++++++++++
 drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c     | 11 -----------
 drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h     |  2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c          |  2 ++
 4 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
index 8e382a8..3958422 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
@@ -151,6 +151,18 @@ u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv)
 	return rtlpriv->btcoexist.btc_info.single_ant_path;
 }
 
+u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
+{
+	u8 num;
+
+	if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2)
+		num = 2;
+	else
+		num = 1;
+
+	return num;
+}
+
 static void halbtc_leave_lps(struct btc_coexist *btcoexist)
 {
 	struct rtl_priv *rtlpriv;
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
index d3fd921..54e893c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
@@ -178,17 +178,6 @@ struct rtl_btc_ops *rtl_btc_get_ops_pointer(void)
 }
 EXPORT_SYMBOL(rtl_btc_get_ops_pointer);
 
-u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
-{
-	u8 num;
-
-	if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2)
-		num = 2;
-	else
-		num = 1;
-
-	return num;
-}
 
 enum rt_media_status mgnt_link_status_query(struct ieee80211_hw *hw)
 {
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
index 65c1c52..bba7e23e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
@@ -46,9 +46,9 @@ void rtl_btc_special_packet_notify(struct rtl_priv *rtlpriv, u8 pkt_type);
 
 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_ant_num(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);
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
index 8e82c0c..b46874b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
@@ -2653,6 +2653,8 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
 		value = hwinfo[EEPROM_RF_BT_SETTING_8723B];
 		rtlpriv->btcoexist.btc_info.bt_type = BT_RTL8723B;
 		rtlpriv->btcoexist.btc_info.ant_num = (value & 0x1);
+		rtlpriv->btcoexist.btc_info.single_ant_path =
+			 (value & 0x40);	/*0xc3[6]*/
 	} else {
 		rtlpriv->btcoexist.btc_info.btcoexist = 0;
 		rtlpriv->btcoexist.btc_info.bt_type = BT_RTL8723B;
-- 
2.10.2

  parent reply	other threads:[~2017-02-07  3:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07  3:29 [PATCH 00/11 V4] rtlwifi: Various updates Larry Finger
2017-01-20 21:27 ` [PATCH 03/11] rtlwifi: Add a new enumeration value to btc_set_type Larry Finger
2017-01-20 21:27 ` [PATCH 05/11] rtlwifi: btcoexist: Change logging in halbtc8192e2ant.c Larry Finger
2017-01-28  6:46   ` Kalle Valo
2017-01-20 21:27 ` [PATCH 09/11] rtlwifi: btcoex: move bt_type declaration Larry Finger
2017-02-01 20:48 ` [PATCH 01/11 V2] rtlwifi: Fix programing CAM content sequence Larry Finger
2017-02-06 11:50   ` Kalle Valo
2017-02-06 12:45   ` [PATCH 01/11 V3] " Kalle Valo
2017-02-07  3:29     ` Larry Finger
2017-02-07  5:42     ` Larry Finger
2017-02-07  7:08       ` Kalle Valo
2017-02-01 20:48 ` [PATCH 11/11 V2] rtlwifi: Add work queue for c2h cmd Larry Finger
2017-01-28  6:55   ` [PATCH 11/11] " Kalle Valo
2017-01-28 17:31     ` Larry Finger
2017-02-03 17:32 ` [PATCH 02/11 V3] rtlwifi: Set retry limit depends on vif type Larry Finger
2017-02-03 17:32 ` [PATCH 04/11 V3] rtlwifi: btcoexist: Add vendor definition for new btcoexist Larry Finger
2017-02-07  3:30 ` [PATCH 05/11 V4] rtlwifi: btcoexist: Change logging in halbtc8192e2ant.c Larry Finger
2017-02-07  3:30 ` [PATCH 06/11 V4] rtlwifi: rtl8723be: btcoexist: Add single_ant_path Larry Finger
2017-02-07  3:30 ` Larry Finger [this message]
2017-02-07  3:30 ` [PATCH 08/11 V4] rtlwifi: rtl8723be: btcoex: add package_type function to btcoex Larry Finger
2017-02-07  3:30 ` [PATCH 10/11 V4] rtlwifi: rtl8723be: fix ant_sel code Larry Finger
2017-02-07  7:29 ` [PATCH 00/11 V4] rtlwifi: Various updates Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170120212716.29887-8-Larry.Finger@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.