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
This commit is contained in:
Jia Ding 2021-08-06 07:04:11 +08:00 • committed by Gerrit - the friendly Code Review server
commit 3e20d8177d
2 changed files with 5 additions and 2 deletions

View file

@ -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;

View file

@ -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);