From 71e5f000d681e7bf405f2ec2cc9c03f51c079f29 Mon Sep 17 00:00:00 2001 From: VIJAY RAJ Date: Wed, 6 Oct 2021 18:27:14 +0530 Subject: [PATCH] qcacld-3.0: Add bt_profile_con parameter for logging The value of btcoex is 0 when bluetooth device is connected. Add bt_profile_con param in enum WLAN_COEX_EVENT, add a check for bluetooth device connection and update the value of btcoex on bluetooth connection. Change-Id: I72d4ef4fd0eb15d37132c11b7aa0a0c7f1452aa2 CRs-Fixed: 3050655 --- core/hdd/inc/wlan_hdd_main.h | 1 + core/hdd/src/wlan_hdd_cfg80211.c | 4 ++++ core/hdd/src/wlan_hdd_connectivity_logging.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index b6eea813d9..41c7189082 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -2125,6 +2125,7 @@ struct hdd_context { #endif uint8_t bt_a2dp_active:1; uint8_t bt_vo_active:1; + uint8_t bt_profile_con:1; enum band_info curr_band; bool imps_enabled; #ifdef WLAN_FEATURE_PACKET_FILTERING diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 6baf985090..a12ccde486 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -15224,6 +15224,10 @@ void hdd_bt_activity_cb(hdd_handle_t hdd_handle, uint32_t bt_activity) hdd_ctx->bt_vo_active = 1; else if (bt_activity == WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE) hdd_ctx->bt_vo_active = 0; + else if (bt_activity == WLAN_COEX_EVENT_BT_PROFILE_CONNECTED) + hdd_ctx->bt_profile_con = 1; + else if (bt_activity == WLAN_COEX_EVENT_BT_PROFILE_DISCONNECTED) + hdd_ctx->bt_profile_con = 0; else return; diff --git a/core/hdd/src/wlan_hdd_connectivity_logging.c b/core/hdd/src/wlan_hdd_connectivity_logging.c index 289e984e1b..f8893caa6f 100644 --- a/core/hdd/src/wlan_hdd_connectivity_logging.c +++ b/core/hdd/src/wlan_hdd_connectivity_logging.c @@ -1174,7 +1174,7 @@ void wlan_hdd_connectivity_event_connecting(struct hdd_context *hdd_ctx, record->conn_info.group = req->crypto.cipher_group; record->conn_info.akm = req->crypto.akm_suites[0]; record->conn_info.auth_type = req->auth_type; - if (hdd_ctx->bt_a2dp_active || hdd_ctx->bt_vo_active) + if (hdd_ctx->bt_profile_con) record->conn_info.is_bt_coex_active = true; wlan_connectivity_log_enqueue(record);