Browse Source

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
Jia Ding 3 years ago
parent
commit
63ff4f1a48
2 changed files with 5 additions and 2 deletions
  1. 3 1
      core/hdd/src/wlan_hdd_stats.c
  2. 2 1
      core/wma/src/wma_utils.c

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

@@ -1612,7 +1612,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;

+ 2 - 1
core/wma/src/wma_utils.c

@@ -2543,7 +2543,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);