rtlwifi: add btc_is_bt_lps_on() for btcoexist
authorPing-Ke Shih <pkshih@realtek.com>
Sun, 18 Jun 2017 16:12:48 +0000 (11:12 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 21 Jun 2017 15:28:06 +0000 (18:28 +0300)
If LPS is controlled by btcoex, this function tell driver LPS is on or off.

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/btcoexist/rtl_btc.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
drivers/net/wireless/realtek/rtlwifi/wifi.h

index 96c1ccb..7ee2aa9 100644 (file)
@@ -46,6 +46,7 @@ static struct rtl_btc_ops rtl_btc_operation = {
        .btc_is_bt_disabled = rtl_btc_is_bt_disabled,
        .btc_special_packet_notify = rtl_btc_special_packet_notify,
        .btc_record_pwr_mode = rtl_btc_record_pwr_mode,
+       .btc_is_bt_lps_on = rtl_btc_is_bt_lps_on,
        .btc_get_ampdu_cfg = rtl_btc_get_ampdu_cfg,
 };
 
@@ -61,6 +62,11 @@ void rtl_btc_record_pwr_mode(struct rtl_priv *rtlpriv, u8 *buf, u8 len)
        memcpy(gl_bt_coexist.pwr_mode_val, buf, safe_len);
 }
 
+bool rtl_btc_is_bt_lps_on(struct rtl_priv *rtlpriv)
+{
+       return gl_bt_coexist.bt_info.bt_lps_on;
+}
+
 void rtl_btc_get_ampdu_cfg(struct rtl_priv *rtlpriv, u8 *reject_agg,
                           u8 *ctrl_agg_size, u8 *agg_size)
 {
index c1c32d6..ed46f41 100644 (file)
@@ -44,6 +44,7 @@ bool rtl_btc_is_disable_edca_turbo(struct rtl_priv *rtlpriv);
 bool rtl_btc_is_bt_disabled(struct rtl_priv *rtlpriv);
 void rtl_btc_special_packet_notify(struct rtl_priv *rtlpriv, u8 pkt_type);
 void rtl_btc_record_pwr_mode(struct rtl_priv *rtlpriv, u8 *buf, u8 len);
+bool rtl_btc_is_bt_lps_on(struct rtl_priv *rtlpriv);
 void rtl_btc_get_ampdu_cfg(struct rtl_priv *rtlpriv, u8 *reject_agg,
                           u8 *ctrl_agg_size, u8 *agg_size);
 
index 0591ade..23d869b 100644 (file)
@@ -2563,6 +2563,7 @@ struct rtl_btc_ops {
        void (*btc_record_pwr_mode)(struct rtl_priv *rtlpriv, u8 *buf, u8 len);
        void (*btc_get_ampdu_cfg)(struct rtl_priv *rtlpriv, u8 *reject_agg,
                                  u8 *ctrl_agg_size, u8 *agg_size);
+       bool (*btc_is_bt_lps_on)(struct rtl_priv *rtlpriv);
 };
 
 struct proxim {