Lines Matching refs:stats
111 static wifi_error get_wifi_interface_info(wifi_interface_link_layer_info *stats, in get_wifi_interface_info() argument
121 …stats->mode = (wifi_interface_mode)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_… in get_wifi_interface_info()
130 len = ((sizeof(stats->mac_addr) <= len) ? sizeof(stats->mac_addr) : len); in get_wifi_interface_info()
131 …memcpy(&stats->mac_addr[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_MAC_ADDR])… in get_wifi_interface_info()
138 …stats->state = (wifi_connection_state)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_IN… in get_wifi_interface_info()
145 …stats->roaming = (wifi_roam_state)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_R… in get_wifi_interface_info()
152 …stats->capabilities = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_CAPABILITIES]… in get_wifi_interface_info()
160 len = ((sizeof(stats->ssid) <= len) ? sizeof(stats->ssid) : len); in get_wifi_interface_info()
161 … memcpy(&stats->ssid[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_SSID]), len); in get_wifi_interface_info()
169 len = ((sizeof(stats->bssid) <= len) ? sizeof(stats->bssid) : len); in get_wifi_interface_info()
170 …memcpy(&stats->bssid[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_BSSID]), len); in get_wifi_interface_info()
178 len = ((sizeof(stats->ap_country_str) <= len) ? sizeof(stats->ap_country_str) : len); in get_wifi_interface_info()
179 …memcpy(&stats->ap_country_str[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_AP_C… in get_wifi_interface_info()
188 len = ((sizeof(stats->country_str) < len) ? sizeof(stats->country_str) : len); in get_wifi_interface_info()
189 …memcpy(&stats->country_str[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY… in get_wifi_interface_info()
197 …stats->time_slicing_duty_cycle_percent = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_… in get_wifi_interface_info()
211 stats->mode, in get_wifi_interface_info()
212 MAC_ADDR_ARRAY(stats->mac_addr), in get_wifi_interface_info()
213 stats->state, in get_wifi_interface_info()
214 stats->roaming, in get_wifi_interface_info()
215 stats->capabilities, in get_wifi_interface_info()
216 stats->ssid, in get_wifi_interface_info()
217 MAC_ADDR_ARRAY(stats->bssid), in get_wifi_interface_info()
218 stats->ap_country_str[0], in get_wifi_interface_info()
219 stats->ap_country_str[1], in get_wifi_interface_info()
220 stats->ap_country_str[2], in get_wifi_interface_info()
221 stats->country_str[0], in get_wifi_interface_info()
222 stats->country_str[1], in get_wifi_interface_info()
223 stats->country_str[2], in get_wifi_interface_info()
224 stats->time_slicing_duty_cycle_percent); in get_wifi_interface_info()
229 static wifi_error get_wifi_wmm_ac_stat(wifi_wmm_ac_stat *stats, in get_wifi_wmm_ac_stat() argument
238 …stats->ac = (wifi_traffic_ac)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STA… in get_wifi_wmm_ac_stat()
245 …stats->tx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_MPDU… in get_wifi_wmm_ac_stat()
252 …stats->rx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_MPDU… in get_wifi_wmm_ac_stat()
259 …stats->tx_mcast = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_MCAS… in get_wifi_wmm_ac_stat()
266 …stats->rx_mcast = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_MCAS… in get_wifi_wmm_ac_stat()
273 …stats->rx_ampdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_AMPD… in get_wifi_wmm_ac_stat()
280 …stats->tx_ampdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_AMPD… in get_wifi_wmm_ac_stat()
287 …stats->mpdu_lost = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_MPDU_LO… in get_wifi_wmm_ac_stat()
294 …stats->retries = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES… in get_wifi_wmm_ac_stat()
301 …stats->retries_short = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES… in get_wifi_wmm_ac_stat()
308 …stats->retries_long = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES… in get_wifi_wmm_ac_stat()
315 …stats->contention_time_min = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
322 …stats->contention_time_max = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
329 …stats->contention_time_avg = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
336 …stats->contention_num_samples = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
342 stats->ac, in get_wifi_wmm_ac_stat()
343 stats->tx_mpdu, in get_wifi_wmm_ac_stat()
344 stats->rx_mpdu, in get_wifi_wmm_ac_stat()
345 stats->tx_mcast, in get_wifi_wmm_ac_stat()
346 stats->rx_mcast, in get_wifi_wmm_ac_stat()
347 stats->rx_ampdu, in get_wifi_wmm_ac_stat()
348 stats->tx_ampdu, in get_wifi_wmm_ac_stat()
349 stats->mpdu_lost, in get_wifi_wmm_ac_stat()
350 stats->retries, in get_wifi_wmm_ac_stat()
351 stats->retries_short, in get_wifi_wmm_ac_stat()
352 stats->retries_long, in get_wifi_wmm_ac_stat()
353 stats->contention_time_min, in get_wifi_wmm_ac_stat()
354 stats->contention_time_max, in get_wifi_wmm_ac_stat()
355 stats->contention_time_avg, in get_wifi_wmm_ac_stat()
356 stats->contention_num_samples); in get_wifi_wmm_ac_stat()
361 static wifi_error get_wifi_rate_stat(wifi_rate_stat *stats, in get_wifi_rate_stat() argument
370 … stats->rate.preamble = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_PREAMBLE]); in get_wifi_rate_stat()
377 stats->rate.nss = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_NSS]); in get_wifi_rate_stat()
384 stats->rate.bw = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_BW]); in get_wifi_rate_stat()
391 … stats->rate.rateMcsIdx = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MCS_INDEX]); in get_wifi_rate_stat()
398 … stats->rate.bitrate = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_BIT_RATE]); in get_wifi_rate_stat()
405 … stats->tx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_TX_MPDU]); in get_wifi_rate_stat()
412 … stats->rx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RX_MPDU]); in get_wifi_rate_stat()
419 …stats->mpdu_lost = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MPDU_LOST]); in get_wifi_rate_stat()
426 … stats->retries = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES]); in get_wifi_rate_stat()
433 …stats->retries_short = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_SHO… in get_wifi_rate_stat()
440 …stats->retries_long = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_LON… in get_wifi_rate_stat()
443 stats->rate.preamble, in get_wifi_rate_stat()
444 stats->rate.nss, in get_wifi_rate_stat()
445 stats->rate.bw, in get_wifi_rate_stat()
446 stats->rate.rateMcsIdx, in get_wifi_rate_stat()
447 stats->rate.bitrate, in get_wifi_rate_stat()
448 stats->tx_mpdu, in get_wifi_rate_stat()
449 stats->rx_mpdu, in get_wifi_rate_stat()
450 stats->mpdu_lost, in get_wifi_rate_stat()
451 stats->retries, in get_wifi_rate_stat()
452 stats->retries_short, in get_wifi_rate_stat()
453 stats->retries_long); in get_wifi_rate_stat()
458 static wifi_error get_wifi_peer_info(wifi_peer_info *stats, in get_wifi_peer_info() argument
472 …stats->type = (wifi_peer_type)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STAT… in get_wifi_peer_info()
480 len = ((sizeof(stats->peer_mac_address) <= len) ? sizeof(stats->peer_mac_address) : len); in get_wifi_peer_info()
481 …memcpy((void *)&stats->peer_mac_address[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_… in get_wifi_peer_info()
489 …stats->capabilities = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_CAPA… in get_wifi_peer_info()
496 …stats->num_rate = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_NUM_… in get_wifi_peer_info()
499 stats->type, MAC_ADDR_ARRAY(stats->peer_mac_address), in get_wifi_peer_info()
500 stats->capabilities, stats->num_rate); in get_wifi_peer_info()
517 pRateStats = (wifi_rate_stat *) ((u8 *)stats->rate_stats + (i++ * sizeof(wifi_rate_stat))); in get_wifi_peer_info()
529 wifi_error LLStatsCommand::get_wifi_iface_stats(wifi_iface_stat *stats, in get_wifi_iface_stats() argument
543 stats->beacon_rx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
548 stats->average_tsf_offset = 0; in get_wifi_iface_stats()
550 stats->average_tsf_offset = nla_get_u64(tb_vendor[ in get_wifi_iface_stats()
556 stats->leaky_ap_detected = 0; in get_wifi_iface_stats()
558 stats->leaky_ap_detected = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
565 stats->leaky_ap_avg_num_frames_leaked = 0; in get_wifi_iface_stats()
567 stats->leaky_ap_avg_num_frames_leaked = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
573 stats->leaky_ap_guard_time = 0; in get_wifi_iface_stats()
575 stats->leaky_ap_guard_time = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
585 stats->mgmt_rx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
596 stats->mgmt_action_rx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
607 stats->mgmt_action_tx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
616 stats->rssi_mgmt = get_s32(tb_vendor[ in get_wifi_iface_stats()
625 stats->rssi_data = get_s32(tb_vendor[ in get_wifi_iface_stats()
634 stats->rssi_ack = get_s32(tb_vendor[ in get_wifi_iface_stats()
645 stats->beacon_rx, in get_wifi_iface_stats()
646 stats->mgmt_rx, in get_wifi_iface_stats()
647 stats->mgmt_action_rx, in get_wifi_iface_stats()
648 stats->mgmt_action_tx, in get_wifi_iface_stats()
649 stats->rssi_mgmt, in get_wifi_iface_stats()
650 stats->rssi_data, in get_wifi_iface_stats()
651 stats->rssi_ack); in get_wifi_iface_stats()
677 pWmmStats = (wifi_wmm_ac_stat *) ((u8 *)stats->ac in get_wifi_iface_stats()
692 static wifi_error get_wifi_radio_stats(wifi_radio_stat *stats, in get_wifi_radio_stats() argument
705 stats->radio = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ID]); in get_wifi_radio_stats()
712 stats->on_time = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME]); in get_wifi_radio_stats()
719 stats->tx_time = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME]); in get_wifi_radio_stats()
721 if (stats->num_tx_levels) { in get_wifi_radio_stats()
723 … QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME_PER_LEVEL not found", __func__, stats->num_tx_levels); in get_wifi_radio_stats()
724 stats->num_tx_levels = 0; in get_wifi_radio_stats()
727 stats->tx_time_per_levels = in get_wifi_radio_stats()
728 (u32 *) malloc(sizeof(u32) * stats->num_tx_levels); in get_wifi_radio_stats()
729 if (!stats->tx_time_per_levels) { in get_wifi_radio_stats()
731 stats->num_tx_levels = 0; in get_wifi_radio_stats()
735 nla_memcpy(stats->tx_time_per_levels, in get_wifi_radio_stats()
737 sizeof(u32) * stats->num_tx_levels); in get_wifi_radio_stats()
745 stats->rx_time = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_RX_TIME]); in get_wifi_radio_stats()
752 …stats->on_time_scan = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_SCAN]… in get_wifi_radio_stats()
759 …stats->on_time_nbd = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_NBD]); in get_wifi_radio_stats()
766 …stats->on_time_gscan = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_GSCAN… in get_wifi_radio_stats()
773 …stats->on_time_roam_scan = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_ROAM_… in get_wifi_radio_stats()
780 …stats->on_time_pno_scan = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_PNO_S… in get_wifi_radio_stats()
787 …stats->on_time_hs20 = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_HS20]… in get_wifi_radio_stats()
795 …stats->num_channels = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STAT… in get_wifi_radio_stats()
797 if (stats->num_channels == 0) { in get_wifi_radio_stats()
811 … pChStats = (wifi_channel_stat *) ((u8 *)stats->channels + (i++ * (sizeof(wifi_channel_stat)))); in get_wifi_radio_stats()