qcacmn: Send kernel time to userspace
Send kernel timestamp to userspace via a new vendor attribute QCA_WLAN_VENDOR_ATTR_DIAG_KERNEL_TIMESTAMP. Change-Id: Iec957f0516c06369e0d2991d96936cb1f7fff5f4 CRs-Fixed: 3150781
This commit is contained in:

committed by
Madan Koyyalamudi

parent
9a986b327b
commit
1e20923d2b
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-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
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -336,6 +337,18 @@ static inline int64_t qdf_ktime_to_ms(qdf_ktime_t ktime)
|
|||||||
return __qdf_ktime_to_ms(ktime);
|
return __qdf_ktime_to_ms(ktime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ktime_to_us - Convert the qdf_ktime_t object into microseconds
|
||||||
|
* @ktime: time as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: qdf_ktime_t in microseconds
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int64_t qdf_ktime_to_us(qdf_ktime_t ktime)
|
||||||
|
{
|
||||||
|
return __qdf_time_ktime_to_us(ktime);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_ktime_to_ns - Convert the qdf_ktime_t object into nanoseconds
|
* qdf_ktime_to_ns - Convert the qdf_ktime_t object into nanoseconds
|
||||||
* @ktime: time as qdf_ktime_t object
|
* @ktime: time as qdf_ktime_t object
|
||||||
|
@@ -1826,6 +1826,7 @@ void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,
|
|||||||
uint8_t pkt_type;
|
uint8_t pkt_type;
|
||||||
|
|
||||||
log_buf.timestamp_us = qdf_get_time_of_the_day_ms() * 1000;
|
log_buf.timestamp_us = qdf_get_time_of_the_day_ms() * 1000;
|
||||||
|
log_buf.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
|
||||||
log_buf.vdev_id = vdev_id;
|
log_buf.vdev_id = vdev_id;
|
||||||
if (type == QDF_PROTO_TYPE_DHCP) {
|
if (type == QDF_PROTO_TYPE_DHCP) {
|
||||||
log_buf.log_subtype = qdf_subtype_to_wlan_main_tag(subtype);
|
log_buf.log_subtype = qdf_subtype_to_wlan_main_tag(subtype);
|
||||||
|
Reference in New Issue
Block a user