|
@@ -28,6 +28,7 @@
|
|
#define WAIT_FOR_HALP_VOTE_MS 100
|
|
#define WAIT_FOR_HALP_VOTE_MS 100
|
|
#define WAIT_FOR_SCAN_ABORT_MS 1000
|
|
#define WAIT_FOR_SCAN_ABORT_MS 1000
|
|
#define WIL_DEFAULT_NUM_RX_STATUS_RINGS 1
|
|
#define WIL_DEFAULT_NUM_RX_STATUS_RINGS 1
|
|
|
|
+#define WIL_BOARD_FILE_MAX_NAMELEN 128
|
|
|
|
|
|
bool debug_fw; /* = false; */
|
|
bool debug_fw; /* = false; */
|
|
module_param(debug_fw, bool, 0444);
|
|
module_param(debug_fw, bool, 0444);
|
|
@@ -1161,6 +1162,28 @@ void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r)
|
|
le32_to_cpus(&r->head);
|
|
le32_to_cpus(&r->head);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/* 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;
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ strlcpy(buf, board_file, len);
|
|
|
|
+}
|
|
|
|
+
|
|
static int wil_get_bl_info(struct wil6210_priv *wil)
|
|
static int wil_get_bl_info(struct wil6210_priv *wil)
|
|
{
|
|
{
|
|
struct net_device *ndev = wil->main_ndev;
|
|
struct net_device *ndev = wil->main_ndev;
|
|
@@ -1532,8 +1555,12 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
|
|
|
|
|
|
wil_set_oob_mode(wil, oob_mode);
|
|
wil_set_oob_mode(wil, oob_mode);
|
|
if (load_fw) {
|
|
if (load_fw) {
|
|
|
|
+ char board_file[WIL_BOARD_FILE_MAX_NAMELEN];
|
|
|
|
+
|
|
|
|
+ board_file[0] = '\0';
|
|
|
|
+ wil_get_board_file(wil, board_file, sizeof(board_file));
|
|
wil_info(wil, "Use firmware <%s> + board <%s>\n",
|
|
wil_info(wil, "Use firmware <%s> + board <%s>\n",
|
|
- wil->wil_fw_name, WIL_BOARD_FILE_NAME);
|
|
|
|
|
|
+ wil->wil_fw_name, board_file);
|
|
|
|
|
|
if (!no_flash)
|
|
if (!no_flash)
|
|
wil_bl_prepare_halt(wil);
|
|
wil_bl_prepare_halt(wil);
|
|
@@ -1545,11 +1572,9 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
|
|
if (rc)
|
|
if (rc)
|
|
goto out;
|
|
goto out;
|
|
if (wil->brd_file_addr)
|
|
if (wil->brd_file_addr)
|
|
- rc = wil_request_board(wil, WIL_BOARD_FILE_NAME);
|
|
|
|
|
|
+ rc = wil_request_board(wil, board_file);
|
|
else
|
|
else
|
|
- rc = wil_request_firmware(wil,
|
|
|
|
- WIL_BOARD_FILE_NAME,
|
|
|
|
- true);
|
|
|
|
|
|
+ rc = wil_request_firmware(wil, board_file, true);
|
|
if (rc)
|
|
if (rc)
|
|
goto out;
|
|
goto out;
|
|
|
|
|