diff options
author | Yan-Hsuan Chuang <yhchuang@realtek.com> | 2017-04-04 11:49:56 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-04-13 17:08:35 +0300 |
commit | 5a347a48467b3c94ad66ead8addb8a29f117dc59 (patch) | |
tree | 3ecacf287b9cc8240440b1b832b1f3efc975837f /drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | |
parent | b91ed731393bc3fe9da3a0d909d6a3fdf7685232 (diff) | |
download | linux-5a347a48467b3c94ad66ead8addb8a29f117dc59.tar.bz2 |
rtlwifi: btcoex: 23b 2ant: detect ap num and set GNT_BT properly
If ap num < 10, let wifi and bt transmit simultaneously, otherwise set
wifi into standy when bt is transmitting
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Pkshih <pkshih@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/halbtc8723b2ant.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c index 30b2b93e92ca..eaf909295a69 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c @@ -2831,6 +2831,7 @@ void ex_btc8723b2ant_media_status_notify(struct btc_coexist *btcoexist, u8 h2c_parameter[3] = {0}; u32 wifi_bw; u8 wifi_central_chnl; + u8 ap_num = 0; if (BTC_MEDIA_CONNECT == type) RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, @@ -2848,10 +2849,16 @@ void ex_btc8723b2ant_media_status_notify(struct btc_coexist *btcoexist, h2c_parameter[1] = wifi_central_chnl; btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); - if (BTC_WIFI_BW_HT40 == wifi_bw) + if (wifi_bw == BTC_WIFI_BW_HT40) { h2c_parameter[2] = 0x30; - else - h2c_parameter[2] = 0x20; + } else { + btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, + &ap_num); + if (ap_num < 10) + h2c_parameter[2] = 0x30; + else + h2c_parameter[2] = 0x20; + } } coex_dm->wifi_chnl_info[0] = h2c_parameter[0]; |