diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2017-06-21 20:15:31 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-06-28 20:50:58 +0300 |
commit | 135f4fbd75d74ac2c945e3f2aef779ef0d5a29ac (patch) | |
tree | 58801ebce6bb30358dcc0da6380b651ff6451f31 /drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | |
parent | 3e3d8aa611076efc945687df30a3abf181989d1d (diff) | |
download | linux-135f4fbd75d74ac2c945e3f2aef779ef0d5a29ac.tar.xz |
rtlwifi: Fix a2dp choppy while BT RSSI stays on threshold.
In this case, BTC asks to enter/leave PS mode frequently to cause A2DP
choppy.
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>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c index 87818d2ccc4e..03259aa150fd 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c @@ -494,6 +494,11 @@ void rtl8821ae_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode) struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops; bool bt_ctrl_lps = (rtlpriv->cfg->ops->get_btc_status() ? btc_ops->btc_is_bt_ctrl_lps(rtlpriv) : false); + bool bt_lps_on = (rtlpriv->cfg->ops->get_btc_status() ? + btc_ops->btc_is_bt_lps_on(rtlpriv) : false); + + if (bt_ctrl_lps) + mode = (bt_lps_on ? FW_PS_MIN_MODE : FW_PS_ACTIVE_MODE); RT_TRACE(rtlpriv, COMP_POWER, DBG_DMESG, "FW LPS mode = %d (coex:%d)\n", mode, bt_ctrl_lps); @@ -549,8 +554,9 @@ void rtl8821ae_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode) SET_H2CCMD_PWRMODE_PARM_MODE(u1_h2c_set_pwrmode, ((mode) ? 1 : 0)); SET_H2CCMD_PWRMODE_PARM_RLBM(u1_h2c_set_pwrmode, rlbm); SET_H2CCMD_PWRMODE_PARM_SMART_PS(u1_h2c_set_pwrmode, - (rtlpriv->mac80211.p2p) ? - ppsc->smart_ps : 1); + bt_ctrl_lps ? 0 : + ((rtlpriv->mac80211.p2p) ? + ppsc->smart_ps : 1)); SET_H2CCMD_PWRMODE_PARM_AWAKE_INTERVAL(u1_h2c_set_pwrmode, awake_intvl); SET_H2CCMD_PWRMODE_PARM_ALL_QUEUE_UAPSD(u1_h2c_set_pwrmode, 0); |