qcacld-3.0: Add qtime & host_time in __hdd_wlan_tsf_show
Add qtime & host_time in __hdd_wlan_tsf_show, so that "cat tsf" will print out qtime and host_time at the instant. Change-Id: I4da440f92b7415440f9064a49777c3c3680ac1b1 CRs-Fixed: 2461503
This commit is contained in:
@@ -928,7 +928,7 @@ static ssize_t __hdd_wlan_tsf_show(struct device *dev,
|
||||
struct hdd_station_ctx *hdd_sta_ctx;
|
||||
struct hdd_adapter *adapter;
|
||||
struct hdd_context *hdd_ctx;
|
||||
uint64_t tsf_sync_qtime;
|
||||
uint64_t tsf_sync_qtime, host_time, reg_qtime, qtime;
|
||||
ssize_t size;
|
||||
|
||||
struct net_device *net_dev = container_of(dev, struct net_device, dev);
|
||||
@@ -955,17 +955,25 @@ static ssize_t __hdd_wlan_tsf_show(struct device *dev,
|
||||
tsf_sync_qtime = adapter->last_tsf_sync_soc_time;
|
||||
do_div(tsf_sync_qtime, NSEC_PER_USEC);
|
||||
|
||||
reg_qtime = qdf_get_log_timestamp();
|
||||
host_time = hdd_get_monotonic_host_time(hdd_ctx);
|
||||
|
||||
qtime = qdf_log_timestamp_to_usecs(reg_qtime);
|
||||
do_div(host_time, NSEC_PER_USEC);
|
||||
|
||||
if (adapter->device_mode == QDF_STA_MODE ||
|
||||
adapter->device_mode == QDF_P2P_CLIENT_MODE) {
|
||||
size = scnprintf(buf, PAGE_SIZE, "%s%llu %llu %pM\n",
|
||||
size = scnprintf(buf, PAGE_SIZE, "%s%llu %llu %pM %llu %llu\n",
|
||||
buf, adapter->last_target_time,
|
||||
tsf_sync_qtime,
|
||||
hdd_sta_ctx->conn_info.bssid.bytes);
|
||||
hdd_sta_ctx->conn_info.bssid.bytes,
|
||||
qtime, host_time);
|
||||
} else {
|
||||
size = scnprintf(buf, PAGE_SIZE, "%s%llu %llu %pM\n",
|
||||
size = scnprintf(buf, PAGE_SIZE, "%s%llu %llu %pM %llu %llu\n",
|
||||
buf, adapter->last_target_time,
|
||||
tsf_sync_qtime,
|
||||
adapter->mac_addr.bytes);
|
||||
adapter->mac_addr.bytes,
|
||||
qtime, host_time);
|
||||
}
|
||||
|
||||
return size;
|
||||
|
Reference in New Issue
Block a user