Bladeren bron

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
VIJAY RAJ 3 jaren geleden
bovenliggende
commit
71e5f000d6
3 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. 1 0
      core/hdd/inc/wlan_hdd_main.h
  2. 4 0
      core/hdd/src/wlan_hdd_cfg80211.c
  3. 1 1
      core/hdd/src/wlan_hdd_connectivity_logging.c

+ 1 - 0
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

+ 4 - 0
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;
 

+ 1 - 1
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);