diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 01239a0d2c6c..b4dbc5061ffb 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2591,13 +2591,15 @@ struct sir_peer_info_ext_req { * @tx_bytes: bytes transmitted to this station * @rx_packets: packets received from this station * @rx_bytes: bytes received from this station - * @rx_retries: cumulative retry counts - * @tx_failed: number of failed transmissions - * @rssi: The signal strength + * @tx_retries: cumulative retry counts + * @tx_failed: the number of failed frames + * @tx_succeed: the number of succeed frames + * @rssi: the signal strength * @tx_rate: last used tx bitrate (kbps) * @tx_rate_code: last tx rate code (last_tx_rate_code of wmi_peer_stats_info) * @rx_rate: last used rx bitrate (kbps) * @rx_rate_code: last rx rate code (last_rx_rate_code of wmi_peer_stats_info) + * @peer_rssi_per_chain: the average value of RSSI (dbm) per chain * * a station's information */ @@ -2609,11 +2611,13 @@ struct sir_peer_info_ext { uint64_t rx_bytes; uint32_t tx_retries; uint32_t tx_failed; + uint32_t tx_succeed; int32_t rssi; uint32_t tx_rate; uint32_t tx_rate_code; uint32_t rx_rate; uint32_t rx_rate_code; + int32_t peer_rssi_per_chain[WMI_MAX_CHAINS]; }; /** diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index bde016a9d8e4..53a14f88c0b4 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -2936,6 +2936,8 @@ static void wma_fill_peer_info(tp_wma_handle wma, wmi_peer_stats_info *stats_info, struct sir_peer_info_ext *peer_info) { + int i; + peer_info->tx_packets = stats_info->tx_packets.low_32; peer_info->tx_bytes = stats_info->tx_bytes.high_32; peer_info->tx_bytes <<= 32; @@ -2946,11 +2948,15 @@ static void wma_fill_peer_info(tp_wma_handle wma, peer_info->rx_bytes += stats_info->rx_bytes.low_32; peer_info->tx_retries = stats_info->tx_retries; peer_info->tx_failed = stats_info->tx_failed; + peer_info->tx_succeed = stats_info->tx_succeed; peer_info->rssi = stats_info->peer_rssi; peer_info->tx_rate = stats_info->last_tx_bitrate_kbps; peer_info->tx_rate_code = stats_info->last_tx_rate_code; peer_info->rx_rate = stats_info->last_rx_bitrate_kbps; peer_info->rx_rate_code = stats_info->last_rx_rate_code; + for (i = 0; i < WMI_MAX_CHAINS; i++) + peer_info->peer_rssi_per_chain[i] = + stats_info->peer_rssi_per_chain[i]; } /** @@ -3048,40 +3054,45 @@ static QDF_STATUS wma_peer_info_ext_rsp(tp_wma_handle wma, u_int8_t *buf) static void dump_peer_stats_info(wmi_peer_stats_info_event_fixed_param *event, wmi_peer_stats_info *peer_stats) { - int i; + int i, j; wmi_peer_stats_info *stats = peer_stats; u_int8_t mac[6]; - WMA_LOGI("%s vdev_id %d, num_peers %d more_data %d", - __func__, event->vdev_id, - event->num_peers, event->more_data); + WMA_LOGD("%s vdev_id %d, num_peers %d more_data %d", + __func__, event->vdev_id, + event->num_peers, event->more_data); for (i = 0; i < event->num_peers; i++) { WMI_MAC_ADDR_TO_CHAR_ARRAY(&stats->peer_macaddr, mac); - WMA_LOGI("%s mac %pM", __func__, mac); - WMA_LOGI("%s tx_bytes %d %d tx_packets %d %d", - __func__, - stats->tx_bytes.low_32, - stats->tx_bytes.high_32, - stats->tx_packets.low_32, - stats->tx_packets.high_32); - WMA_LOGI("%s rx_bytes %d %d rx_packets %d %d", - __func__, - stats->rx_bytes.low_32, - stats->rx_bytes.high_32, - stats->rx_packets.low_32, - stats->rx_packets.high_32); - WMA_LOGI("%s tx_retries %d tx_failed %d", - __func__, stats->tx_retries, stats->tx_failed); - WMA_LOGI("%s tx_rate_code %x rx_rate_code %x", - __func__, - stats->last_tx_rate_code, - stats->last_rx_rate_code); - WMA_LOGI("%s tx_rate %x rx_rate %x", - __func__, - stats->last_tx_bitrate_kbps, - stats->last_rx_bitrate_kbps); - WMA_LOGI("%s peer_rssi %d", __func__, stats->peer_rssi); + WMA_LOGD("%s mac %pM", __func__, mac); + WMA_LOGD("%s tx_bytes %d %d tx_packets %d %d", + __func__, + stats->tx_bytes.low_32, + stats->tx_bytes.high_32, + stats->tx_packets.low_32, + stats->tx_packets.high_32); + WMA_LOGD("%s rx_bytes %d %d rx_packets %d %d", + __func__, + stats->rx_bytes.low_32, + stats->rx_bytes.high_32, + stats->rx_packets.low_32, + stats->rx_packets.high_32); + WMA_LOGD("%s tx_retries %d tx_failed %d", + __func__, stats->tx_retries, stats->tx_failed); + WMA_LOGD("%s tx_rate_code %x rx_rate_code %x", + __func__, + stats->last_tx_rate_code, + stats->last_rx_rate_code); + WMA_LOGD("%s tx_rate %x rx_rate %x", + __func__, + stats->last_tx_bitrate_kbps, + stats->last_rx_bitrate_kbps); + WMA_LOGD("%s peer_rssi %d", __func__, stats->peer_rssi); + WMA_LOGD("%s tx_succeed %d", __func__, stats->tx_succeed); + for (j = 0; j < WMI_MAX_CHAINS; j++) + WMA_LOGD("%s chain%d_rssi %d", __func__, j, + stats->peer_rssi_per_chain[j]); + stats++; } }