rtlwifi: btcoex: add scan_notify within ips_notify if RFON
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 19 Jan 2018 06:45:45 +0000 (14:45 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jan 2018 15:39:58 +0000 (17:39 +0200)
Three steps of connection procedure are scan, enter/leave IPS, auth.
There is no scan between leaving IPS and sending auth, but btcoex use scan
as an important clue that indicates user is going to connect. So add scan
notifications in ips_notify to correct btcoex's state.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c

index bbc9517..0111ab9 100644 (file)
@@ -212,6 +212,14 @@ void rtl_btc_ips_notify(struct rtl_priv *rtlpriv, u8 type)
                return;
 
        exhalbtc_ips_notify(btcoexist, type);
+
+       if (type == ERFON) {
+               /* In some situation, it doesn't scan after leaving IPS, and
+                * this will cause btcoex in wrong state.
+                */
+               exhalbtc_scan_notify(btcoexist, 1);
+               exhalbtc_scan_notify(btcoexist, 0);
+       }
 }
 
 void rtl_btc_lps_notify(struct rtl_priv *rtlpriv, u8 type)