rtlwifi: btcoexist: Modify rtl_btc for changes in latest Realtek code
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 4 Sep 2014 21:03:41 +0000 (16:03 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 9 Sep 2014 19:27:19 +0000 (15:27 -0400)
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/btcoexist/rtl_btc.c
drivers/net/wireless/rtlwifi/btcoexist/rtl_btc.h
drivers/net/wireless/rtlwifi/wifi.h

index 0ab94fe4cbbe000c328a6dbe6bfeb89f3ffdffb0..826b1a670b6553366b1ef90cbb20609083ee9648 100644 (file)
  * Larry Finger <Larry.Finger@lwfinger.net>
  *
  *****************************************************************************/
-
 #include "../wifi.h"
-#include "rtl_btc.h"
-#include "halbt_precomp.h"
-
 #include <linux/vmalloc.h>
 #include <linux/module.h>
 
+#include "rtl_btc.h"
+#include "halbt_precomp.h"
+
 static struct rtl_btc_ops rtl_btc_operation = {
        .btc_init_variables = rtl_btc_init_variables,
        .btc_init_hal_vars = rtl_btc_init_hal_vars,
        .btc_init_hw_config = rtl_btc_init_hw_config,
        .btc_ips_notify = rtl_btc_ips_notify,
+       .btc_lps_notify = rtl_btc_lps_notify,
        .btc_scan_notify = rtl_btc_scan_notify,
        .btc_connect_notify = rtl_btc_connect_notify,
        .btc_mediastatus_notify = rtl_btc_mediastatus_notify,
@@ -44,6 +44,7 @@ static struct rtl_btc_ops rtl_btc_operation = {
        .btc_is_limited_dig = rtl_btc_is_limited_dig,
        .btc_is_disable_edca_turbo = rtl_btc_is_disable_edca_turbo,
        .btc_is_bt_disabled = rtl_btc_is_bt_disabled,
+       .btc_special_packet_notify = rtl_btc_special_packet_notify,
 };
 
 void rtl_btc_init_variables(struct rtl_priv *rtlpriv)
@@ -85,6 +86,11 @@ void rtl_btc_ips_notify(struct rtl_priv *rtlpriv, u8 type)
        exhalbtc_ips_notify(&gl_bt_coexist, type);
 }
 
+void rtl_btc_lps_notify(struct rtl_priv *rtlpriv, u8 type)
+{
+       exhalbtc_lps_notify(&gl_bt_coexist, type);
+}
+
 void rtl_btc_scan_notify(struct rtl_priv *rtlpriv, u8 scantype)
 {
        exhalbtc_scan_notify(&gl_bt_coexist, scantype);
@@ -103,6 +109,7 @@ void rtl_btc_mediastatus_notify(struct rtl_priv *rtlpriv,
 
 void rtl_btc_periodical(struct rtl_priv *rtlpriv)
 {
+       /*rtl_bt_dm_monitor();*/
        exhalbtc_periodical(&gl_bt_coexist);
 }
 
@@ -150,12 +157,18 @@ bool rtl_btc_is_disable_edca_turbo(struct rtl_priv *rtlpriv)
 
 bool rtl_btc_is_bt_disabled(struct rtl_priv *rtlpriv)
 {
+       /* It seems 'bt_disabled' is never be initialized or set. */
        if (gl_bt_coexist.bt_info.bt_disabled)
                return true;
        else
                return false;
 }
 
+void rtl_btc_special_packet_notify(struct rtl_priv *rtlpriv, u8 pkt_type)
+{
+       return exhalbtc_special_packet_notify(&gl_bt_coexist, pkt_type);
+}
+
 struct rtl_btc_ops *rtl_btc_get_ops_pointer(void)
 {
        return &rtl_btc_operation;
index 805b22cc8fc8fcbd55f87cf1b5d2ebc5e83c83ea..d5218ce03206330889511b03be2accb8e446274a 100644 (file)
@@ -31,6 +31,7 @@ void rtl_btc_init_variables(struct rtl_priv *rtlpriv);
 void rtl_btc_init_hal_vars(struct rtl_priv *rtlpriv);
 void rtl_btc_init_hw_config(struct rtl_priv *rtlpriv);
 void rtl_btc_ips_notify(struct rtl_priv *rtlpriv, u8 type);
+void rtl_btc_lps_notify(struct rtl_priv *rtlpriv, u8 type);
 void rtl_btc_scan_notify(struct rtl_priv *rtlpriv, u8 scantype);
 void rtl_btc_connect_notify(struct rtl_priv *rtlpriv, u8 action);
 void rtl_btc_mediastatus_notify(struct rtl_priv *rtlpriv,
@@ -41,6 +42,7 @@ void rtl_btc_btinfo_notify(struct rtl_priv *rtlpriv, u8 *tmpbuf, u8 length);
 bool rtl_btc_is_limited_dig(struct rtl_priv *rtlpriv);
 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);
 
 struct rtl_btc_ops *rtl_btc_get_ops_pointer(void);
 
index 407a7936d3642f39fb4fb0364ab0568e20f75153..e44e2df07e13f14d4f11fb79ed477726c3ad5dc0 100644 (file)
@@ -2312,6 +2312,7 @@ struct rtl_btc_ops {
        void (*btc_init_hal_vars) (struct rtl_priv *rtlpriv);
        void (*btc_init_hw_config) (struct rtl_priv *rtlpriv);
        void (*btc_ips_notify) (struct rtl_priv *rtlpriv, u8 type);
+       void (*btc_lps_notify)(struct rtl_priv *rtlpriv, u8 type);
        void (*btc_scan_notify) (struct rtl_priv *rtlpriv, u8 scantype);
        void (*btc_connect_notify) (struct rtl_priv *rtlpriv, u8 action);
        void (*btc_mediastatus_notify) (struct rtl_priv *rtlpriv,
@@ -2323,6 +2324,8 @@ struct rtl_btc_ops {
        bool (*btc_is_limited_dig) (struct rtl_priv *rtlpriv);
        bool (*btc_is_disable_edca_turbo) (struct rtl_priv *rtlpriv);
        bool (*btc_is_bt_disabled) (struct rtl_priv *rtlpriv);
+       void (*btc_special_packet_notify)(struct rtl_priv *rtlpriv,
+                                         u8 pkt_type);
 };
 
 struct proxim {