Просмотр исходного кода

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
Yu Ouyang 3 лет назад
Родитель
Сommit
4c86f51c68
3 измененных файлов с 7 добавлено и 1 удалено
  1. 4 1
      core/hdd/src/wlan_hdd_stats.c
  2. 1 0
      core/mac/inc/sir_api.h
  3. 2 0
      core/wma/src/wma_utils.c

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

@@ -631,7 +631,10 @@ static bool put_wifi_interface_info(struct wifi_interface_info *stats,
 		    REG_ALPHA2_LEN + 1, stats->apCountryStr) ||
 	    nla_put(vendor_event,
 		    QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY_STR,
-		    REG_ALPHA2_LEN + 1, stats->countryStr)) {
+		    REG_ALPHA2_LEN + 1, 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;
 	}

+ 1 - 0
core/mac/inc/sir_api.h

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

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

@@ -2777,6 +2777,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++) {