Hi Tamizh, Thank you for the patch! Yet something to improve: [auto build test ERROR on ath6kl/ath-next] [also build test ERROR on v4.16-rc6 next-20180323] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Tamizh-chelvam/ath10k-fix-kernel-panic-while-reading-tpc_stats/20180325-093724 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next config: i386-randconfig-h0-03251902 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/net/wireless/ath/ath10k/wmi.c: In function 'ath10k_wmi_event_pdev_tpc_config': >> drivers/net/wireless/ath/ath10k/wmi.c:4465:14: error: 'struct ath10k' has no member named 'debug' complete(&ar->debug.tpc_complete); ^ vim +4465 drivers/net/wireless/ath/ath10k/wmi.c 4315 4316 void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb) 4317 { 4318 u32 i, j, pream_idx, num_tx_chain; 4319 u8 rate_code[WMI_TPC_RATE_MAX], rate_idx; 4320 u16 pream_table[WMI_TPC_PREAM_TABLE_MAX]; 4321 struct wmi_pdev_tpc_config_event *ev; 4322 struct ath10k_tpc_stats *tpc_stats; 4323 4324 ev = (struct wmi_pdev_tpc_config_event *)skb->data; 4325 4326 tpc_stats = kzalloc(sizeof(*tpc_stats), GFP_ATOMIC); 4327 if (!tpc_stats) 4328 goto exit; 4329 4330 /* Create the rate code table based on the chains supported */ 4331 rate_idx = 0; 4332 pream_idx = 0; 4333 4334 /* Fill CCK rate code */ 4335 for (i = 0; i < 4; i++) { 4336 rate_code[rate_idx] = 4337 ATH10K_HW_RATECODE(i, 0, WMI_RATE_PREAMBLE_CCK); 4338 rate_idx++; 4339 } 4340 pream_table[pream_idx] = rate_idx; 4341 pream_idx++; 4342 4343 /* Fill OFDM rate code */ 4344 for (i = 0; i < 8; i++) { 4345 rate_code[rate_idx] = 4346 ATH10K_HW_RATECODE(i, 0, WMI_RATE_PREAMBLE_OFDM); 4347 rate_idx++; 4348 } 4349 pream_table[pream_idx] = rate_idx; 4350 pream_idx++; 4351 4352 num_tx_chain = __le32_to_cpu(ev->num_tx_chain); 4353 4354 if (num_tx_chain > WMI_TPC_TX_N_CHAIN) { 4355 ath10k_warn(ar, "number of tx chain is %d greater than TPC configured tx chain %d\n", 4356 num_tx_chain, WMI_TPC_TX_N_CHAIN); 4357 goto exit; 4358 } 4359 4360 /* Fill HT20 rate code */ 4361 for (i = 0; i < num_tx_chain; i++) { 4362 for (j = 0; j < 8; j++) { 4363 rate_code[rate_idx] = 4364 ATH10K_HW_RATECODE(j, i, WMI_RATE_PREAMBLE_HT); 4365 rate_idx++; 4366 } 4367 } 4368 pream_table[pream_idx] = rate_idx; 4369 pream_idx++; 4370 4371 /* Fill HT40 rate code */ 4372 for (i = 0; i < num_tx_chain; i++) { 4373 for (j = 0; j < 8; j++) { 4374 rate_code[rate_idx] = 4375 ATH10K_HW_RATECODE(j, i, WMI_RATE_PREAMBLE_HT); 4376 rate_idx++; 4377 } 4378 } 4379 pream_table[pream_idx] = rate_idx; 4380 pream_idx++; 4381 4382 /* Fill VHT20 rate code */ 4383 for (i = 0; i < __le32_to_cpu(ev->num_tx_chain); i++) { 4384 for (j = 0; j < 10; j++) { 4385 rate_code[rate_idx] = 4386 ATH10K_HW_RATECODE(j, i, WMI_RATE_PREAMBLE_VHT); 4387 rate_idx++; 4388 } 4389 } 4390 pream_table[pream_idx] = rate_idx; 4391 pream_idx++; 4392 4393 /* Fill VHT40 rate code */ 4394 for (i = 0; i < num_tx_chain; i++) { 4395 for (j = 0; j < 10; j++) { 4396 rate_code[rate_idx] = 4397 ATH10K_HW_RATECODE(j, i, WMI_RATE_PREAMBLE_VHT); 4398 rate_idx++; 4399 } 4400 } 4401 pream_table[pream_idx] = rate_idx; 4402 pream_idx++; 4403 4404 /* Fill VHT80 rate code */ 4405 for (i = 0; i < num_tx_chain; i++) { 4406 for (j = 0; j < 10; j++) { 4407 rate_code[rate_idx] = 4408 ATH10K_HW_RATECODE(j, i, WMI_RATE_PREAMBLE_VHT); 4409 rate_idx++; 4410 } 4411 } 4412 pream_table[pream_idx] = rate_idx; 4413 pream_idx++; 4414 4415 rate_code[rate_idx++] = 4416 ATH10K_HW_RATECODE(0, 0, WMI_RATE_PREAMBLE_CCK); 4417 rate_code[rate_idx++] = 4418 ATH10K_HW_RATECODE(0, 0, WMI_RATE_PREAMBLE_OFDM); 4419 rate_code[rate_idx++] = 4420 ATH10K_HW_RATECODE(0, 0, WMI_RATE_PREAMBLE_CCK); 4421 rate_code[rate_idx++] = 4422 ATH10K_HW_RATECODE(0, 0, WMI_RATE_PREAMBLE_OFDM); 4423 rate_code[rate_idx++] = 4424 ATH10K_HW_RATECODE(0, 0, WMI_RATE_PREAMBLE_OFDM); 4425 4426 pream_table[pream_idx] = ATH10K_TPC_PREAM_TABLE_END; 4427 4428 tpc_stats->chan_freq = __le32_to_cpu(ev->chan_freq); 4429 tpc_stats->phy_mode = __le32_to_cpu(ev->phy_mode); 4430 tpc_stats->ctl = __le32_to_cpu(ev->ctl); 4431 tpc_stats->reg_domain = __le32_to_cpu(ev->reg_domain); 4432 tpc_stats->twice_antenna_gain = a_sle32_to_cpu(ev->twice_antenna_gain); 4433 tpc_stats->twice_antenna_reduction = 4434 __le32_to_cpu(ev->twice_antenna_reduction); 4435 tpc_stats->power_limit = __le32_to_cpu(ev->power_limit); 4436 tpc_stats->twice_max_rd_power = __le32_to_cpu(ev->twice_max_rd_power); 4437 tpc_stats->num_tx_chain = __le32_to_cpu(ev->num_tx_chain); 4438 tpc_stats->rate_max = __le32_to_cpu(ev->rate_max); 4439 4440 ath10k_tpc_config_disp_tables(ar, ev, tpc_stats, 4441 rate_code, pream_table, 4442 WMI_TPC_TABLE_TYPE_CDD); 4443 ath10k_tpc_config_disp_tables(ar, ev, tpc_stats, 4444 rate_code, pream_table, 4445 WMI_TPC_TABLE_TYPE_STBC); 4446 ath10k_tpc_config_disp_tables(ar, ev, tpc_stats, 4447 rate_code, pream_table, 4448 WMI_TPC_TABLE_TYPE_TXBF); 4449 4450 ath10k_debug_tpc_stats_process(ar, tpc_stats); 4451 4452 ath10k_dbg(ar, ATH10K_DBG_WMI, 4453 "wmi event tpc config channel %d mode %d ctl %d regd %d gain %d %d limit %d max_power %d tx_chanins %d rates %d\n", 4454 __le32_to_cpu(ev->chan_freq), 4455 __le32_to_cpu(ev->phy_mode), 4456 __le32_to_cpu(ev->ctl), 4457 __le32_to_cpu(ev->reg_domain), 4458 a_sle32_to_cpu(ev->twice_antenna_gain), 4459 __le32_to_cpu(ev->twice_antenna_reduction), 4460 __le32_to_cpu(ev->power_limit), 4461 __le32_to_cpu(ev->twice_max_rd_power) / 2, 4462 __le32_to_cpu(ev->num_tx_chain), 4463 __le32_to_cpu(ev->rate_max)); 4464 exit: > 4465 complete(&ar->debug.tpc_complete); 4466 } 4467 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip