Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /** |
| 29 | * @file htt_fw_stats.c |
| 30 | * @brief Provide functions to process FW status retrieved from FW. |
| 31 | */ |
| 32 | |
| 33 | #include <htc_api.h> /* HTC_PACKET */ |
| 34 | #include <htt.h> /* HTT_T2H_MSG_TYPE, etc. */ |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame^] | 35 | #include <qdf_nbuf.h> /* qdf_nbuf_t */ |
Anurag Chouhan | 600c3a0 | 2016-03-01 10:33:54 +0530 | [diff] [blame] | 36 | #include <qdf_mem.h> /* qdf_mem_set */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 37 | #include <ol_fw_tx_dbg.h> /* ol_fw_tx_dbg_ppdu_base */ |
| 38 | |
| 39 | #include <ol_htt_rx_api.h> |
| 40 | #include <ol_txrx_htt_api.h> /* htt_tx_status */ |
| 41 | |
| 42 | #include <htt_internal.h> |
| 43 | |
| 44 | #include <wlan_defs.h> |
| 45 | |
| 46 | #define ROUND_UP_TO_4(val) (((val) + 3) & ~0x3) |
| 47 | |
| 48 | |
| 49 | static char *bw_str_arr[] = {"20MHz", "40MHz", "80MHz", "160MHz"}; |
| 50 | |
| 51 | /* |
| 52 | * Defined the macro tx_rate_stats_print_cmn() |
| 53 | * so that this could be used in both |
| 54 | * htt_t2h_stats_tx_rate_stats_print() & |
| 55 | * htt_t2h_stats_tx_rate_stats_print_v2(). |
| 56 | * Each of these functions take a different structure as argument, |
| 57 | * but with common fields in the structures--so using a macro |
| 58 | * to bypass the strong type-checking of a function seems a simple |
| 59 | * trick to use to avoid the code duplication. |
| 60 | */ |
| 61 | #define tx_rate_stats_print_cmn(_tx_rate_info, _concise) \ |
| 62 | { \ |
| 63 | int i; \ |
| 64 | \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 65 | qdf_print("TX Rate Info:\n"); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 66 | \ |
| 67 | /* MCS */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 68 | qdf_print("MCS counts (0..9): "); \ |
| 69 | qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 70 | _tx_rate_info->mcs[0], \ |
| 71 | _tx_rate_info->mcs[1], \ |
| 72 | _tx_rate_info->mcs[2], \ |
| 73 | _tx_rate_info->mcs[3], \ |
| 74 | _tx_rate_info->mcs[4], \ |
| 75 | _tx_rate_info->mcs[5], \ |
| 76 | _tx_rate_info->mcs[6], \ |
| 77 | _tx_rate_info->mcs[7], \ |
| 78 | _tx_rate_info->mcs[8], \ |
| 79 | _tx_rate_info->mcs[9]); \ |
| 80 | \ |
| 81 | /* SGI */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 82 | qdf_print("SGI counts (0..9): "); \ |
| 83 | qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 84 | _tx_rate_info->sgi[0], \ |
| 85 | _tx_rate_info->sgi[1], \ |
| 86 | _tx_rate_info->sgi[2], \ |
| 87 | _tx_rate_info->sgi[3], \ |
| 88 | _tx_rate_info->sgi[4], \ |
| 89 | _tx_rate_info->sgi[5], \ |
| 90 | _tx_rate_info->sgi[6], \ |
| 91 | _tx_rate_info->sgi[7], \ |
| 92 | _tx_rate_info->sgi[8], \ |
| 93 | _tx_rate_info->sgi[9]); \ |
| 94 | \ |
| 95 | /* NSS */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 96 | qdf_print("NSS counts: "); \ |
| 97 | qdf_print("1x1 %d, 2x2 %d, 3x3 %d\n", \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 98 | _tx_rate_info->nss[0], \ |
| 99 | _tx_rate_info->nss[1], _tx_rate_info->nss[2]);\ |
| 100 | \ |
| 101 | /* BW */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 102 | qdf_print("BW counts: "); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 103 | \ |
| 104 | for (i = 0; \ |
| 105 | i < sizeof(_tx_rate_info->bw) / sizeof(_tx_rate_info->bw[0]);\ |
| 106 | i++) { \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 107 | qdf_print("%s %d ", bw_str_arr[i], _tx_rate_info->bw[i]);\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 108 | } \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 109 | qdf_print("\n"); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 110 | \ |
| 111 | /* Preamble */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 112 | qdf_print("Preamble (O C H V) counts: "); \ |
| 113 | qdf_print("%d, %d, %d, %d\n", \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 114 | _tx_rate_info->pream[0], \ |
| 115 | _tx_rate_info->pream[1], \ |
| 116 | _tx_rate_info->pream[2], \ |
| 117 | _tx_rate_info->pream[3]); \ |
| 118 | \ |
| 119 | /* STBC rate counts */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 120 | qdf_print("STBC rate counts (0..9): "); \ |
| 121 | qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 122 | _tx_rate_info->stbc[0], \ |
| 123 | _tx_rate_info->stbc[1], \ |
| 124 | _tx_rate_info->stbc[2], \ |
| 125 | _tx_rate_info->stbc[3], \ |
| 126 | _tx_rate_info->stbc[4], \ |
| 127 | _tx_rate_info->stbc[5], \ |
| 128 | _tx_rate_info->stbc[6], \ |
| 129 | _tx_rate_info->stbc[7], \ |
| 130 | _tx_rate_info->stbc[8], \ |
| 131 | _tx_rate_info->stbc[9]); \ |
| 132 | \ |
| 133 | /* LDPC and TxBF counts */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 134 | qdf_print("LDPC Counts: "); \ |
| 135 | qdf_print("%d\n", _tx_rate_info->ldpc); \ |
| 136 | qdf_print("RTS Counts: "); \ |
| 137 | qdf_print("%d\n", _tx_rate_info->rts_cnt); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 138 | /* RSSI Values for last ack frames */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 139 | qdf_print("Ack RSSI: %d\n", _tx_rate_info->ack_rssi);\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 140 | } |
| 141 | |
| 142 | static void htt_t2h_stats_tx_rate_stats_print(wlan_dbg_tx_rate_info_t * |
| 143 | tx_rate_info, int concise) |
| 144 | { |
| 145 | tx_rate_stats_print_cmn(tx_rate_info, concise); |
| 146 | } |
| 147 | |
| 148 | static void htt_t2h_stats_tx_rate_stats_print_v2(wlan_dbg_tx_rate_info_v2_t * |
| 149 | tx_rate_info, int concise) |
| 150 | { |
| 151 | tx_rate_stats_print_cmn(tx_rate_info, concise); |
| 152 | } |
| 153 | |
| 154 | /* |
| 155 | * Defined the macro rx_rate_stats_print_cmn() |
| 156 | * so that this could be used in both |
| 157 | * htt_t2h_stats_rx_rate_stats_print() & |
| 158 | * htt_t2h_stats_rx_rate_stats_print_v2(). |
| 159 | * Each of these functions take a different structure as argument, |
| 160 | * but with common fields in the structures -- so using a macro |
| 161 | * to bypass the strong type-checking of a function seems a simple |
| 162 | * trick to use to avoid the code duplication. |
| 163 | */ |
| 164 | #define rx_rate_stats_print_cmn(_rx_phy_info, _concise) \ |
| 165 | { \ |
| 166 | int i; \ |
| 167 | \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 168 | qdf_print("RX Rate Info:\n"); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 169 | \ |
| 170 | /* MCS */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 171 | qdf_print("MCS counts (0..9): "); \ |
| 172 | qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 173 | _rx_phy_info->mcs[0], \ |
| 174 | _rx_phy_info->mcs[1], \ |
| 175 | _rx_phy_info->mcs[2], \ |
| 176 | _rx_phy_info->mcs[3], \ |
| 177 | _rx_phy_info->mcs[4], \ |
| 178 | _rx_phy_info->mcs[5], \ |
| 179 | _rx_phy_info->mcs[6], \ |
| 180 | _rx_phy_info->mcs[7], \ |
| 181 | _rx_phy_info->mcs[8], \ |
| 182 | _rx_phy_info->mcs[9]); \ |
| 183 | \ |
| 184 | /* SGI */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 185 | qdf_print("SGI counts (0..9): "); \ |
| 186 | qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 187 | _rx_phy_info->sgi[0], \ |
| 188 | _rx_phy_info->sgi[1], \ |
| 189 | _rx_phy_info->sgi[2], \ |
| 190 | _rx_phy_info->sgi[3], \ |
| 191 | _rx_phy_info->sgi[4], \ |
| 192 | _rx_phy_info->sgi[5], \ |
| 193 | _rx_phy_info->sgi[6], \ |
| 194 | _rx_phy_info->sgi[7], \ |
| 195 | _rx_phy_info->sgi[8], \ |
| 196 | _rx_phy_info->sgi[9]); \ |
| 197 | \ |
| 198 | /* NSS */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 199 | qdf_print("NSS counts: "); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 200 | /* nss[0] just holds the count of non-stbc frames that were sent at 1x1 \ |
| 201 | * rates and nsts holds the count of frames sent with stbc. \ |
| 202 | * It was decided to not include PPDUs sent w/ STBC in nss[0]\ |
| 203 | * since it would be easier to change the value that needs to be\ |
| 204 | * printed (from "stbc+non-stbc count to only non-stbc count")\ |
| 205 | * if needed in the future. Hence the addition in the host code\ |
| 206 | * at this line. */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 207 | qdf_print("1x1 %d, 2x2 %d, 3x3 %d, 4x4 %d\n", \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 208 | _rx_phy_info->nss[0] + _rx_phy_info->nsts, \ |
| 209 | _rx_phy_info->nss[1], \ |
| 210 | _rx_phy_info->nss[2], \ |
| 211 | _rx_phy_info->nss[3]); \ |
| 212 | \ |
| 213 | /* NSTS */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 214 | qdf_print("NSTS count: "); \ |
| 215 | qdf_print("%d\n", _rx_phy_info->nsts); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 216 | \ |
| 217 | /* BW */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 218 | qdf_print("BW counts: "); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 219 | for (i = 0; \ |
| 220 | i < sizeof(_rx_phy_info->bw) / sizeof(_rx_phy_info->bw[0]); \ |
| 221 | i++) { \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 222 | qdf_print("%s %d ", bw_str_arr[i], _rx_phy_info->bw[i]);\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 223 | } \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 224 | qdf_print("\n"); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 225 | \ |
| 226 | /* Preamble */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 227 | qdf_print("Preamble counts: "); \ |
| 228 | qdf_print("%d, %d, %d, %d, %d, %d\n", \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 229 | _rx_phy_info->pream[0], \ |
| 230 | _rx_phy_info->pream[1], \ |
| 231 | _rx_phy_info->pream[2], \ |
| 232 | _rx_phy_info->pream[3], \ |
| 233 | _rx_phy_info->pream[4], \ |
| 234 | _rx_phy_info->pream[5]); \ |
| 235 | \ |
| 236 | /* STBC rate counts */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 237 | qdf_print("STBC rate counts (0..9): "); \ |
| 238 | qdf_print("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 239 | _rx_phy_info->stbc[0], \ |
| 240 | _rx_phy_info->stbc[1], \ |
| 241 | _rx_phy_info->stbc[2], \ |
| 242 | _rx_phy_info->stbc[3], \ |
| 243 | _rx_phy_info->stbc[4], \ |
| 244 | _rx_phy_info->stbc[5], \ |
| 245 | _rx_phy_info->stbc[6], \ |
| 246 | _rx_phy_info->stbc[7], \ |
| 247 | _rx_phy_info->stbc[8], \ |
| 248 | _rx_phy_info->stbc[9]); \ |
| 249 | \ |
| 250 | /* LDPC and TxBF counts */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 251 | qdf_print("LDPC TXBF Counts: "); \ |
| 252 | qdf_print("%d, %d\n", _rx_phy_info->ldpc, _rx_phy_info->txbf);\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 253 | /* RSSI Values for last received frames */ \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 254 | qdf_print("RSSI (data, mgmt): %d, %d\n", _rx_phy_info->data_rssi,\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 255 | _rx_phy_info->mgmt_rssi); \ |
| 256 | \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 257 | qdf_print("RSSI Chain 0 (0x%02x 0x%02x 0x%02x 0x%02x)\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 258 | ((_rx_phy_info->rssi_chain0 >> 24) & 0xff), \ |
| 259 | ((_rx_phy_info->rssi_chain0 >> 16) & 0xff), \ |
| 260 | ((_rx_phy_info->rssi_chain0 >> 8) & 0xff), \ |
| 261 | ((_rx_phy_info->rssi_chain0 >> 0) & 0xff)); \ |
| 262 | \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 263 | qdf_print("RSSI Chain 1 (0x%02x 0x%02x 0x%02x 0x%02x)\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 264 | ((_rx_phy_info->rssi_chain1 >> 24) & 0xff), \ |
| 265 | ((_rx_phy_info->rssi_chain1 >> 16) & 0xff), \ |
| 266 | ((_rx_phy_info->rssi_chain1 >> 8) & 0xff), \ |
| 267 | ((_rx_phy_info->rssi_chain1 >> 0) & 0xff)); \ |
| 268 | \ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 269 | qdf_print("RSSI Chain 2 (0x%02x 0x%02x 0x%02x 0x%02x)\n",\ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 270 | ((_rx_phy_info->rssi_chain2 >> 24) & 0xff), \ |
| 271 | ((_rx_phy_info->rssi_chain2 >> 16) & 0xff), \ |
| 272 | ((_rx_phy_info->rssi_chain2 >> 8) & 0xff), \ |
| 273 | ((_rx_phy_info->rssi_chain2 >> 0) & 0xff)); \ |
| 274 | } |
| 275 | |
| 276 | static void htt_t2h_stats_rx_rate_stats_print(wlan_dbg_rx_rate_info_t * |
| 277 | rx_phy_info, int concise) |
| 278 | { |
| 279 | rx_rate_stats_print_cmn(rx_phy_info, concise); |
| 280 | } |
| 281 | |
| 282 | static void htt_t2h_stats_rx_rate_stats_print_v2(wlan_dbg_rx_rate_info_v2_t * |
| 283 | rx_phy_info, int concise) |
| 284 | { |
| 285 | rx_rate_stats_print_cmn(rx_phy_info, concise); |
| 286 | } |
| 287 | |
| 288 | static void |
| 289 | htt_t2h_stats_pdev_stats_print(struct wlan_dbg_stats *wlan_pdev_stats, |
| 290 | int concise) |
| 291 | { |
| 292 | struct wlan_dbg_tx_stats *tx = &wlan_pdev_stats->tx; |
| 293 | struct wlan_dbg_rx_stats *rx = &wlan_pdev_stats->rx; |
| 294 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 295 | qdf_print("WAL Pdev stats:\n"); |
| 296 | qdf_print("\n### Tx ###\n"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 297 | |
| 298 | /* Num HTT cookies queued to dispatch list */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 299 | qdf_print("comp_queued :\t%d\n", tx->comp_queued); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 300 | /* Num HTT cookies dispatched */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 301 | qdf_print("comp_delivered :\t%d\n", tx->comp_delivered); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 302 | /* Num MSDU queued to WAL */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 303 | qdf_print("msdu_enqued :\t%d\n", tx->msdu_enqued); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 304 | /* Num MPDU queued to WAL */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 305 | qdf_print("mpdu_enqued :\t%d\n", tx->mpdu_enqued); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 306 | /* Num MSDUs dropped by WMM limit */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 307 | qdf_print("wmm_drop :\t%d\n", tx->wmm_drop); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 308 | /* Num Local frames queued */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 309 | qdf_print("local_enqued :\t%d\n", tx->local_enqued); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 310 | /* Num Local frames done */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 311 | qdf_print("local_freed :\t%d\n", tx->local_freed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 312 | /* Num queued to HW */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 313 | qdf_print("hw_queued :\t%d\n", tx->hw_queued); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 314 | /* Num PPDU reaped from HW */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 315 | qdf_print("hw_reaped :\t%d\n", tx->hw_reaped); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 316 | /* Num underruns */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 317 | qdf_print("mac underrun :\t%d\n", tx->underrun); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 318 | /* Num underruns */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 319 | qdf_print("phy underrun :\t%d\n", tx->phy_underrun); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 320 | /* Num PPDUs cleaned up in TX abort */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 321 | qdf_print("tx_abort :\t%d\n", tx->tx_abort); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 322 | /* Num MPDUs requed by SW */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 323 | qdf_print("mpdus_requed :\t%d\n", tx->mpdus_requed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 324 | /* Excessive retries */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 325 | qdf_print("excess retries :\t%d\n", tx->tx_ko); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 326 | /* last data rate */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 327 | qdf_print("last rc :\t%d\n", tx->data_rc); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 328 | /* scheduler self triggers */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 329 | qdf_print("sched self trig :\t%d\n", tx->self_triggers); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 330 | /* SW retry failures */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 331 | qdf_print("ampdu retry failed:\t%d\n", tx->sw_retry_failure); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 332 | /* ilegal phy rate errirs */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 333 | qdf_print("illegal rate errs :\t%d\n", tx->illgl_rate_phy_err); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 334 | /* pdev continous excessive retries */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 335 | qdf_print("pdev cont xretry :\t%d\n", tx->pdev_cont_xretry); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 336 | /* pdev continous excessive retries */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 337 | qdf_print("pdev tx timeout :\t%d\n", tx->pdev_tx_timeout); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 338 | /* pdev resets */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 339 | qdf_print("pdev resets :\t%d\n", tx->pdev_resets); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 340 | /* PPDU > txop duration */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 341 | qdf_print("ppdu txop ovf :\t%d\n", tx->txop_ovf); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 342 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 343 | qdf_print("\n### Rx ###\n"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 344 | /* Cnts any change in ring routing mid-ppdu */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 345 | qdf_print("ppdu_route_change :\t%d\n", rx->mid_ppdu_route_change); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 346 | /* Total number of statuses processed */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 347 | qdf_print("status_rcvd :\t%d\n", rx->status_rcvd); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 348 | /* Extra frags on rings 0-3 */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 349 | qdf_print("r0_frags :\t%d\n", rx->r0_frags); |
| 350 | qdf_print("r1_frags :\t%d\n", rx->r1_frags); |
| 351 | qdf_print("r2_frags :\t%d\n", rx->r2_frags); |
| 352 | qdf_print("r3_frags :\t%d\n", rx->r3_frags); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 353 | /* MSDUs / MPDUs delivered to HTT */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 354 | qdf_print("htt_msdus :\t%d\n", rx->htt_msdus); |
| 355 | qdf_print("htt_mpdus :\t%d\n", rx->htt_mpdus); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 356 | /* MSDUs / MPDUs delivered to local stack */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 357 | qdf_print("loc_msdus :\t%d\n", rx->loc_msdus); |
| 358 | qdf_print("loc_mpdus :\t%d\n", rx->loc_mpdus); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 359 | /* AMSDUs that have more MSDUs than the status ring size */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 360 | qdf_print("oversize_amsdu :\t%d\n", rx->oversize_amsdu); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 361 | /* Number of PHY errors */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 362 | qdf_print("phy_errs :\t%d\n", rx->phy_errs); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 363 | /* Number of PHY errors dropped */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 364 | qdf_print("phy_errs dropped :\t%d\n", rx->phy_err_drop); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 365 | /* Number of mpdu errors - FCS, MIC, ENC etc. */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 366 | qdf_print("mpdu_errs :\t%d\n", rx->mpdu_errs); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 367 | |
| 368 | } |
| 369 | |
| 370 | static void |
| 371 | htt_t2h_stats_rx_reorder_stats_print(struct rx_reorder_stats *stats_ptr, |
| 372 | int concise) |
| 373 | { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 374 | qdf_print("Rx reorder statistics:\n"); |
| 375 | qdf_print(" %u non-QoS frames received\n", stats_ptr->deliver_non_qos); |
| 376 | qdf_print(" %u frames received in-order\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 377 | stats_ptr->deliver_in_order); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 378 | qdf_print(" %u frames flushed due to timeout\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 379 | stats_ptr->deliver_flush_timeout); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 380 | qdf_print(" %u frames flushed due to moving out of window\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 381 | stats_ptr->deliver_flush_oow); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 382 | qdf_print(" %u frames flushed due to receiving DELBA\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 383 | stats_ptr->deliver_flush_delba); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 384 | qdf_print(" %u frames discarded due to FCS error\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 385 | stats_ptr->fcs_error); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 386 | qdf_print(" %u frames discarded due to invalid peer\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 387 | stats_ptr->invalid_peer); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 388 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 389 | (" %u frames discarded due to duplication (non aggregation)\n", |
| 390 | stats_ptr->dup_non_aggr); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 391 | qdf_print(" %u frames discarded due to duplication in reorder queue\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 392 | stats_ptr->dup_in_reorder); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 393 | qdf_print(" %u frames discarded due to processed before\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 394 | stats_ptr->dup_past); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 395 | qdf_print(" %u times reorder timeout happened\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 396 | stats_ptr->reorder_timeout); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 397 | qdf_print(" %u times incorrect bar received\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 398 | stats_ptr->invalid_bar_ssn); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 399 | qdf_print(" %u times bar ssn reset happened\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 400 | stats_ptr->ssn_reset); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 401 | qdf_print(" %u times flushed due to peer delete\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 402 | stats_ptr->deliver_flush_delpeer); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 403 | qdf_print(" %u times flushed due to offload\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 404 | stats_ptr->deliver_flush_offload); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 405 | qdf_print(" %u times flushed due to ouf of buffer\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 406 | stats_ptr->deliver_flush_oob); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 407 | qdf_print(" %u MPDU's dropped due to PN check fail\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 408 | stats_ptr->pn_fail); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 409 | qdf_print(" %u MPDU's dropped due to lack of memory\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 410 | stats_ptr->store_fail); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 411 | qdf_print(" %u times tid pool alloc succeeded\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 412 | stats_ptr->tid_pool_alloc_succ); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 413 | qdf_print(" %u times MPDU pool alloc succeeded\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 414 | stats_ptr->mpdu_pool_alloc_succ); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 415 | qdf_print(" %u times MSDU pool alloc succeeded\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 416 | stats_ptr->msdu_pool_alloc_succ); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 417 | qdf_print(" %u times tid pool alloc failed\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 418 | stats_ptr->tid_pool_alloc_fail); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 419 | qdf_print(" %u times MPDU pool alloc failed\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 420 | stats_ptr->mpdu_pool_alloc_fail); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 421 | qdf_print(" %u times MSDU pool alloc failed\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 422 | stats_ptr->msdu_pool_alloc_fail); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 423 | qdf_print(" %u times tid pool freed\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 424 | stats_ptr->tid_pool_free); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 425 | qdf_print(" %u times MPDU pool freed\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 426 | stats_ptr->mpdu_pool_free); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 427 | qdf_print(" %u times MSDU pool freed\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 428 | stats_ptr->msdu_pool_free); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 429 | qdf_print(" %u MSDUs undelivered to HTT, queued to Rx MSDU free list\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 430 | stats_ptr->msdu_queued); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 431 | qdf_print(" %u MSDUs released from Rx MSDU list to MAC ring\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 432 | stats_ptr->msdu_recycled); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 433 | qdf_print(" %u MPDUs with invalid peer but A2 found in AST\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 434 | stats_ptr->invalid_peer_a2_in_ast); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 435 | qdf_print(" %u MPDUs with invalid peer but A3 found in AST\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 436 | stats_ptr->invalid_peer_a3_in_ast); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 437 | qdf_print(" %u MPDUs with invalid peer, Broadcast or Mulitcast frame\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 438 | stats_ptr->invalid_peer_bmc_mpdus); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 439 | qdf_print(" %u MSDUs with err attention word\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 440 | stats_ptr->rxdesc_err_att); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 441 | qdf_print(" %u MSDUs with flag of peer_idx_invalid\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 442 | stats_ptr->rxdesc_err_peer_idx_inv); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 443 | qdf_print(" %u MSDUs with flag of peer_idx_timeout\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 444 | stats_ptr->rxdesc_err_peer_idx_to); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 445 | qdf_print(" %u MSDUs with flag of overflow\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 446 | stats_ptr->rxdesc_err_ov); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 447 | qdf_print(" %u MSDUs with flag of msdu_length_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 448 | stats_ptr->rxdesc_err_msdu_len); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 449 | qdf_print(" %u MSDUs with flag of mpdu_length_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 450 | stats_ptr->rxdesc_err_mpdu_len); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 451 | qdf_print(" %u MSDUs with flag of tkip_mic_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 452 | stats_ptr->rxdesc_err_tkip_mic); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 453 | qdf_print(" %u MSDUs with flag of decrypt_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 454 | stats_ptr->rxdesc_err_decrypt); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 455 | qdf_print(" %u MSDUs with flag of fcs_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 456 | stats_ptr->rxdesc_err_fcs); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 457 | qdf_print(" %u Unicast frames with invalid peer handler\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 458 | stats_ptr->rxdesc_uc_msdus_inv_peer); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 459 | qdf_print(" %u unicast frame directly to DUT with invalid peer handler\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 460 | stats_ptr->rxdesc_direct_msdus_inv_peer); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 461 | qdf_print(" %u Broadcast/Multicast frames with invalid peer handler\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 462 | stats_ptr->rxdesc_bmc_msdus_inv_peer); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 463 | qdf_print(" %u MSDUs dropped due to no first MSDU flag\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 464 | stats_ptr->rxdesc_no_1st_msdu); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 465 | qdf_print(" %u MSDUs dropped due to ring overflow\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 466 | stats_ptr->msdu_drop_ring_ov); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 467 | qdf_print(" %u MSDUs dropped due to FC mismatch\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 468 | stats_ptr->msdu_drop_fc_mismatch); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 469 | qdf_print(" %u MSDUs dropped due to mgt frame in Remote ring\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 470 | stats_ptr->msdu_drop_mgmt_remote_ring); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 471 | qdf_print(" %u MSDUs dropped due to misc non error\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 472 | stats_ptr->msdu_drop_misc); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 473 | qdf_print(" %u MSDUs go to offload before reorder\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 474 | stats_ptr->offload_msdu_wal); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 475 | qdf_print(" %u data frame dropped by offload after reorder\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 476 | stats_ptr->offload_msdu_reorder); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 477 | qdf_print(" %u MPDUs with SN in the past & within BA window\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 478 | stats_ptr->dup_past_within_window); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 479 | qdf_print(" %u MPDUs with SN in the past & outside BA window\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 480 | stats_ptr->dup_past_outside_window); |
| 481 | } |
| 482 | |
| 483 | static void |
| 484 | htt_t2h_stats_rx_rem_buf_stats_print( |
| 485 | struct rx_remote_buffer_mgmt_stats *stats_ptr, int concise) |
| 486 | { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 487 | qdf_print("Rx Remote Buffer Statistics:\n"); |
| 488 | qdf_print(" %u MSDU's reaped for Rx processing\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 489 | stats_ptr->remote_reaped); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 490 | qdf_print(" %u MSDU's recycled within firmware\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 491 | stats_ptr->remote_recycled); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 492 | qdf_print(" %u MSDU's stored by Data Rx\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 493 | stats_ptr->data_rx_msdus_stored); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 494 | qdf_print(" %u HTT indications from WAL Rx MSDU\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 495 | stats_ptr->wal_rx_ind); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 496 | qdf_print(" %u HTT indications unconsumed from WAL Rx MSDU\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 497 | stats_ptr->wal_rx_ind_unconsumed); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 498 | qdf_print(" %u HTT indications from Data Rx MSDU\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 499 | stats_ptr->data_rx_ind); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 500 | qdf_print(" %u HTT indications unconsumed from Data Rx MSDU\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 501 | stats_ptr->data_rx_ind_unconsumed); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 502 | qdf_print(" %u HTT indications from ATHBUF\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 503 | stats_ptr->athbuf_rx_ind); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 504 | qdf_print(" %u Remote buffers requested for refill\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 505 | stats_ptr->refill_buf_req); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 506 | qdf_print(" %u Remote buffers filled by host\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 507 | stats_ptr->refill_buf_rsp); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 508 | qdf_print(" %u times MAC has no buffers\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 509 | stats_ptr->mac_no_bufs); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 510 | qdf_print(" %u times f/w write & read indices on MAC ring are equal\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 511 | stats_ptr->fw_indices_equal); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 512 | qdf_print(" %u times f/w has no remote buffers to post to MAC\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 513 | stats_ptr->host_no_bufs); |
| 514 | } |
| 515 | |
| 516 | static void |
| 517 | htt_t2h_stats_txbf_info_buf_stats_print( |
| 518 | struct wlan_dbg_txbf_data_stats *stats_ptr) |
| 519 | { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 520 | qdf_print("TXBF data Statistics:\n"); |
| 521 | qdf_print("tx_txbf_vht (0..9): "); |
| 522 | qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %d\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 523 | stats_ptr->tx_txbf_vht[0], |
| 524 | stats_ptr->tx_txbf_vht[1], |
| 525 | stats_ptr->tx_txbf_vht[2], |
| 526 | stats_ptr->tx_txbf_vht[3], |
| 527 | stats_ptr->tx_txbf_vht[4], |
| 528 | stats_ptr->tx_txbf_vht[5], |
| 529 | stats_ptr->tx_txbf_vht[6], |
| 530 | stats_ptr->tx_txbf_vht[7], |
| 531 | stats_ptr->tx_txbf_vht[8], |
| 532 | stats_ptr->tx_txbf_vht[9]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 533 | qdf_print("rx_txbf_vht (0..9): "); |
| 534 | qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 535 | stats_ptr->rx_txbf_vht[0], |
| 536 | stats_ptr->rx_txbf_vht[1], |
| 537 | stats_ptr->rx_txbf_vht[2], |
| 538 | stats_ptr->rx_txbf_vht[3], |
| 539 | stats_ptr->rx_txbf_vht[4], |
| 540 | stats_ptr->rx_txbf_vht[5], |
| 541 | stats_ptr->rx_txbf_vht[6], |
| 542 | stats_ptr->rx_txbf_vht[7], |
| 543 | stats_ptr->rx_txbf_vht[8], |
| 544 | stats_ptr->rx_txbf_vht[9]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 545 | qdf_print("tx_txbf_ht (0..7): "); |
| 546 | qdf_print("%u, %u, %u, %u, %u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 547 | stats_ptr->tx_txbf_ht[0], |
| 548 | stats_ptr->tx_txbf_ht[1], |
| 549 | stats_ptr->tx_txbf_ht[2], |
| 550 | stats_ptr->tx_txbf_ht[3], |
| 551 | stats_ptr->tx_txbf_ht[4], |
| 552 | stats_ptr->tx_txbf_ht[5], |
| 553 | stats_ptr->tx_txbf_ht[6], |
| 554 | stats_ptr->tx_txbf_ht[7]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 555 | qdf_print("tx_txbf_ofdm (0..7): "); |
| 556 | qdf_print("%u, %u, %u, %u, %u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 557 | stats_ptr->tx_txbf_ofdm[0], |
| 558 | stats_ptr->tx_txbf_ofdm[1], |
| 559 | stats_ptr->tx_txbf_ofdm[2], |
| 560 | stats_ptr->tx_txbf_ofdm[3], |
| 561 | stats_ptr->tx_txbf_ofdm[4], |
| 562 | stats_ptr->tx_txbf_ofdm[5], |
| 563 | stats_ptr->tx_txbf_ofdm[6], |
| 564 | stats_ptr->tx_txbf_ofdm[7]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 565 | qdf_print("tx_txbf_cck (0..6): "); |
| 566 | qdf_print("%u, %u, %u, %u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 567 | stats_ptr->tx_txbf_cck[0], |
| 568 | stats_ptr->tx_txbf_cck[1], |
| 569 | stats_ptr->tx_txbf_cck[2], |
| 570 | stats_ptr->tx_txbf_cck[3], |
| 571 | stats_ptr->tx_txbf_cck[4], |
| 572 | stats_ptr->tx_txbf_cck[5], |
| 573 | stats_ptr->tx_txbf_cck[6]); |
| 574 | } |
| 575 | |
| 576 | static void |
| 577 | htt_t2h_stats_txbf_snd_buf_stats_print( |
| 578 | struct wlan_dbg_txbf_snd_stats *stats_ptr) |
| 579 | { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 580 | qdf_print("TXBF snd Buffer Statistics:\n"); |
| 581 | qdf_print("cbf_20: "); |
| 582 | qdf_print("%u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 583 | stats_ptr->cbf_20[0], |
| 584 | stats_ptr->cbf_20[1], |
| 585 | stats_ptr->cbf_20[2], |
| 586 | stats_ptr->cbf_20[3]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 587 | qdf_print("cbf_40: "); |
| 588 | qdf_print("%u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 589 | stats_ptr->cbf_40[0], |
| 590 | stats_ptr->cbf_40[1], |
| 591 | stats_ptr->cbf_40[2], |
| 592 | stats_ptr->cbf_40[3]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 593 | qdf_print("cbf_80: "); |
| 594 | qdf_print("%u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 595 | stats_ptr->cbf_80[0], |
| 596 | stats_ptr->cbf_80[1], |
| 597 | stats_ptr->cbf_80[2], |
| 598 | stats_ptr->cbf_80[3]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 599 | qdf_print("sounding: "); |
| 600 | qdf_print("%u, %u, %u, %u, %u, %u, %u, %u, %u\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 601 | stats_ptr->sounding[0], |
| 602 | stats_ptr->sounding[1], |
| 603 | stats_ptr->sounding[2], |
| 604 | stats_ptr->sounding[3], |
| 605 | stats_ptr->sounding[4], |
| 606 | stats_ptr->sounding[5], |
| 607 | stats_ptr->sounding[6], |
| 608 | stats_ptr->sounding[7], |
| 609 | stats_ptr->sounding[8]); |
| 610 | } |
| 611 | |
| 612 | static void |
| 613 | htt_t2h_stats_tx_selfgen_buf_stats_print( |
| 614 | struct wlan_dbg_tx_selfgen_stats *stats_ptr) |
| 615 | { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 616 | qdf_print("Tx selfgen Buffer Statistics:\n"); |
| 617 | qdf_print(" %u su_ndpa\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 618 | stats_ptr->su_ndpa); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 619 | qdf_print(" %u mu_ndp\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 620 | stats_ptr->mu_ndp); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 621 | qdf_print(" %u mu_ndpa\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 622 | stats_ptr->mu_ndpa); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 623 | qdf_print(" %u mu_ndp\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 624 | stats_ptr->mu_ndp); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 625 | qdf_print(" %u mu_brpoll_1\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 626 | stats_ptr->mu_brpoll_1); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 627 | qdf_print(" %u mu_brpoll_2\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 628 | stats_ptr->mu_brpoll_2); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 629 | qdf_print(" %u mu_bar_1\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 630 | stats_ptr->mu_bar_1); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 631 | qdf_print(" %u mu_bar_2\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 632 | stats_ptr->mu_bar_2); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 633 | qdf_print(" %u cts_burst\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 634 | stats_ptr->cts_burst); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 635 | qdf_print(" %u su_ndp_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 636 | stats_ptr->su_ndp_err); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 637 | qdf_print(" %u su_ndpa_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 638 | stats_ptr->su_ndpa_err); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 639 | qdf_print(" %u mu_ndp_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 640 | stats_ptr->mu_ndp_err); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 641 | qdf_print(" %u mu_brp1_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 642 | stats_ptr->mu_brp1_err); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 643 | qdf_print(" %u mu_brp2_err\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 644 | stats_ptr->mu_brp2_err); |
| 645 | } |
| 646 | |
| 647 | static void |
| 648 | htt_t2h_stats_wifi2_error_stats_print( |
| 649 | struct wlan_dbg_wifi2_error_stats *stats_ptr) |
| 650 | { |
| 651 | int i; |
| 652 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 653 | qdf_print("Scheduler error Statistics:\n"); |
| 654 | qdf_print("urrn_stats: "); |
| 655 | qdf_print("%d, %d, %d\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 656 | stats_ptr->urrn_stats[0], |
| 657 | stats_ptr->urrn_stats[1], |
| 658 | stats_ptr->urrn_stats[2]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 659 | qdf_print("flush_errs (0..%d): ", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 660 | WHAL_DBG_FLUSH_REASON_MAXCNT); |
| 661 | for (i = 0; i < WHAL_DBG_FLUSH_REASON_MAXCNT; i++) |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 662 | qdf_print(" %u", stats_ptr->flush_errs[i]); |
| 663 | qdf_print("\n"); |
| 664 | qdf_print("schd_stall_errs (0..3): "); |
| 665 | qdf_print("%d, %d, %d, %d\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 666 | stats_ptr->schd_stall_errs[0], |
| 667 | stats_ptr->schd_stall_errs[1], |
| 668 | stats_ptr->schd_stall_errs[2], |
| 669 | stats_ptr->schd_stall_errs[3]); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 670 | qdf_print("schd_cmd_result (0..%d): ", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 671 | WHAL_DBG_CMD_RESULT_MAXCNT); |
| 672 | for (i = 0; i < WHAL_DBG_CMD_RESULT_MAXCNT; i++) |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 673 | qdf_print(" %u", stats_ptr->schd_cmd_result[i]); |
| 674 | qdf_print("\n"); |
| 675 | qdf_print("sifs_status (0..%d): ", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 676 | WHAL_DBG_SIFS_STATUS_MAXCNT); |
| 677 | for (i = 0; i < WHAL_DBG_SIFS_STATUS_MAXCNT; i++) |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 678 | qdf_print(" %u", stats_ptr->sifs_status[i]); |
| 679 | qdf_print("\n"); |
| 680 | qdf_print("phy_errs (0..%d): ", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 681 | WHAL_DBG_PHY_ERR_MAXCNT); |
| 682 | for (i = 0; i < WHAL_DBG_PHY_ERR_MAXCNT; i++) |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 683 | qdf_print(" %u", stats_ptr->phy_errs[i]); |
| 684 | qdf_print("\n"); |
| 685 | qdf_print(" %u rx_rate_inval\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 686 | stats_ptr->rx_rate_inval); |
| 687 | } |
| 688 | |
| 689 | static void |
| 690 | htt_t2h_rx_musu_ndpa_pkts_stats_print( |
| 691 | struct rx_txbf_musu_ndpa_pkts_stats *stats_ptr) |
| 692 | { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 693 | qdf_print("Rx TXBF MU/SU Packets and NDPA Statistics:\n"); |
| 694 | qdf_print(" %u Number of TXBF MU packets received\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 695 | stats_ptr->number_mu_pkts); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 696 | qdf_print(" %u Number of TXBF SU packets received\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 697 | stats_ptr->number_su_pkts); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 698 | qdf_print(" %u Number of TXBF directed NDPA\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 699 | stats_ptr->txbf_directed_ndpa_count); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 700 | qdf_print(" %u Number of TXBF retried NDPA\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 701 | stats_ptr->txbf_ndpa_retry_count); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 702 | qdf_print(" %u Total number of TXBF NDPA\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 703 | stats_ptr->txbf_total_ndpa_count); |
| 704 | } |
| 705 | |
| 706 | #define HTT_TICK_TO_USEC(ticks, microsec_per_tick) (ticks * microsec_per_tick) |
| 707 | static inline int htt_rate_flags_to_mhz(uint8_t rate_flags) |
| 708 | { |
| 709 | if (rate_flags & 0x20) |
| 710 | return 40; /* WHAL_RC_FLAG_40MHZ */ |
| 711 | if (rate_flags & 0x40) |
| 712 | return 80; /* WHAL_RC_FLAG_80MHZ */ |
| 713 | if (rate_flags & 0x80) |
| 714 | return 160; /* WHAL_RC_FLAG_160MHZ */ |
| 715 | return 20; |
| 716 | } |
| 717 | |
| 718 | #define HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW 64 |
| 719 | |
| 720 | static void |
| 721 | htt_t2h_tx_ppdu_bitmaps_pr(uint32_t *queued_ptr, uint32_t *acked_ptr) |
| 722 | { |
| 723 | char queued_str[HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW + 1]; |
| 724 | char acked_str[HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW + 1]; |
| 725 | int i, j, word; |
| 726 | |
Anurag Chouhan | 600c3a0 | 2016-03-01 10:33:54 +0530 | [diff] [blame] | 727 | qdf_mem_set(queued_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '0'); |
| 728 | qdf_mem_set(acked_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '-'); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 729 | i = 0; |
| 730 | for (word = 0; word < 2; word++) { |
| 731 | uint32_t queued = *(queued_ptr + word); |
| 732 | uint32_t acked = *(acked_ptr + word); |
| 733 | for (j = 0; j < 32; j++, i++) { |
| 734 | if (queued & (1 << j)) { |
| 735 | queued_str[i] = '1'; |
| 736 | acked_str[i] = (acked & (1 << j)) ? 'y' : 'N'; |
| 737 | } |
| 738 | } |
| 739 | } |
| 740 | queued_str[HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW] = '\0'; |
| 741 | acked_str[HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW] = '\0'; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 742 | qdf_print("%s\n", queued_str); |
| 743 | qdf_print("%s\n", acked_str); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 744 | } |
| 745 | |
| 746 | static inline uint16_t htt_msg_read16(uint16_t *p16) |
| 747 | { |
| 748 | #ifdef BIG_ENDIAN_HOST |
| 749 | /* |
| 750 | * During upload, the bytes within each uint32_t word were |
| 751 | * swapped by the HIF HW. This results in the lower and upper bytes |
| 752 | * of each uint16_t to be in the correct big-endian order with |
| 753 | * respect to each other, but for each even-index uint16_t to |
| 754 | * have its position switched with its successor neighbor uint16_t. |
| 755 | * Undo this uint16_t position swapping. |
| 756 | */ |
| 757 | return (((size_t) p16) & 0x2) ? *(p16 - 1) : *(p16 + 1); |
| 758 | #else |
| 759 | return *p16; |
| 760 | #endif |
| 761 | } |
| 762 | |
| 763 | static inline uint8_t htt_msg_read8(uint8_t *p8) |
| 764 | { |
| 765 | #ifdef BIG_ENDIAN_HOST |
| 766 | /* |
| 767 | * During upload, the bytes within each uint32_t word were |
| 768 | * swapped by the HIF HW. |
| 769 | * Undo this byte swapping. |
| 770 | */ |
| 771 | switch (((size_t) p8) & 0x3) { |
| 772 | case 0: |
| 773 | return *(p8 + 3); |
| 774 | case 1: |
| 775 | return *(p8 + 1); |
| 776 | case 2: |
| 777 | return *(p8 - 1); |
| 778 | default /* 3 */: |
| 779 | return *(p8 - 3); |
| 780 | } |
| 781 | #else |
| 782 | return *p8; |
| 783 | #endif |
| 784 | } |
| 785 | |
| 786 | void htt_make_u8_list_str(uint32_t *aligned_data, |
| 787 | char *buffer, int space, int max_elems) |
| 788 | { |
| 789 | uint8_t *p8 = (uint8_t *) aligned_data; |
| 790 | char *buf_p = buffer; |
| 791 | while (max_elems-- > 0) { |
| 792 | int bytes; |
| 793 | uint8_t val; |
| 794 | |
| 795 | val = htt_msg_read8(p8); |
| 796 | if (val == 0) |
| 797 | /* not enough data to fill the reserved msg buffer*/ |
| 798 | break; |
| 799 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 800 | bytes = qdf_snprint(buf_p, space, "%d,", val); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 801 | space -= bytes; |
| 802 | if (space > 0) |
| 803 | buf_p += bytes; |
| 804 | else /* not enough print buffer space for all the data */ |
| 805 | break; |
| 806 | p8++; |
| 807 | } |
| 808 | if (buf_p == buffer) |
| 809 | *buf_p = '\0'; /* nothing was written */ |
| 810 | else |
| 811 | *(buf_p - 1) = '\0'; /* erase the final comma */ |
| 812 | |
| 813 | } |
| 814 | |
| 815 | void htt_make_u16_list_str(uint32_t *aligned_data, |
| 816 | char *buffer, int space, int max_elems) |
| 817 | { |
| 818 | uint16_t *p16 = (uint16_t *) aligned_data; |
| 819 | char *buf_p = buffer; |
| 820 | while (max_elems-- > 0) { |
| 821 | int bytes; |
| 822 | uint16_t val; |
| 823 | |
| 824 | val = htt_msg_read16(p16); |
| 825 | if (val == 0) |
| 826 | /* not enough data to fill the reserved msg buffer */ |
| 827 | break; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 828 | bytes = qdf_snprint(buf_p, space, "%d,", val); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 829 | space -= bytes; |
| 830 | if (space > 0) |
| 831 | buf_p += bytes; |
| 832 | else /* not enough print buffer space for all the data */ |
| 833 | break; |
| 834 | |
| 835 | p16++; |
| 836 | } |
| 837 | if (buf_p == buffer) |
| 838 | *buf_p = '\0'; /* nothing was written */ |
| 839 | else |
| 840 | *(buf_p - 1) = '\0'; /* erase the final comma */ |
| 841 | } |
| 842 | |
| 843 | void |
| 844 | htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr, |
| 845 | struct ol_fw_tx_dbg_ppdu_base *record, |
| 846 | int length, int concise) |
| 847 | { |
| 848 | int i; |
| 849 | int record_size; |
| 850 | int num_records; |
| 851 | |
| 852 | record_size = |
| 853 | sizeof(*record) + |
| 854 | hdr->mpdu_bytes_array_len * sizeof(uint16_t) + |
| 855 | hdr->mpdu_msdus_array_len * sizeof(uint8_t) + |
| 856 | hdr->msdu_bytes_array_len * sizeof(uint16_t); |
| 857 | num_records = (length - sizeof(*hdr)) / record_size; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 858 | qdf_print("Tx PPDU log elements:\n"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 859 | |
| 860 | for (i = 0; i < num_records; i++) { |
| 861 | uint16_t start_seq_num; |
| 862 | uint16_t start_pn_lsbs; |
| 863 | uint8_t num_mpdus; |
| 864 | uint16_t peer_id; |
| 865 | uint8_t ext_tid; |
| 866 | uint8_t rate_code; |
| 867 | uint8_t rate_flags; |
| 868 | uint8_t tries; |
| 869 | uint8_t complete; |
| 870 | uint32_t time_enqueue_us; |
| 871 | uint32_t time_completion_us; |
| 872 | uint32_t *msg_word = (uint32_t *) record; |
| 873 | |
| 874 | /* fields used for both concise and complete printouts */ |
| 875 | start_seq_num = |
| 876 | ((*(msg_word + OL_FW_TX_DBG_PPDU_START_SEQ_NUM_16)) & |
| 877 | OL_FW_TX_DBG_PPDU_START_SEQ_NUM_M) >> |
| 878 | OL_FW_TX_DBG_PPDU_START_SEQ_NUM_S; |
| 879 | complete = |
| 880 | ((*(msg_word + OL_FW_TX_DBG_PPDU_COMPLETE_16)) & |
| 881 | OL_FW_TX_DBG_PPDU_COMPLETE_M) >> |
| 882 | OL_FW_TX_DBG_PPDU_COMPLETE_S; |
| 883 | |
| 884 | /* fields used only for complete printouts */ |
| 885 | if (!concise) { |
| 886 | #define BUF_SIZE 80 |
| 887 | char buf[BUF_SIZE]; |
| 888 | uint8_t *p8; |
| 889 | time_enqueue_us = |
| 890 | HTT_TICK_TO_USEC(record->timestamp_enqueue, |
| 891 | hdr->microsec_per_tick); |
| 892 | time_completion_us = |
| 893 | HTT_TICK_TO_USEC(record->timestamp_completion, |
| 894 | hdr->microsec_per_tick); |
| 895 | |
| 896 | start_pn_lsbs = |
| 897 | ((* |
| 898 | (msg_word + |
| 899 | OL_FW_TX_DBG_PPDU_START_PN_LSBS_16)) & |
| 900 | OL_FW_TX_DBG_PPDU_START_PN_LSBS_M) >> |
| 901 | OL_FW_TX_DBG_PPDU_START_PN_LSBS_S; |
| 902 | num_mpdus = |
| 903 | ((*(msg_word + OL_FW_TX_DBG_PPDU_NUM_MPDUS_16))& |
| 904 | OL_FW_TX_DBG_PPDU_NUM_MPDUS_M) >> |
| 905 | OL_FW_TX_DBG_PPDU_NUM_MPDUS_S; |
| 906 | peer_id = |
| 907 | ((*(msg_word + OL_FW_TX_DBG_PPDU_PEER_ID_16)) & |
| 908 | OL_FW_TX_DBG_PPDU_PEER_ID_M) >> |
| 909 | OL_FW_TX_DBG_PPDU_PEER_ID_S; |
| 910 | ext_tid = |
| 911 | ((*(msg_word + OL_FW_TX_DBG_PPDU_EXT_TID_16)) & |
| 912 | OL_FW_TX_DBG_PPDU_EXT_TID_M) >> |
| 913 | OL_FW_TX_DBG_PPDU_EXT_TID_S; |
| 914 | rate_code = |
| 915 | ((*(msg_word + OL_FW_TX_DBG_PPDU_RATE_CODE_16))& |
| 916 | OL_FW_TX_DBG_PPDU_RATE_CODE_M) >> |
| 917 | OL_FW_TX_DBG_PPDU_RATE_CODE_S; |
| 918 | rate_flags = |
| 919 | ((*(msg_word + OL_FW_TX_DBG_PPDU_RATEFLAGS_16))& |
| 920 | OL_FW_TX_DBG_PPDU_RATE_FLAGS_M) >> |
| 921 | OL_FW_TX_DBG_PPDU_RATE_FLAGS_S; |
| 922 | tries = |
| 923 | ((*(msg_word + OL_FW_TX_DBG_PPDU_TRIES_16)) & |
| 924 | OL_FW_TX_DBG_PPDU_TRIES_M) >> |
| 925 | OL_FW_TX_DBG_PPDU_TRIES_S; |
| 926 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 927 | qdf_print(" - PPDU tx to peer %d, TID %d\n", peer_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 928 | ext_tid); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 929 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 930 | (" start seq num= %u, start PN LSBs= %#04x\n", |
| 931 | start_seq_num, start_pn_lsbs); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 932 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 933 | (" PPDU: %d MPDUs, (?) MSDUs, %d bytes\n", |
| 934 | num_mpdus, |
| 935 | /* num_msdus - not yet computed in target */ |
| 936 | record->num_bytes); |
| 937 | if (complete) { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 938 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 939 | (" enqueued: %u, completed: %u usec)\n", |
| 940 | time_enqueue_us, time_completion_us); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 941 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 942 | (" %d tries, last tx used rate %d ", |
| 943 | tries, rate_code); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 944 | qdf_print("on %d MHz chan (flags = %#x)\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 945 | htt_rate_flags_to_mhz |
| 946 | (rate_flags), rate_flags); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 947 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 948 | (" enqueued and acked MPDU bitmaps:\n"); |
| 949 | htt_t2h_tx_ppdu_bitmaps_pr(msg_word + |
| 950 | OL_FW_TX_DBG_PPDU_ENQUEUED_LSBS_16, |
| 951 | msg_word + |
| 952 | OL_FW_TX_DBG_PPDU_BLOCK_ACK_LSBS_16); |
| 953 | } else { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 954 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 955 | (" enqueued: %d us, not yet completed\n", |
| 956 | time_enqueue_us); |
| 957 | } |
| 958 | /* skip the regular msg fields to reach the tail area */ |
| 959 | p8 = (uint8_t *) record; |
| 960 | p8 += sizeof(struct ol_fw_tx_dbg_ppdu_base); |
| 961 | if (hdr->mpdu_bytes_array_len) { |
| 962 | htt_make_u16_list_str((uint32_t *) p8, buf, |
| 963 | BUF_SIZE, |
| 964 | hdr-> |
| 965 | mpdu_bytes_array_len); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 966 | qdf_print(" MPDU bytes: %s\n", buf); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 967 | } |
| 968 | p8 += hdr->mpdu_bytes_array_len * sizeof(uint16_t); |
| 969 | if (hdr->mpdu_msdus_array_len) { |
| 970 | htt_make_u8_list_str((uint32_t *) p8, buf, |
| 971 | BUF_SIZE, |
| 972 | hdr->mpdu_msdus_array_len); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 973 | qdf_print(" MPDU MSDUs: %s\n", buf); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 974 | } |
| 975 | p8 += hdr->mpdu_msdus_array_len * sizeof(uint8_t); |
| 976 | if (hdr->msdu_bytes_array_len) { |
| 977 | htt_make_u16_list_str((uint32_t *) p8, buf, |
| 978 | BUF_SIZE, |
| 979 | hdr-> |
| 980 | msdu_bytes_array_len); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 981 | qdf_print(" MSDU bytes: %s\n", buf); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 982 | } |
| 983 | } else { |
| 984 | /* concise */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 985 | qdf_print("start seq num = %u ", start_seq_num); |
| 986 | qdf_print("enqueued and acked MPDU bitmaps:\n"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 987 | if (complete) { |
| 988 | htt_t2h_tx_ppdu_bitmaps_pr(msg_word + |
| 989 | OL_FW_TX_DBG_PPDU_ENQUEUED_LSBS_16, |
| 990 | msg_word + |
| 991 | OL_FW_TX_DBG_PPDU_BLOCK_ACK_LSBS_16); |
| 992 | } else { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 993 | qdf_print("(not completed)\n"); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 994 | } |
| 995 | } |
| 996 | record = (struct ol_fw_tx_dbg_ppdu_base *) |
| 997 | (((uint8_t *) record) + record_size); |
| 998 | } |
| 999 | } |
| 1000 | |
| 1001 | void htt_t2h_stats_print(uint8_t *stats_data, int concise) |
| 1002 | { |
| 1003 | uint32_t *msg_word = (uint32_t *) stats_data; |
| 1004 | enum htt_dbg_stats_type type; |
| 1005 | enum htt_dbg_stats_status status; |
| 1006 | int length; |
| 1007 | |
| 1008 | type = HTT_T2H_STATS_CONF_TLV_TYPE_GET(*msg_word); |
| 1009 | status = HTT_T2H_STATS_CONF_TLV_STATUS_GET(*msg_word); |
| 1010 | length = HTT_T2H_STATS_CONF_TLV_LENGTH_GET(*msg_word); |
| 1011 | |
| 1012 | /* check that we've been given a valid stats type */ |
| 1013 | if (status == HTT_DBG_STATS_STATUS_SERIES_DONE) { |
| 1014 | return; |
| 1015 | } else if (status == HTT_DBG_STATS_STATUS_INVALID) { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1016 | qdf_print("Target doesn't support stats type %d\n", type); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1017 | return; |
| 1018 | } else if (status == HTT_DBG_STATS_STATUS_ERROR) { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1019 | qdf_print("Target couldn't upload stats type %d (no mem?)\n", |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1020 | type); |
| 1021 | return; |
| 1022 | } |
| 1023 | /* got valid (though perhaps partial) stats - process them */ |
| 1024 | switch (type) { |
| 1025 | case HTT_DBG_STATS_WAL_PDEV_TXRX: |
| 1026 | { |
| 1027 | struct wlan_dbg_stats *wlan_dbg_stats_ptr; |
| 1028 | |
| 1029 | wlan_dbg_stats_ptr = |
| 1030 | (struct wlan_dbg_stats *)(msg_word + 1); |
| 1031 | htt_t2h_stats_pdev_stats_print(wlan_dbg_stats_ptr, |
| 1032 | concise); |
| 1033 | break; |
| 1034 | } |
| 1035 | case HTT_DBG_STATS_RX_REORDER: |
| 1036 | { |
| 1037 | struct rx_reorder_stats *rx_reorder_stats_ptr; |
| 1038 | |
| 1039 | rx_reorder_stats_ptr = |
| 1040 | (struct rx_reorder_stats *)(msg_word + 1); |
| 1041 | htt_t2h_stats_rx_reorder_stats_print |
| 1042 | (rx_reorder_stats_ptr, concise); |
| 1043 | break; |
| 1044 | } |
| 1045 | |
| 1046 | case HTT_DBG_STATS_RX_RATE_INFO: |
| 1047 | { |
| 1048 | wlan_dbg_rx_rate_info_t *rx_phy_info; |
| 1049 | rx_phy_info = |
| 1050 | (wlan_dbg_rx_rate_info_t *) (msg_word + 1); |
| 1051 | |
| 1052 | htt_t2h_stats_rx_rate_stats_print(rx_phy_info, concise); |
| 1053 | |
| 1054 | break; |
| 1055 | } |
| 1056 | case HTT_DBG_STATS_RX_RATE_INFO_V2: |
| 1057 | { |
| 1058 | wlan_dbg_rx_rate_info_v2_t *rx_phy_info; |
| 1059 | rx_phy_info = |
| 1060 | (wlan_dbg_rx_rate_info_v2_t *) (msg_word + 1); |
| 1061 | htt_t2h_stats_rx_rate_stats_print_v2(rx_phy_info, concise); |
| 1062 | break; |
| 1063 | } |
| 1064 | case HTT_DBG_STATS_TX_PPDU_LOG: |
| 1065 | { |
| 1066 | struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr; |
| 1067 | struct ol_fw_tx_dbg_ppdu_base *record; |
| 1068 | |
| 1069 | if (status == HTT_DBG_STATS_STATUS_PARTIAL |
| 1070 | && length == 0) { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1071 | qdf_print |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1072 | ("HTT_DBG_STATS_TX_PPDU_LOG -- length = 0!\n"); |
| 1073 | break; |
| 1074 | } |
| 1075 | hdr = |
| 1076 | (struct ol_fw_tx_dbg_ppdu_msg_hdr *)(msg_word + 1); |
| 1077 | record = (struct ol_fw_tx_dbg_ppdu_base *)(hdr + 1); |
| 1078 | htt_t2h_tx_ppdu_log_print(hdr, record, length, concise); |
| 1079 | } |
| 1080 | break; |
| 1081 | case HTT_DBG_STATS_TX_RATE_INFO: |
| 1082 | { |
| 1083 | wlan_dbg_tx_rate_info_t *tx_rate_info; |
| 1084 | tx_rate_info = |
| 1085 | (wlan_dbg_tx_rate_info_t *) (msg_word + 1); |
| 1086 | |
| 1087 | htt_t2h_stats_tx_rate_stats_print(tx_rate_info, concise); |
| 1088 | |
| 1089 | break; |
| 1090 | } |
| 1091 | case HTT_DBG_STATS_TX_RATE_INFO_V2: |
| 1092 | { |
| 1093 | wlan_dbg_tx_rate_info_v2_t *tx_rate_info; |
| 1094 | tx_rate_info = |
| 1095 | (wlan_dbg_tx_rate_info_v2_t *) (msg_word + 1); |
| 1096 | htt_t2h_stats_tx_rate_stats_print_v2(tx_rate_info, concise); |
| 1097 | break; |
| 1098 | } |
| 1099 | case HTT_DBG_STATS_RX_REMOTE_RING_BUFFER_INFO: |
| 1100 | { |
| 1101 | struct rx_remote_buffer_mgmt_stats *rx_rem_buf; |
| 1102 | |
| 1103 | rx_rem_buf = (struct rx_remote_buffer_mgmt_stats *)(msg_word + 1); |
| 1104 | htt_t2h_stats_rx_rem_buf_stats_print(rx_rem_buf, concise); |
| 1105 | break; |
| 1106 | } |
| 1107 | case HTT_DBG_STATS_TXBF_INFO: |
| 1108 | { |
| 1109 | struct wlan_dbg_txbf_data_stats *txbf_info_buf; |
| 1110 | |
| 1111 | txbf_info_buf = |
| 1112 | (struct wlan_dbg_txbf_data_stats *)(msg_word + 1); |
| 1113 | htt_t2h_stats_txbf_info_buf_stats_print(txbf_info_buf); |
| 1114 | break; |
| 1115 | } |
| 1116 | case HTT_DBG_STATS_SND_INFO: |
| 1117 | { |
| 1118 | struct wlan_dbg_txbf_snd_stats *txbf_snd_buf; |
| 1119 | |
| 1120 | txbf_snd_buf = |
| 1121 | (struct wlan_dbg_txbf_snd_stats *)(msg_word + 1); |
| 1122 | htt_t2h_stats_txbf_snd_buf_stats_print(txbf_snd_buf); |
| 1123 | break; |
| 1124 | } |
| 1125 | case HTT_DBG_STATS_TX_SELFGEN_INFO: |
| 1126 | { |
| 1127 | struct wlan_dbg_tx_selfgen_stats *tx_selfgen_buf; |
| 1128 | |
| 1129 | tx_selfgen_buf = |
| 1130 | (struct wlan_dbg_tx_selfgen_stats *)(msg_word + 1); |
| 1131 | htt_t2h_stats_tx_selfgen_buf_stats_print(tx_selfgen_buf); |
| 1132 | break; |
| 1133 | } |
| 1134 | case HTT_DBG_STATS_ERROR_INFO: |
| 1135 | { |
| 1136 | struct wlan_dbg_wifi2_error_stats *wifi2_error_buf; |
| 1137 | |
| 1138 | wifi2_error_buf = |
| 1139 | (struct wlan_dbg_wifi2_error_stats *)(msg_word + 1); |
| 1140 | htt_t2h_stats_wifi2_error_stats_print(wifi2_error_buf); |
| 1141 | break; |
| 1142 | } |
| 1143 | case HTT_DBG_STATS_TXBF_MUSU_NDPA_PKT: |
| 1144 | { |
| 1145 | struct rx_txbf_musu_ndpa_pkts_stats *rx_musu_ndpa_stats; |
| 1146 | |
| 1147 | rx_musu_ndpa_stats = (struct rx_txbf_musu_ndpa_pkts_stats *) |
| 1148 | (msg_word + 1); |
| 1149 | htt_t2h_rx_musu_ndpa_pkts_stats_print(rx_musu_ndpa_stats); |
| 1150 | break; |
| 1151 | } |
| 1152 | default: |
| 1153 | break; |
| 1154 | } |
| 1155 | } |