Lines Matching refs:stats

106 static wifi_error get_wifi_interface_info(wifi_interface_link_layer_info *stats,  in get_wifi_interface_info()  argument
116stats->mode = (wifi_interface_mode)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_… in get_wifi_interface_info()
125 len = ((sizeof(stats->mac_addr) <= len) ? sizeof(stats->mac_addr) : len); in get_wifi_interface_info()
126 …memcpy(&stats->mac_addr[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_MAC_ADDR])… in get_wifi_interface_info()
133stats->state = (wifi_connection_state)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_IN… in get_wifi_interface_info()
140stats->roaming = (wifi_roam_state)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_R… in get_wifi_interface_info()
147stats->capabilities = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_CAPABILITIES]… in get_wifi_interface_info()
155 len = ((sizeof(stats->ssid) <= len) ? sizeof(stats->ssid) : len); in get_wifi_interface_info()
156 … memcpy(&stats->ssid[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_SSID]), len); in get_wifi_interface_info()
164 len = ((sizeof(stats->bssid) <= len) ? sizeof(stats->bssid) : len); in get_wifi_interface_info()
165 …memcpy(&stats->bssid[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_BSSID]), len); in get_wifi_interface_info()
173 len = ((sizeof(stats->ap_country_str) <= len) ? sizeof(stats->ap_country_str) : len); in get_wifi_interface_info()
174 …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()
183 len = ((sizeof(stats->country_str) < len) ? sizeof(stats->country_str) : len); in get_wifi_interface_info()
184 …memcpy(&stats->country_str[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY… in get_wifi_interface_info()
198 stats->mode, in get_wifi_interface_info()
199 MAC_ADDR_ARRAY(stats->mac_addr), in get_wifi_interface_info()
200 stats->state, in get_wifi_interface_info()
201 stats->roaming, in get_wifi_interface_info()
202 stats->capabilities, in get_wifi_interface_info()
203 stats->ssid, in get_wifi_interface_info()
204 MAC_ADDR_ARRAY(stats->bssid), in get_wifi_interface_info()
205 stats->ap_country_str[0], in get_wifi_interface_info()
206 stats->ap_country_str[1], in get_wifi_interface_info()
207 stats->ap_country_str[2], in get_wifi_interface_info()
208 stats->country_str[0], in get_wifi_interface_info()
209 stats->country_str[1], in get_wifi_interface_info()
210 stats->country_str[2]); in get_wifi_interface_info()
215 static wifi_error get_wifi_wmm_ac_stat(wifi_wmm_ac_stat *stats, in get_wifi_wmm_ac_stat() argument
224stats->ac = (wifi_traffic_ac)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STA… in get_wifi_wmm_ac_stat()
231stats->tx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_MPDU… in get_wifi_wmm_ac_stat()
238stats->rx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_MPDU… in get_wifi_wmm_ac_stat()
245stats->tx_mcast = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_MCAS… in get_wifi_wmm_ac_stat()
252stats->rx_mcast = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_MCAS… in get_wifi_wmm_ac_stat()
259stats->rx_ampdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RX_AMPD… in get_wifi_wmm_ac_stat()
266stats->tx_ampdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_TX_AMPD… in get_wifi_wmm_ac_stat()
273stats->mpdu_lost = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_MPDU_LO… in get_wifi_wmm_ac_stat()
280stats->retries = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES… in get_wifi_wmm_ac_stat()
287stats->retries_short = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES… in get_wifi_wmm_ac_stat()
294stats->retries_long = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_RETRIES… in get_wifi_wmm_ac_stat()
301stats->contention_time_min = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
308stats->contention_time_max = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
315stats->contention_time_avg = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
322stats->contention_num_samples = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENT… in get_wifi_wmm_ac_stat()
328 stats->ac, in get_wifi_wmm_ac_stat()
329 stats->tx_mpdu, in get_wifi_wmm_ac_stat()
330 stats->rx_mpdu, in get_wifi_wmm_ac_stat()
331 stats->tx_mcast, in get_wifi_wmm_ac_stat()
332 stats->rx_mcast, in get_wifi_wmm_ac_stat()
333 stats->rx_ampdu, in get_wifi_wmm_ac_stat()
334 stats->tx_ampdu, in get_wifi_wmm_ac_stat()
335 stats->mpdu_lost, in get_wifi_wmm_ac_stat()
336 stats->retries, in get_wifi_wmm_ac_stat()
337 stats->retries_short, in get_wifi_wmm_ac_stat()
338 stats->retries_long, in get_wifi_wmm_ac_stat()
339 stats->contention_time_min, in get_wifi_wmm_ac_stat()
340 stats->contention_time_max, in get_wifi_wmm_ac_stat()
341 stats->contention_time_avg, in get_wifi_wmm_ac_stat()
342 stats->contention_num_samples); in get_wifi_wmm_ac_stat()
347 static wifi_error get_wifi_rate_stat(wifi_rate_stat *stats, in get_wifi_rate_stat() argument
356stats->rate.preamble = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_PREAMBLE]); in get_wifi_rate_stat()
363 stats->rate.nss = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_NSS]); in get_wifi_rate_stat()
370 stats->rate.bw = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_BW]); in get_wifi_rate_stat()
377stats->rate.rateMcsIdx = nla_get_u8(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MCS_INDEX]); in get_wifi_rate_stat()
384stats->rate.bitrate = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_BIT_RATE]); in get_wifi_rate_stat()
391stats->tx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_TX_MPDU]); in get_wifi_rate_stat()
398stats->rx_mpdu = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RX_MPDU]); in get_wifi_rate_stat()
405stats->mpdu_lost = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_MPDU_LOST]); in get_wifi_rate_stat()
412stats->retries = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES]); in get_wifi_rate_stat()
419stats->retries_short = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_SHO… in get_wifi_rate_stat()
426stats->retries_long = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_LON… in get_wifi_rate_stat()
429 stats->rate.preamble, in get_wifi_rate_stat()
430 stats->rate.nss, in get_wifi_rate_stat()
431 stats->rate.bw, in get_wifi_rate_stat()
432 stats->rate.rateMcsIdx, in get_wifi_rate_stat()
433 stats->rate.bitrate, in get_wifi_rate_stat()
434 stats->tx_mpdu, in get_wifi_rate_stat()
435 stats->rx_mpdu, in get_wifi_rate_stat()
436 stats->mpdu_lost, in get_wifi_rate_stat()
437 stats->retries, in get_wifi_rate_stat()
438 stats->retries_short, in get_wifi_rate_stat()
439 stats->retries_long); in get_wifi_rate_stat()
444 static wifi_error get_wifi_peer_info(wifi_peer_info *stats, in get_wifi_peer_info() argument
458stats->type = (wifi_peer_type)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STAT… in get_wifi_peer_info()
466 len = ((sizeof(stats->peer_mac_address) <= len) ? sizeof(stats->peer_mac_address) : len); in get_wifi_peer_info()
467 …memcpy((void *)&stats->peer_mac_address[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_… in get_wifi_peer_info()
475stats->capabilities = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_CAPA… in get_wifi_peer_info()
482stats->num_rate = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_NUM_… in get_wifi_peer_info()
485 stats->type, MAC_ADDR_ARRAY(stats->peer_mac_address), in get_wifi_peer_info()
486 stats->capabilities, stats->num_rate); in get_wifi_peer_info()
503 pRateStats = (wifi_rate_stat *) ((u8 *)stats->rate_stats + (i++ * sizeof(wifi_rate_stat))); in get_wifi_peer_info()
515 wifi_error LLStatsCommand::get_wifi_iface_stats(wifi_iface_stat *stats, in get_wifi_iface_stats() argument
529 stats->beacon_rx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
534 stats->average_tsf_offset = 0; in get_wifi_iface_stats()
536 stats->average_tsf_offset = nla_get_u64(tb_vendor[ in get_wifi_iface_stats()
542 stats->leaky_ap_detected = 0; in get_wifi_iface_stats()
544 stats->leaky_ap_detected = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
551 stats->leaky_ap_avg_num_frames_leaked = 0; in get_wifi_iface_stats()
553 stats->leaky_ap_avg_num_frames_leaked = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
559 stats->leaky_ap_guard_time = 0; in get_wifi_iface_stats()
561 stats->leaky_ap_guard_time = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
571 stats->mgmt_rx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
582 stats->mgmt_action_rx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
593 stats->mgmt_action_tx = nla_get_u32(tb_vendor[ in get_wifi_iface_stats()
602 stats->rssi_mgmt = get_s32(tb_vendor[ in get_wifi_iface_stats()
611 stats->rssi_data = get_s32(tb_vendor[ in get_wifi_iface_stats()
620 stats->rssi_ack = get_s32(tb_vendor[ in get_wifi_iface_stats()
631 stats->beacon_rx, in get_wifi_iface_stats()
632 stats->mgmt_rx, in get_wifi_iface_stats()
633 stats->mgmt_action_rx, in get_wifi_iface_stats()
634 stats->mgmt_action_tx, in get_wifi_iface_stats()
635 stats->rssi_mgmt, in get_wifi_iface_stats()
636 stats->rssi_data, in get_wifi_iface_stats()
637 stats->rssi_ack); in get_wifi_iface_stats()
663 pWmmStats = (wifi_wmm_ac_stat *) ((u8 *)stats->ac in get_wifi_iface_stats()
678 static wifi_error get_wifi_radio_stats(wifi_radio_stat *stats, in get_wifi_radio_stats() argument
691 stats->radio = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ID]); in get_wifi_radio_stats()
698 stats->on_time = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME]); in get_wifi_radio_stats()
705 stats->tx_time = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME]); in get_wifi_radio_stats()
707 if (stats->num_tx_levels) { in get_wifi_radio_stats()
709 … QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_TX_TIME_PER_LEVEL not found", __func__, stats->num_tx_levels); in get_wifi_radio_stats()
710 stats->num_tx_levels = 0; in get_wifi_radio_stats()
713 stats->tx_time_per_levels = in get_wifi_radio_stats()
714 (u32 *) malloc(sizeof(u32) * stats->num_tx_levels); in get_wifi_radio_stats()
715 if (!stats->tx_time_per_levels) { in get_wifi_radio_stats()
717 stats->num_tx_levels = 0; in get_wifi_radio_stats()
721 nla_memcpy(stats->tx_time_per_levels, in get_wifi_radio_stats()
723 sizeof(u32) * stats->num_tx_levels); in get_wifi_radio_stats()
731 stats->rx_time = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_RX_TIME]); in get_wifi_radio_stats()
738stats->on_time_scan = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_SCAN]… in get_wifi_radio_stats()
745stats->on_time_nbd = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_NBD]); in get_wifi_radio_stats()
752stats->on_time_gscan = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_GSCAN… in get_wifi_radio_stats()
759stats->on_time_roam_scan = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_ROAM_… in get_wifi_radio_stats()
766stats->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()
773stats->on_time_hs20 = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ON_TIME_HS20]… in get_wifi_radio_stats()
781stats->num_channels = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STAT… in get_wifi_radio_stats()
783 if (stats->num_channels == 0) { in get_wifi_radio_stats()
797 … pChStats = (wifi_channel_stat *) ((u8 *)stats->channels + (i++ * (sizeof(wifi_channel_stat)))); in get_wifi_radio_stats()