qcacld-3.0: Add time slice duty cycle in wifi_interface_info

Android S VTS test case GetLinkLayerStats_1_5 need get interface time
slice duty cycle info. VTS will get it over vendor command
QCA_NL80211_VENDOR_SUBCMD_LL_STATS_GET.

So, we need put time slice duty cycle percentage in structure
wifi_interface_info.

Change-Id: Iff644b4b1ed6dd34badc2008d2957c98e0207aa6
CRs-Fixed: 3040005
This commit is contained in:
Yu Ouyang 2021-08-25 14:14:42 +08:00 committed by Michael Bestas
parent fcd1edee57
commit ab40644aa2
No known key found for this signature in database
GPG key ID: CC95044519BE6669
3 changed files with 7 additions and 1 deletions

View file

@ -438,7 +438,10 @@ static bool put_wifi_interface_info(struct wifi_interface_info *stats,
CFG_COUNTRY_CODE_LEN, stats->apCountryStr) ||
nla_put(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY_STR,
CFG_COUNTRY_CODE_LEN, stats->countryStr)) {
CFG_COUNTRY_CODE_LEN, stats->countryStr) ||
nla_put_u32(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_TS_DUTY_CYCLE,
stats->time_slice_duty_cycle)) {
hdd_err("QCA_WLAN_VENDOR_ATTR put fail");
return false;
}

View file

@ -3574,6 +3574,7 @@ struct wifi_interface_info {
uint8_t apCountryStr[CFG_COUNTRY_CODE_LEN];
/* country string for this association */
uint8_t countryStr[CFG_COUNTRY_CODE_LEN];
uint8_t time_slice_duty_cycle;
};
/**

View file

@ -2618,6 +2618,8 @@ int wma_unified_link_iface_stats_event_handler(void *handle,
/* Copy roaming state */
iface_stat->info.roaming = link_stats->roam_state;
/* Copy time slicing duty cycle */
iface_stat->info.time_slice_duty_cycle = 100;
iface_ac_stats = &iface_stat->ac_stats[0];
for (count = 0; count < link_stats->num_ac; count++) {