diff mbox

[2/2] rtlwifi: btcoex: fix compiler warnings for unused functions

Message ID 20170419022143.15484-3-Larry.Finger@lwfinger.net (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Larry Finger April 19, 2017, 2:21 a.m. UTC
From: Yan-Hsuan Chuang <yhchuang@realtek.com>

Add if define ... endif to fix the unused warnings for 21a 2ant. The
routines in question are not needed at the moment, but will be
needed in the near future.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Pkshih <pkshih@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
---
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c   | 10 +++++++++-
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.h   |  2 ++
 2 files changed, 11 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
index 3b4c892fc233..93a264380016 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
@@ -265,6 +265,8 @@  void btc8821a2ant_limited_rx(struct btc_coexist *btcoexist, bool force_exec,
 	btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL);
 }
 
+#if (BT_AUTO_REPORT_ONLY_8821A_2ANT != 0)
+
 static void btc8821a2ant_monitor_bt_ctr(struct btc_coexist *btcoexist)
 {
 	struct rtl_priv *rtlpriv = btcoexist->adapter;
@@ -343,6 +345,8 @@  static void btc8821a2ant_monitor_wifi_ctr(struct btc_coexist *btcoexist)
 	btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x0);
 }
 
+#endif
+
 static void btc8821a2ant_query_bt_info(struct btc_coexist *btcoexist)
 {
 	struct rtl_priv *rtlpriv = btcoexist->adapter;
@@ -359,7 +363,9 @@  static void btc8821a2ant_query_bt_info(struct btc_coexist *btcoexist)
 	btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter);
 }
 
-bool btc8821a2ant_is_wifi_status_changed(struct btc_coexist *btcoexist)
+#if (BT_AUTO_REPORT_ONLY_8821A_2ANT != 0)
+
+static bool btc8821a2ant_is_wifi_status_changed(struct btc_coexist *btcoexist)
 {
 	static bool pre_wifi_busy = true;
 	static bool pre_under_4way = true;
@@ -400,6 +406,8 @@  bool btc8821a2ant_is_wifi_status_changed(struct btc_coexist *btcoexist)
 	return false;
 }
 
+#endif
+
 static void btc8821a2ant_update_bt_link_info(struct btc_coexist *btcoexist)
 {
 	struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.h
index a839d5574422..006f139f4882 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.h
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.h
@@ -43,6 +43,8 @@ 
 /* BT RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation */
 #define BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES	46
 
+#define BT_AUTO_REPORT_ONLY_8821A_2ANT		0
+
 enum _BT_INFO_SRC_8821A_2ANT {
 	BT_INFO_SRC_8821A_2ANT_WIFI_FW		= 0x0,
 	BT_INFO_SRC_8821A_2ANT_BT_RSP		= 0x1,