浏览代码

qcacld-3.0: Report noise floor value to userspace

Noise floor value is got from fw and report it to
userspace by QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NF_CAL_VAL.

Change-Id: Ie5aabdd650b2d8b21dbfbe13a9f7da81e8684d13
CRs-Fixed: 3427742
Jingxiang Ge 2 年之前
父节点
当前提交
055778ff85
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 3 2
      core/hdd/src/wlan_hdd_debugfs_llstat.c
  2. 3 0
      core/hdd/src/wlan_hdd_stats.c

+ 3 - 2
core/hdd/src/wlan_hdd_debugfs_llstat.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 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
@@ -93,7 +93,7 @@ void hdd_debugfs_process_iface_stats(struct hdd_adapter *adapter,
 	buffer += len;
 	ll_stats.len += len;
 	len = scnprintf(buffer, DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len,
-			"\nbeacon_rx: %u, mgmt_rx: %u, mgmt_action_rx: %u, mgmt_action_tx: %u, rssi_mgmt: %d, rssi_data: %d, rssi_ack: %d, is_leaky_ap: %u, avg_rx_frms_leaked: %u, rx_leak_window: %u, average_tsf_offset: %llu, Tx RTS success count: %u, Tx RTS fail count: %u, Tx ppdu success count: %u, Tx ppdu fail count: %u, Connected duration: %u, Disconnected duration: %u, RTT ranging duration: %u, RTT responder duration: %u, Num tx probes: %u, Num beacon miss: %u,\n\nNumber of AC: %d",
+			"\nbeacon_rx: %u, mgmt_rx: %u, mgmt_action_rx: %u, mgmt_action_tx: %u, rssi_mgmt: %d, rssi_data: %d, rssi_ack: %d, is_leaky_ap: %u, avg_rx_frms_leaked: %u, rx_leak_window: %u, average_tsf_offset: %llu, Tx RTS success count: %u, Tx RTS fail count: %u, Tx ppdu success count: %u, Tx ppdu fail count: %u, Connected duration: %u, Disconnected duration: %u, RTT ranging duration: %u, RTT responder duration: %u, Num tx probes: %u, Num beacon miss: %u, nf_cal %d\n\nNumber of AC: %d",
 			link_stats->beacon_rx, link_stats->mgmt_rx,
 			link_stats->mgmt_action_rx, link_stats->mgmt_action_tx,
 			link_stats->rssi_mgmt, link_stats->rssi_data,
@@ -109,6 +109,7 @@ void hdd_debugfs_process_iface_stats(struct hdd_adapter *adapter,
 			link_stats->rtt_ranging_duration,
 			link_stats->rtt_responder_duration,
 			link_stats->num_probes_tx, link_stats->num_beacon_miss,
+			link_stats->nf_cal_val,
 			link_stats->num_ac);
 
 	for (i = 0; i < link_stats->num_ac; i++) {

+ 3 - 0
core/hdd/src/wlan_hdd_stats.c

@@ -794,6 +794,9 @@ static bool put_wifi_iface_stats(struct wifi_interface_stats *if_stat,
 	    nla_put_u32(vendor_event,
 			QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_LEAKY_AP_GUARD_TIME,
 			link_stats->rx_leak_window) ||
+	    nla_put_s32(vendor_event,
+			QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NF_CAL_VAL,
+			link_stats->nf_cal_val) ||
 	    hdd_wlan_nla_put_u64(vendor_event,
 			QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_AVERAGE_TSF_OFFSET,
 			average_tsf_offset) ||