diff --git a/core/dp/htt/htt_fw_stats.c b/core/dp/htt/htt_fw_stats.c index 0bf4c13d4f31..ea54e1efd003 100644 --- a/core/dp/htt/htt_fw_stats.c +++ b/core/dp/htt/htt_fw_stats.c @@ -59,84 +59,79 @@ static char *bw_str_arr[] = {"20MHz", "40MHz", "80MHz", "160MHz"}; * trick to use to avoid the code duplication. */ #define tx_rate_stats_print_cmn(_tx_rate_info, _concise) \ -{ \ - int i; \ - \ - qdf_print("TX Rate Info:\n"); \ - \ - /* MCS */ \ - qdf_print("MCS counts (0..9): "); \ - qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ - _tx_rate_info->mcs[0], \ - _tx_rate_info->mcs[1], \ - _tx_rate_info->mcs[2], \ - _tx_rate_info->mcs[3], \ - _tx_rate_info->mcs[4], \ - _tx_rate_info->mcs[5], \ - _tx_rate_info->mcs[6], \ - _tx_rate_info->mcs[7], \ - _tx_rate_info->mcs[8], \ - _tx_rate_info->mcs[9]); \ - \ - /* SGI */ \ - qdf_print("SGI counts (0..9): "); \ - qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ - _tx_rate_info->sgi[0], \ - _tx_rate_info->sgi[1], \ - _tx_rate_info->sgi[2], \ - _tx_rate_info->sgi[3], \ - _tx_rate_info->sgi[4], \ - _tx_rate_info->sgi[5], \ - _tx_rate_info->sgi[6], \ - _tx_rate_info->sgi[7], \ - _tx_rate_info->sgi[8], \ - _tx_rate_info->sgi[9]); \ - \ - /* NSS */ \ - qdf_print("NSS counts: "); \ - qdf_print("1x1 %d, 2x2 %d, 3x3 %d\n", \ - _tx_rate_info->nss[0], \ +{ \ + qdf_print("TX Rate Info:"); \ + \ + /* MCS */ \ + qdf_print("MCS counts (0..9): %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",\ + _tx_rate_info->mcs[0], \ + _tx_rate_info->mcs[1], \ + _tx_rate_info->mcs[2], \ + _tx_rate_info->mcs[3], \ + _tx_rate_info->mcs[4], \ + _tx_rate_info->mcs[5], \ + _tx_rate_info->mcs[6], \ + _tx_rate_info->mcs[7], \ + _tx_rate_info->mcs[8], \ + _tx_rate_info->mcs[9]); \ + \ + /* SGI */ \ + qdf_print("SGI counts (0..9): %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",\ + _tx_rate_info->sgi[0], \ + _tx_rate_info->sgi[1], \ + _tx_rate_info->sgi[2], \ + _tx_rate_info->sgi[3], \ + _tx_rate_info->sgi[4], \ + _tx_rate_info->sgi[5], \ + _tx_rate_info->sgi[6], \ + _tx_rate_info->sgi[7], \ + _tx_rate_info->sgi[8], \ + _tx_rate_info->sgi[9]); \ + \ + /* NSS */ \ + qdf_print("NSS counts: 1x1 %d, 2x2 %d, 3x3 %d", \ + _tx_rate_info->nss[0], \ _tx_rate_info->nss[1], _tx_rate_info->nss[2]);\ - \ - /* BW */ \ - qdf_print("BW counts: "); \ - \ - for (i = 0; \ - i < sizeof(_tx_rate_info->bw) / sizeof(_tx_rate_info->bw[0]);\ - i++) { \ - qdf_print("%s %d ", bw_str_arr[i], _tx_rate_info->bw[i]);\ - } \ - qdf_print("\n"); \ - \ - /* Preamble */ \ - qdf_print("Preamble (O C H V) counts: "); \ - qdf_print("%d, %d, %d, %d\n", \ - _tx_rate_info->pream[0], \ - _tx_rate_info->pream[1], \ - _tx_rate_info->pream[2], \ - _tx_rate_info->pream[3]); \ - \ - /* STBC rate counts */ \ - qdf_print("STBC rate counts (0..9): "); \ - qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ - _tx_rate_info->stbc[0], \ - _tx_rate_info->stbc[1], \ - _tx_rate_info->stbc[2], \ - _tx_rate_info->stbc[3], \ - _tx_rate_info->stbc[4], \ - _tx_rate_info->stbc[5], \ - _tx_rate_info->stbc[6], \ - _tx_rate_info->stbc[7], \ - _tx_rate_info->stbc[8], \ - _tx_rate_info->stbc[9]); \ - \ - /* LDPC and TxBF counts */ \ - qdf_print("LDPC Counts: "); \ - qdf_print("%d\n", _tx_rate_info->ldpc); \ - qdf_print("RTS Counts: "); \ - qdf_print("%d\n", _tx_rate_info->rts_cnt); \ - /* RSSI Values for last ack frames */ \ - qdf_print("Ack RSSI: %d\n", _tx_rate_info->ack_rssi);\ + \ + /* BW */ \ + if (sizeof(_tx_rate_info->bw) / sizeof(_tx_rate_info->bw[0]) == 3)\ + qdf_print("BW counts: %s %d, %s %d, %s %d", \ + bw_str_arr[0], _tx_rate_info->bw[0], \ + bw_str_arr[1], _tx_rate_info->bw[1], \ + bw_str_arr[2], _tx_rate_info->bw[2]); \ + else if (sizeof(_tx_rate_info->bw) / sizeof(_tx_rate_info->bw[0]) == 4)\ + qdf_print("BW counts: %s %d, %s %d, %s %d, %s %d", \ + bw_str_arr[0], _tx_rate_info->bw[0], \ + bw_str_arr[1], _tx_rate_info->bw[1], \ + bw_str_arr[2], _tx_rate_info->bw[2], \ + bw_str_arr[3], _tx_rate_info->bw[3]); \ + \ + \ + /* Preamble */ \ + qdf_print("Preamble (O C H V) counts: %d, %d, %d, %d",\ + _tx_rate_info->pream[0], \ + _tx_rate_info->pream[1], \ + _tx_rate_info->pream[2], \ + _tx_rate_info->pream[3]); \ + \ + /* STBC rate counts */ \ + qdf_print("STBC rate counts (0..9): %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",\ + _tx_rate_info->stbc[0], \ + _tx_rate_info->stbc[1], \ + _tx_rate_info->stbc[2], \ + _tx_rate_info->stbc[3], \ + _tx_rate_info->stbc[4], \ + _tx_rate_info->stbc[5], \ + _tx_rate_info->stbc[6], \ + _tx_rate_info->stbc[7], \ + _tx_rate_info->stbc[8], \ + _tx_rate_info->stbc[9]); \ + \ + /* LDPC and TxBF counts */ \ + qdf_print("LDPC Counts: %d", _tx_rate_info->ldpc);\ + qdf_print("RTS Counts: %d", _tx_rate_info->rts_cnt);\ + /* RSSI Values for last ack frames */ \ + qdf_print("Ack RSSI: %d", _tx_rate_info->ack_rssi);\ } static void htt_t2h_stats_tx_rate_stats_print(wlan_dbg_tx_rate_info_t * @@ -162,111 +157,107 @@ static void htt_t2h_stats_tx_rate_stats_print_v2(wlan_dbg_tx_rate_info_v2_t * * trick to use to avoid the code duplication. */ #define rx_rate_stats_print_cmn(_rx_phy_info, _concise) \ -{ \ - int i; \ - \ - qdf_print("RX Rate Info:\n"); \ - \ - /* MCS */ \ - qdf_print("MCS counts (0..9): "); \ - qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ - _rx_phy_info->mcs[0], \ - _rx_phy_info->mcs[1], \ - _rx_phy_info->mcs[2], \ - _rx_phy_info->mcs[3], \ - _rx_phy_info->mcs[4], \ - _rx_phy_info->mcs[5], \ - _rx_phy_info->mcs[6], \ - _rx_phy_info->mcs[7], \ - _rx_phy_info->mcs[8], \ - _rx_phy_info->mcs[9]); \ - \ - /* SGI */ \ - qdf_print("SGI counts (0..9): "); \ - qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ - _rx_phy_info->sgi[0], \ - _rx_phy_info->sgi[1], \ - _rx_phy_info->sgi[2], \ - _rx_phy_info->sgi[3], \ - _rx_phy_info->sgi[4], \ - _rx_phy_info->sgi[5], \ - _rx_phy_info->sgi[6], \ - _rx_phy_info->sgi[7], \ - _rx_phy_info->sgi[8], \ - _rx_phy_info->sgi[9]); \ - \ - /* NSS */ \ - qdf_print("NSS counts: "); \ +{ \ + qdf_print("RX Rate Info:"); \ + \ + /* MCS */ \ + qdf_print("MCS counts (0..9): %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",\ + _rx_phy_info->mcs[0], \ + _rx_phy_info->mcs[1], \ + _rx_phy_info->mcs[2], \ + _rx_phy_info->mcs[3], \ + _rx_phy_info->mcs[4], \ + _rx_phy_info->mcs[5], \ + _rx_phy_info->mcs[6], \ + _rx_phy_info->mcs[7], \ + _rx_phy_info->mcs[8], \ + _rx_phy_info->mcs[9]); \ + \ + /* SGI */ \ + qdf_print("SGI counts (0..9): %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",\ + _rx_phy_info->sgi[0], \ + _rx_phy_info->sgi[1], \ + _rx_phy_info->sgi[2], \ + _rx_phy_info->sgi[3], \ + _rx_phy_info->sgi[4], \ + _rx_phy_info->sgi[5], \ + _rx_phy_info->sgi[6], \ + _rx_phy_info->sgi[7], \ + _rx_phy_info->sgi[8], \ + _rx_phy_info->sgi[9]); \ + \ + /* NSS */ \ /* nss[0] just holds the count of non-stbc frames that were sent at 1x1 \ * rates and nsts holds the count of frames sent with stbc. \ * It was decided to not include PPDUs sent w/ STBC in nss[0]\ * since it would be easier to change the value that needs to be\ * printed (from "stbc+non-stbc count to only non-stbc count")\ * if needed in the future. Hence the addition in the host code\ - * at this line. */ \ - qdf_print("1x1 %d, 2x2 %d, 3x3 %d, 4x4 %d\n", \ + * at this line. */ \ + qdf_print("NSS counts: 1x1 %d, 2x2 %d, 3x3 %d, 4x4 %d",\ _rx_phy_info->nss[0] + _rx_phy_info->nsts, \ - _rx_phy_info->nss[1], \ - _rx_phy_info->nss[2], \ - _rx_phy_info->nss[3]); \ - \ - /* NSTS */ \ - qdf_print("NSTS count: "); \ - qdf_print("%d\n", _rx_phy_info->nsts); \ - \ - /* BW */ \ - qdf_print("BW counts: "); \ - for (i = 0; \ - i < sizeof(_rx_phy_info->bw) / sizeof(_rx_phy_info->bw[0]); \ - i++) { \ - qdf_print("%s %d ", bw_str_arr[i], _rx_phy_info->bw[i]);\ - } \ - qdf_print("\n"); \ - \ - /* Preamble */ \ - qdf_print("Preamble counts: "); \ - qdf_print("%d, %d, %d, %d, %d, %d\n", \ - _rx_phy_info->pream[0], \ - _rx_phy_info->pream[1], \ - _rx_phy_info->pream[2], \ - _rx_phy_info->pream[3], \ - _rx_phy_info->pream[4], \ - _rx_phy_info->pream[5]); \ - \ - /* STBC rate counts */ \ - qdf_print("STBC rate counts (0..9): "); \ - qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ - _rx_phy_info->stbc[0], \ - _rx_phy_info->stbc[1], \ - _rx_phy_info->stbc[2], \ - _rx_phy_info->stbc[3], \ - _rx_phy_info->stbc[4], \ - _rx_phy_info->stbc[5], \ - _rx_phy_info->stbc[6], \ - _rx_phy_info->stbc[7], \ - _rx_phy_info->stbc[8], \ - _rx_phy_info->stbc[9]); \ - \ - /* LDPC and TxBF counts */ \ - qdf_print("LDPC TXBF Counts: "); \ - qdf_print("%d, %d\n", _rx_phy_info->ldpc, _rx_phy_info->txbf);\ - /* RSSI Values for last received frames */ \ - qdf_print("RSSI (data, mgmt): %d, %d\n", _rx_phy_info->data_rssi,\ - _rx_phy_info->mgmt_rssi); \ - \ - qdf_print("RSSI Chain 0 (0x%02x 0x%02x 0x%02x 0x%02x)\n",\ + _rx_phy_info->nss[1], \ + _rx_phy_info->nss[2], \ + _rx_phy_info->nss[3]); \ + \ + /* NSTS */ \ + qdf_print("NSTS count: %d", _rx_phy_info->nsts); \ + \ + /* BW */ \ + if (sizeof(_rx_phy_info->bw) / sizeof(_rx_phy_info->bw[0]) == 3)\ + qdf_print("BW counts: %s %d, %s %d, %s %d", \ + bw_str_arr[0], _rx_phy_info->bw[0], \ + bw_str_arr[1], _rx_phy_info->bw[1], \ + bw_str_arr[2], _rx_phy_info->bw[2]); \ + else if (sizeof(_rx_phy_info->bw) / sizeof(_rx_phy_info->bw[0]) == 4) \ + qdf_print("BW counts: %s %d, %s %d, %s %d, %s %d", \ + bw_str_arr[0], _rx_phy_info->bw[0], \ + bw_str_arr[1], _rx_phy_info->bw[1], \ + bw_str_arr[2], _rx_phy_info->bw[2], \ + bw_str_arr[3], _rx_phy_info->bw[3]); \ + \ + /* Preamble */ \ + qdf_print("Preamble counts: %d, %d, %d, %d, %d, %d",\ + _rx_phy_info->pream[0], \ + _rx_phy_info->pream[1], \ + _rx_phy_info->pream[2], \ + _rx_phy_info->pream[3], \ + _rx_phy_info->pream[4], \ + _rx_phy_info->pream[5]); \ + \ + /* STBC rate counts */ \ + qdf_print("STBC rate counts (0..9): %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",\ + _rx_phy_info->stbc[0], \ + _rx_phy_info->stbc[1], \ + _rx_phy_info->stbc[2], \ + _rx_phy_info->stbc[3], \ + _rx_phy_info->stbc[4], \ + _rx_phy_info->stbc[5], \ + _rx_phy_info->stbc[6], \ + _rx_phy_info->stbc[7], \ + _rx_phy_info->stbc[8], \ + _rx_phy_info->stbc[9]); \ + \ + /* LDPC and TxBF counts */ \ + qdf_print("LDPC TXBF Counts: %d, %d", \ + _rx_phy_info->ldpc, _rx_phy_info->txbf);\ + /* RSSI Values for last received frames */ \ + qdf_print("RSSI (data, mgmt): %d, %d", _rx_phy_info->data_rssi,\ + _rx_phy_info->mgmt_rssi); \ + \ + qdf_print("RSSI Chain 0 (0x%02x 0x%02x 0x%02x 0x%02x)",\ ((_rx_phy_info->rssi_chain0 >> 24) & 0xff), \ ((_rx_phy_info->rssi_chain0 >> 16) & 0xff), \ ((_rx_phy_info->rssi_chain0 >> 8) & 0xff), \ ((_rx_phy_info->rssi_chain0 >> 0) & 0xff)); \ - \ - qdf_print("RSSI Chain 1 (0x%02x 0x%02x 0x%02x 0x%02x)\n",\ + \ + qdf_print("RSSI Chain 1 (0x%02x 0x%02x 0x%02x 0x%02x)",\ ((_rx_phy_info->rssi_chain1 >> 24) & 0xff), \ ((_rx_phy_info->rssi_chain1 >> 16) & 0xff), \ ((_rx_phy_info->rssi_chain1 >> 8) & 0xff), \ ((_rx_phy_info->rssi_chain1 >> 0) & 0xff)); \ - \ - qdf_print("RSSI Chain 2 (0x%02x 0x%02x 0x%02x 0x%02x)\n",\ + \ + qdf_print("RSSI Chain 2 (0x%02x 0x%02x 0x%02x 0x%02x)",\ ((_rx_phy_info->rssi_chain2 >> 24) & 0xff), \ ((_rx_phy_info->rssi_chain2 >> 16) & 0xff), \ ((_rx_phy_info->rssi_chain2 >> 8) & 0xff), \ @@ -292,78 +283,78 @@ htt_t2h_stats_pdev_stats_print(struct wlan_dbg_stats *wlan_pdev_stats, struct wlan_dbg_tx_stats *tx = &wlan_pdev_stats->tx; struct wlan_dbg_rx_stats *rx = &wlan_pdev_stats->rx; - qdf_print("WAL Pdev stats:\n"); - qdf_print("\n### Tx ###\n"); + qdf_print("WAL Pdev stats:"); + qdf_print("\n### Tx ###"); /* Num HTT cookies queued to dispatch list */ - qdf_print("comp_queued :\t%d\n", tx->comp_queued); + qdf_print("comp_queued :\t%d", tx->comp_queued); /* Num HTT cookies dispatched */ - qdf_print("comp_delivered :\t%d\n", tx->comp_delivered); + qdf_print("comp_delivered :\t%d", tx->comp_delivered); /* Num MSDU queued to WAL */ - qdf_print("msdu_enqued :\t%d\n", tx->msdu_enqued); + qdf_print("msdu_enqued :\t%d", tx->msdu_enqued); /* Num MPDU queued to WAL */ - qdf_print("mpdu_enqued :\t%d\n", tx->mpdu_enqued); + qdf_print("mpdu_enqued :\t%d", tx->mpdu_enqued); /* Num MSDUs dropped by WMM limit */ - qdf_print("wmm_drop :\t%d\n", tx->wmm_drop); + qdf_print("wmm_drop :\t%d", tx->wmm_drop); /* Num Local frames queued */ - qdf_print("local_enqued :\t%d\n", tx->local_enqued); + qdf_print("local_enqued :\t%d", tx->local_enqued); /* Num Local frames done */ - qdf_print("local_freed :\t%d\n", tx->local_freed); + qdf_print("local_freed :\t%d", tx->local_freed); /* Num queued to HW */ - qdf_print("hw_queued :\t%d\n", tx->hw_queued); + qdf_print("hw_queued :\t%d", tx->hw_queued); /* Num PPDU reaped from HW */ - qdf_print("hw_reaped :\t%d\n", tx->hw_reaped); + qdf_print("hw_reaped :\t%d", tx->hw_reaped); /* Num underruns */ - qdf_print("mac underrun :\t%d\n", tx->underrun); + qdf_print("mac underrun :\t%d", tx->underrun); /* Num underruns */ - qdf_print("phy underrun :\t%d\n", tx->phy_underrun); + qdf_print("phy underrun :\t%d", tx->phy_underrun); /* Num PPDUs cleaned up in TX abort */ - qdf_print("tx_abort :\t%d\n", tx->tx_abort); + qdf_print("tx_abort :\t%d", tx->tx_abort); /* Num MPDUs requed by SW */ - qdf_print("mpdus_requed :\t%d\n", tx->mpdus_requed); + qdf_print("mpdus_requed :\t%d", tx->mpdus_requed); /* Excessive retries */ - qdf_print("excess retries :\t%d\n", tx->tx_ko); + qdf_print("excess retries :\t%d", tx->tx_ko); /* last data rate */ - qdf_print("last rc :\t%d\n", tx->data_rc); + qdf_print("last rc :\t%d", tx->data_rc); /* scheduler self triggers */ - qdf_print("sched self trig :\t%d\n", tx->self_triggers); + qdf_print("sched self trig :\t%d", tx->self_triggers); /* SW retry failures */ - qdf_print("ampdu retry failed:\t%d\n", tx->sw_retry_failure); + qdf_print("ampdu retry failed:\t%d", tx->sw_retry_failure); /* ilegal phy rate errirs */ - qdf_print("illegal rate errs :\t%d\n", tx->illgl_rate_phy_err); + qdf_print("illegal rate errs :\t%d", tx->illgl_rate_phy_err); /* pdev continous excessive retries */ - qdf_print("pdev cont xretry :\t%d\n", tx->pdev_cont_xretry); + qdf_print("pdev cont xretry :\t%d", tx->pdev_cont_xretry); /* pdev continous excessive retries */ - qdf_print("pdev tx timeout :\t%d\n", tx->pdev_tx_timeout); + qdf_print("pdev tx timeout :\t%d", tx->pdev_tx_timeout); /* pdev resets */ - qdf_print("pdev resets :\t%d\n", tx->pdev_resets); + qdf_print("pdev resets :\t%d", tx->pdev_resets); /* PPDU > txop duration */ - qdf_print("ppdu txop ovf :\t%d\n", tx->txop_ovf); + qdf_print("ppdu txop ovf :\t%d", tx->txop_ovf); qdf_print("\n### Rx ###\n"); /* Cnts any change in ring routing mid-ppdu */ - qdf_print("ppdu_route_change :\t%d\n", rx->mid_ppdu_route_change); + qdf_print("ppdu_route_change :\t%d", rx->mid_ppdu_route_change); /* Total number of statuses processed */ - qdf_print("status_rcvd :\t%d\n", rx->status_rcvd); + qdf_print("status_rcvd :\t%d", rx->status_rcvd); /* Extra frags on rings 0-3 */ - qdf_print("r0_frags :\t%d\n", rx->r0_frags); - qdf_print("r1_frags :\t%d\n", rx->r1_frags); - qdf_print("r2_frags :\t%d\n", rx->r2_frags); - qdf_print("r3_frags :\t%d\n", rx->r3_frags); + qdf_print("r0_frags :\t%d", rx->r0_frags); + qdf_print("r1_frags :\t%d", rx->r1_frags); + qdf_print("r2_frags :\t%d", rx->r2_frags); + qdf_print("r3_frags :\t%d", rx->r3_frags); /* MSDUs / MPDUs delivered to HTT */ - qdf_print("htt_msdus :\t%d\n", rx->htt_msdus); - qdf_print("htt_mpdus :\t%d\n", rx->htt_mpdus); + qdf_print("htt_msdus :\t%d", rx->htt_msdus); + qdf_print("htt_mpdus :\t%d", rx->htt_mpdus); /* MSDUs / MPDUs delivered to local stack */ - qdf_print("loc_msdus :\t%d\n", rx->loc_msdus); - qdf_print("loc_mpdus :\t%d\n", rx->loc_mpdus); + qdf_print("loc_msdus :\t%d", rx->loc_msdus); + qdf_print("loc_mpdus :\t%d", rx->loc_mpdus); /* AMSDUs that have more MSDUs than the status ring size */ - qdf_print("oversize_amsdu :\t%d\n", rx->oversize_amsdu); + qdf_print("oversize_amsdu :\t%d", rx->oversize_amsdu); /* Number of PHY errors */ - qdf_print("phy_errs :\t%d\n", rx->phy_errs); + qdf_print("phy_errs :\t%d", rx->phy_errs); /* Number of PHY errors dropped */ - qdf_print("phy_errs dropped :\t%d\n", rx->phy_err_drop); + qdf_print("phy_errs dropped :\t%d", rx->phy_err_drop); /* Number of mpdu errors - FCS, MIC, ENC etc. */ - qdf_print("mpdu_errs :\t%d\n", rx->mpdu_errs); + qdf_print("mpdu_errs :\t%d", rx->mpdu_errs); } @@ -371,112 +362,112 @@ static void htt_t2h_stats_rx_reorder_stats_print(struct rx_reorder_stats *stats_ptr, int concise) { - qdf_print("Rx reorder statistics:\n"); - qdf_print(" %u non-QoS frames received\n", stats_ptr->deliver_non_qos); - qdf_print(" %u frames received in-order\n", + qdf_print("Rx reorder statistics:"); + qdf_print(" %u non-QoS frames received", stats_ptr->deliver_non_qos); + qdf_print(" %u frames received in-order", stats_ptr->deliver_in_order); - qdf_print(" %u frames flushed due to timeout\n", + qdf_print(" %u frames flushed due to timeout", stats_ptr->deliver_flush_timeout); - qdf_print(" %u frames flushed due to moving out of window\n", + qdf_print(" %u frames flushed due to moving out of window", stats_ptr->deliver_flush_oow); - qdf_print(" %u frames flushed due to receiving DELBA\n", + qdf_print(" %u frames flushed due to receiving DELBA", stats_ptr->deliver_flush_delba); - qdf_print(" %u frames discarded due to FCS error\n", + qdf_print(" %u frames discarded due to FCS error", stats_ptr->fcs_error); - qdf_print(" %u frames discarded due to invalid peer\n", + qdf_print(" %u frames discarded due to invalid peer", stats_ptr->invalid_peer); qdf_print - (" %u frames discarded due to duplication (non aggregation)\n", + (" %u frames discarded due to duplication (non aggregation)", stats_ptr->dup_non_aggr); - qdf_print(" %u frames discarded due to duplication in reorder queue\n", + qdf_print(" %u frames discarded due to duplication in reorder queue", stats_ptr->dup_in_reorder); - qdf_print(" %u frames discarded due to processed before\n", + qdf_print(" %u frames discarded due to processed before", stats_ptr->dup_past); - qdf_print(" %u times reorder timeout happened\n", + qdf_print(" %u times reorder timeout happened", stats_ptr->reorder_timeout); - qdf_print(" %u times incorrect bar received\n", + qdf_print(" %u times incorrect bar received", stats_ptr->invalid_bar_ssn); - qdf_print(" %u times bar ssn reset happened\n", + qdf_print(" %u times bar ssn reset happened", stats_ptr->ssn_reset); - qdf_print(" %u times flushed due to peer delete\n", + qdf_print(" %u times flushed due to peer delete", stats_ptr->deliver_flush_delpeer); - qdf_print(" %u times flushed due to offload\n", + qdf_print(" %u times flushed due to offload", stats_ptr->deliver_flush_offload); - qdf_print(" %u times flushed due to ouf of buffer\n", + qdf_print(" %u times flushed due to ouf of buffer", stats_ptr->deliver_flush_oob); - qdf_print(" %u MPDU's dropped due to PN check fail\n", + qdf_print(" %u MPDU's dropped due to PN check fail", stats_ptr->pn_fail); - qdf_print(" %u MPDU's dropped due to lack of memory\n", + qdf_print(" %u MPDU's dropped due to lack of memory", stats_ptr->store_fail); - qdf_print(" %u times tid pool alloc succeeded\n", + qdf_print(" %u times tid pool alloc succeeded", stats_ptr->tid_pool_alloc_succ); - qdf_print(" %u times MPDU pool alloc succeeded\n", + qdf_print(" %u times MPDU pool alloc succeeded", stats_ptr->mpdu_pool_alloc_succ); - qdf_print(" %u times MSDU pool alloc succeeded\n", + qdf_print(" %u times MSDU pool alloc succeeded", stats_ptr->msdu_pool_alloc_succ); - qdf_print(" %u times tid pool alloc failed\n", + qdf_print(" %u times tid pool alloc failed", stats_ptr->tid_pool_alloc_fail); - qdf_print(" %u times MPDU pool alloc failed\n", + qdf_print(" %u times MPDU pool alloc failed", stats_ptr->mpdu_pool_alloc_fail); - qdf_print(" %u times MSDU pool alloc failed\n", + qdf_print(" %u times MSDU pool alloc failed", stats_ptr->msdu_pool_alloc_fail); - qdf_print(" %u times tid pool freed\n", + qdf_print(" %u times tid pool freed", stats_ptr->tid_pool_free); - qdf_print(" %u times MPDU pool freed\n", + qdf_print(" %u times MPDU pool freed", stats_ptr->mpdu_pool_free); - qdf_print(" %u times MSDU pool freed\n", + qdf_print(" %u times MSDU pool freed", stats_ptr->msdu_pool_free); - qdf_print(" %u MSDUs undelivered to HTT, queued to Rx MSDU free list\n", + qdf_print(" %u MSDUs undelivered to HTT, queued to Rx MSDU free list", stats_ptr->msdu_queued); - qdf_print(" %u MSDUs released from Rx MSDU list to MAC ring\n", + qdf_print(" %u MSDUs released from Rx MSDU list to MAC ring", stats_ptr->msdu_recycled); - qdf_print(" %u MPDUs with invalid peer but A2 found in AST\n", + qdf_print(" %u MPDUs with invalid peer but A2 found in AST", stats_ptr->invalid_peer_a2_in_ast); - qdf_print(" %u MPDUs with invalid peer but A3 found in AST\n", + qdf_print(" %u MPDUs with invalid peer but A3 found in AST", stats_ptr->invalid_peer_a3_in_ast); - qdf_print(" %u MPDUs with invalid peer, Broadcast or Mulitcast frame\n", + qdf_print(" %u MPDUs with invalid peer, Broadcast or Mulitcast frame", stats_ptr->invalid_peer_bmc_mpdus); - qdf_print(" %u MSDUs with err attention word\n", + qdf_print(" %u MSDUs with err attention word", stats_ptr->rxdesc_err_att); - qdf_print(" %u MSDUs with flag of peer_idx_invalid\n", + qdf_print(" %u MSDUs with flag of peer_idx_invalid", stats_ptr->rxdesc_err_peer_idx_inv); - qdf_print(" %u MSDUs with flag of peer_idx_timeout\n", + qdf_print(" %u MSDUs with flag of peer_idx_timeout", stats_ptr->rxdesc_err_peer_idx_to); - qdf_print(" %u MSDUs with flag of overflow\n", + qdf_print(" %u MSDUs with flag of overflow", stats_ptr->rxdesc_err_ov); - qdf_print(" %u MSDUs with flag of msdu_length_err\n", + qdf_print(" %u MSDUs with flag of msdu_length_err", stats_ptr->rxdesc_err_msdu_len); - qdf_print(" %u MSDUs with flag of mpdu_length_err\n", + qdf_print(" %u MSDUs with flag of mpdu_length_err", stats_ptr->rxdesc_err_mpdu_len); - qdf_print(" %u MSDUs with flag of tkip_mic_err\n", + qdf_print(" %u MSDUs with flag of tkip_mic_err", stats_ptr->rxdesc_err_tkip_mic); - qdf_print(" %u MSDUs with flag of decrypt_err\n", + qdf_print(" %u MSDUs with flag of decrypt_err", stats_ptr->rxdesc_err_decrypt); - qdf_print(" %u MSDUs with flag of fcs_err\n", + qdf_print(" %u MSDUs with flag of fcs_err", stats_ptr->rxdesc_err_fcs); - qdf_print(" %u Unicast frames with invalid peer handler\n", + qdf_print(" %u Unicast frames with invalid peer handler", stats_ptr->rxdesc_uc_msdus_inv_peer); - qdf_print(" %u unicast frame directly to DUT with invalid peer handler\n", + qdf_print(" %u unicast frame directly to DUT with invalid peer handler", stats_ptr->rxdesc_direct_msdus_inv_peer); - qdf_print(" %u Broadcast/Multicast frames with invalid peer handler\n", + qdf_print(" %u Broadcast/Multicast frames with invalid peer handler", stats_ptr->rxdesc_bmc_msdus_inv_peer); - qdf_print(" %u MSDUs dropped due to no first MSDU flag\n", + qdf_print(" %u MSDUs dropped due to no first MSDU flag", stats_ptr->rxdesc_no_1st_msdu); - qdf_print(" %u MSDUs dropped due to ring overflow\n", + qdf_print(" %u MSDUs dropped due to ring overflow", stats_ptr->msdu_drop_ring_ov); - qdf_print(" %u MSDUs dropped due to FC mismatch\n", + qdf_print(" %u MSDUs dropped due to FC mismatch", stats_ptr->msdu_drop_fc_mismatch); - qdf_print(" %u MSDUs dropped due to mgt frame in Remote ring\n", + qdf_print(" %u MSDUs dropped due to mgt frame in Remote ring", stats_ptr->msdu_drop_mgmt_remote_ring); - qdf_print(" %u MSDUs dropped due to misc non error\n", + qdf_print(" %u MSDUs dropped due to misc non error", stats_ptr->msdu_drop_misc); - qdf_print(" %u MSDUs go to offload before reorder\n", + qdf_print(" %u MSDUs go to offload before reorder", stats_ptr->offload_msdu_wal); - qdf_print(" %u data frame dropped by offload after reorder\n", + qdf_print(" %u data frame dropped by offload after reorder", stats_ptr->offload_msdu_reorder); - qdf_print(" %u MPDUs with SN in the past & within BA window\n", + qdf_print(" %u MPDUs with SN in the past & within BA window", stats_ptr->dup_past_within_window); - qdf_print(" %u MPDUs with SN in the past & outside BA window\n", + qdf_print(" %u MPDUs with SN in the past & outside BA window", stats_ptr->dup_past_outside_window); } @@ -484,32 +475,32 @@ static void htt_t2h_stats_rx_rem_buf_stats_print( struct rx_remote_buffer_mgmt_stats *stats_ptr, int concise) { - qdf_print("Rx Remote Buffer Statistics:\n"); - qdf_print(" %u MSDU's reaped for Rx processing\n", + qdf_print("Rx Remote Buffer Statistics:"); + qdf_print(" %u MSDU's reaped for Rx processing", stats_ptr->remote_reaped); - qdf_print(" %u MSDU's recycled within firmware\n", + qdf_print(" %u MSDU's recycled within firmware", stats_ptr->remote_recycled); - qdf_print(" %u MSDU's stored by Data Rx\n", + qdf_print(" %u MSDU's stored by Data Rx", stats_ptr->data_rx_msdus_stored); - qdf_print(" %u HTT indications from WAL Rx MSDU\n", + qdf_print(" %u HTT indications from WAL Rx MSDU", stats_ptr->wal_rx_ind); - qdf_print(" %u HTT indications unconsumed from WAL Rx MSDU\n", + qdf_print(" %u HTT indications unconsumed from WAL Rx MSDU", stats_ptr->wal_rx_ind_unconsumed); - qdf_print(" %u HTT indications from Data Rx MSDU\n", + qdf_print(" %u HTT indications from Data Rx MSDU", stats_ptr->data_rx_ind); - qdf_print(" %u HTT indications unconsumed from Data Rx MSDU\n", + qdf_print(" %u HTT indications unconsumed from Data Rx MSDU", stats_ptr->data_rx_ind_unconsumed); - qdf_print(" %u HTT indications from ATHBUF\n", + qdf_print(" %u HTT indications from ATHBUF", stats_ptr->athbuf_rx_ind); - qdf_print(" %u Remote buffers requested for refill\n", + qdf_print(" %u Remote buffers requested for refill", stats_ptr->refill_buf_req); - qdf_print(" %u Remote buffers filled by host\n", + qdf_print(" %u Remote buffers filled by host", stats_ptr->refill_buf_rsp); - qdf_print(" %u times MAC has no buffers\n", + qdf_print(" %u times MAC has no buffers", stats_ptr->mac_no_bufs); - qdf_print(" %u times f/w write & read indices on MAC ring are equal\n", + qdf_print(" %u times f/w write & read indices on MAC ring are equal", stats_ptr->fw_indices_equal); - qdf_print(" %u times f/w has no remote buffers to post to MAC\n", + qdf_print(" %u times f/w has no remote buffers to post to MAC", stats_ptr->host_no_bufs); } @@ -517,9 +508,8 @@ static void htt_t2h_stats_txbf_info_buf_stats_print( struct wlan_dbg_txbf_data_stats *stats_ptr) { - qdf_print("TXBF data Statistics:\n"); - qdf_print("tx_txbf_vht (0..9): "); - qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %d\n", + qdf_print("TXBF data Statistics:"); + qdf_print("tx_txbf_vht (0..9): %u, %u, %u, %u, %u, %u, %u, %u, %u, %d", stats_ptr->tx_txbf_vht[0], stats_ptr->tx_txbf_vht[1], stats_ptr->tx_txbf_vht[2], @@ -530,8 +520,7 @@ htt_t2h_stats_txbf_info_buf_stats_print( stats_ptr->tx_txbf_vht[7], stats_ptr->tx_txbf_vht[8], stats_ptr->tx_txbf_vht[9]); - qdf_print("rx_txbf_vht (0..9): "); - qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %u\n", + qdf_print("rx_txbf_vht (0..9): %u, %u, %u, %u, %u, %u, %u, %u, %u, %u", stats_ptr->rx_txbf_vht[0], stats_ptr->rx_txbf_vht[1], stats_ptr->rx_txbf_vht[2], @@ -542,8 +531,7 @@ htt_t2h_stats_txbf_info_buf_stats_print( stats_ptr->rx_txbf_vht[7], stats_ptr->rx_txbf_vht[8], stats_ptr->rx_txbf_vht[9]); - qdf_print("tx_txbf_ht (0..7): "); - qdf_print("%u, %u, %u, %u, %u, %u, %u, %u\n", + qdf_print("tx_txbf_ht (0..7): %u, %u, %u, %u, %u, %u, %u, %u", stats_ptr->tx_txbf_ht[0], stats_ptr->tx_txbf_ht[1], stats_ptr->tx_txbf_ht[2], @@ -552,8 +540,7 @@ htt_t2h_stats_txbf_info_buf_stats_print( stats_ptr->tx_txbf_ht[5], stats_ptr->tx_txbf_ht[6], stats_ptr->tx_txbf_ht[7]); - qdf_print("tx_txbf_ofdm (0..7): "); - qdf_print("%u, %u, %u, %u, %u, %u, %u, %u\n", + qdf_print("tx_txbf_ofdm (0..7): %u, %u, %u, %u, %u, %u, %u, %u", stats_ptr->tx_txbf_ofdm[0], stats_ptr->tx_txbf_ofdm[1], stats_ptr->tx_txbf_ofdm[2], @@ -562,8 +549,7 @@ htt_t2h_stats_txbf_info_buf_stats_print( stats_ptr->tx_txbf_ofdm[5], stats_ptr->tx_txbf_ofdm[6], stats_ptr->tx_txbf_ofdm[7]); - qdf_print("tx_txbf_cck (0..6): "); - qdf_print("%u, %u, %u, %u, %u, %u, %u\n", + qdf_print("tx_txbf_cck (0..6): %u, %u, %u, %u, %u, %u, %u", stats_ptr->tx_txbf_cck[0], stats_ptr->tx_txbf_cck[1], stats_ptr->tx_txbf_cck[2], @@ -577,27 +563,23 @@ static void htt_t2h_stats_txbf_snd_buf_stats_print( struct wlan_dbg_txbf_snd_stats *stats_ptr) { - qdf_print("TXBF snd Buffer Statistics:\n"); - qdf_print("cbf_20: "); - qdf_print("%u, %u, %u, %u\n", + qdf_print("TXBF snd Buffer Statistics:"); + qdf_print("cbf_20: %u, %u, %u, %u", stats_ptr->cbf_20[0], stats_ptr->cbf_20[1], stats_ptr->cbf_20[2], stats_ptr->cbf_20[3]); - qdf_print("cbf_40: "); - qdf_print("%u, %u, %u, %u\n", + qdf_print("cbf_40: %u, %u, %u, %u", stats_ptr->cbf_40[0], stats_ptr->cbf_40[1], stats_ptr->cbf_40[2], stats_ptr->cbf_40[3]); - qdf_print("cbf_80: "); - qdf_print("%u, %u, %u, %u\n", + qdf_print("cbf_80: %u, %u, %u, %u", stats_ptr->cbf_80[0], stats_ptr->cbf_80[1], stats_ptr->cbf_80[2], stats_ptr->cbf_80[3]); - qdf_print("sounding: "); - qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u\n", + qdf_print("sounding: %u, %u, %u, %u, %u, %u, %u, %u, %u", stats_ptr->sounding[0], stats_ptr->sounding[1], stats_ptr->sounding[2], @@ -613,34 +595,34 @@ static void htt_t2h_stats_tx_selfgen_buf_stats_print( struct wlan_dbg_tx_selfgen_stats *stats_ptr) { - qdf_print("Tx selfgen Buffer Statistics:\n"); - qdf_print(" %u su_ndpa\n", + qdf_print("Tx selfgen Buffer Statistics:"); + qdf_print(" %u su_ndpa", stats_ptr->su_ndpa); - qdf_print(" %u mu_ndp\n", + qdf_print(" %u mu_ndp", stats_ptr->mu_ndp); - qdf_print(" %u mu_ndpa\n", + qdf_print(" %u mu_ndpa", stats_ptr->mu_ndpa); - qdf_print(" %u mu_ndp\n", + qdf_print(" %u mu_ndp", stats_ptr->mu_ndp); - qdf_print(" %u mu_brpoll_1\n", + qdf_print(" %u mu_brpoll_1", stats_ptr->mu_brpoll_1); - qdf_print(" %u mu_brpoll_2\n", + qdf_print(" %u mu_brpoll_2", stats_ptr->mu_brpoll_2); - qdf_print(" %u mu_bar_1\n", + qdf_print(" %u mu_bar_1", stats_ptr->mu_bar_1); - qdf_print(" %u mu_bar_2\n", + qdf_print(" %u mu_bar_2", stats_ptr->mu_bar_2); - qdf_print(" %u cts_burst\n", + qdf_print(" %u cts_burst", stats_ptr->cts_burst); - qdf_print(" %u su_ndp_err\n", + qdf_print(" %u su_ndp_err", stats_ptr->su_ndp_err); - qdf_print(" %u su_ndpa_err\n", + qdf_print(" %u su_ndpa_err", stats_ptr->su_ndpa_err); - qdf_print(" %u mu_ndp_err\n", + qdf_print(" %u mu_ndp_err", stats_ptr->mu_ndp_err); - qdf_print(" %u mu_brp1_err\n", + qdf_print(" %u mu_brp1_err", stats_ptr->mu_brp1_err); - qdf_print(" %u mu_brp2_err\n", + qdf_print(" %u mu_brp2_err", stats_ptr->mu_brp2_err); } @@ -650,9 +632,9 @@ htt_t2h_stats_wifi2_error_stats_print( { int i; - qdf_print("Scheduler error Statistics:\n"); + qdf_print("Scheduler error Statistics:"); qdf_print("urrn_stats: "); - qdf_print("%d, %d, %d\n", + qdf_print("urrn_stats: %d, %d, %d", stats_ptr->urrn_stats[0], stats_ptr->urrn_stats[1], stats_ptr->urrn_stats[2]); @@ -662,7 +644,7 @@ htt_t2h_stats_wifi2_error_stats_print( qdf_print(" %u", stats_ptr->flush_errs[i]); qdf_print("\n"); qdf_print("schd_stall_errs (0..3): "); - qdf_print("%d, %d, %d, %d\n", + qdf_print("%d, %d, %d, %d", stats_ptr->schd_stall_errs[0], stats_ptr->schd_stall_errs[1], stats_ptr->schd_stall_errs[2], @@ -682,7 +664,7 @@ htt_t2h_stats_wifi2_error_stats_print( for (i = 0; i < WHAL_DBG_PHY_ERR_MAXCNT; i++) qdf_print(" %u", stats_ptr->phy_errs[i]); qdf_print("\n"); - qdf_print(" %u rx_rate_inval\n", + qdf_print(" %u rx_rate_inval", stats_ptr->rx_rate_inval); } @@ -690,16 +672,16 @@ static void htt_t2h_rx_musu_ndpa_pkts_stats_print( struct rx_txbf_musu_ndpa_pkts_stats *stats_ptr) { - qdf_print("Rx TXBF MU/SU Packets and NDPA Statistics:\n"); - qdf_print(" %u Number of TXBF MU packets received\n", + qdf_print("Rx TXBF MU/SU Packets and NDPA Statistics:"); + qdf_print(" %u Number of TXBF MU packets received", stats_ptr->number_mu_pkts); - qdf_print(" %u Number of TXBF SU packets received\n", + qdf_print(" %u Number of TXBF SU packets received", stats_ptr->number_su_pkts); - qdf_print(" %u Number of TXBF directed NDPA\n", + qdf_print(" %u Number of TXBF directed NDPA", stats_ptr->txbf_directed_ndpa_count); - qdf_print(" %u Number of TXBF retried NDPA\n", + qdf_print(" %u Number of TXBF retried NDPA", stats_ptr->txbf_ndpa_retry_count); - qdf_print(" %u Total number of TXBF NDPA\n", + qdf_print(" %u Total number of TXBF NDPA", stats_ptr->txbf_total_ndpa_count); } @@ -855,7 +837,7 @@ htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr, hdr->mpdu_msdus_array_len * sizeof(uint8_t) + hdr->msdu_bytes_array_len * sizeof(uint16_t); num_records = (length - sizeof(*hdr)) / record_size; - qdf_print("Tx PPDU log elements:\n"); + qdf_print("Tx PPDU log elements: num_records %d", num_records); for (i = 0; i < num_records; i++) { uint16_t start_seq_num; @@ -924,35 +906,35 @@ htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr, OL_FW_TX_DBG_PPDU_TRIES_M) >> OL_FW_TX_DBG_PPDU_TRIES_S; - qdf_print(" - PPDU tx to peer %d, TID %d\n", peer_id, + qdf_print(" - PPDU tx to peer %d, TID %d", peer_id, ext_tid); qdf_print - (" start seq num= %u, start PN LSBs= %#04x\n", + (" start seq num= %u, start PN LSBs= %#04x", start_seq_num, start_pn_lsbs); qdf_print - (" PPDU: %d MPDUs, (?) MSDUs, %d bytes\n", + (" PPDU: %d MPDUs, (?) MSDUs, %d bytes", num_mpdus, /* num_msdus - not yet computed in target */ record->num_bytes); if (complete) { qdf_print - (" enqueued: %u, completed: %u usec)\n", + (" enqueued: %u, completed: %u usec)", time_enqueue_us, time_completion_us); qdf_print (" %d tries, last tx used rate %d ", tries, rate_code); - qdf_print("on %d MHz chan (flags = %#x)\n", + qdf_print("on %d MHz chan (flags = %#x)", htt_rate_flags_to_mhz (rate_flags), rate_flags); qdf_print - (" enqueued and acked MPDU bitmaps:\n"); + (" enqueued and acked MPDU bitmaps:"); htt_t2h_tx_ppdu_bitmaps_pr(msg_word + OL_FW_TX_DBG_PPDU_ENQUEUED_LSBS_16, msg_word + OL_FW_TX_DBG_PPDU_BLOCK_ACK_LSBS_16); } else { qdf_print - (" enqueued: %d us, not yet completed\n", + (" enqueued: %d us, not yet completed", time_enqueue_us); } /* skip the regular msg fields to reach the tail area */ @@ -963,14 +945,14 @@ htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr, BUF_SIZE, hdr-> mpdu_bytes_array_len); - qdf_print(" MPDU bytes: %s\n", buf); + qdf_print(" MPDU bytes: %s", buf); } p8 += hdr->mpdu_bytes_array_len * sizeof(uint16_t); if (hdr->mpdu_msdus_array_len) { htt_make_u8_list_str((uint32_t *) p8, buf, BUF_SIZE, hdr->mpdu_msdus_array_len); - qdf_print(" MPDU MSDUs: %s\n", buf); + qdf_print(" MPDU MSDUs: %s", buf); } p8 += hdr->mpdu_msdus_array_len * sizeof(uint8_t); if (hdr->msdu_bytes_array_len) { @@ -978,19 +960,19 @@ htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr, BUF_SIZE, hdr-> msdu_bytes_array_len); - qdf_print(" MSDU bytes: %s\n", buf); + qdf_print(" MSDU bytes: %s", buf); } } else { /* concise */ qdf_print("start seq num = %u ", start_seq_num); - qdf_print("enqueued and acked MPDU bitmaps:\n"); + qdf_print("enqueued and acked MPDU bitmaps:"); if (complete) { htt_t2h_tx_ppdu_bitmaps_pr(msg_word + OL_FW_TX_DBG_PPDU_ENQUEUED_LSBS_16, msg_word + OL_FW_TX_DBG_PPDU_BLOCK_ACK_LSBS_16); } else { - qdf_print("(not completed)\n"); + qdf_print("(not completed)"); } } record = (struct ol_fw_tx_dbg_ppdu_base *) @@ -998,6 +980,135 @@ htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr, } } +void htt_t2h_stats_tidq_stats_print( + struct wlan_dbg_tidq_stats *tidq_stats, int concise) +{ + qdf_print("TID QUEUE STATS:"); + qdf_print("tid_txq_stats: %u", tidq_stats->wlan_dbg_tid_txq_status); + qdf_print("num_pkts_queued(0..9):"); + qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %u", + tidq_stats->txq_st.num_pkts_queued[0], + tidq_stats->txq_st.num_pkts_queued[1], + tidq_stats->txq_st.num_pkts_queued[2], + tidq_stats->txq_st.num_pkts_queued[3], + tidq_stats->txq_st.num_pkts_queued[4], + tidq_stats->txq_st.num_pkts_queued[5], + tidq_stats->txq_st.num_pkts_queued[6], + tidq_stats->txq_st.num_pkts_queued[7], + tidq_stats->txq_st.num_pkts_queued[8], + tidq_stats->txq_st.num_pkts_queued[9]); + qdf_print("tid_hw_qdepth(0..19):"); + qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %u", + tidq_stats->txq_st.tid_hw_qdepth[0], + tidq_stats->txq_st.tid_hw_qdepth[1], + tidq_stats->txq_st.tid_hw_qdepth[2], + tidq_stats->txq_st.tid_hw_qdepth[3], + tidq_stats->txq_st.tid_hw_qdepth[4], + tidq_stats->txq_st.tid_hw_qdepth[5], + tidq_stats->txq_st.tid_hw_qdepth[6], + tidq_stats->txq_st.tid_hw_qdepth[7], + tidq_stats->txq_st.tid_hw_qdepth[8], + tidq_stats->txq_st.tid_hw_qdepth[9]); + qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %u", + tidq_stats->txq_st.tid_hw_qdepth[10], + tidq_stats->txq_st.tid_hw_qdepth[11], + tidq_stats->txq_st.tid_hw_qdepth[12], + tidq_stats->txq_st.tid_hw_qdepth[13], + tidq_stats->txq_st.tid_hw_qdepth[14], + tidq_stats->txq_st.tid_hw_qdepth[15], + tidq_stats->txq_st.tid_hw_qdepth[16], + tidq_stats->txq_st.tid_hw_qdepth[17], + tidq_stats->txq_st.tid_hw_qdepth[18], + tidq_stats->txq_st.tid_hw_qdepth[19]); + qdf_print("tid_sw_qdepth(0..19):"); + qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %u", + tidq_stats->txq_st.tid_sw_qdepth[0], + tidq_stats->txq_st.tid_sw_qdepth[1], + tidq_stats->txq_st.tid_sw_qdepth[2], + tidq_stats->txq_st.tid_sw_qdepth[3], + tidq_stats->txq_st.tid_sw_qdepth[4], + tidq_stats->txq_st.tid_sw_qdepth[5], + tidq_stats->txq_st.tid_sw_qdepth[6], + tidq_stats->txq_st.tid_sw_qdepth[7], + tidq_stats->txq_st.tid_sw_qdepth[8], + tidq_stats->txq_st.tid_sw_qdepth[9]); + qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %u", + tidq_stats->txq_st.tid_sw_qdepth[10], + tidq_stats->txq_st.tid_sw_qdepth[11], + tidq_stats->txq_st.tid_sw_qdepth[12], + tidq_stats->txq_st.tid_sw_qdepth[13], + tidq_stats->txq_st.tid_sw_qdepth[14], + tidq_stats->txq_st.tid_sw_qdepth[15], + tidq_stats->txq_st.tid_sw_qdepth[16], + tidq_stats->txq_st.tid_sw_qdepth[17], + tidq_stats->txq_st.tid_sw_qdepth[18], + tidq_stats->txq_st.tid_sw_qdepth[19]); +} + +void htt_t2h_stats_tx_mu_stats_print( + struct wlan_dbg_tx_mu_stats *tx_mu_stats, int concise) +{ + qdf_print("TX MU STATS:"); + qdf_print("mu_sch_nusers_2: %u", tx_mu_stats->mu_sch_nusers_2); + qdf_print("mu_sch_nusers_3: %u", tx_mu_stats->mu_sch_nusers_3); + qdf_print("mu_mpdus_queued_usr: %u, %u, %u, %u", + tx_mu_stats->mu_mpdus_queued_usr[0], + tx_mu_stats->mu_mpdus_queued_usr[1], + tx_mu_stats->mu_mpdus_queued_usr[2], + tx_mu_stats->mu_mpdus_queued_usr[3]); + qdf_print("mu_mpdus_tried_usr: %u, %u, %u, %u", + tx_mu_stats->mu_mpdus_tried_usr[0], + tx_mu_stats->mu_mpdus_tried_usr[1], + tx_mu_stats->mu_mpdus_tried_usr[2], + tx_mu_stats->mu_mpdus_tried_usr[3]); + qdf_print("mu_mpdus_failed_usr: %u, %u, %u, %u", + tx_mu_stats->mu_mpdus_failed_usr[0], + tx_mu_stats->mu_mpdus_failed_usr[1], + tx_mu_stats->mu_mpdus_failed_usr[2], + tx_mu_stats->mu_mpdus_failed_usr[3]); + qdf_print("mu_mpdus_requeued_usr: %u, %u, %u, %u", + tx_mu_stats->mu_mpdus_requeued_usr[0], + tx_mu_stats->mu_mpdus_requeued_usr[1], + tx_mu_stats->mu_mpdus_requeued_usr[2], + tx_mu_stats->mu_mpdus_requeued_usr[3]); + qdf_print("mu_err_no_ba_usr: %u, %u, %u, %u", + tx_mu_stats->mu_err_no_ba_usr[0], + tx_mu_stats->mu_err_no_ba_usr[1], + tx_mu_stats->mu_err_no_ba_usr[2], + tx_mu_stats->mu_err_no_ba_usr[3]); + qdf_print("mu_mpdu_underrun_usr: %u, %u, %u, %u", + tx_mu_stats->mu_mpdu_underrun_usr[0], + tx_mu_stats->mu_mpdu_underrun_usr[1], + tx_mu_stats->mu_mpdu_underrun_usr[2], + tx_mu_stats->mu_mpdu_underrun_usr[3]); + qdf_print("mu_ampdu_underrun_usr: %u, %u, %u, %u", + tx_mu_stats->mu_ampdu_underrun_usr[0], + tx_mu_stats->mu_ampdu_underrun_usr[1], + tx_mu_stats->mu_ampdu_underrun_usr[2], + tx_mu_stats->mu_ampdu_underrun_usr[3]); + +} + +void htt_t2h_stats_sifs_resp_stats_print( + struct wlan_dbg_sifs_resp_stats *sifs_stats, int concise) +{ + qdf_print("SIFS RESP STATS:"); + qdf_print("num of ps-poll trigger frames: %u", + sifs_stats->ps_poll_trigger); + qdf_print("num of uapsd trigger frames: %u", + sifs_stats->uapsd_trigger); + qdf_print("num of data trigger frames: %u, %u", + sifs_stats->qb_data_trigger[0], + sifs_stats->qb_data_trigger[1]); + qdf_print("num of bar trigger frames: %u, %u", + sifs_stats->qb_bar_trigger[0], + sifs_stats->qb_bar_trigger[1]); + qdf_print("num of ppdu transmitted at SIFS interval: %u", + sifs_stats->sifs_resp_data); + qdf_print("num of ppdu failed to meet SIFS resp timing: %u", + sifs_stats->sifs_resp_err); +} + void htt_t2h_stats_print(uint8_t *stats_data, int concise) { uint32_t *msg_word = (uint32_t *) stats_data; @@ -1013,10 +1124,10 @@ void htt_t2h_stats_print(uint8_t *stats_data, int concise) if (status == HTT_DBG_STATS_STATUS_SERIES_DONE) { return; } else if (status == HTT_DBG_STATS_STATUS_INVALID) { - qdf_print("Target doesn't support stats type %d\n", type); + qdf_print("Target doesn't support stats type %d", type); return; } else if (status == HTT_DBG_STATS_STATUS_ERROR) { - qdf_print("Target couldn't upload stats type %d (no mem?)\n", + qdf_print("Target couldn't upload stats type %d (no mem?)", type); return; } @@ -1069,7 +1180,7 @@ void htt_t2h_stats_print(uint8_t *stats_data, int concise) if (status == HTT_DBG_STATS_STATUS_PARTIAL && length == 0) { qdf_print - ("HTT_DBG_STATS_TX_PPDU_LOG -- length = 0!\n"); + ("HTT_DBG_STATS_TX_PPDU_LOG -- length = 0!"); break; } hdr = @@ -1149,6 +1260,30 @@ void htt_t2h_stats_print(uint8_t *stats_data, int concise) htt_t2h_rx_musu_ndpa_pkts_stats_print(rx_musu_ndpa_stats); break; } + case HTT_DBG_STATS_TIDQ: + { + struct wlan_dbg_tidq_stats *tidq_stats; + tidq_stats = (struct wlan_dbg_tidq_stats *)(msg_word + 1); + + htt_t2h_stats_tidq_stats_print(tidq_stats, concise); + break; + } + case HTT_DBG_STATS_TX_MU_INFO: + { + struct wlan_dbg_tx_mu_stats *tx_mu_stats; + tx_mu_stats = (struct wlan_dbg_tx_mu_stats *)(msg_word + 1); + + htt_t2h_stats_tx_mu_stats_print(tx_mu_stats, concise); + break; + } + case HTT_DBG_STATS_SIFS_RESP_INFO: + { + struct wlan_dbg_sifs_resp_stats *sifs_stats; + sifs_stats = (struct wlan_dbg_sifs_resp_stats *)(msg_word + 1); + + htt_t2h_stats_sifs_resp_stats_print(sifs_stats, concise); + break; + } default: break; } diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 062faaa6e035..8dc2d4862d08 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -206,19 +206,6 @@ #define WMA_BSS_STATUS_STARTED 0x1 #define WMA_BSS_STATUS_STOPPED 0x2 -#define WMA_FW_PHY_STATS 0x1 -#define WMA_FW_RX_REORDER_STATS 0x2 -#define WMA_FW_RX_RC_STATS 0x3 -#define WMA_FW_TX_PPDU_STATS 0x4 -#define WMA_FW_TX_CONCISE_STATS 0x5 -#define WMA_FW_TX_RC_STATS 0x6 -#define WMA_FW_TXBF_INFO_STATS 0x07 -#define WMA_FW_SND_INFO_STATS 0x08 -#define WMA_FW_ERROR_INFO_STATS 0x09 -#define WMA_FW_TX_SELFGEN_INFO_STATS 0xa -#define WMA_FW_RX_REM_RING_BUF 0xc -#define WMA_FW_RX_TXBF_MUSU_NDPA 0xf - #define WMA_TARGET_REQ_TYPE_VDEV_START 0x1 #define WMA_TARGET_REQ_TYPE_VDEV_STOP 0x2 #define WMA_TARGET_REQ_TYPE_VDEV_DEL 0x3 diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 8ef3e1757eab..7816236f9c4d 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -406,6 +406,7 @@ int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf, } #endif /* WLAN_FEATURE_STATS_EXT */ + /** * wma_profile_data_report_event_handler() - fw profiling handler * @handle: wma handle @@ -423,6 +424,7 @@ int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf, uint32_t i = 0; uint32_t entries; uint8_t *buf_ptr; + char temp_str[150]; param_buf = (WMI_WLAN_PROFILE_DATA_EVENTID_param_tlvs *) event_buf; if (!param_buf) { @@ -452,19 +454,14 @@ int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf, profile_ctx->rx_mpdu_cnt, profile_ctx->bin_count); + QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, + "Profile ID: Count: TOT: Min: Max: hist_intvl: hist[0]: hist[1]:hist[2]"); + for (i = 0; i < entries; i++) { if (i == WMI_WLAN_PROFILE_MAX_BIN_CNT) break; - QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, - "Profile ID: %d\n" - "Profile Count: %d\n" - "Profile TOT: %d\n" - "Profile Min: %d\n" - "Profile Max: %d\n" - "Profile hist_intvl: %d\n" - "Profile hist[0]: %d\n" - "Profile hist[1]: %d\n" - "Profile hist[2]: %d\n", + snprintf(temp_str, sizeof(temp_str), + " %d : %d : %d : %d : %d : %d : %d : %d : %d", profile_data[i].id, profile_data[i].cnt, profile_data[i].tot, @@ -474,6 +471,8 @@ int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf, profile_data[i].hist[0], profile_data[i].hist[1], profile_data[i].hist[2]); + QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, + "%s", temp_str); } return 0; @@ -1782,6 +1781,32 @@ int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle, ((_mask) = 1 << (_rate_info)) #endif +#ifdef HELIUMPLUS +bool wma_is_valid_fw_stats_cmd(uint32_t value) +{ + if (value > (HTT_DBG_NUM_STATS + 1) || + value == (HTT_DBG_STATS_RX_RATE_INFO + 1) || + value == (HTT_DBG_STATS_TX_RATE_INFO + 1) || + value == (HTT_DBG_STATS_TXBF_MUSU_NDPA_PKT + 1)) { + WMA_LOGE("%s: Not supported", __func__); + return false; + } + return true; +} +#else +bool wma_is_valid_fw_stats_cmd(uint32_t value) +{ + if (value > (HTT_DBG_NUM_STATS + 1) || + value == (HTT_DBG_STATS_RX_RATE_INFO_V2 + 1) || + value == (HTT_DBG_STATS_TX_RATE_INFO_V2 + 1) || + value == (HTT_DBG_STATS_TXBF_MUSU_NDPA_PKT + 1)) { + WMA_LOGE("%s: Not supported", __func__); + return false; + } + return true; +} +#endif + /** * wma_set_txrx_fw_stats_level() - set txrx fw stats level * @wma_handle: wma handle @@ -1802,84 +1827,15 @@ int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle, WMA_LOGE("%s:Invalid vdev handle", __func__); return -EINVAL; } + + if (wma_is_valid_fw_stats_cmd(value) == false) + return -EINVAL; + qdf_mem_zero(&req, sizeof(req)); req.print.verbose = 1; - switch (value) { - /* txrx_fw_stats 1 */ - case WMA_FW_PHY_STATS: - l_up_mask = 1 << HTT_DBG_STATS_WAL_PDEV_TXRX; - break; - - /* txrx_fw_stats 2 */ - case WMA_FW_RX_REORDER_STATS: - l_up_mask = 1 << HTT_DBG_STATS_RX_REORDER; - break; - - /* txrx_fw_stats 3 */ - case WMA_FW_RX_RC_STATS: - SET_UPLOAD_MASK(l_up_mask, HTT_DBG_STATS_RX_RATE_INFO); - break; - - /* txrx_fw_stats 5 */ - case WMA_FW_TX_CONCISE_STATS: - req.print.concise = 1; - /* No break here, since l_up_mask is same for - * both WMA_FW_TX_CONCISE_STATS & WMA_FW_TX_PPDU_STATS */ - - /* txrx_fw_stats 4 */ - case WMA_FW_TX_PPDU_STATS: - l_up_mask = 1 << HTT_DBG_STATS_TX_PPDU_LOG; - break; - - /* txrx_fw_stats 6 */ - case WMA_FW_TX_RC_STATS: - SET_UPLOAD_MASK(l_up_mask, HTT_DBG_STATS_TX_RATE_INFO); - break; - - /* txrx_fw_stats 12 */ - /* - * This is 1:1 correspondence with WMA defined value - * and the f/w bitmask. - */ - case WMA_FW_RX_REM_RING_BUF: - l_up_mask = 1 << HTT_DBG_STATS_RX_REMOTE_RING_BUFFER_INFO; - break; - - /* txrx_fw_stats 7 */ - case WMA_FW_TXBF_INFO_STATS: - l_up_mask = 1 << HTT_DBG_STATS_TXBF_INFO; - break; - - /* txrx_fw_stats 8 */ - case WMA_FW_SND_INFO_STATS: - l_up_mask = 1 << HTT_DBG_STATS_SND_INFO; - break; - - /* txrx_fw_stats 9 */ - case WMA_FW_ERROR_INFO_STATS: - l_up_mask = 1 << HTT_DBG_STATS_ERROR_INFO; - break; - - /* txrx_fw_stats 10 */ - case WMA_FW_TX_SELFGEN_INFO_STATS: - l_up_mask = 1 << HTT_DBG_STATS_TX_SELFGEN_INFO; - break; - - /* txrx_fw_stats 15 */ - /* - * This is 1:1 correspondence with WMA defined value - * and the f/w bitmask. - */ - case WMA_FW_RX_TXBF_MUSU_NDPA: - l_up_mask = 1 << HTT_DBG_STATS_TXBF_MUSU_NDPA_PKT; - break; - - default: - qdf_print("%s %d Invalid value %d\n", - __func__, __LINE__, value); - return 0; - } + /* TODO: Need to check how to avoid mem leak*/ + l_up_mask = 1 << (value - 1); req.stats_type_upload_mask = l_up_mask; ol_txrx_fw_stats_get(vdev, &req, true);