From 3e20d8177dbadd03d71f4b4d65745ff19780cdd8 Mon Sep 17 00:00:00 2001 From: Jia Ding Date: Fri, 6 Aug 2021 07:04:11 +0800 Subject: [PATCH] qcacld-3.0: Support LLSTATS set for P2P mode ll_stats_set vendor cmd is now only supported for STA mode. Add support for P2P_GO and P2P_CLI modes since FW supports LL_STATS for P2P mode as well. For P2P_GO mode, use WMI_REQUEST_LINK_STATS_CMDID instead of the club cmd WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID. Change-Id: I675ff87593e6eb80e1e1fef85ae1f46d24701d63 CRs-Fixed: 3012389 --- core/hdd/src/wlan_hdd_stats.c | 4 +++- core/wma/src/wma_utils.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index ca1e1ca94893..68d2af89bc1e 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -1453,7 +1453,9 @@ __wlan_hdd_cfg80211_ll_stats_set(struct wiphy *wiphy, if (hdd_validate_adapter(adapter)) return -EINVAL; - if (adapter->device_mode != QDF_STA_MODE) { + if (adapter->device_mode != QDF_STA_MODE && + adapter->device_mode != QDF_P2P_CLIENT_MODE && + adapter->device_mode != QDF_P2P_GO_MODE) { hdd_debug("Cannot set LL_STATS for device mode %d", adapter->device_mode); return -EINVAL; diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 5167385950c3..5482ef859e7d 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -2536,7 +2536,8 @@ wma_send_ll_stats_get_cmd(tp_wma_handle wma_handle, { if (!(cfg_get(wma_handle->psoc, CFG_CLUB_LL_STA_AND_GET_STATION) && wmi_service_enabled(wma_handle->wmi_handle, - wmi_service_get_station_in_ll_stats_req))) + wmi_service_get_station_in_ll_stats_req) && + wma_handle->interfaces[cmd->vdev_id].type == WMI_VDEV_TYPE_STA)) return wmi_unified_process_ll_stats_get_cmd( wma_handle->wmi_handle, cmd);