rtlwifi: btcoexist control to enter/leave LPS

To yield better user experience, have btcoex control LPS's parameters.

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>
This commit is contained in:
Ping-Ke Shih
2017-06-18 11:12:49 -05:00
committed by Kalle Valo
parent c692205da1
commit 42213f2f35
8 changed files with 203 additions and 26 deletions

View File

@@ -1802,12 +1802,20 @@ void rtl_watchdog_wq_callback(void *data)
false;
}
/* PS is controlled by coex. */
if (rtlpriv->cfg->ops->get_btc_status() &&
rtlpriv->btcoexist.btc_ops->btc_is_bt_ctrl_lps(rtlpriv))
goto label_lps_done;
if (((rtlpriv->link_info.num_rx_inperiod +
rtlpriv->link_info.num_tx_inperiod) > 8) ||
(rtlpriv->link_info.num_rx_inperiod > 2))
rtl_lps_leave(hw);
else
rtl_lps_enter(hw);
label_lps_done:
;
}
rtlpriv->link_info.num_rx_inperiod = 0;