Message ID | 20170520154907.15590-2-Larry.Finger@lwfinger.net (mailing list archive) |
---|---|
State | Accepted |
Commit | fa73a1ebe720c8360d6cce251487cb3917c16e09 |
Delegated to: | Kalle Valo |
Headers | show |
Larry Finger <Larry.Finger@lwfinger.net> wrote: > From: Ping-Ke Shih <pkshih@realtek.com> > > Count and log special packets of DHCP, EAPOL and ARP, and check whether > the interface is in 4-way handshake. > > 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> 10 patches applied to wireless-drivers-next.git, thanks. fa73a1ebe720 rtlwifi: btcoex: 23b 1ant: Special packets statistic in notification c34e42aa3e6e rtlwifi: btcoex: 23b 1ant: define wifi in high priority task. 5ae40d993576 rtlwifi: btcoex: 23b 1ant: check more cases when bt is queing 8be514054d26 rtlwifi: btcoex: 23b 1ant: remove verbose log from periodic function 46b5689c3761 rtlwifi: btcoex: 23b 1ant: Add coex_table_type to log 056faad2e980 rtlwifi: btcoex: 23b 1ant: coex table fine tune 1ecdc4363f99 rtlwifi: btcoex: 23b 1ant: fine tune for wifi connected 40ca18823515 rtlwifi: btcoex: 23b 1ant: fine tune for wifi not connected f9cbb5b4e90e rtlwifi: btcoex: 23b 1ant: fine tune for bt_sco_hid busy 86aeb82563b7 rtlwifi: btcoex: 23b 1ant: turn off ps and tdma mechanism when concurrent mode
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c index b8b50c13d911..188e248b2265 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c @@ -2754,6 +2754,7 @@ void ex_halbtc8723b1ant_connect_notify(struct btc_coexist *btcoexist, u8 type) FORCE_EXEC, false, false); RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], CONNECT START notify\n"); + coex_dm->arp_cnt = 0; } else { RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], CONNECT FINISH notify\n"); @@ -2844,6 +2845,7 @@ void ex_halbtc8723b1ant_media_status_notify(struct btc_coexist *btcoexist, } else { RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], MEDIA disconnect notify\n"); + coex_dm->arp_cnt = 0; btcoexist->btc_write_1byte(btcoexist, 0x6cd, 0x0); /* CCK Tx */ btcoexist->btc_write_1byte(btcoexist, 0x6cf, 0x0); /* CCK Rx */ @@ -2884,13 +2886,36 @@ void ex_halbtc8723b1ant_special_packet_notify(struct btc_coexist *btcoexist, bool bt_hs_on = false; u32 wifi_link_status = 0; u32 num_of_wifi_link = 0; - bool bt_ctrl_agg_buf_size = false; + bool bt_ctrl_agg_buf_size = false, under_4way = false; u8 agg_buf_size = 5; + btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, + &under_4way); + if (btcoexist->manual_control || btcoexist->stop_coex_dm || coex_sta->bt_disabled) return; + if (type == BTC_PACKET_DHCP || type == BTC_PACKET_EAPOL || + type == BTC_PACKET_ARP) { + if (type == BTC_PACKET_ARP) { + RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, + "[BTCoex], special Packet ARP notify\n"); + + coex_dm->arp_cnt++; + RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, + "[BTCoex], ARP Packet Count = %d\n", + coex_dm->arp_cnt); + } else { + RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, + "[BTCoex], special Packet DHCP or EAPOL notify\n"); + } + } else { + RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, + "[BTCoex], special Packet [Type = %d] notify\n", + type); + } + btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifi_link_status); num_of_wifi_link = wifi_link_status >> 16; diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h index 592a289c993c..8df1036e36f1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h @@ -134,6 +134,7 @@ struct coex_dm_8723b_1ant { u8 cur_retry_limit_type; u8 pre_ampdu_time_type; u8 cur_ampdu_time_type; + u32 arp_cnt; u8 error_condition; };