[PATCH v2] ath11k: add string type to search board data in board-2.bin for WCN6855
Kalle Valo
kvalo at codeaurora.org
Mon Nov 15 04:33:29 PST 2021
Wen Gong <quic_wgong at quicinc.com> writes:
> 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 at quicinc.com>
> Signed-off-by: Jouni Malinen <quic_jouni at quicinc.com>
> ---
> v2: remove the mask of chip id and board id in ath11k_core_create_board_name()
>
> drivers/net/wireless/ath/ath11k/core.c | 27 ++++++++++++++++++++------
> drivers/net/wireless/ath/ath11k/core.h | 13 +++++++++++++
> drivers/net/wireless/ath/ath11k/pci.c | 10 ++++++++++
> 3 files changed, 44 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
> index 2012b0170e3c..3ac0dca997e1 100644
> --- a/drivers/net/wireless/ath/ath11k/core.c
> +++ b/drivers/net/wireless/ath/ath11k/core.c
> @@ -473,11 +473,26 @@ static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
> scnprintf(variant, sizeof(variant), ",variant=%s",
> ab->qmi.target.bdf_ext);
>
> - 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);
> + 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=%04x,qmi-board-id=%04x%s",
For consistency I changed qmi-chip-id and qmi-board-id to use %d, like
before:
"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
This is now in the pending branch.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath11k
mailing list