summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210/wmi.c
diff options
context:
space:
mode:
authorLior David <liord@codeaurora.org>2018-01-21 12:14:41 +0300
committerKalle Valo <kvalo@codeaurora.org>2018-01-25 08:32:23 +0300
commit70bcc658c0b13d9e89033e1981daf0f431f39522 (patch)
tree8614a39e73bab6381a2a212fcbe732f5e7bc9a3c /drivers/net/wireless/ath/wil6210/wmi.c
parentb8e13b87b15d2dde8c61ad7de5626d07a9d4da01 (diff)
downloadlinux-70bcc658c0b13d9e89033e1981daf0f431f39522.tar.xz
wil6210: fix random failure to bring network interface up
Currently when we want to bring the interface up, we first reset the device which causes the boot loader to run. Then we halt the device CPU, load FW image and resume the device CPU. There are some boot loader versions which perform redundant memory accesses even when idle. Halting the device CPU while boot loader access memory can cause the device memory controller to get stuck, the FW will fail to load and the network interface will not come up. For such boot loaders implement a workaround where we freeze the boot loader before halting the device CPU, so it will not perform any memory accesses. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wmi.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/wmi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index 69da3c256ad0..43c5803a35af 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -185,6 +185,24 @@ static u32 wmi_addr_remap(u32 x)
}
/**
+ * find fw_mapping entry by section name
+ * @section - section name
+ *
+ * Return pointer to section or NULL if not found
+ */
+struct fw_map *wil_find_fw_mapping(const char *section)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(fw_mapping); i++)
+ if (fw_mapping[i].name &&
+ !strcmp(section, fw_mapping[i].name))
+ return &fw_mapping[i];
+
+ return NULL;
+}
+
+/**
* Check address validity for WMI buffer; remap if needed
* @ptr - internal (linker) fw/ucode address
* @size - if non zero, validate the block does not