瀏覽代碼

qcacld-3.0: Add connection record info in connection manager code

Add connection record info in connection manager code.

Change-Id: Idf61755eeaad5990223895b66487a08fc69bdfc3
CRs-Fixed: 2913983
Utkarsh Bhatnagar 4 年之前
父節點
當前提交
f469d5b928

+ 2 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -613,6 +613,8 @@ cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 		status = QDF_STATUS_E_FAILURE;
 		goto error;
 	}
+	wlan_rec_conn_info(vdev_id, DEBUG_CONN_ROAMING,
+			   roam_synch_data->bssid.bytes, 0, 0);
 
 	cm_id = roam_req->cm_id;
 	rsp = qdf_mem_malloc(sizeof(struct cm_vdev_join_rsp));

+ 5 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -32,6 +32,7 @@
 #include "wlan_scan_api.h"
 #include "wlan_logging_sock_svc.h"
 #include "cfg_ucfg_api.h"
+#include "wlan_roam_debug.h"
 
 #ifdef WLAN_FEATURE_FILS_SK
 void cm_update_hlp_info(struct wlan_objmgr_vdev *vdev,
@@ -1141,6 +1142,10 @@ cm_handle_connect_req(struct wlan_objmgr_vdev *vdev,
 
 	mlme_debug(CM_PREFIX_FMT "HT cap %x",
 		   CM_PREFIX_REF(req->vdev_id, req->cm_id), req->ht_caps);
+	wlan_rec_conn_info(req->vdev_id, DEBUG_CONN_CONNECTING,
+			   req->bss->entry->bssid.bytes,
+			   req->bss->entry->neg_sec_info.key_mgmt,
+			   req->bss->entry->channel.chan_freq);
 	if (mlme_obj->cfg.obss_ht40.is_override_ht20_40_24g &&
 	    !(req->ht_caps & WLAN_HTCAP_C_CHWIDTH40))
 		join_req->force_24ghz_in_ht20 = true;

+ 16 - 1
core/hdd/src/wlan_hdd_cm_connect.c

@@ -44,6 +44,7 @@
 #include "wlan_hdd_scan.h"
 #include <enet.h>
 #include <wlan_mlme_twt_ucfg_api.h>
+#include "wlan_roam_debug.h"
 
 #ifdef FEATURE_CM_ENABLE
 bool hdd_cm_is_vdev_associated(struct hdd_adapter *adapter)
@@ -415,6 +416,19 @@ int wlan_hdd_cm_connect(struct wiphy *wiphy,
 	return status;
 }
 
+static void hdd_cm_rec_connect_info(struct hdd_adapter *adapter,
+				    struct wlan_cm_connect_resp *rsp)
+{
+	if (rsp->is_reassoc)
+		wlan_rec_conn_info(rsp->vdev_id, DEBUG_CONN_ROAMED_IND,
+				   rsp->bssid.bytes, rsp->cm_id, 0);
+	else
+		wlan_rec_conn_info(rsp->vdev_id, DEBUG_CONN_CONNECT_RESULT,
+				   rsp->bssid.bytes, rsp->cm_id << 16 |
+				   rsp->reason,
+				   rsp->status_code);
+}
+
 static void
 hdd_cm_connect_failure_pre_user_update(struct wlan_objmgr_vdev *vdev,
 				       struct wlan_cm_connect_resp *rsp)
@@ -444,7 +458,7 @@ hdd_cm_connect_failure_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	hdd_cm_save_connect_status(adapter, rsp->status_code);
 	hdd_conn_remove_connect_info(hdd_sta_ctx);
 	hdd_cm_update_rssi_snr_by_bssid(adapter);
-
+	hdd_cm_rec_connect_info(adapter, rsp);
 	hdd_debug("Invoking packetdump deregistration API");
 	wlan_deregister_txrx_packetdump(OL_TXRX_PDEV_ID);
 }
@@ -810,6 +824,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 
 	hdd_init_scan_reject_params(hdd_ctx);
 	hdd_start_tsf_sync(adapter);
+	hdd_cm_rec_connect_info(adapter, rsp);
 
 	hdd_cm_save_connect_info(adapter, rsp);
 

+ 10 - 0
core/hdd/src/wlan_hdd_cm_disconnect.c

@@ -45,6 +45,7 @@
 #include "hif.h"
 #include "wlan_hdd_power.h"
 #include "wlan_hdd_napi.h"
+#include "wlan_roam_debug.h"
 
 void hdd_handle_disassociation_event(struct hdd_adapter *adapter,
 				     struct qdf_mac_addr *peer_macaddr)
@@ -218,6 +219,7 @@ QDF_STATUS wlan_hdd_cm_issue_disconnect(struct hdd_adapter *adapter,
 	QDF_STATUS status;
 	struct wlan_objmgr_vdev *vdev;
 	void *hif_ctx;
+	struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 
 	vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_CM_ID);
 	if (!vdev)
@@ -235,6 +237,9 @@ QDF_STATUS wlan_hdd_cm_issue_disconnect(struct hdd_adapter *adapter,
 		 */
 		hif_pm_runtime_sync_resume(hif_ctx);
 
+	wlan_rec_conn_info(adapter->vdev_id, DEBUG_CONN_DISCONNECT,
+			   sta_ctx->conn_info.bssid.bytes, 0, reason);
+
 	if (sync)
 		status = osif_cm_disconnect_sync(vdev, reason);
 	else
@@ -300,6 +305,11 @@ hdd_cm_disconnect_complete_pre_user_update(struct wlan_objmgr_vdev *vdev,
 
 	hdd_handle_disassociation_event(adapter, &rsp->req.req.bssid);
 
+	wlan_rec_conn_info(adapter->vdev_id, DEBUG_CONN_DISCONNECT_HANDLER,
+			   rsp->req.req.bssid.bytes,
+			   rsp->req.cm_id,
+			   rsp->req.req.reason_code << 16 |
+			   rsp->req.req.source);
 	hdd_ipa_set_tx_flow_info();
 
 	return QDF_STATUS_SUCCESS;