2019-11-23 15:58:40 +08:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
2022-03-23 17:14:17 +08:00
|
|
|
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
2019-11-23 15:58:40 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/slab.h>
|
|
|
|
#include <linux/remoteproc.h>
|
|
|
|
#include <linux/firmware.h>
|
2020-10-15 21:15:01 +08:00
|
|
|
#include <linux/of.h>
|
2022-03-23 17:14:17 +08:00
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
#include "core.h"
|
|
|
|
#include "dp_tx.h"
|
2019-11-28 16:21:58 +08:00
|
|
|
#include "dp_rx.h"
|
2019-11-23 15:58:40 +08:00
|
|
|
#include "debug.h"
|
2020-05-08 10:55:44 +08:00
|
|
|
#include "hif.h"
|
2020-12-12 01:35:50 +08:00
|
|
|
#include "wow.h"
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
unsigned int ath11k_debug_mask;
|
2020-08-13 17:04:20 +08:00
|
|
|
EXPORT_SYMBOL(ath11k_debug_mask);
|
2019-11-23 15:58:40 +08:00
|
|
|
module_param_named(debug_mask, ath11k_debug_mask, uint, 0644);
|
|
|
|
MODULE_PARM_DESC(debug_mask, "Debugging mask");
|
|
|
|
|
2020-09-08 14:32:21 +08:00
|
|
|
static unsigned int ath11k_crypto_mode;
|
|
|
|
module_param_named(crypto_mode, ath11k_crypto_mode, uint, 0644);
|
|
|
|
MODULE_PARM_DESC(crypto_mode, "crypto mode: 0-hardware, 1-software");
|
|
|
|
|
|
|
|
/* frame mode values are mapped as per enum ath11k_hw_txrx_mode */
|
|
|
|
unsigned int ath11k_frame_mode = ATH11K_HW_TXRX_NATIVE_WIFI;
|
|
|
|
module_param_named(frame_mode, ath11k_frame_mode, uint, 0644);
|
|
|
|
MODULE_PARM_DESC(frame_mode,
|
|
|
|
"Datapath frame mode (0: raw, 1: native wifi (default), 2: ethernet)");
|
|
|
|
|
2020-06-16 22:00:45 +08:00
|
|
|
static const struct ath11k_hw_params ath11k_hw_params[] = {
|
|
|
|
{
|
|
|
|
.hw_rev = ATH11K_HW_IPQ8074,
|
|
|
|
.name = "ipq8074 hw2.0",
|
|
|
|
.fw = {
|
2020-06-16 22:00:50 +08:00
|
|
|
.dir = "IPQ8074/hw2.0",
|
2020-06-16 22:00:54 +08:00
|
|
|
.board_size = 256 * 1024,
|
2021-09-28 17:05:39 +08:00
|
|
|
.cal_offset = 128 * 1024,
|
2020-06-16 22:00:45 +08:00
|
|
|
},
|
2020-06-16 22:00:46 +08:00
|
|
|
.max_radios = 3,
|
2020-06-16 22:00:48 +08:00
|
|
|
.bdf_addr = 0x4B0C0000,
|
2020-06-16 22:00:47 +08:00
|
|
|
.hw_ops = &ipq8074_ops,
|
2020-08-13 17:04:19 +08:00
|
|
|
.ring_mask = &ath11k_hw_ring_mask_ipq8074,
|
2020-08-14 15:10:29 +08:00
|
|
|
.internal_sleep_clock = false,
|
2020-08-17 18:31:46 +08:00
|
|
|
.regs = &ipq8074_regs,
|
2021-02-16 15:15:48 +08:00
|
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074,
|
2020-08-17 18:31:47 +08:00
|
|
|
.host_ce_config = ath11k_host_ce_config_ipq8074,
|
|
|
|
.ce_count = 12,
|
2020-09-08 15:55:35 +08:00
|
|
|
.target_ce_config = ath11k_target_ce_config_wlan_ipq8074,
|
|
|
|
.target_ce_count = 11,
|
|
|
|
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq8074,
|
|
|
|
.svc_to_ce_map_len = 21,
|
2021-12-21 00:11:09 +08:00
|
|
|
.rfkill_pin = 0,
|
|
|
|
.rfkill_cfg = 0,
|
|
|
|
.rfkill_on_level = 0,
|
2020-08-17 18:31:50 +08:00
|
|
|
.single_pdev_only = false,
|
2020-08-17 18:31:52 +08:00
|
|
|
.rxdma1_enable = true,
|
2020-08-17 18:31:53 +08:00
|
|
|
.num_rxmda_per_pdev = 1,
|
|
|
|
.rx_mac_buf_ring = false,
|
2020-08-17 18:31:53 +08:00
|
|
|
.vdev_start_delay = false,
|
2020-08-17 18:31:54 +08:00
|
|
|
.htt_peer_map_v2 = true,
|
2021-09-24 21:52:46 +08:00
|
|
|
|
|
|
|
.spectral = {
|
|
|
|
.fft_sz = 2,
|
|
|
|
/* HW bug, expected BIN size is 2 bytes but HW report as 4 bytes.
|
|
|
|
* so added pad size as 2 bytes to compensate the BIN size
|
|
|
|
*/
|
|
|
|
.fft_pad_sz = 2,
|
2021-09-24 21:52:46 +08:00
|
|
|
.summary_pad_sz = 0,
|
|
|
|
.fft_hdr_len = 16,
|
|
|
|
.max_fft_bins = 512,
|
2021-09-24 21:52:46 +08:00
|
|
|
},
|
2020-09-30 01:15:31 +08:00
|
|
|
|
|
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
BIT(NL80211_IFTYPE_AP) |
|
|
|
|
BIT(NL80211_IFTYPE_MESH_POINT),
|
2020-09-30 01:15:33 +08:00
|
|
|
.supports_monitor = true,
|
2021-12-08 16:44:00 +08:00
|
|
|
.full_monitor_mode = false,
|
2020-10-01 17:34:44 +08:00
|
|
|
.supports_shadow_regs = false,
|
2020-10-01 17:34:49 +08:00
|
|
|
.idle_ps = false,
|
2021-11-08 20:38:26 +08:00
|
|
|
.supports_sta_ps = false,
|
2020-10-16 23:28:31 +08:00
|
|
|
.cold_boot_calib = true,
|
2021-12-13 17:53:08 +08:00
|
|
|
.fw_mem_mode = 0,
|
|
|
|
.num_vdevs = 16 + 1,
|
|
|
|
.num_peers = 512,
|
2020-12-12 01:35:50 +08:00
|
|
|
.supports_suspend = false,
|
2021-02-16 15:16:23 +08:00
|
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
.supports_regdb = false,
|
2021-05-31 22:41:28 +08:00
|
|
|
.fix_l1ss = true,
|
2021-11-15 17:50:52 +08:00
|
|
|
.credit_flow = false,
|
2021-10-11 14:33:09 +08:00
|
|
|
.max_tx_ring = DP_TCL_NUM_RING_MAX,
|
2021-10-20 16:59:06 +08:00
|
|
|
.hal_params = &ath11k_hw_hal_params_ipq8074,
|
2021-10-28 15:46:28 +08:00
|
|
|
.supports_dynamic_smps_6ghz = false,
|
2021-11-12 17:01:26 +08:00
|
|
|
.alloc_cacheable_memory = true,
|
2021-12-18 02:27:21 +08:00
|
|
|
.supports_rssi_stats = false,
|
2021-12-20 20:10:53 +08:00
|
|
|
.fw_wmi_diag_event = false,
|
2022-01-19 12:13:55 +08:00
|
|
|
.current_cc_support = false,
|
2022-02-20 22:07:39 +08:00
|
|
|
.dbr_debug_support = true,
|
2021-10-11 13:56:02 +08:00
|
|
|
.global_reset = false,
|
2022-04-12 21:15:50 +08:00
|
|
|
.bios_sar_capa = NULL,
|
2022-04-30 01:04:55 +08:00
|
|
|
.m3_fw_support = false,
|
|
|
|
.fixed_bdf_addr = true,
|
|
|
|
.fixed_mem_region = true,
|
|
|
|
.static_window_map = false,
|
2022-04-30 01:04:56 +08:00
|
|
|
.hybrid_bus_type = false,
|
2022-04-30 01:04:57 +08:00
|
|
|
.dp_window_idx = 0,
|
|
|
|
.ce_window_idx = 0,
|
2022-04-30 01:04:59 +08:00
|
|
|
.fixed_fw_mem = false,
|
2019-11-23 15:58:40 +08:00
|
|
|
},
|
2020-09-08 15:55:36 +08:00
|
|
|
{
|
|
|
|
.hw_rev = ATH11K_HW_IPQ6018_HW10,
|
|
|
|
.name = "ipq6018 hw1.0",
|
|
|
|
.fw = {
|
|
|
|
.dir = "IPQ6018/hw1.0",
|
|
|
|
.board_size = 256 * 1024,
|
2021-09-28 17:05:39 +08:00
|
|
|
.cal_offset = 128 * 1024,
|
2020-09-08 15:55:36 +08:00
|
|
|
},
|
|
|
|
.max_radios = 2,
|
|
|
|
.bdf_addr = 0x4ABC0000,
|
|
|
|
.hw_ops = &ipq6018_ops,
|
|
|
|
.ring_mask = &ath11k_hw_ring_mask_ipq8074,
|
|
|
|
.internal_sleep_clock = false,
|
|
|
|
.regs = &ipq8074_regs,
|
2021-02-16 15:15:48 +08:00
|
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074,
|
2020-09-08 15:55:36 +08:00
|
|
|
.host_ce_config = ath11k_host_ce_config_ipq8074,
|
|
|
|
.ce_count = 12,
|
|
|
|
.target_ce_config = ath11k_target_ce_config_wlan_ipq8074,
|
|
|
|
.target_ce_count = 11,
|
|
|
|
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq6018,
|
|
|
|
.svc_to_ce_map_len = 19,
|
2021-12-21 00:11:09 +08:00
|
|
|
.rfkill_pin = 0,
|
|
|
|
.rfkill_cfg = 0,
|
|
|
|
.rfkill_on_level = 0,
|
2020-09-08 15:55:36 +08:00
|
|
|
.single_pdev_only = false,
|
|
|
|
.rxdma1_enable = true,
|
|
|
|
.num_rxmda_per_pdev = 1,
|
|
|
|
.rx_mac_buf_ring = false,
|
|
|
|
.vdev_start_delay = false,
|
|
|
|
.htt_peer_map_v2 = true,
|
2021-09-24 21:52:46 +08:00
|
|
|
|
|
|
|
.spectral = {
|
|
|
|
.fft_sz = 4,
|
|
|
|
.fft_pad_sz = 0,
|
2021-09-24 21:52:46 +08:00
|
|
|
.summary_pad_sz = 0,
|
|
|
|
.fft_hdr_len = 16,
|
|
|
|
.max_fft_bins = 512,
|
2021-09-24 21:52:46 +08:00
|
|
|
},
|
2020-09-30 01:15:31 +08:00
|
|
|
|
|
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
BIT(NL80211_IFTYPE_AP) |
|
|
|
|
BIT(NL80211_IFTYPE_MESH_POINT),
|
2020-09-30 01:15:33 +08:00
|
|
|
.supports_monitor = true,
|
2021-12-08 16:44:00 +08:00
|
|
|
.full_monitor_mode = false,
|
2020-10-01 17:34:44 +08:00
|
|
|
.supports_shadow_regs = false,
|
2020-10-01 17:34:49 +08:00
|
|
|
.idle_ps = false,
|
2021-11-08 20:38:26 +08:00
|
|
|
.supports_sta_ps = false,
|
2020-10-16 23:28:31 +08:00
|
|
|
.cold_boot_calib = true,
|
2021-12-13 17:53:08 +08:00
|
|
|
.fw_mem_mode = 0,
|
|
|
|
.num_vdevs = 16 + 1,
|
|
|
|
.num_peers = 512,
|
2020-12-12 01:35:50 +08:00
|
|
|
.supports_suspend = false,
|
2021-02-16 15:16:23 +08:00
|
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
.supports_regdb = false,
|
2021-05-31 22:41:28 +08:00
|
|
|
.fix_l1ss = true,
|
2021-11-15 17:50:52 +08:00
|
|
|
.credit_flow = false,
|
2021-10-11 14:33:09 +08:00
|
|
|
.max_tx_ring = DP_TCL_NUM_RING_MAX,
|
2021-10-20 16:59:06 +08:00
|
|
|
.hal_params = &ath11k_hw_hal_params_ipq8074,
|
2021-10-28 15:46:28 +08:00
|
|
|
.supports_dynamic_smps_6ghz = false,
|
2021-11-12 17:01:26 +08:00
|
|
|
.alloc_cacheable_memory = true,
|
2021-12-18 02:27:21 +08:00
|
|
|
.supports_rssi_stats = false,
|
2021-12-20 20:10:53 +08:00
|
|
|
.fw_wmi_diag_event = false,
|
2022-01-19 12:13:55 +08:00
|
|
|
.current_cc_support = false,
|
2022-02-20 22:07:39 +08:00
|
|
|
.dbr_debug_support = true,
|
2021-10-11 13:56:02 +08:00
|
|
|
.global_reset = false,
|
2022-04-12 21:15:50 +08:00
|
|
|
.bios_sar_capa = NULL,
|
2022-04-30 01:04:55 +08:00
|
|
|
.m3_fw_support = false,
|
|
|
|
.fixed_bdf_addr = true,
|
|
|
|
.fixed_mem_region = true,
|
|
|
|
.static_window_map = false,
|
2022-04-30 01:04:56 +08:00
|
|
|
.hybrid_bus_type = false,
|
2022-04-30 01:04:57 +08:00
|
|
|
.dp_window_idx = 0,
|
|
|
|
.ce_window_idx = 0,
|
2022-04-30 01:04:59 +08:00
|
|
|
.fixed_fw_mem = false,
|
2020-09-08 15:55:36 +08:00
|
|
|
},
|
2020-08-13 17:04:18 +08:00
|
|
|
{
|
|
|
|
.name = "qca6390 hw2.0",
|
|
|
|
.hw_rev = ATH11K_HW_QCA6390_HW20,
|
|
|
|
.fw = {
|
|
|
|
.dir = "QCA6390/hw2.0",
|
|
|
|
.board_size = 256 * 1024,
|
2021-09-28 17:05:39 +08:00
|
|
|
.cal_offset = 128 * 1024,
|
2020-08-13 17:04:18 +08:00
|
|
|
},
|
|
|
|
.max_radios = 3,
|
|
|
|
.bdf_addr = 0x4B0C0000,
|
|
|
|
.hw_ops = &qca6390_ops,
|
2020-08-17 18:31:52 +08:00
|
|
|
.ring_mask = &ath11k_hw_ring_mask_qca6390,
|
2020-08-14 15:10:29 +08:00
|
|
|
.internal_sleep_clock = true,
|
2020-08-17 18:31:46 +08:00
|
|
|
.regs = &qca6390_regs,
|
2021-02-16 15:15:48 +08:00
|
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390,
|
2020-08-17 18:31:47 +08:00
|
|
|
.host_ce_config = ath11k_host_ce_config_qca6390,
|
|
|
|
.ce_count = 9,
|
2020-09-08 15:55:35 +08:00
|
|
|
.target_ce_config = ath11k_target_ce_config_wlan_qca6390,
|
|
|
|
.target_ce_count = 9,
|
|
|
|
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390,
|
|
|
|
.svc_to_ce_map_len = 14,
|
2021-12-21 00:11:09 +08:00
|
|
|
.rfkill_pin = 48,
|
|
|
|
.rfkill_cfg = 0,
|
|
|
|
.rfkill_on_level = 1,
|
2020-08-17 18:31:50 +08:00
|
|
|
.single_pdev_only = true,
|
2020-08-17 18:31:52 +08:00
|
|
|
.rxdma1_enable = false,
|
2020-08-17 18:31:53 +08:00
|
|
|
.num_rxmda_per_pdev = 2,
|
|
|
|
.rx_mac_buf_ring = true,
|
2020-08-17 18:31:53 +08:00
|
|
|
.vdev_start_delay = true,
|
2020-08-17 18:31:54 +08:00
|
|
|
.htt_peer_map_v2 = false,
|
2021-09-24 21:52:46 +08:00
|
|
|
|
|
|
|
.spectral = {
|
|
|
|
.fft_sz = 0,
|
|
|
|
.fft_pad_sz = 0,
|
2021-09-24 21:52:46 +08:00
|
|
|
.summary_pad_sz = 0,
|
|
|
|
.fft_hdr_len = 0,
|
|
|
|
.max_fft_bins = 0,
|
2021-09-24 21:52:46 +08:00
|
|
|
},
|
2020-09-30 01:15:31 +08:00
|
|
|
|
|
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
BIT(NL80211_IFTYPE_AP),
|
2020-09-30 01:15:33 +08:00
|
|
|
.supports_monitor = false,
|
2021-12-08 16:44:00 +08:00
|
|
|
.full_monitor_mode = false,
|
2020-10-01 17:34:44 +08:00
|
|
|
.supports_shadow_regs = true,
|
2020-10-01 17:34:49 +08:00
|
|
|
.idle_ps = true,
|
2021-11-08 20:38:26 +08:00
|
|
|
.supports_sta_ps = true,
|
2020-10-16 23:28:31 +08:00
|
|
|
.cold_boot_calib = false,
|
2021-12-13 17:53:08 +08:00
|
|
|
.fw_mem_mode = 0,
|
|
|
|
.num_vdevs = 16 + 1,
|
|
|
|
.num_peers = 512,
|
2020-12-12 01:35:50 +08:00
|
|
|
.supports_suspend = true,
|
2021-02-16 15:16:23 +08:00
|
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
|
2022-03-21 19:03:29 +08:00
|
|
|
.supports_regdb = false,
|
2021-05-31 22:41:28 +08:00
|
|
|
.fix_l1ss = true,
|
2021-11-15 17:50:52 +08:00
|
|
|
.credit_flow = true,
|
2021-10-11 14:33:09 +08:00
|
|
|
.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
|
2021-10-20 16:59:06 +08:00
|
|
|
.hal_params = &ath11k_hw_hal_params_qca6390,
|
2021-10-28 15:46:28 +08:00
|
|
|
.supports_dynamic_smps_6ghz = false,
|
2021-11-12 17:01:26 +08:00
|
|
|
.alloc_cacheable_memory = false,
|
2021-12-18 02:27:21 +08:00
|
|
|
.supports_rssi_stats = true,
|
2021-12-20 20:10:53 +08:00
|
|
|
.fw_wmi_diag_event = true,
|
2022-01-19 12:13:55 +08:00
|
|
|
.current_cc_support = true,
|
2022-02-20 22:07:39 +08:00
|
|
|
.dbr_debug_support = false,
|
2021-10-11 13:56:02 +08:00
|
|
|
.global_reset = true,
|
2022-04-12 21:15:50 +08:00
|
|
|
.bios_sar_capa = NULL,
|
2022-04-30 01:04:55 +08:00
|
|
|
.m3_fw_support = true,
|
|
|
|
.fixed_bdf_addr = false,
|
|
|
|
.fixed_mem_region = false,
|
|
|
|
.static_window_map = false,
|
2022-04-30 01:04:56 +08:00
|
|
|
.hybrid_bus_type = false,
|
2022-04-30 01:04:57 +08:00
|
|
|
.dp_window_idx = 0,
|
|
|
|
.ce_window_idx = 0,
|
2022-04-30 01:04:59 +08:00
|
|
|
.fixed_fw_mem = false,
|
2020-08-13 17:04:18 +08:00
|
|
|
},
|
2021-02-16 15:16:08 +08:00
|
|
|
{
|
|
|
|
.name = "qcn9074 hw1.0",
|
|
|
|
.hw_rev = ATH11K_HW_QCN9074_HW10,
|
|
|
|
.fw = {
|
|
|
|
.dir = "QCN9074/hw1.0",
|
|
|
|
.board_size = 256 * 1024,
|
2021-09-28 17:05:39 +08:00
|
|
|
.cal_offset = 128 * 1024,
|
2021-02-16 15:16:08 +08:00
|
|
|
},
|
|
|
|
.max_radios = 1,
|
|
|
|
.single_pdev_only = false,
|
|
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074,
|
2021-02-16 15:16:22 +08:00
|
|
|
.hw_ops = &qcn9074_ops,
|
2021-02-16 15:16:24 +08:00
|
|
|
.ring_mask = &ath11k_hw_ring_mask_qcn9074,
|
2021-02-16 15:16:22 +08:00
|
|
|
.internal_sleep_clock = false,
|
|
|
|
.regs = &qcn9074_regs,
|
2021-02-16 15:16:23 +08:00
|
|
|
.host_ce_config = ath11k_host_ce_config_qcn9074,
|
|
|
|
.ce_count = 6,
|
|
|
|
.target_ce_config = ath11k_target_ce_config_wlan_qcn9074,
|
|
|
|
.target_ce_count = 9,
|
|
|
|
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qcn9074,
|
|
|
|
.svc_to_ce_map_len = 18,
|
2021-12-21 00:11:09 +08:00
|
|
|
.rfkill_pin = 0,
|
|
|
|
.rfkill_cfg = 0,
|
|
|
|
.rfkill_on_level = 0,
|
2021-02-16 15:16:22 +08:00
|
|
|
.rxdma1_enable = true,
|
|
|
|
.num_rxmda_per_pdev = 1,
|
|
|
|
.rx_mac_buf_ring = false,
|
|
|
|
.vdev_start_delay = false,
|
|
|
|
.htt_peer_map_v2 = true,
|
2021-09-24 21:52:46 +08:00
|
|
|
|
|
|
|
.spectral = {
|
2021-09-24 21:52:46 +08:00
|
|
|
.fft_sz = 2,
|
2021-09-24 21:52:46 +08:00
|
|
|
.fft_pad_sz = 0,
|
2021-09-24 21:52:46 +08:00
|
|
|
.summary_pad_sz = 16,
|
|
|
|
.fft_hdr_len = 24,
|
|
|
|
.max_fft_bins = 1024,
|
2021-09-24 21:52:46 +08:00
|
|
|
},
|
|
|
|
|
2021-02-16 15:16:22 +08:00
|
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
BIT(NL80211_IFTYPE_AP) |
|
|
|
|
BIT(NL80211_IFTYPE_MESH_POINT),
|
|
|
|
.supports_monitor = true,
|
2021-12-08 16:44:00 +08:00
|
|
|
.full_monitor_mode = true,
|
2021-02-16 15:16:22 +08:00
|
|
|
.supports_shadow_regs = false,
|
|
|
|
.idle_ps = false,
|
2021-11-08 20:38:26 +08:00
|
|
|
.supports_sta_ps = false,
|
2021-02-16 15:16:22 +08:00
|
|
|
.cold_boot_calib = false,
|
2021-12-13 17:53:08 +08:00
|
|
|
.fw_mem_mode = 2,
|
|
|
|
.num_vdevs = 8,
|
|
|
|
.num_peers = 128,
|
2021-02-16 15:16:22 +08:00
|
|
|
.supports_suspend = false,
|
2021-02-16 15:16:23 +08:00
|
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
.supports_regdb = false,
|
2021-05-31 22:41:28 +08:00
|
|
|
.fix_l1ss = true,
|
2021-11-15 17:50:52 +08:00
|
|
|
.credit_flow = false,
|
2021-10-11 14:33:09 +08:00
|
|
|
.max_tx_ring = DP_TCL_NUM_RING_MAX,
|
2021-10-20 16:59:06 +08:00
|
|
|
.hal_params = &ath11k_hw_hal_params_ipq8074,
|
2021-10-28 15:46:28 +08:00
|
|
|
.supports_dynamic_smps_6ghz = true,
|
2021-11-12 17:01:26 +08:00
|
|
|
.alloc_cacheable_memory = true,
|
2021-12-18 02:27:21 +08:00
|
|
|
.supports_rssi_stats = false,
|
2021-12-20 20:10:53 +08:00
|
|
|
.fw_wmi_diag_event = false,
|
2022-01-19 12:13:55 +08:00
|
|
|
.current_cc_support = false,
|
2022-02-20 22:07:39 +08:00
|
|
|
.dbr_debug_support = true,
|
2021-10-11 13:56:02 +08:00
|
|
|
.global_reset = false,
|
2022-04-12 21:15:50 +08:00
|
|
|
.bios_sar_capa = NULL,
|
2022-04-30 01:04:55 +08:00
|
|
|
.m3_fw_support = true,
|
|
|
|
.fixed_bdf_addr = false,
|
|
|
|
.fixed_mem_region = false,
|
|
|
|
.static_window_map = true,
|
2022-04-30 01:04:56 +08:00
|
|
|
.hybrid_bus_type = false,
|
2022-04-30 01:04:57 +08:00
|
|
|
.dp_window_idx = 3,
|
|
|
|
.ce_window_idx = 2,
|
2022-04-30 01:04:59 +08:00
|
|
|
.fixed_fw_mem = false,
|
2021-02-16 15:16:08 +08:00
|
|
|
},
|
2021-05-31 22:41:28 +08:00
|
|
|
{
|
|
|
|
.name = "wcn6855 hw2.0",
|
|
|
|
.hw_rev = ATH11K_HW_WCN6855_HW20,
|
|
|
|
.fw = {
|
|
|
|
.dir = "WCN6855/hw2.0",
|
|
|
|
.board_size = 256 * 1024,
|
2021-09-28 17:05:39 +08:00
|
|
|
.cal_offset = 128 * 1024,
|
2021-05-31 22:41:28 +08:00
|
|
|
},
|
|
|
|
.max_radios = 3,
|
|
|
|
.bdf_addr = 0x4B0C0000,
|
|
|
|
.hw_ops = &wcn6855_ops,
|
|
|
|
.ring_mask = &ath11k_hw_ring_mask_qca6390,
|
|
|
|
.internal_sleep_clock = true,
|
|
|
|
.regs = &wcn6855_regs,
|
|
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390,
|
|
|
|
.host_ce_config = ath11k_host_ce_config_qca6390,
|
|
|
|
.ce_count = 9,
|
|
|
|
.target_ce_config = ath11k_target_ce_config_wlan_qca6390,
|
|
|
|
.target_ce_count = 9,
|
|
|
|
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390,
|
|
|
|
.svc_to_ce_map_len = 14,
|
2021-12-21 00:11:09 +08:00
|
|
|
.rfkill_pin = 0,
|
|
|
|
.rfkill_cfg = 0,
|
|
|
|
.rfkill_on_level = 0,
|
2021-05-31 22:41:28 +08:00
|
|
|
.single_pdev_only = true,
|
|
|
|
.rxdma1_enable = false,
|
|
|
|
.num_rxmda_per_pdev = 2,
|
|
|
|
.rx_mac_buf_ring = true,
|
2021-11-29 10:56:12 +08:00
|
|
|
.vdev_start_delay = true,
|
|
|
|
.htt_peer_map_v2 = false,
|
|
|
|
|
|
|
|
.spectral = {
|
|
|
|
.fft_sz = 0,
|
|
|
|
.fft_pad_sz = 0,
|
|
|
|
.summary_pad_sz = 0,
|
|
|
|
.fft_hdr_len = 0,
|
|
|
|
.max_fft_bins = 0,
|
|
|
|
},
|
|
|
|
|
|
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
BIT(NL80211_IFTYPE_AP),
|
|
|
|
.supports_monitor = false,
|
2021-12-08 16:44:00 +08:00
|
|
|
.full_monitor_mode = false,
|
2021-11-29 10:56:12 +08:00
|
|
|
.supports_shadow_regs = true,
|
|
|
|
.idle_ps = true,
|
|
|
|
.supports_sta_ps = true,
|
|
|
|
.cold_boot_calib = false,
|
2021-12-13 17:53:08 +08:00
|
|
|
.fw_mem_mode = 0,
|
|
|
|
.num_vdevs = 16 + 1,
|
|
|
|
.num_peers = 512,
|
2021-11-29 10:56:12 +08:00
|
|
|
.supports_suspend = true,
|
|
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
.supports_regdb = true,
|
2021-11-29 10:56:12 +08:00
|
|
|
.fix_l1ss = false,
|
|
|
|
.credit_flow = true,
|
|
|
|
.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
|
|
|
|
.hal_params = &ath11k_hw_hal_params_qca6390,
|
|
|
|
.supports_dynamic_smps_6ghz = false,
|
|
|
|
.alloc_cacheable_memory = false,
|
2021-12-18 02:27:21 +08:00
|
|
|
.supports_rssi_stats = true,
|
2021-12-20 20:10:53 +08:00
|
|
|
.fw_wmi_diag_event = true,
|
2022-01-19 12:13:55 +08:00
|
|
|
.current_cc_support = true,
|
2022-02-20 22:07:39 +08:00
|
|
|
.dbr_debug_support = false,
|
2021-10-11 13:56:02 +08:00
|
|
|
.global_reset = true,
|
2022-04-12 21:15:50 +08:00
|
|
|
.bios_sar_capa = &ath11k_hw_sar_capa_wcn6855,
|
2022-04-30 01:04:55 +08:00
|
|
|
.m3_fw_support = true,
|
|
|
|
.fixed_bdf_addr = false,
|
|
|
|
.fixed_mem_region = false,
|
|
|
|
.static_window_map = false,
|
2022-04-30 01:04:56 +08:00
|
|
|
.hybrid_bus_type = false,
|
2022-04-30 01:04:57 +08:00
|
|
|
.dp_window_idx = 0,
|
|
|
|
.ce_window_idx = 0,
|
2022-04-30 01:04:59 +08:00
|
|
|
.fixed_fw_mem = false,
|
2021-11-29 10:56:12 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.name = "wcn6855 hw2.1",
|
|
|
|
.hw_rev = ATH11K_HW_WCN6855_HW21,
|
|
|
|
.fw = {
|
|
|
|
.dir = "WCN6855/hw2.1",
|
|
|
|
.board_size = 256 * 1024,
|
|
|
|
.cal_offset = 128 * 1024,
|
|
|
|
},
|
|
|
|
.max_radios = 3,
|
|
|
|
.bdf_addr = 0x4B0C0000,
|
|
|
|
.hw_ops = &wcn6855_ops,
|
|
|
|
.ring_mask = &ath11k_hw_ring_mask_qca6390,
|
|
|
|
.internal_sleep_clock = true,
|
|
|
|
.regs = &wcn6855_regs,
|
|
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCA6390,
|
|
|
|
.host_ce_config = ath11k_host_ce_config_qca6390,
|
|
|
|
.ce_count = 9,
|
|
|
|
.target_ce_config = ath11k_target_ce_config_wlan_qca6390,
|
|
|
|
.target_ce_count = 9,
|
|
|
|
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390,
|
|
|
|
.svc_to_ce_map_len = 14,
|
2021-12-21 00:11:09 +08:00
|
|
|
.rfkill_pin = 0,
|
|
|
|
.rfkill_cfg = 0,
|
|
|
|
.rfkill_on_level = 0,
|
2021-11-29 10:56:12 +08:00
|
|
|
.single_pdev_only = true,
|
|
|
|
.rxdma1_enable = false,
|
|
|
|
.num_rxmda_per_pdev = 2,
|
|
|
|
.rx_mac_buf_ring = true,
|
2021-05-31 22:41:28 +08:00
|
|
|
.vdev_start_delay = true,
|
|
|
|
.htt_peer_map_v2 = false,
|
2021-09-24 21:52:46 +08:00
|
|
|
|
|
|
|
.spectral = {
|
|
|
|
.fft_sz = 0,
|
|
|
|
.fft_pad_sz = 0,
|
2021-09-24 21:52:46 +08:00
|
|
|
.summary_pad_sz = 0,
|
|
|
|
.fft_hdr_len = 0,
|
|
|
|
.max_fft_bins = 0,
|
2021-09-24 21:52:46 +08:00
|
|
|
},
|
2021-05-31 22:41:28 +08:00
|
|
|
|
|
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
BIT(NL80211_IFTYPE_AP),
|
|
|
|
.supports_monitor = false,
|
|
|
|
.supports_shadow_regs = true,
|
|
|
|
.idle_ps = true,
|
2021-11-08 20:38:26 +08:00
|
|
|
.supports_sta_ps = true,
|
2021-05-31 22:41:28 +08:00
|
|
|
.cold_boot_calib = false,
|
2021-12-13 17:53:08 +08:00
|
|
|
.fw_mem_mode = 0,
|
|
|
|
.num_vdevs = 16 + 1,
|
|
|
|
.num_peers = 512,
|
2021-05-31 22:41:28 +08:00
|
|
|
.supports_suspend = true,
|
|
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
.supports_regdb = true,
|
2021-05-31 22:41:28 +08:00
|
|
|
.fix_l1ss = false,
|
2021-11-15 17:50:52 +08:00
|
|
|
.credit_flow = true,
|
2021-10-11 14:33:09 +08:00
|
|
|
.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
|
2021-10-20 16:59:06 +08:00
|
|
|
.hal_params = &ath11k_hw_hal_params_qca6390,
|
2021-10-28 15:46:28 +08:00
|
|
|
.supports_dynamic_smps_6ghz = false,
|
2021-11-12 17:01:26 +08:00
|
|
|
.alloc_cacheable_memory = false,
|
2021-12-18 02:27:21 +08:00
|
|
|
.supports_rssi_stats = true,
|
2021-12-20 20:10:53 +08:00
|
|
|
.fw_wmi_diag_event = true,
|
2022-01-19 12:13:55 +08:00
|
|
|
.current_cc_support = true,
|
2022-02-20 22:07:39 +08:00
|
|
|
.dbr_debug_support = false,
|
2021-10-11 13:56:02 +08:00
|
|
|
.global_reset = true,
|
2022-04-12 21:15:50 +08:00
|
|
|
.bios_sar_capa = &ath11k_hw_sar_capa_wcn6855,
|
2022-04-30 01:04:55 +08:00
|
|
|
.m3_fw_support = true,
|
|
|
|
.fixed_bdf_addr = false,
|
|
|
|
.fixed_mem_region = false,
|
|
|
|
.static_window_map = false,
|
2022-04-30 01:04:56 +08:00
|
|
|
.hybrid_bus_type = false,
|
2022-04-30 01:04:57 +08:00
|
|
|
.dp_window_idx = 0,
|
|
|
|
.ce_window_idx = 0,
|
2022-04-30 01:04:59 +08:00
|
|
|
.fixed_fw_mem = false,
|
2022-04-30 01:04:56 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.name = "wcn6750 hw1.0",
|
|
|
|
.hw_rev = ATH11K_HW_WCN6750_HW10,
|
|
|
|
.fw = {
|
|
|
|
.dir = "WCN6750/hw1.0",
|
|
|
|
.board_size = 256 * 1024,
|
|
|
|
.cal_offset = 128 * 1024,
|
|
|
|
},
|
|
|
|
.max_radios = 1,
|
|
|
|
.bdf_addr = 0x4B0C0000,
|
2022-04-30 01:05:00 +08:00
|
|
|
.hw_ops = &wcn6750_ops,
|
2022-04-30 01:04:56 +08:00
|
|
|
.ring_mask = &ath11k_hw_ring_mask_qca6390,
|
|
|
|
.internal_sleep_clock = false,
|
2022-04-30 01:05:00 +08:00
|
|
|
.regs = &wcn6750_regs,
|
2022-04-30 01:04:56 +08:00
|
|
|
.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_WCN6750,
|
|
|
|
.host_ce_config = ath11k_host_ce_config_qca6390,
|
|
|
|
.ce_count = 9,
|
|
|
|
.target_ce_config = ath11k_target_ce_config_wlan_qca6390,
|
|
|
|
.target_ce_count = 9,
|
|
|
|
.svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390,
|
|
|
|
.svc_to_ce_map_len = 14,
|
|
|
|
.rfkill_pin = 0,
|
|
|
|
.rfkill_cfg = 0,
|
|
|
|
.rfkill_on_level = 0,
|
|
|
|
.single_pdev_only = true,
|
|
|
|
.rxdma1_enable = false,
|
|
|
|
.num_rxmda_per_pdev = 1,
|
|
|
|
.rx_mac_buf_ring = true,
|
|
|
|
.vdev_start_delay = true,
|
|
|
|
.htt_peer_map_v2 = false,
|
|
|
|
|
|
|
|
.spectral = {
|
|
|
|
.fft_sz = 0,
|
|
|
|
.fft_pad_sz = 0,
|
|
|
|
.summary_pad_sz = 0,
|
|
|
|
.fft_hdr_len = 0,
|
|
|
|
.max_fft_bins = 0,
|
|
|
|
},
|
|
|
|
|
|
|
|
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
|
BIT(NL80211_IFTYPE_AP),
|
|
|
|
.supports_monitor = false,
|
|
|
|
.supports_shadow_regs = true,
|
|
|
|
.idle_ps = true,
|
|
|
|
.supports_sta_ps = true,
|
|
|
|
.cold_boot_calib = false,
|
|
|
|
.fw_mem_mode = 0,
|
|
|
|
.num_vdevs = 16 + 1,
|
|
|
|
.num_peers = 512,
|
|
|
|
.supports_suspend = false,
|
2022-04-30 01:05:01 +08:00
|
|
|
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
|
2022-04-30 01:04:56 +08:00
|
|
|
.supports_regdb = true,
|
|
|
|
.fix_l1ss = false,
|
|
|
|
.credit_flow = true,
|
|
|
|
.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
|
|
|
|
.hal_params = &ath11k_hw_hal_params_qca6390,
|
|
|
|
.supports_dynamic_smps_6ghz = false,
|
|
|
|
.alloc_cacheable_memory = false,
|
|
|
|
.supports_rssi_stats = true,
|
|
|
|
.fw_wmi_diag_event = false,
|
|
|
|
.current_cc_support = true,
|
|
|
|
.dbr_debug_support = false,
|
|
|
|
.global_reset = false,
|
|
|
|
.bios_sar_capa = NULL,
|
|
|
|
.m3_fw_support = false,
|
|
|
|
.fixed_bdf_addr = false,
|
|
|
|
.fixed_mem_region = false,
|
|
|
|
.static_window_map = true,
|
|
|
|
.hybrid_bus_type = true,
|
2022-04-30 01:04:57 +08:00
|
|
|
.dp_window_idx = 1,
|
|
|
|
.ce_window_idx = 2,
|
2022-04-30 01:04:59 +08:00
|
|
|
.fixed_fw_mem = true,
|
2021-05-31 22:41:28 +08:00
|
|
|
},
|
2019-11-23 15:58:40 +08:00
|
|
|
};
|
|
|
|
|
2022-03-14 13:18:15 +08:00
|
|
|
static inline struct ath11k_pdev *ath11k_core_get_single_pdev(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
WARN_ON(!ab->hw_params.single_pdev_only);
|
|
|
|
|
|
|
|
return &ab->pdevs[0];
|
|
|
|
}
|
|
|
|
|
2020-12-12 01:35:50 +08:00
|
|
|
int ath11k_core_suspend(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
2022-03-14 13:18:15 +08:00
|
|
|
struct ath11k_pdev *pdev;
|
|
|
|
struct ath11k *ar;
|
2020-12-12 01:35:50 +08:00
|
|
|
|
|
|
|
if (!ab->hw_params.supports_suspend)
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
2022-03-14 13:18:15 +08:00
|
|
|
/* so far single_pdev_only chips have supports_suspend as true
|
|
|
|
* and only the first pdev is valid.
|
|
|
|
*/
|
|
|
|
pdev = ath11k_core_get_single_pdev(ab);
|
|
|
|
ar = pdev->ar;
|
|
|
|
if (!ar || ar->state != ATH11K_STATE_OFF)
|
|
|
|
return 0;
|
|
|
|
|
2020-12-12 01:35:50 +08:00
|
|
|
ret = ath11k_dp_rx_pktlog_stop(ab, true);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_warn(ab, "failed to stop dp rx (and timer) pktlog during suspend: %d\n",
|
|
|
|
ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2022-03-14 13:18:15 +08:00
|
|
|
ret = ath11k_mac_wait_tx_complete(ar);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_warn(ab, "failed to wait tx complete: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-12-12 01:35:50 +08:00
|
|
|
ret = ath11k_wow_enable(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_warn(ab, "failed to enable wow during suspend: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_dp_rx_pktlog_stop(ab, false);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_warn(ab, "failed to stop dp rx pktlog during suspend: %d\n",
|
|
|
|
ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
ath11k_ce_stop_shadow_timers(ab);
|
|
|
|
ath11k_dp_stop_shadow_timers(ab);
|
|
|
|
|
|
|
|
ath11k_hif_irq_disable(ab);
|
|
|
|
ath11k_hif_ce_irq_disable(ab);
|
|
|
|
|
|
|
|
ret = ath11k_hif_suspend(ab);
|
2020-12-16 16:31:19 +08:00
|
|
|
if (ret) {
|
2020-12-12 01:35:50 +08:00
|
|
|
ath11k_warn(ab, "failed to suspend hif: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(ath11k_core_suspend);
|
|
|
|
|
|
|
|
int ath11k_core_resume(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
2022-03-14 13:18:15 +08:00
|
|
|
struct ath11k_pdev *pdev;
|
|
|
|
struct ath11k *ar;
|
2020-12-12 01:35:50 +08:00
|
|
|
|
|
|
|
if (!ab->hw_params.supports_suspend)
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
2022-03-14 13:18:15 +08:00
|
|
|
/* so far signle_pdev_only chips have supports_suspend as true
|
|
|
|
* and only the first pdev is valid.
|
|
|
|
*/
|
|
|
|
pdev = ath11k_core_get_single_pdev(ab);
|
|
|
|
ar = pdev->ar;
|
|
|
|
if (!ar || ar->state != ATH11K_STATE_OFF)
|
|
|
|
return 0;
|
|
|
|
|
2020-12-12 01:35:50 +08:00
|
|
|
ret = ath11k_hif_resume(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_warn(ab, "failed to resume hif during resume: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
ath11k_hif_ce_irq_enable(ab);
|
|
|
|
ath11k_hif_irq_enable(ab);
|
|
|
|
|
|
|
|
ret = ath11k_dp_rx_pktlog_start(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_warn(ab, "failed to start rx pktlog during resume: %d\n",
|
|
|
|
ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_wow_wakeup(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_warn(ab, "failed to wakeup wow during resume: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(ath11k_core_resume);
|
|
|
|
|
2022-04-21 10:35:01 +08:00
|
|
|
static void ath11k_core_check_cc_code_bdfext(const struct dmi_header *hdr, void *data)
|
2022-03-23 17:14:17 +08:00
|
|
|
{
|
|
|
|
struct ath11k_base *ab = data;
|
|
|
|
const char *magic = ATH11K_SMBIOS_BDF_EXT_MAGIC;
|
|
|
|
struct ath11k_smbios_bdf *smbios = (struct ath11k_smbios_bdf *)hdr;
|
|
|
|
ssize_t copied;
|
|
|
|
size_t len;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
if (ab->qmi.target.bdf_ext[0] != '\0')
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (hdr->type != ATH11K_SMBIOS_BDF_EXT_TYPE)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (hdr->length != ATH11K_SMBIOS_BDF_EXT_LENGTH) {
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
|
|
"wrong smbios bdf ext type length (%d).\n",
|
|
|
|
hdr->length);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-04-21 10:35:01 +08:00
|
|
|
spin_lock_bh(&ab->base_lock);
|
|
|
|
|
|
|
|
switch (smbios->country_code_flag) {
|
|
|
|
case ATH11K_SMBIOS_CC_ISO:
|
|
|
|
ab->new_alpha2[0] = (smbios->cc_code >> 8) & 0xff;
|
|
|
|
ab->new_alpha2[1] = smbios->cc_code & 0xff;
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot smbios cc_code %c%c\n",
|
|
|
|
ab->new_alpha2[0], ab->new_alpha2[1]);
|
|
|
|
break;
|
|
|
|
case ATH11K_SMBIOS_CC_WW:
|
|
|
|
ab->new_alpha2[0] = '0';
|
|
|
|
ab->new_alpha2[1] = '0';
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot smbios worldwide regdomain\n");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot ignore smbios country code setting %d\n",
|
|
|
|
smbios->country_code_flag);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
spin_unlock_bh(&ab->base_lock);
|
|
|
|
|
2022-03-23 17:14:17 +08:00
|
|
|
if (!smbios->bdf_enabled) {
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "bdf variant name not found.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Only one string exists (per spec) */
|
|
|
|
if (memcmp(smbios->bdf_ext, magic, strlen(magic)) != 0) {
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
|
|
"bdf variant magic does not match.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
len = min_t(size_t,
|
|
|
|
strlen(smbios->bdf_ext), sizeof(ab->qmi.target.bdf_ext));
|
|
|
|
for (i = 0; i < len; i++) {
|
|
|
|
if (!isascii(smbios->bdf_ext[i]) || !isprint(smbios->bdf_ext[i])) {
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
|
|
"bdf variant name contains non ascii chars.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Copy extension name without magic prefix */
|
|
|
|
copied = strscpy(ab->qmi.target.bdf_ext, smbios->bdf_ext + strlen(magic),
|
|
|
|
sizeof(ab->qmi.target.bdf_ext));
|
|
|
|
if (copied < 0) {
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
|
|
"bdf variant string is longer than the buffer can accommodate\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
|
|
"found and validated bdf variant smbios_type 0x%x bdf %s\n",
|
|
|
|
ATH11K_SMBIOS_BDF_EXT_TYPE, ab->qmi.target.bdf_ext);
|
|
|
|
}
|
|
|
|
|
|
|
|
int ath11k_core_check_smbios(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
ab->qmi.target.bdf_ext[0] = '\0';
|
2022-04-21 10:35:01 +08:00
|
|
|
dmi_walk(ath11k_core_check_cc_code_bdfext, ab);
|
2022-03-23 17:14:17 +08:00
|
|
|
|
|
|
|
if (ab->qmi.target.bdf_ext[0] == '\0')
|
|
|
|
return -ENODATA;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-10-15 21:15:01 +08:00
|
|
|
int ath11k_core_check_dt(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
size_t max_len = sizeof(ab->qmi.target.bdf_ext);
|
|
|
|
const char *variant = NULL;
|
|
|
|
struct device_node *node;
|
|
|
|
|
|
|
|
node = ab->dev->of_node;
|
|
|
|
if (!node)
|
|
|
|
return -ENOENT;
|
|
|
|
|
|
|
|
of_property_read_string(node, "qcom,ath11k-calibration-variant",
|
|
|
|
&variant);
|
|
|
|
if (!variant)
|
|
|
|
return -ENODATA;
|
|
|
|
|
|
|
|
if (strscpy(ab->qmi.target.bdf_ext, variant, max_len) < 0)
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
|
|
"bdf variant string is longer than the buffer can accommodate (variant: %s)\n",
|
|
|
|
variant);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
|
|
|
size_t name_len, bool with_variant)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
2020-10-15 21:15:01 +08:00
|
|
|
/* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
|
|
|
|
char variant[9 + ATH11K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
|
|
|
|
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
if (with_variant && ab->qmi.target.bdf_ext[0] != '\0')
|
2020-10-15 21:15:01 +08:00
|
|
|
scnprintf(variant, sizeof(variant), ",variant=%s",
|
|
|
|
ab->qmi.target.bdf_ext);
|
|
|
|
|
ath11k: add string type to search board data in board-2.bin for WCN6855
Currently ath11k only support string type with bus, chip id and board id
such as "bus=ahb,qmi-chip-id=1,qmi-board-id=4" for ahb bus chip and
"bus=pci,qmi-chip-id=0,qmi-board-id=255" for PCIe bus chip in
board-2.bin. For WCN6855, it is not enough to distinguish all different
chips.
This is to add a new string type which include bus, chip id, board id,
vendor, device, subsystem-vendor and subsystem-device for WCN6855.
ath11k will first load board-2.bin and search in it for the board data
with the above parameters, if matched one board data, then download it
to firmware, if not matched any one, then ath11k will download the file
board.bin to firmware.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211111065340.20187-1-quic_wgong@quicinc.com
2021-11-15 17:29:55 +08:00
|
|
|
switch (ab->id.bdf_search) {
|
|
|
|
case ATH11K_BDF_SEARCH_BUS_AND_BOARD:
|
|
|
|
scnprintf(name, name_len,
|
|
|
|
"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
|
|
|
|
ath11k_bus_str(ab->hif.bus),
|
|
|
|
ab->id.vendor, ab->id.device,
|
|
|
|
ab->id.subsystem_vendor,
|
|
|
|
ab->id.subsystem_device,
|
|
|
|
ab->qmi.target.chip_id,
|
|
|
|
ab->qmi.target.board_id,
|
|
|
|
variant);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
scnprintf(name, name_len,
|
|
|
|
"bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s",
|
|
|
|
ath11k_bus_str(ab->hif.bus),
|
|
|
|
ab->qmi.target.chip_id,
|
|
|
|
ab->qmi.target.board_id, variant);
|
|
|
|
break;
|
|
|
|
}
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot using board name '%s'\n", name);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
|
|
|
|
size_t name_len)
|
|
|
|
{
|
|
|
|
return __ath11k_core_create_board_name(ab, name, name_len, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ath11k_core_create_fallback_board_name(struct ath11k_base *ab, char *name,
|
|
|
|
size_t name_len)
|
|
|
|
{
|
|
|
|
return __ath11k_core_create_board_name(ab, name, name_len, false);
|
|
|
|
}
|
|
|
|
|
2020-06-16 22:00:49 +08:00
|
|
|
const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
|
|
|
|
const char *file)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
|
|
|
const struct firmware *fw;
|
2020-06-16 22:00:50 +08:00
|
|
|
char path[100];
|
2019-11-23 15:58:40 +08:00
|
|
|
int ret;
|
|
|
|
|
|
|
|
if (file == NULL)
|
|
|
|
return ERR_PTR(-ENOENT);
|
|
|
|
|
2020-06-16 22:00:50 +08:00
|
|
|
ath11k_core_create_firmware_path(ab, file, path, sizeof(path));
|
2019-11-23 15:58:40 +08:00
|
|
|
|
2020-06-16 22:00:50 +08:00
|
|
|
ret = firmware_request_nowarn(&fw, path, ab->dev);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret)
|
|
|
|
return ERR_PTR(ret);
|
2020-06-16 22:00:49 +08:00
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot firmware request %s size %zu\n",
|
2020-06-16 22:00:50 +08:00
|
|
|
path, fw->size);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
return fw;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ath11k_core_free_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
|
|
|
|
{
|
|
|
|
if (!IS_ERR(bd->fw))
|
|
|
|
release_firmware(bd->fw);
|
|
|
|
|
|
|
|
memset(bd, 0, sizeof(*bd));
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ath11k_core_parse_bd_ie_board(struct ath11k_base *ab,
|
|
|
|
struct ath11k_board_data *bd,
|
|
|
|
const void *buf, size_t buf_len,
|
|
|
|
const char *boardname,
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
int ie_id,
|
|
|
|
int name_id,
|
|
|
|
int data_id)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
|
|
|
const struct ath11k_fw_ie *hdr;
|
|
|
|
bool name_match_found;
|
|
|
|
int ret, board_ie_id;
|
|
|
|
size_t board_ie_len;
|
|
|
|
const void *board_ie_data;
|
|
|
|
|
|
|
|
name_match_found = false;
|
|
|
|
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
/* go through ATH11K_BD_IE_BOARD_/ATH11K_BD_IE_REGDB_ elements */
|
2019-11-23 15:58:40 +08:00
|
|
|
while (buf_len > sizeof(struct ath11k_fw_ie)) {
|
|
|
|
hdr = buf;
|
|
|
|
board_ie_id = le32_to_cpu(hdr->id);
|
|
|
|
board_ie_len = le32_to_cpu(hdr->len);
|
|
|
|
board_ie_data = hdr->data;
|
|
|
|
|
|
|
|
buf_len -= sizeof(*hdr);
|
|
|
|
buf += sizeof(*hdr);
|
|
|
|
|
|
|
|
if (buf_len < ALIGN(board_ie_len, 4)) {
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
ath11k_err(ab, "invalid %s length: %zu < %zu\n",
|
|
|
|
ath11k_bd_ie_type_str(ie_id),
|
2019-11-23 15:58:40 +08:00
|
|
|
buf_len, ALIGN(board_ie_len, 4));
|
|
|
|
ret = -EINVAL;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
if (board_ie_id == name_id) {
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_dbg_dump(ab, ATH11K_DBG_BOOT, "board name", "",
|
|
|
|
board_ie_data, board_ie_len);
|
|
|
|
|
|
|
|
if (board_ie_len != strlen(boardname))
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
goto next;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
ret = memcmp(board_ie_data, boardname, strlen(boardname));
|
|
|
|
if (ret)
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
goto next;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
name_match_found = true;
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
"boot found match %s for name '%s'",
|
|
|
|
ath11k_bd_ie_type_str(ie_id),
|
2019-11-23 15:58:40 +08:00
|
|
|
boardname);
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
} else if (board_ie_id == data_id) {
|
2019-11-23 15:58:40 +08:00
|
|
|
if (!name_match_found)
|
|
|
|
/* no match found */
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
goto next;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
"boot found %s for '%s'",
|
|
|
|
ath11k_bd_ie_type_str(ie_id),
|
|
|
|
boardname);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
bd->data = board_ie_data;
|
|
|
|
bd->len = board_ie_len;
|
|
|
|
|
|
|
|
ret = 0;
|
|
|
|
goto out;
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
} else {
|
|
|
|
ath11k_warn(ab, "unknown %s id found: %d\n",
|
|
|
|
ath11k_bd_ie_type_str(ie_id),
|
2019-11-23 15:58:40 +08:00
|
|
|
board_ie_id);
|
|
|
|
}
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
next:
|
2019-11-23 15:58:40 +08:00
|
|
|
/* jump over the padding */
|
|
|
|
board_ie_len = ALIGN(board_ie_len, 4);
|
|
|
|
|
|
|
|
buf_len -= board_ie_len;
|
|
|
|
buf += board_ie_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* no match found */
|
|
|
|
ret = -ENOENT;
|
|
|
|
|
|
|
|
out:
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *ab,
|
|
|
|
struct ath11k_board_data *bd,
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
const char *boardname,
|
|
|
|
int ie_id_match,
|
|
|
|
int name_id,
|
|
|
|
int data_id)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
|
|
|
size_t len, magic_len;
|
|
|
|
const u8 *data;
|
2020-06-16 22:00:51 +08:00
|
|
|
char *filename, filepath[100];
|
2019-11-23 15:58:40 +08:00
|
|
|
size_t ie_len;
|
|
|
|
struct ath11k_fw_ie *hdr;
|
|
|
|
int ret, ie_id;
|
|
|
|
|
2020-06-16 22:00:51 +08:00
|
|
|
filename = ATH11K_BOARD_API2_FILE;
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
if (!bd->fw)
|
2020-06-16 22:00:50 +08:00
|
|
|
bd->fw = ath11k_core_firmware_request(ab, filename);
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
if (IS_ERR(bd->fw))
|
|
|
|
return PTR_ERR(bd->fw);
|
|
|
|
|
|
|
|
data = bd->fw->data;
|
|
|
|
len = bd->fw->size;
|
|
|
|
|
2020-06-16 22:00:51 +08:00
|
|
|
ath11k_core_create_firmware_path(ab, filename,
|
|
|
|
filepath, sizeof(filepath));
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
/* magic has extra null byte padded */
|
|
|
|
magic_len = strlen(ATH11K_BOARD_MAGIC) + 1;
|
|
|
|
if (len < magic_len) {
|
2020-06-16 22:00:51 +08:00
|
|
|
ath11k_err(ab, "failed to find magic value in %s, file too short: %zu\n",
|
|
|
|
filepath, len);
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = -EINVAL;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (memcmp(data, ATH11K_BOARD_MAGIC, magic_len)) {
|
|
|
|
ath11k_err(ab, "found invalid board magic\n");
|
|
|
|
ret = -EINVAL;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* magic is padded to 4 bytes */
|
|
|
|
magic_len = ALIGN(magic_len, 4);
|
|
|
|
if (len < magic_len) {
|
2020-06-16 22:00:51 +08:00
|
|
|
ath11k_err(ab, "failed: %s too small to contain board data, len: %zu\n",
|
|
|
|
filepath, len);
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = -EINVAL;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
|
|
|
data += magic_len;
|
|
|
|
len -= magic_len;
|
|
|
|
|
|
|
|
while (len > sizeof(struct ath11k_fw_ie)) {
|
|
|
|
hdr = (struct ath11k_fw_ie *)data;
|
|
|
|
ie_id = le32_to_cpu(hdr->id);
|
|
|
|
ie_len = le32_to_cpu(hdr->len);
|
|
|
|
|
|
|
|
len -= sizeof(*hdr);
|
|
|
|
data = hdr->data;
|
|
|
|
|
|
|
|
if (len < ALIGN(ie_len, 4)) {
|
|
|
|
ath11k_err(ab, "invalid length for board ie_id %d ie_len %zu len %zu\n",
|
|
|
|
ie_id, ie_len, len);
|
2021-05-22 17:50:54 +08:00
|
|
|
ret = -EINVAL;
|
|
|
|
goto err;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
if (ie_id == ie_id_match) {
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = ath11k_core_parse_bd_ie_board(ab, bd, data,
|
|
|
|
ie_len,
|
|
|
|
boardname,
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
ie_id_match,
|
|
|
|
name_id,
|
|
|
|
data_id);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret == -ENOENT)
|
|
|
|
/* no match found, continue */
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
goto next;
|
2019-11-23 15:58:40 +08:00
|
|
|
else if (ret)
|
|
|
|
/* there was an error, bail out */
|
|
|
|
goto err;
|
|
|
|
/* either found or error, so stop searching */
|
|
|
|
goto out;
|
|
|
|
}
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
next:
|
2019-11-23 15:58:40 +08:00
|
|
|
/* jump over the padding */
|
|
|
|
ie_len = ALIGN(ie_len, 4);
|
|
|
|
|
|
|
|
len -= ie_len;
|
|
|
|
data += ie_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
out:
|
|
|
|
if (!bd->data || !bd->len) {
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
"failed to fetch %s for %s from %s\n",
|
|
|
|
ath11k_bd_ie_type_str(ie_id_match),
|
2020-06-16 22:00:51 +08:00
|
|
|
boardname, filepath);
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = -ENODATA;
|
|
|
|
goto err;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err:
|
|
|
|
ath11k_core_free_bdf(ab, bd);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
int ath11k_core_fetch_board_data_api_1(struct ath11k_base *ab,
|
|
|
|
struct ath11k_board_data *bd,
|
|
|
|
const char *name)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
bd->fw = ath11k_core_firmware_request(ab, name);
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
if (IS_ERR(bd->fw))
|
|
|
|
return PTR_ERR(bd->fw);
|
|
|
|
|
|
|
|
bd->data = bd->fw->data;
|
|
|
|
bd->len = bd->fw->size;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
ath11k: add string type to search board data in board-2.bin for WCN6855
Currently ath11k only support string type with bus, chip id and board id
such as "bus=ahb,qmi-chip-id=1,qmi-board-id=4" for ahb bus chip and
"bus=pci,qmi-chip-id=0,qmi-board-id=255" for PCIe bus chip in
board-2.bin. For WCN6855, it is not enough to distinguish all different
chips.
This is to add a new string type which include bus, chip id, board id,
vendor, device, subsystem-vendor and subsystem-device for WCN6855.
ath11k will first load board-2.bin and search in it for the board data
with the above parameters, if matched one board data, then download it
to firmware, if not matched any one, then ath11k will download the file
board.bin to firmware.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211111065340.20187-1-quic_wgong@quicinc.com
2021-11-15 17:29:55 +08:00
|
|
|
#define BOARD_NAME_SIZE 200
|
2019-11-23 15:58:40 +08:00
|
|
|
int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
|
|
|
|
{
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
char boardname[BOARD_NAME_SIZE], fallback_boardname[BOARD_NAME_SIZE];
|
|
|
|
char *filename, filepath[100];
|
2019-11-23 15:58:40 +08:00
|
|
|
int ret;
|
|
|
|
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
filename = ATH11K_BOARD_API2_FILE;
|
|
|
|
|
|
|
|
ret = ath11k_core_create_board_name(ab, boardname, sizeof(boardname));
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to create board name: %d", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
ab->bd_api = 2;
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname,
|
|
|
|
ATH11K_BD_IE_BOARD,
|
|
|
|
ATH11K_BD_IE_BOARD_NAME,
|
|
|
|
ATH11K_BD_IE_BOARD_DATA);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (!ret)
|
|
|
|
goto success;
|
|
|
|
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
ret = ath11k_core_create_fallback_board_name(ab, fallback_boardname,
|
|
|
|
sizeof(fallback_boardname));
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to create fallback board name: %d", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
ret = ath11k_core_fetch_board_data_api_n(ab, bd, fallback_boardname,
|
|
|
|
ATH11K_BD_IE_BOARD,
|
|
|
|
ATH11K_BD_IE_BOARD_NAME,
|
|
|
|
ATH11K_BD_IE_BOARD_DATA);
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
if (!ret)
|
|
|
|
goto success;
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
ab->bd_api = 1;
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_DEFAULT_BOARD_FILE);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
ath11k: add fallback board name without variant while searching board-2.bin
Sometimes it has a variant value which read from DT or SMBIOS by
ath11k, and meanwhile it does not have the matched board name in
board-2.bin, then it will failed at boot up phase.
Add fallback board name which removed variant value and search again
in board-2.bin when failed with variant and try to load the board
data again to increase boot up success rate.
dmesg log after this patch:
[169547.248472] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test'
[169547.248565] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248568] ath11k_pci 0000:05:00.0: board name
[169547.248570] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248571] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248572] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248574] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248575] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248576] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248577] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248578] ath11k_pci 0000:05:00.0: board name
[169547.248579] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248581] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248582] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248583] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248584] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248585] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248587] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[169547.248588] ath11k_pci 0000:05:00.0: board name
[169547.248589] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248590] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248591] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248592] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248594] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248595] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 31 38 2c 71 6d 69 2d 62 chip-id=18,qmi-b
[169547.248596] ath11k_pci 0000:05:00.0: 00000060: 6f 61 72 64 2d 69 64 3d 32 36 36 oard-id=266
[169547.248597] ath11k_pci 0000:05:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262,variant=test from ath11k/WCN6855/hw2.0/board-2.bin
[169547.248476] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248634] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 180324
[169547.248636] ath11k_pci 0000:05:00.0: board name
[169547.248637] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[169547.248638] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[169547.248639] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[169547.248641] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[169547.248642] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[169547.248643] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[169547.248645] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[169547.248646] ath11k_pci 0000:05:00.0: boot found match for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248647] ath11k_pci 0000:05:00.0: boot found board data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[169547.248649] ath11k_pci 0000:05:00.0: using board api 2
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220315104721.26649-2-quic_wgong@quicinc.com
2022-03-23 17:14:16 +08:00
|
|
|
ath11k_core_create_firmware_path(ab, filename,
|
|
|
|
filepath, sizeof(filepath));
|
|
|
|
ath11k_err(ab, "failed to fetch board data for %s from %s\n",
|
|
|
|
boardname, filepath);
|
|
|
|
if (memcmp(boardname, fallback_boardname, strlen(boardname)))
|
|
|
|
ath11k_err(ab, "failed to fetch board data for %s from %s\n",
|
|
|
|
fallback_boardname, filepath);
|
|
|
|
|
|
|
|
ath11k_err(ab, "failed to fetch board.bin from %s\n",
|
2019-11-23 15:58:40 +08:00
|
|
|
ab->hw_params.fw.dir);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
success:
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", ab->bd_api);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd)
|
|
|
|
{
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
char boardname[BOARD_NAME_SIZE];
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
int ret;
|
|
|
|
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
ret = ath11k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT,
|
|
|
|
"failed to create board name for regdb: %d", ret);
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname,
|
|
|
|
ATH11K_BD_IE_REGDB,
|
|
|
|
ATH11K_BD_IE_REGDB_NAME,
|
|
|
|
ATH11K_BD_IE_REGDB_DATA);
|
|
|
|
if (!ret)
|
|
|
|
goto exit;
|
|
|
|
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_REGDB_FILE_NAME);
|
|
|
|
if (ret)
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "failed to fetch %s from %s\n",
|
|
|
|
ATH11K_REGDB_FILE_NAME, ab->hw_params.fw.dir);
|
|
|
|
|
ath11k: add support to search regdb data in board-2.bin for WCN6855
Currently ath11k only download the same regdb.bin file for all WCN6855
chips, actually ath11k needs to distinguish all different WCN6855 chips.
This is to re-use the string type which include bus, chip id, board id,
vendor, device, subsystem-vendor, subsystem-device and variant for
WCN6855 to distinguish different regdb in board-2.bin.
ath11k will first load board-2.bin and search in it for the regdb data
with the above parameters, if matched one regdb data, then download it
to firmware, if not matched any one, then ath11k will download the file
regdb.bin to firmware.
Add enum value ATH11K_BD_IE_REGDB and enum type ath11k_bd_ie_regdb_type
to distinguish regdb data and board data since they are in the same file
board-2.bin.
This only take effect for WCN6855 which supports regdb in hardware parameters.
Test log:
[ 3833.091948] ath11k_pci 0000:05:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092072] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 205316
[ 3833.092079] ath11k_pci 0000:05:00.0: board name
[ 3833.092083] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092088] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 -id=1
[ 3833.092091] ath11k_pci 0000:05:00.0: board name
[ 3833.092095] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092099] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 -id=2
[ 3833.092102] ath11k_pci 0000:05:00.0: board name
[ 3833.092105] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092109] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 -id=3
[ 3833.092112] ath11k_pci 0000:05:00.0: board name
[ 3833.092116] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092119] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092123] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092126] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092130] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092133] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092137] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 2c 76 61 72 69 61 ard-id=266,varia
[ 3833.092140] ath11k_pci 0000:05:00.0: 00000070: 6e 74 3d 48 50 5f 47 38 5f 4c 61 6e 63 69 61 31 nt=HP_G8_Lancia1
[ 3833.092144] ath11k_pci 0000:05:00.0: 00000080: 35 5
[ 3833.092147] ath11k_pci 0000:05:00.0: board name
[ 3833.092150] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092154] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092157] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092161] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092165] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092168] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092172] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 36 ard-id=266
[ 3833.092206] ath11k_pci 0000:05:00.0: board name
[ 3833.092209] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 76 65 6e 64 6f 72 3d 31 bus=pci,vendor=1
[ 3833.092213] ath11k_pci 0000:05:00.0: 00000010: 37 63 62 2c 64 65 76 69 63 65 3d 31 31 30 33 2c 7cb,device=1103,
[ 3833.092216] ath11k_pci 0000:05:00.0: 00000020: 73 75 62 73 79 73 74 65 6d 2d 76 65 6e 64 6f 72 subsystem-vendor
[ 3833.092220] ath11k_pci 0000:05:00.0: 00000030: 3d 31 37 63 62 2c 73 75 62 73 79 73 74 65 6d 2d =17cb,subsystem-
[ 3833.092223] ath11k_pci 0000:05:00.0: 00000040: 64 65 76 69 63 65 3d 33 33 37 34 2c 71 6d 69 2d device=3374,qmi-
[ 3833.092227] ath11k_pci 0000:05:00.0: 00000050: 63 68 69 70 2d 69 64 3d 32 2c 71 6d 69 2d 62 6f chip-id=2,qmi-bo
[ 3833.092230] ath11k_pci 0000:05:00.0: 00000060: 61 72 64 2d 69 64 3d 32 36 32 ard-id=262
[ 3833.092234] ath11k_pci 0000:05:00.0: boot found match regdb data for name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092238] ath11k_pci 0000:05:00.0: board name
[ 3833.092241] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092245] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 31 31 -id=11
[ 3833.092248] ath11k_pci 0000:05:00.0: board name
[ 3833.092251] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092255] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 32 32 -id=22
[ 3833.092258] ath11k_pci 0000:05:00.0: board name
[ 3833.092261] ath11k_pci 0000:05:00.0: 00000000: 62 75 73 3d 70 63 69 2c 71 6d 69 2d 63 68 69 70 bus=pci,qmi-chip
[ 3833.092265] ath11k_pci 0000:05:00.0: 00000010: 2d 69 64 3d 33 33 -id=33
[ 3833.092268] ath11k_pci 0000:05:00.0: boot found regdb data for 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
[ 3833.092272] ath11k_pci 0000:05:00.0: fetched regdb
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220319023543.14288-4-quic_wgong@quicinc.com
2022-03-28 19:57:19 +08:00
|
|
|
exit:
|
|
|
|
if (!ret)
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "fetched regdb\n");
|
|
|
|
|
ath11k: add regdb.bin download for regdb offload
The regdomain is self-managed type for ath11k, the regdomain info is
reported from firmware, it is not from wireless regdb. Firmware fetch
the regdomain info from board data file before. Currently most of the
regdomain info has moved to another file regdb.bin from board data
file for some chips such as QCA6390 and WCN6855, so the regdomain info
left in board data file is not enough to support the feature which need
more regdomain info.
After download regdb.bin, firmware will fetch the regdomain info from
regdb.bin instead of board data file and report to ath11k. If it does
not have the file regdb.bin, it also can initialize wlan success and
firmware then fetch regdomain info from board data file.
Add download the regdb.bin before download board data for some specific
chip which support supports_regdb in hardware parameters.
download regdb.bin log:
[430082.334162] ath11k_pci 0000:05:00.0: chip_id 0x2 chip_family 0xb board_id 0x106 soc_id 0x400c0200
[430082.334169] ath11k_pci 0000:05:00.0: fw_version 0x110c8b4c fw_build_timestamp 2021-10-25 07:41 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HSP.1.1-02892-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
[430082.334414] ath11k_pci 0000:05:00.0: boot firmware request ath11k/WCN6855/hw2.0/regdb.bin size 24310
output of "iw reg get"
global
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)
phy#0 (self-managed)
country US: DFS-FCC
(2402 - 2472 @ 40), (6, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 24), (0 ms), DFS, AUTO-BW
(5735 - 5895 @ 160), (N/A, 30), (N/A), AUTO-BW
(5945 - 7125 @ 160), (N/A, 24), (N/A), NO-OUTDOOR, AUTO-BW
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211220062355.17021-1-quic_wgong@quicinc.com
2021-12-20 14:23:55 +08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
static void ath11k_core_stop(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
|
|
|
|
ath11k_qmi_firmware_stop(ab);
|
2020-10-01 17:34:44 +08:00
|
|
|
|
2020-05-08 10:55:44 +08:00
|
|
|
ath11k_hif_stop(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_wmi_detach(ab);
|
2019-11-28 16:21:58 +08:00
|
|
|
ath11k_dp_pdev_reo_cleanup(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
/* De-Init of components as needed */
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ath11k_core_soc_create(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = ath11k_qmi_init_service(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to initialize qmi :%d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-09-16 21:55:21 +08:00
|
|
|
ret = ath11k_debugfs_soc_create(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to create ath11k debugfs\n");
|
|
|
|
goto err_qmi_deinit;
|
|
|
|
}
|
|
|
|
|
2020-05-08 10:55:44 +08:00
|
|
|
ret = ath11k_hif_power_up(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to power up :%d\n", ret);
|
|
|
|
goto err_debugfs_reg;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err_debugfs_reg:
|
2020-09-16 21:55:21 +08:00
|
|
|
ath11k_debugfs_soc_destroy(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
err_qmi_deinit:
|
|
|
|
ath11k_qmi_deinit_service(ab);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ath11k_core_soc_destroy(struct ath11k_base *ab)
|
|
|
|
{
|
2020-09-16 21:55:21 +08:00
|
|
|
ath11k_debugfs_soc_destroy(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_dp_free(ab);
|
|
|
|
ath11k_reg_free(ab);
|
|
|
|
ath11k_qmi_deinit_service(ab);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ath11k_core_pdev_create(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2020-09-16 21:55:21 +08:00
|
|
|
ret = ath11k_debugfs_pdev_create(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to create core pdev debugfs: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-11-28 16:21:57 +08:00
|
|
|
ret = ath11k_mac_register(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
2019-11-28 16:21:57 +08:00
|
|
|
ath11k_err(ab, "failed register the radio with mac80211: %d\n", ret);
|
2019-11-23 15:58:40 +08:00
|
|
|
goto err_pdev_debug;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_dp_pdev_alloc(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to attach DP pdev: %d\n", ret);
|
2019-11-28 16:21:57 +08:00
|
|
|
goto err_mac_unregister;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
2020-02-15 08:25:21 +08:00
|
|
|
ret = ath11k_thermal_register(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "could not register thermal device: %d\n",
|
|
|
|
ret);
|
|
|
|
goto err_dp_pdev_free;
|
|
|
|
}
|
|
|
|
|
2020-06-09 15:33:34 +08:00
|
|
|
ret = ath11k_spectral_init(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to init spectral %d\n", ret);
|
|
|
|
goto err_thermal_unregister;
|
|
|
|
}
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
return 0;
|
|
|
|
|
2020-06-09 15:33:34 +08:00
|
|
|
err_thermal_unregister:
|
|
|
|
ath11k_thermal_unregister(ab);
|
2020-02-15 08:25:21 +08:00
|
|
|
err_dp_pdev_free:
|
|
|
|
ath11k_dp_pdev_free(ab);
|
2019-11-28 16:21:57 +08:00
|
|
|
err_mac_unregister:
|
|
|
|
ath11k_mac_unregister(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
err_pdev_debug:
|
2020-09-16 21:55:21 +08:00
|
|
|
ath11k_debugfs_pdev_destroy(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ath11k_core_pdev_destroy(struct ath11k_base *ab)
|
|
|
|
{
|
2020-06-09 15:33:34 +08:00
|
|
|
ath11k_spectral_deinit(ab);
|
2020-02-15 08:25:21 +08:00
|
|
|
ath11k_thermal_unregister(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_mac_unregister(ab);
|
2020-05-08 10:55:44 +08:00
|
|
|
ath11k_hif_irq_disable(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_dp_pdev_free(ab);
|
2020-09-16 21:55:21 +08:00
|
|
|
ath11k_debugfs_pdev_destroy(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
2022-04-06 17:41:05 +08:00
|
|
|
static int ath11k_core_start(struct ath11k_base *ab)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = ath11k_wmi_attach(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to attach wmi: %d\n", ret);
|
2022-04-06 17:41:05 +08:00
|
|
|
return ret;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_htc_init(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to init htc: %d\n", ret);
|
|
|
|
goto err_wmi_detach;
|
|
|
|
}
|
|
|
|
|
2020-05-08 10:55:44 +08:00
|
|
|
ret = ath11k_hif_start(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to start HIF: %d\n", ret);
|
|
|
|
goto err_wmi_detach;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_htc_wait_target(&ab->htc);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to connect to HTC: %d\n", ret);
|
|
|
|
goto err_hif_stop;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_dp_htt_connect(&ab->dp);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to connect to HTT: %d\n", ret);
|
|
|
|
goto err_hif_stop;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_wmi_connect(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to connect wmi: %d\n", ret);
|
|
|
|
goto err_hif_stop;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_htc_start(&ab->htc);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to start HTC: %d\n", ret);
|
|
|
|
goto err_hif_stop;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_wmi_wait_for_service_ready(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to receive wmi service ready event: %d\n",
|
|
|
|
ret);
|
|
|
|
goto err_hif_stop;
|
|
|
|
}
|
|
|
|
|
2019-11-28 16:21:57 +08:00
|
|
|
ret = ath11k_mac_allocate(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to create new hw device with mac80211 :%d\n",
|
|
|
|
ret);
|
|
|
|
goto err_hif_stop;
|
|
|
|
}
|
|
|
|
|
2019-11-28 16:21:58 +08:00
|
|
|
ath11k_dp_pdev_pre_alloc(ab);
|
|
|
|
|
|
|
|
ret = ath11k_dp_pdev_reo_setup(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to initialize reo destination rings: %d\n", ret);
|
|
|
|
goto err_mac_destroy;
|
|
|
|
}
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = ath11k_wmi_cmd_init(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to send wmi init cmd: %d\n", ret);
|
2019-11-28 16:21:58 +08:00
|
|
|
goto err_reo_cleanup;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_wmi_wait_for_unified_ready(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to receive wmi unified ready event: %d\n",
|
|
|
|
ret);
|
2019-11-28 16:21:58 +08:00
|
|
|
goto err_reo_cleanup;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
2020-12-10 22:05:20 +08:00
|
|
|
/* put hardware to DBS mode */
|
2022-04-06 17:41:03 +08:00
|
|
|
if (ab->hw_params.single_pdev_only && ab->hw_params.num_rxmda_per_pdev > 1) {
|
2020-12-10 22:05:20 +08:00
|
|
|
ret = ath11k_wmi_set_hw_mode(ab, WMI_HOST_HW_MODE_DBS);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to send dbs mode: %d\n", ret);
|
|
|
|
goto err_hif_stop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = ath11k_dp_tx_htt_h2t_ver_req_msg(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to send htt version request message: %d\n",
|
|
|
|
ret);
|
2019-11-28 16:21:58 +08:00
|
|
|
goto err_reo_cleanup;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
2019-11-28 16:21:58 +08:00
|
|
|
err_reo_cleanup:
|
|
|
|
ath11k_dp_pdev_reo_cleanup(ab);
|
2019-11-28 16:21:57 +08:00
|
|
|
err_mac_destroy:
|
|
|
|
ath11k_mac_destroy(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
err_hif_stop:
|
2020-05-08 10:55:44 +08:00
|
|
|
ath11k_hif_stop(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
err_wmi_detach:
|
|
|
|
ath11k_wmi_detach(ab);
|
2022-04-06 17:41:05 +08:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ath11k_core_start_firmware(struct ath11k_base *ab,
|
|
|
|
enum ath11k_firmware_mode mode)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ath11k_ce_get_shadow_config(ab, &ab->qmi.ce_cfg.shadow_reg_v2,
|
|
|
|
&ab->qmi.ce_cfg.shadow_reg_v2_len);
|
|
|
|
|
|
|
|
ret = ath11k_qmi_firmware_start(ab, mode);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to send firmware start: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2021-12-21 00:11:09 +08:00
|
|
|
static int ath11k_core_rfkill_config(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
struct ath11k *ar;
|
|
|
|
int ret = 0, i;
|
|
|
|
|
|
|
|
if (!(ab->target_caps.sys_cap_info & WMI_SYS_CAP_INFO_RFKILL))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
for (i = 0; i < ab->num_radios; i++) {
|
|
|
|
ar = ab->pdevs[i].ar;
|
|
|
|
|
|
|
|
ret = ath11k_mac_rfkill_config(ar);
|
|
|
|
if (ret && ret != -EOPNOTSUPP) {
|
|
|
|
ath11k_warn(ab, "failed to configure rfkill: %d", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2022-04-06 17:41:05 +08:00
|
|
|
ret = ath11k_core_start_firmware(ab, ATH11K_FIRMWARE_MODE_NORMAL);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to start firmware: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = ath11k_ce_init_pipes(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to initialize CE: %d\n", ret);
|
2022-04-06 17:41:05 +08:00
|
|
|
goto err_firmware_stop;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_dp_alloc(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to init DP: %d\n", ret);
|
2022-04-06 17:41:05 +08:00
|
|
|
goto err_firmware_stop;
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
2020-09-08 14:32:21 +08:00
|
|
|
switch (ath11k_crypto_mode) {
|
|
|
|
case ATH11K_CRYPT_MODE_SW:
|
|
|
|
set_bit(ATH11K_FLAG_HW_CRYPTO_DISABLED, &ab->dev_flags);
|
|
|
|
set_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags);
|
|
|
|
break;
|
|
|
|
case ATH11K_CRYPT_MODE_HW:
|
|
|
|
clear_bit(ATH11K_FLAG_HW_CRYPTO_DISABLED, &ab->dev_flags);
|
|
|
|
clear_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ath11k_info(ab, "invalid crypto_mode: %d\n", ath11k_crypto_mode);
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ath11k_frame_mode == ATH11K_HW_TXRX_RAW)
|
|
|
|
set_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags);
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
mutex_lock(&ab->core_lock);
|
2022-04-06 17:41:05 +08:00
|
|
|
ret = ath11k_core_start(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to start core: %d\n", ret);
|
|
|
|
goto err_dp_free;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = ath11k_core_pdev_create(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to create pdev core: %d\n", ret);
|
|
|
|
goto err_core_stop;
|
|
|
|
}
|
2020-05-08 10:55:44 +08:00
|
|
|
ath11k_hif_irq_enable(ab);
|
2021-12-21 00:11:09 +08:00
|
|
|
|
|
|
|
ret = ath11k_core_rfkill_config(ab);
|
|
|
|
if (ret && ret != -EOPNOTSUPP) {
|
|
|
|
ath11k_err(ab, "failed to config rfkill: %d\n", ret);
|
|
|
|
goto err_core_stop;
|
|
|
|
}
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
mutex_unlock(&ab->core_lock);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err_core_stop:
|
|
|
|
ath11k_core_stop(ab);
|
2019-11-28 16:21:57 +08:00
|
|
|
ath11k_mac_destroy(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
err_dp_free:
|
|
|
|
ath11k_dp_free(ab);
|
2019-11-27 22:08:58 +08:00
|
|
|
mutex_unlock(&ab->core_lock);
|
2022-04-06 17:41:05 +08:00
|
|
|
err_firmware_stop:
|
|
|
|
ath11k_qmi_firmware_stop(ab);
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
mutex_lock(&ab->core_lock);
|
2020-02-15 08:25:21 +08:00
|
|
|
ath11k_thermal_unregister(ab);
|
2020-05-08 10:55:44 +08:00
|
|
|
ath11k_hif_irq_disable(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_dp_pdev_free(ab);
|
2020-06-09 15:33:34 +08:00
|
|
|
ath11k_spectral_deinit(ab);
|
2020-05-08 10:55:44 +08:00
|
|
|
ath11k_hif_stop(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_wmi_detach(ab);
|
2019-11-28 16:21:58 +08:00
|
|
|
ath11k_dp_pdev_reo_cleanup(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
mutex_unlock(&ab->core_lock);
|
|
|
|
|
|
|
|
ath11k_dp_free(ab);
|
|
|
|
ath11k_hal_srng_deinit(ab);
|
|
|
|
|
2021-12-13 17:53:08 +08:00
|
|
|
ab->free_vdev_map = (1LL << (ab->num_radios * TARGET_NUM_VDEVS(ab))) - 1;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
ret = ath11k_hal_srng_init(ab);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
clear_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags);
|
|
|
|
|
|
|
|
ret = ath11k_core_qmi_firmware_ready(ab);
|
|
|
|
if (ret)
|
|
|
|
goto err_hal_srng_deinit;
|
|
|
|
|
|
|
|
clear_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err_hal_srng_deinit:
|
|
|
|
ath11k_hal_srng_deinit(ab);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ath11k_core_halt(struct ath11k *ar)
|
|
|
|
{
|
|
|
|
struct ath11k_base *ab = ar->ab;
|
|
|
|
|
|
|
|
lockdep_assert_held(&ar->conf_mutex);
|
|
|
|
|
|
|
|
ar->num_created_vdevs = 0;
|
2020-02-05 09:23:48 +08:00
|
|
|
ar->allocated_vdev_map = 0;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
ath11k_mac_scan_finish(ar);
|
|
|
|
ath11k_mac_peer_cleanup_all(ar);
|
|
|
|
cancel_delayed_work_sync(&ar->scan.timeout);
|
|
|
|
cancel_work_sync(&ar->regd_update_work);
|
2021-12-07 23:23:36 +08:00
|
|
|
cancel_work_sync(&ab->update_11d_work);
|
2021-12-21 00:11:09 +08:00
|
|
|
cancel_work_sync(&ab->rfkill_work);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
rcu_assign_pointer(ab->pdevs_active[ar->pdev_idx], NULL);
|
|
|
|
synchronize_rcu();
|
|
|
|
INIT_LIST_HEAD(&ar->arvifs);
|
|
|
|
idr_init(&ar->txmgmt_idr);
|
|
|
|
}
|
|
|
|
|
2021-12-21 00:11:09 +08:00
|
|
|
static void ath11k_rfkill_work(struct work_struct *work)
|
|
|
|
{
|
|
|
|
struct ath11k_base *ab = container_of(work, struct ath11k_base, rfkill_work);
|
|
|
|
struct ath11k *ar;
|
|
|
|
bool rfkill_radio_on;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
spin_lock_bh(&ab->base_lock);
|
|
|
|
rfkill_radio_on = ab->rfkill_radio_on;
|
|
|
|
spin_unlock_bh(&ab->base_lock);
|
|
|
|
|
|
|
|
for (i = 0; i < ab->num_radios; i++) {
|
|
|
|
ar = ab->pdevs[i].ar;
|
|
|
|
if (!ar)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* notify cfg80211 radio state change */
|
|
|
|
ath11k_mac_rfkill_enable_radio(ar, rfkill_radio_on);
|
|
|
|
wiphy_rfkill_set_hw_state(ar->hw->wiphy, !rfkill_radio_on);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-07 23:23:36 +08:00
|
|
|
static void ath11k_update_11d(struct work_struct *work)
|
|
|
|
{
|
|
|
|
struct ath11k_base *ab = container_of(work, struct ath11k_base, update_11d_work);
|
|
|
|
struct ath11k *ar;
|
|
|
|
struct ath11k_pdev *pdev;
|
|
|
|
struct wmi_set_current_country_params set_current_param = {};
|
|
|
|
int ret, i;
|
|
|
|
|
|
|
|
spin_lock_bh(&ab->base_lock);
|
|
|
|
memcpy(&set_current_param.alpha2, &ab->new_alpha2, 2);
|
|
|
|
spin_unlock_bh(&ab->base_lock);
|
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_WMI, "update 11d new cc %c%c\n",
|
|
|
|
set_current_param.alpha2[0],
|
|
|
|
set_current_param.alpha2[1]);
|
|
|
|
|
|
|
|
for (i = 0; i < ab->num_radios; i++) {
|
|
|
|
pdev = &ab->pdevs[i];
|
|
|
|
ar = pdev->ar;
|
|
|
|
|
2022-03-24 09:18:56 +08:00
|
|
|
memcpy(&ar->alpha2, &set_current_param.alpha2, 2);
|
2021-12-07 23:23:36 +08:00
|
|
|
ret = ath11k_wmi_send_set_current_country_cmd(ar, &set_current_param);
|
|
|
|
if (ret)
|
|
|
|
ath11k_warn(ar->ab,
|
|
|
|
"pdev id %d failed set current country code: %d\n",
|
|
|
|
i, ret);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of
each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash()
is the main function for recovery of ath11k_base, it has more than
one ieee80211_hw and ath11k for each ath11k_base, so it need to add
synchronization between them, otherwise it has many issue.
For example, when ath11k_core_reconfigure_on_crash() is not complete,
mac80211 send a hw scan request to ath11k, it leads firmware crash,
because firmware has not been initialized at that moment, firmware
is only finished downloaded and loaded, it can not receive scan
command.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
2022-03-21 19:16:57 +08:00
|
|
|
static void ath11k_core_pre_reconfigure_recovery(struct ath11k_base *ab)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
|
|
|
struct ath11k *ar;
|
|
|
|
struct ath11k_pdev *pdev;
|
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of
each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash()
is the main function for recovery of ath11k_base, it has more than
one ieee80211_hw and ath11k for each ath11k_base, so it need to add
synchronization between them, otherwise it has many issue.
For example, when ath11k_core_reconfigure_on_crash() is not complete,
mac80211 send a hw scan request to ath11k, it leads firmware crash,
because firmware has not been initialized at that moment, firmware
is only finished downloaded and loaded, it can not receive scan
command.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
2022-03-21 19:16:57 +08:00
|
|
|
int i;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
spin_lock_bh(&ab->base_lock);
|
|
|
|
ab->stats.fw_crash_counter++;
|
|
|
|
spin_unlock_bh(&ab->base_lock);
|
|
|
|
|
|
|
|
for (i = 0; i < ab->num_radios; i++) {
|
|
|
|
pdev = &ab->pdevs[i];
|
|
|
|
ar = pdev->ar;
|
|
|
|
if (!ar || ar->state == ATH11K_STATE_OFF)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
ieee80211_stop_queues(ar->hw);
|
|
|
|
ath11k_mac_drain_tx(ar);
|
ath11k: reset 11d state in process of recovery
When doing simulate_fw_crash operation periodically with a short interval
time such as 10 seconds, it is easy happened WMI command timed out for
WMI_SCAN_CHAN_LIST_CMDID in ath11k_reg_update_chan_list().
log:
[42287.610053] ath11k_pci 0000:01:00.0: wmi command 12291 timeout
[42287.610064] ath11k_pci 0000:01:00.0: failed to send WMI_SCAN_CHAN_LIST cmd
[42287.610073] ath11k_pci 0000:01:00.0: failed to perform regd update : -11
Note that this issue does not occur with a longer interval such as 20 seconds.
The reason the issue occurs with a shorter interval is the following steps:
1) Upon initial boot, or after device recovery, the initial hw scan plus
the 11d scan will run, and when 6 GHz support is present, these scans
can take up to 12 seconds to complete, so ath11k_reg_update_chan_list()
is still waiting the completion of ar->completed_11d_scan.
2) If a simulate_fw_crash operation is received during this time, those
scans do not complete, and ath11k_core_pre_reconfigure_recovery()
complete the ar->completed_11d_scan, then ath11k_reg_update_chan_list()
wakeup and start to send WMI_SCAN_CHAN_LIST_CMDID, but firmware is crashed
at this moment, so wmi timed out occur.
To address this issue, reset the 11d state during device recovery so that
WMI_SCAN_CHAN_LIST_CMDID does not timed out for short interval time such
as 10 seconds.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Fixes: 1f682dc9fb37 ("ath11k: reduce the wait time of 11d scan and hw scan while add interface")
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220505034636.29582-1-quic_wgong@quicinc.com
2022-05-05 11:46:36 +08:00
|
|
|
ar->state_11d = ATH11K_11D_IDLE;
|
ath11k: reduce the wait time of 11d scan and hw scan while add interface
Currently ath11k will wait 11d scan complete while add interface in
ath11k_mac_op_add_interface(), when system resume without enable
wowlan, ath11k_mac_op_add_interface() is called for each resume, thus
it increase the resume time of system. And ath11k_mac_op_hw_scan()
after ath11k_mac_op_add_interface() also needs some time cost because
the previous 11d scan need more than 5 seconds when 6 GHz is enabled,
then the scan started event will indicated to ath11k after the 11d
scan completed.
While 11d scan/hw scan is running in firmware, if ath11k update channel
list to firmware by WMI_SCAN_CHAN_LIST_CMDID, then firmware will cancel
the current scan which is running, it lead the scan failed. The patch
commit 9dcf6808b253 ("ath11k: add 11d scan offload support") used
finish_11d_scan/finish_11d_ch_list/pending_11d to synchronize the 11d
scan/hw scan/channel list between ath11k/firmware/mac80211 and to avoid
the scan fail.
Add wait operation before ath11k update channel list, function
ath11k_reg_update_chan_list() will wait until the current 11d scan/hw
scan completed. And remove the wait operation of start 11d scan and
waiting channel list complete in hw scan. After these changes, resume
time cost reduce about 5 seconds and also hw scan time cost reduced
obviously, and scan failed not seen.
The 11d scan is sent to firmware only one time for each interface added
in mac.c, and it is moved after the 1st hw scan because 11d scan will
cost some time and thus leads the AP scan result update to UI delay.
Currently priority of ath11k's hw scan is WMI_SCAN_PRIORITY_LOW, and
priority of 11d scan in firmware is WMI_SCAN_PRIORITY_MEDIUM, then the
11d scan which sent after hw scan will cancel the hw scan in firmware,
so change the priority to WMI_SCAN_PRIORITY_MEDIUM for the hw scan which
is in front of the 11d scan, thus it will not happen scan cancel in
firmware.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Fixes: 9dcf6808b253 ("ath11k: add 11d scan offload support")
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220328035832.14122-1-quic_wgong@quicinc.com
2022-03-28 11:58:32 +08:00
|
|
|
complete(&ar->completed_11d_scan);
|
2019-11-23 15:58:40 +08:00
|
|
|
complete(&ar->scan.started);
|
|
|
|
complete(&ar->scan.completed);
|
|
|
|
complete(&ar->peer_assoc_done);
|
2020-11-24 23:59:14 +08:00
|
|
|
complete(&ar->peer_delete_done);
|
2019-11-23 15:58:40 +08:00
|
|
|
complete(&ar->install_key_done);
|
|
|
|
complete(&ar->vdev_setup_done);
|
2020-11-24 23:59:13 +08:00
|
|
|
complete(&ar->vdev_delete_done);
|
2019-11-23 15:58:40 +08:00
|
|
|
complete(&ar->bss_survey_done);
|
2020-02-15 08:25:22 +08:00
|
|
|
complete(&ar->thermal.wmi_sync);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
wake_up(&ar->dp.tx_empty_waitq);
|
|
|
|
idr_for_each(&ar->txmgmt_idr,
|
|
|
|
ath11k_mac_tx_mgmt_pending_free, ar);
|
|
|
|
idr_destroy(&ar->txmgmt_idr);
|
ath11k: add wait operation for tx management packets for flush from mac80211
In ath11k, tx of management packet is doing in a work queue. Sometimes
the workqueue does not finish tx immediately, then it lead after the next
step of vdev delete finished, it start to send the management packet to
firmware and lead firmware crash.
ieee80211_set_disassoc() have logic of ieee80211_flush_queues() after
it send_deauth_disassoc() to ath11k, its purpose is make sure the
deauth was actually sent, so it need to change ath11k to match the
purpose of mac80211.
To address these issue wait for tx mgmt as well as tx data packets.
dmesg log of connect/disconnect to AP:
[ 307.522226] wls1: authenticate with 62:66:e4:e9:6a:a9
[ 307.586565] wls1: send auth to 62:66:e4:e9:6a:a9 (try 1/3)
[ 307.586581] ath11k_pci 0000:05:00.0: mac tx mgmt frame, buf id 0
[ 307.586922] ath11k_pci 0000:05:00.0: mac tx mgmt frame, vdev_id 0
[ 307.590179] ath11k_pci 0000:05:00.0: wmi mgmt tx comp pending 0 desc id 0
[ 307.590181] ath11k_pci 0000:05:00.0: mgmt tx compl ev pdev_id 2, desc_id 0, status 0
[ 307.598699] wls1: authenticated
[ 307.599483] wls1: associate with 62:66:e4:e9:6a:a9 (try 1/3)
[ 307.599506] ath11k_pci 0000:05:00.0: mac tx mgmt frame, buf id 0
[ 307.599519] ath11k_pci 0000:05:00.0: mac tx mgmt frame, vdev_id 0
[ 307.603059] ath11k_pci 0000:05:00.0: wmi mgmt tx comp pending 0 desc id 0
[ 307.603063] ath11k_pci 0000:05:00.0: mgmt tx compl ev pdev_id 2, desc_id 0, status 0
[ 307.637105] wls1: associated
[ 317.365239] wls1: deauthenticating from 62:66:e4:e9:6a:a9 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 317.368104] ath11k_pci 0000:05:00.0: mac tx mgmt frame, buf id 0
[ 317.372622] ath11k_pci 0000:05:00.0: mac tx mgmt frame, vdev_id 0
[ 317.378320] ath11k_pci 0000:05:00.0: wmi mgmt tx comp pending 0 desc id 0
[ 317.378330] ath11k_pci 0000:05:00.0: mgmt tx compl ev pdev_id 2, desc_id 0, status 0
[ 317.378359] ath11k_pci 0000:05:00.0: mac mgmt tx flush mgmt pending 0
[ 317.421066] ath11k_pci 0000:05:00.0: mac mgmt tx flush mgmt pending 0
[ 317.421427] ath11k_pci 0000:05:00.0: mac remove interface (vdev 0)
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01230-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211202063705.14321-1-quic_wgong@quicinc.com
2021-12-02 14:37:05 +08:00
|
|
|
wake_up(&ar->txmgmt_empty_waitq);
|
2019-11-23 15:58:40 +08:00
|
|
|
}
|
|
|
|
|
2019-12-13 23:38:34 +08:00
|
|
|
wake_up(&ab->wmi_ab.tx_credits_wq);
|
2019-11-23 15:58:40 +08:00
|
|
|
wake_up(&ab->peer_mapping_wq);
|
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of
each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash()
is the main function for recovery of ath11k_base, it has more than
one ieee80211_hw and ath11k for each ath11k_base, so it need to add
synchronization between them, otherwise it has many issue.
For example, when ath11k_core_reconfigure_on_crash() is not complete,
mac80211 send a hw scan request to ath11k, it leads firmware crash,
because firmware has not been initialized at that moment, firmware
is only finished downloaded and loaded, it can not receive scan
command.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
2022-03-21 19:16:57 +08:00
|
|
|
}
|
2019-11-23 15:58:40 +08:00
|
|
|
|
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of
each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash()
is the main function for recovery of ath11k_base, it has more than
one ieee80211_hw and ath11k for each ath11k_base, so it need to add
synchronization between them, otherwise it has many issue.
For example, when ath11k_core_reconfigure_on_crash() is not complete,
mac80211 send a hw scan request to ath11k, it leads firmware crash,
because firmware has not been initialized at that moment, firmware
is only finished downloaded and loaded, it can not receive scan
command.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
2022-03-21 19:16:57 +08:00
|
|
|
static void ath11k_core_post_reconfigure_recovery(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
struct ath11k *ar;
|
|
|
|
struct ath11k_pdev *pdev;
|
|
|
|
int i;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
for (i = 0; i < ab->num_radios; i++) {
|
|
|
|
pdev = &ab->pdevs[i];
|
|
|
|
ar = pdev->ar;
|
|
|
|
if (!ar || ar->state == ATH11K_STATE_OFF)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
mutex_lock(&ar->conf_mutex);
|
|
|
|
|
|
|
|
switch (ar->state) {
|
|
|
|
case ATH11K_STATE_ON:
|
|
|
|
ar->state = ATH11K_STATE_RESTARTING;
|
|
|
|
ath11k_core_halt(ar);
|
|
|
|
ieee80211_restart_hw(ar->hw);
|
|
|
|
break;
|
|
|
|
case ATH11K_STATE_OFF:
|
|
|
|
ath11k_warn(ab,
|
|
|
|
"cannot restart radio %d that hasn't been started\n",
|
|
|
|
i);
|
|
|
|
break;
|
|
|
|
case ATH11K_STATE_RESTARTING:
|
|
|
|
break;
|
|
|
|
case ATH11K_STATE_RESTARTED:
|
|
|
|
ar->state = ATH11K_STATE_WEDGED;
|
2020-07-28 03:44:15 +08:00
|
|
|
fallthrough;
|
2019-11-23 15:58:40 +08:00
|
|
|
case ATH11K_STATE_WEDGED:
|
|
|
|
ath11k_warn(ab,
|
|
|
|
"device is wedged, will not restart radio %d\n", i);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
mutex_unlock(&ar->conf_mutex);
|
|
|
|
}
|
|
|
|
complete(&ab->driver_recovery);
|
|
|
|
}
|
|
|
|
|
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of
each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash()
is the main function for recovery of ath11k_base, it has more than
one ieee80211_hw and ath11k for each ath11k_base, so it need to add
synchronization between them, otherwise it has many issue.
For example, when ath11k_core_reconfigure_on_crash() is not complete,
mac80211 send a hw scan request to ath11k, it leads firmware crash,
because firmware has not been initialized at that moment, firmware
is only finished downloaded and loaded, it can not receive scan
command.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
2022-03-21 19:16:57 +08:00
|
|
|
static void ath11k_core_restart(struct work_struct *work)
|
|
|
|
{
|
|
|
|
struct ath11k_base *ab = container_of(work, struct ath11k_base, restart_work);
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
if (!ab->is_reset)
|
|
|
|
ath11k_core_pre_reconfigure_recovery(ab);
|
|
|
|
|
|
|
|
ret = ath11k_core_reconfigure_on_crash(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to reconfigure driver on crash recovery\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ab->is_reset)
|
|
|
|
complete_all(&ab->reconfigure_complete);
|
|
|
|
|
|
|
|
if (!ab->is_reset)
|
|
|
|
ath11k_core_post_reconfigure_recovery(ab);
|
|
|
|
}
|
|
|
|
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
static void ath11k_core_reset(struct work_struct *work)
|
|
|
|
{
|
|
|
|
struct ath11k_base *ab = container_of(work, struct ath11k_base, reset_work);
|
|
|
|
int reset_count, fail_cont_count;
|
|
|
|
long time_left;
|
|
|
|
|
|
|
|
if (!(test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags))) {
|
|
|
|
ath11k_warn(ab, "ignore reset dev flags 0x%lx\n", ab->dev_flags);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Sometimes the recovery will fail and then the next all recovery fail,
|
|
|
|
* this is to avoid infinite recovery since it can not recovery success.
|
|
|
|
*/
|
|
|
|
fail_cont_count = atomic_read(&ab->fail_cont_count);
|
|
|
|
|
|
|
|
if (fail_cont_count >= ATH11K_RESET_MAX_FAIL_COUNT_FINAL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (fail_cont_count >= ATH11K_RESET_MAX_FAIL_COUNT_FIRST &&
|
|
|
|
time_before(jiffies, ab->reset_fail_timeout))
|
|
|
|
return;
|
|
|
|
|
|
|
|
reset_count = atomic_inc_return(&ab->reset_count);
|
|
|
|
|
|
|
|
if (reset_count > 1) {
|
|
|
|
/* Sometimes it happened another reset worker before the previous one
|
|
|
|
* completed, then the second reset worker will destroy the previous one,
|
|
|
|
* thus below is to avoid that.
|
|
|
|
*/
|
2022-04-07 18:28:20 +08:00
|
|
|
ath11k_warn(ab, "already resetting count %d\n", reset_count);
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
|
|
|
|
reinit_completion(&ab->reset_complete);
|
|
|
|
time_left = wait_for_completion_timeout(&ab->reset_complete,
|
|
|
|
ATH11K_RESET_TIMEOUT_HZ);
|
|
|
|
|
|
|
|
if (time_left) {
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "to skip reset\n");
|
|
|
|
atomic_dec(&ab->reset_count);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ab->reset_fail_timeout = jiffies + ATH11K_RESET_FAIL_TIMEOUT_HZ;
|
|
|
|
/* Record the continuous recovery fail count when recovery failed*/
|
|
|
|
atomic_inc(&ab->fail_cont_count);
|
|
|
|
}
|
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset starting\n");
|
|
|
|
|
|
|
|
ab->is_reset = true;
|
|
|
|
atomic_set(&ab->recovery_count, 0);
|
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of
each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash()
is the main function for recovery of ath11k_base, it has more than
one ieee80211_hw and ath11k for each ath11k_base, so it need to add
synchronization between them, otherwise it has many issue.
For example, when ath11k_core_reconfigure_on_crash() is not complete,
mac80211 send a hw scan request to ath11k, it leads firmware crash,
because firmware has not been initialized at that moment, firmware
is only finished downloaded and loaded, it can not receive scan
command.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
2022-03-21 19:16:57 +08:00
|
|
|
reinit_completion(&ab->recovery_start);
|
|
|
|
atomic_set(&ab->recovery_start_count, 0);
|
|
|
|
|
|
|
|
ath11k_core_pre_reconfigure_recovery(ab);
|
|
|
|
|
|
|
|
reinit_completion(&ab->reconfigure_complete);
|
|
|
|
ath11k_core_post_reconfigure_recovery(ab);
|
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "waiting recovery start...\n");
|
|
|
|
|
|
|
|
time_left = wait_for_completion_timeout(&ab->recovery_start,
|
|
|
|
ATH11K_RECOVER_START_TIMEOUT_HZ);
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
|
|
|
|
ath11k_hif_power_down(ab);
|
|
|
|
ath11k_qmi_free_resource(ab);
|
|
|
|
ath11k_hif_power_up(ab);
|
|
|
|
|
|
|
|
ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset started\n");
|
|
|
|
}
|
|
|
|
|
2020-06-16 22:00:45 +08:00
|
|
|
static int ath11k_init_hw_params(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
const struct ath11k_hw_params *hw_params = NULL;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(ath11k_hw_params); i++) {
|
|
|
|
hw_params = &ath11k_hw_params[i];
|
|
|
|
|
|
|
|
if (hw_params->hw_rev == ab->hw_rev)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i == ARRAY_SIZE(ath11k_hw_params)) {
|
|
|
|
ath11k_err(ab, "Unsupported hardware version: 0x%x\n", ab->hw_rev);
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ab->hw_params = *hw_params;
|
|
|
|
|
2021-02-18 03:16:40 +08:00
|
|
|
ath11k_info(ab, "%s\n", ab->hw_params.name);
|
2020-06-16 22:00:45 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-08-13 17:04:23 +08:00
|
|
|
int ath11k_core_pre_init(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = ath11k_init_hw_params(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to get hw params: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(ath11k_core_pre_init);
|
|
|
|
|
2020-08-13 17:04:26 +08:00
|
|
|
int ath11k_core_init(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
ret = ath11k_core_soc_create(ab);
|
|
|
|
if (ret) {
|
|
|
|
ath11k_err(ab, "failed to create soc core: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2020-08-13 17:04:25 +08:00
|
|
|
EXPORT_SYMBOL(ath11k_core_init);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
void ath11k_core_deinit(struct ath11k_base *ab)
|
|
|
|
{
|
|
|
|
mutex_lock(&ab->core_lock);
|
|
|
|
|
|
|
|
ath11k_core_pdev_destroy(ab);
|
|
|
|
ath11k_core_stop(ab);
|
|
|
|
|
|
|
|
mutex_unlock(&ab->core_lock);
|
|
|
|
|
2020-05-08 10:55:44 +08:00
|
|
|
ath11k_hif_power_down(ab);
|
2019-11-23 15:58:40 +08:00
|
|
|
ath11k_mac_destroy(ab);
|
|
|
|
ath11k_core_soc_destroy(ab);
|
|
|
|
}
|
2020-08-13 17:04:20 +08:00
|
|
|
EXPORT_SYMBOL(ath11k_core_deinit);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
void ath11k_core_free(struct ath11k_base *ab)
|
|
|
|
{
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
destroy_workqueue(ab->workqueue_aux);
|
2022-01-10 22:24:14 +08:00
|
|
|
destroy_workqueue(ab->workqueue);
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
kfree(ab);
|
|
|
|
}
|
2020-08-13 17:04:20 +08:00
|
|
|
EXPORT_SYMBOL(ath11k_core_free);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
2020-05-08 10:55:48 +08:00
|
|
|
struct ath11k_base *ath11k_core_alloc(struct device *dev, size_t priv_size,
|
2022-04-30 01:04:55 +08:00
|
|
|
enum ath11k_bus bus)
|
2019-11-23 15:58:40 +08:00
|
|
|
{
|
|
|
|
struct ath11k_base *ab;
|
|
|
|
|
2020-05-08 10:55:48 +08:00
|
|
|
ab = kzalloc(sizeof(*ab) + priv_size, GFP_KERNEL);
|
2019-11-23 15:58:40 +08:00
|
|
|
if (!ab)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
init_completion(&ab->driver_recovery);
|
|
|
|
|
|
|
|
ab->workqueue = create_singlethread_workqueue("ath11k_wq");
|
|
|
|
if (!ab->workqueue)
|
|
|
|
goto err_sc_free;
|
|
|
|
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
ab->workqueue_aux = create_singlethread_workqueue("ath11k_aux_wq");
|
|
|
|
if (!ab->workqueue_aux)
|
|
|
|
goto err_free_wq;
|
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
mutex_init(&ab->core_lock);
|
2022-03-23 17:14:17 +08:00
|
|
|
mutex_init(&ab->tbl_mtx_lock);
|
2019-11-23 15:58:40 +08:00
|
|
|
spin_lock_init(&ab->base_lock);
|
2021-12-07 23:23:36 +08:00
|
|
|
mutex_init(&ab->vdev_id_11d_lock);
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
init_completion(&ab->reset_complete);
|
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of
each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash()
is the main function for recovery of ath11k_base, it has more than
one ieee80211_hw and ath11k for each ath11k_base, so it need to add
synchronization between them, otherwise it has many issue.
For example, when ath11k_core_reconfigure_on_crash() is not complete,
mac80211 send a hw scan request to ath11k, it leads firmware crash,
because firmware has not been initialized at that moment, firmware
is only finished downloaded and loaded, it can not receive scan
command.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
2022-03-21 19:16:57 +08:00
|
|
|
init_completion(&ab->reconfigure_complete);
|
|
|
|
init_completion(&ab->recovery_start);
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
INIT_LIST_HEAD(&ab->peers);
|
|
|
|
init_waitqueue_head(&ab->peer_mapping_wq);
|
2019-12-13 23:38:34 +08:00
|
|
|
init_waitqueue_head(&ab->wmi_ab.tx_credits_wq);
|
2020-10-16 23:28:31 +08:00
|
|
|
init_waitqueue_head(&ab->qmi.cold_boot_waitq);
|
2019-11-23 15:58:40 +08:00
|
|
|
INIT_WORK(&ab->restart_work, ath11k_core_restart);
|
2021-12-07 23:23:36 +08:00
|
|
|
INIT_WORK(&ab->update_11d_work, ath11k_update_11d);
|
2021-12-21 00:11:09 +08:00
|
|
|
INIT_WORK(&ab->rfkill_work, ath11k_rfkill_work);
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
INIT_WORK(&ab->reset_work, ath11k_core_reset);
|
2019-11-23 15:58:40 +08:00
|
|
|
timer_setup(&ab->rx_replenish_retry, ath11k_ce_rx_replenish_retry, 0);
|
2020-12-12 01:35:45 +08:00
|
|
|
init_completion(&ab->htc_suspend);
|
2020-12-12 01:35:48 +08:00
|
|
|
init_completion(&ab->wow.wakeup_completed);
|
2020-12-12 01:35:45 +08:00
|
|
|
|
2019-11-23 15:58:40 +08:00
|
|
|
ab->dev = dev;
|
2020-08-14 15:10:21 +08:00
|
|
|
ab->hif.bus = bus;
|
2019-11-23 15:58:40 +08:00
|
|
|
|
|
|
|
return ab;
|
|
|
|
|
ath11k: add support for device recovery for QCA6390/WCN6855
Currently ath11k has device recovery logic, it is introduced by this
patch "ath11k: Add support for subsystem recovery" which is upstream
by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
The patch is for AHB devices such as IPQ8074, it has remote proc module
which is used to download the firmware and boots the processor which
firmware is running on. If firmware crashed, remote proc module will
detect it and download and boot firmware again. Below command will
trigger a firmware crash, and then user can test feature of device
recovery.
Test command:
echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
module, it use mhi module to communicate between firmware and ath11k.
So ath11k does not support device recovery for QCA6390 currently.
This patch is to add the extra logic which is different for QCA6390.
When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
firmware and then ath11k_mhi_op_status_cb which is the callback of
mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
will start to do recovery process, ath11k_core_reset() calls
ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
will start to download and boot firmware. There are some logic to
avoid deadloop recovery and two simultaneous recovery operations.
And because it has muti-radios for the soc, so it add some logic
in ath11k_mac_op_reconfig_complete() to make sure all radios has
reconfig complete and then complete the device recovery.
Also it add workqueue_aux, because ab->workqueue is used when receive
ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
&ab->restart_work)), and ath11k_core_reset will wait for max
ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
ath11k_core_reset also queued in ab->workqueue, then it will delay
restart_work of previous recovery and lead previous recovery fail.
ath11k recovery success for QCA6390/WCN6855 after apply this patch.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220228064606.8981-2-quic_wgong@quicinc.com
2022-02-28 14:46:03 +08:00
|
|
|
err_free_wq:
|
|
|
|
destroy_workqueue(ab->workqueue);
|
2019-11-23 15:58:40 +08:00
|
|
|
err_sc_free:
|
|
|
|
kfree(ab);
|
|
|
|
return NULL;
|
|
|
|
}
|
2020-08-13 17:04:20 +08:00
|
|
|
EXPORT_SYMBOL(ath11k_core_alloc);
|
|
|
|
|
|
|
|
MODULE_DESCRIPTION("Core module for Qualcomm Atheros 802.11ax wireless LAN cards.");
|
|
|
|
MODULE_LICENSE("Dual BSD/GPL");
|