Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6caa52e7 authored by Maya Erez's avatar Maya Erez
Browse files

wil6210: support Talyn specific board file



FW file name for Talyn device can be different from the default name.
In such a case use a corresponding board file name.
If such a board file is not present FW download procedure will fail.

Change-Id: If5d4bc6af8a91d617039bc56bf58d47999bd9040
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 4b89284c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2015,2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
@@ -22,6 +23,8 @@
MODULE_FIRMWARE(WIL_FW_NAME_DEFAULT);
MODULE_FIRMWARE(WIL_FW_NAME_SPARROW_PLUS);
MODULE_FIRMWARE(WIL_BOARD_FILE_NAME);
MODULE_FIRMWARE(WIL_FW_NAME_TALYN);
MODULE_FIRMWARE(WIL_BRD_NAME_TALYN);

static
void wil_memset_toio_32(volatile void __iomem *dst, u32 val,
+15 −2
Original line number Diff line number Diff line
@@ -1137,10 +1137,23 @@ void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r)
/* construct actual board file name to use */
void wil_get_board_file(struct wil6210_priv *wil, char *buf, size_t len)
{
	const char *board_file = wil->board_file ?
					wil->board_file : WIL_BOARD_FILE_NAME;
	const char *board_file;
	const char *ext;
	int prefix_len;
	const char *wil_talyn_fw_name = ftm_mode ? WIL_FW_NAME_FTM_TALYN :
			      WIL_FW_NAME_TALYN;

	if (wil->board_file) {
		board_file = wil->board_file;
	} else {
		/* If specific FW file is used for Talyn,
		 * use specific board file
		 */
		if (strcmp(wil->wil_fw_name, wil_talyn_fw_name) == 0)
			board_file = WIL_BRD_NAME_TALYN;
		else
			board_file = WIL_BOARD_FILE_NAME;
	}

	if (wil->board_file_country[0] == '\0') {
		strlcpy(buf, board_file, len);
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ static bool use_msi = true;
module_param(use_msi, bool, 0444);
MODULE_PARM_DESC(use_msi, " Use MSI interrupt, default - true");

static bool ftm_mode;
bool ftm_mode;
module_param(ftm_mode, bool, 0444);
MODULE_PARM_DESC(ftm_mode, " Set factory test mode, default - false");

+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ extern bool debug_fw;
extern bool disable_ap_sme;
extern bool use_rx_hw_reordering;
extern bool use_compressed_rx_status;
extern bool ftm_mode;

struct wil6210_priv;
struct wil6210_vif;
@@ -55,6 +56,7 @@ union wil_tx_desc;

#define WIL_FW_NAME_TALYN "wil6436.fw"
#define WIL_FW_NAME_FTM_TALYN "wil6436_ftm.fw"
#define WIL_BRD_NAME_TALYN "wil6436.brd"

#define WIL_BOARD_FILE_NAME "wil6210.brd" /* board & radio parameters */