qcacld-3.0: Send kernel time to userspace

Send kernel timestamp to userspace via a
new vendor attribute
QCA_WLAN_VENDOR_ATTR_DIAG_KERNEL_TIMESTAMP.

Change-Id: I085a1f140b5036895249723f6a5b34b18d9aa574
CRs-Fixed: 3146742
This commit is contained in:
abhinav kumar
2022-03-11 21:52:45 +05:30
committed by Madan Koyyalamudi
parent 7da020bc16
commit 4e2cc50408
4 changed files with 94 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -307,6 +307,7 @@ struct wlan_connect_info {
* buffer
* @timestamp_us: Timestamp(time of the day) in microseconds
* @fw_timestamp_us: timestamp at which roam scan was triggered
* @ktime_us: kernel timestamp (time of the day) in microseconds
* @vdev_id: VDEV id
* @log_subtype: Tag of the log
* @bssid: AP bssid
@@ -323,6 +324,7 @@ struct wlan_connect_info {
struct wlan_log_record {
uint64_t timestamp_us;
uint64_t fw_timestamp_us;
uint64_t ktime_us;
uint8_t vdev_id;
uint32_t log_subtype;
struct qdf_mac_addr bssid;

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -98,6 +99,7 @@ wlan_connectivity_mgmt_event(struct wlan_frame_hdr *mac_hdr,
return;
new_rec->timestamp_us = qdf_get_time_of_the_day_us();
new_rec->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
new_rec->vdev_id = vdev_id;
new_rec->log_subtype = tag;
qdf_copy_macaddr(&new_rec->bssid,