diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2017-06-18 11:12:47 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-06-21 18:28:06 +0300 |
commit | 2635664e6e4a691ad6f1e0c13a04623cac3794da (patch) | |
tree | b84b19e56cc50cd4fd57021ed9770d4472c9a1b9 /drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | |
parent | 54685f9c7af17e2430deb289b4f255ea0dec42c9 (diff) |
rtlwifi: Add rx ampdu cfg for btcoexist.
If RX ampdu is too long, BT will have less time.
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/btcoexist/halbtcoutsrc.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c index 451039ac7b0a..226927a752f8 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c @@ -272,14 +272,24 @@ static void halbtc_disable_low_power(struct btc_coexist *btcoexist, static void halbtc_aggregation_check(struct btc_coexist *btcoexist) { bool need_to_act = false; + static unsigned long pre_time; + unsigned long cur_time = 0; + struct rtl_priv *rtlpriv = btcoexist->adapter; /* To void continuous deleteBA=>addBA=>deleteBA=>addBA * This function is not allowed to continuous called * It can only be called after 8 seconds */ + cur_time = jiffies; + if (jiffies_to_msecs(cur_time - pre_time) <= 8000) { + /* over 8 seconds you can execute this function again. */ + return; + } + pre_time = cur_time; + if (btcoexist->bt_info.reject_agg_pkt) { - ;/* TODO: reject */ + need_to_act = true; btcoexist->bt_info.pre_reject_agg_pkt = btcoexist->bt_info.reject_agg_pkt; } else { @@ -304,8 +314,10 @@ static void halbtc_aggregation_check(struct btc_coexist *btcoexist) btcoexist->bt_info.pre_agg_buf_size = btcoexist->bt_info.agg_buf_size; } - } + if (need_to_act) + rtl_rx_ampdu_apply(rtlpriv); + } } static u32 halbtc_get_bt_patch_version(struct btc_coexist *btcoexist) |