From 824d698f2575529ea46d148dcbca4ed0f498c439 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Mon, 2 Nov 2020 11:24:08 +0530 Subject: [PATCH] qcacld-3.0: Add HW dbs cap info in pm_cinfo User reads policy manager connection status information via sysfs entry. Host adds HW mode dbs capability information in pm_cinfo by checking HW is dbs capable and present HW state is DBS. Change-Id: I00d83b49dfae41b17341d3758d8ead42ffd602a8 CRs-Fixed: 2795010 --- core/hdd/src/wlan_hdd_sysfs_policy_mgr.c | 8 +++++++- core/hdd/src/wlan_hdd_wext.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_sysfs_policy_mgr.c b/core/hdd/src/wlan_hdd_sysfs_policy_mgr.c index 5d74e4bb4205..327a97b9facd 100644 --- a/core/hdd/src/wlan_hdd_sysfs_policy_mgr.c +++ b/core/hdd/src/wlan_hdd_sysfs_policy_mgr.c @@ -35,17 +35,23 @@ static ssize_t hdd_pm_cinfo_show(struct hdd_context *hdd_ctx) conn_info = policy_mgr_get_conn_info(&len); pr_info("+--------------------------+\n"); for (i = 0; i < len; i++) { + if (!conn_info->in_use) + continue; + pr_info("|table_index[%d]\t\t\n", i); pr_info("|\t|vdev_id - %-10d|\n", conn_info->vdev_id); pr_info("|\t|freq - %-10d|\n", conn_info->freq); pr_info("|\t|bw - %-10d|\n", conn_info->bw); pr_info("|\t|mode - %-10d|\n", conn_info->mode); - pr_info("|\t|mac - %-10d|\n", conn_info->mac); + pr_info("|\t|mac_id - %-10d|\n", conn_info->mac); pr_info("|\t|in_use - %-10d|\n", conn_info->in_use); pr_info("+--------------------------+\n"); conn_info++; } + pr_info("|\t|current state dbs - %-10d|\n", + policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc)); + hdd_exit(); return 0; } diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 9da9172b7e82..9ccb8b0a084b 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -7105,16 +7105,22 @@ static int __iw_set_var_ints_getnone(struct net_device *dev, conn_info = policy_mgr_get_conn_info(&len); pr_info("+--------------------------+\n"); for (i = 0; i < len; i++) { + if (!conn_info->in_use) + continue; + pr_info("|table_index[%d]\t\t\n", i); pr_info("|\t|vdev_id - %-10d|\n", conn_info->vdev_id); pr_info("|\t|freq - %-10d|\n", conn_info->freq); pr_info("|\t|bw - %-10d|\n", conn_info->bw); pr_info("|\t|mode - %-10d|\n", conn_info->mode); - pr_info("|\t|mac - %-10d|\n", conn_info->mac); + pr_info("|\t|mac_id - %-10d|\n", conn_info->mac); pr_info("|\t|in_use - %-10d|\n", conn_info->in_use); pr_info("+--------------------------+\n"); conn_info++; } + + pr_info("|\t|current state dbs - %-10d|\n", + policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc)); } break;