summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMaya Erez <merez@codeaurora.org>2019-06-16 03:26:02 -0400
committerKalle Valo <kvalo@codeaurora.org>2019-06-27 13:50:19 -0400
commitf2b6b46e483b9a084088853ecc4123118791829e (patch)
tree6c9b121d2d58c7da49be4ce6b780fe90651ff44f /drivers/net/wireless
parentdedec35b40195f56d16386eea51c8255bf034dba (diff)
wil6210: clear FW and ucode log address
Clear the FW and ucode log address on device initialization to allow user space app identify when the address was set by FW/ucode and it can start read. Signed-off-by: Tzahi Sabo <stzahi@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/wil6210/main.c15
-rw-r--r--drivers/net/wireless/ath/wil6210/pcie_bus.c1
-rw-r--r--drivers/net/wireless/ath/wil6210/wil6210.h1
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 3c30076efb64..f7b9e6b85ef4 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1522,6 +1522,7 @@ int wil_ps_update(struct wil6210_priv *wil, enum wmi_ps_profile_type ps_profile)
1522 1522
1523static void wil_pre_fw_config(struct wil6210_priv *wil) 1523static void wil_pre_fw_config(struct wil6210_priv *wil)
1524{ 1524{
1525 wil_clear_fw_log_addr(wil);
1525 /* Mark FW as loaded from host */ 1526 /* Mark FW as loaded from host */
1526 wil_s(wil, RGF_USER_USAGE_6, 1); 1527 wil_s(wil, RGF_USER_USAGE_6, 1);
1527 1528
@@ -1579,6 +1580,20 @@ static int wil_restore_vifs(struct wil6210_priv *wil)
1579} 1580}
1580 1581
1581/* 1582/*
1583 * Clear FW and ucode log start addr to indicate FW log is not ready. The host
1584 * driver clears the addresses before FW starts and FW initializes the address
1585 * when it is ready to send logs.
1586 */
1587void wil_clear_fw_log_addr(struct wil6210_priv *wil)
1588{
1589 /* FW log addr */
1590 wil_w(wil, RGF_USER_USAGE_1, 0);
1591 /* ucode log addr */
1592 wil_w(wil, RGF_USER_USAGE_2, 0);
1593 wil_dbg_misc(wil, "Cleared FW and ucode log address");
1594}
1595
1596/*
1582 * We reset all the structures, and we reset the UMAC. 1597 * We reset all the structures, and we reset the UMAC.
1583 * After calling this routine, you're expected to reload 1598 * After calling this routine, you're expected to reload
1584 * the firmware. 1599 * the firmware.
diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c
index 4e2d9221b8e6..9f5a914abc18 100644
--- a/drivers/net/wireless/ath/wil6210/pcie_bus.c
+++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c
@@ -420,6 +420,7 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
420 } 420 }
421 /* rollback to bus_disable */ 421 /* rollback to bus_disable */
422 422
423 wil_clear_fw_log_addr(wil);
423 rc = wil_if_add(wil); 424 rc = wil_if_add(wil);
424 if (rc) { 425 if (rc) {
425 wil_err(wil, "wil_if_add failed: %d\n", rc); 426 wil_err(wil, "wil_if_add failed: %d\n", rc);
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 75abec2f94aa..afbc5240a110 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -1425,4 +1425,5 @@ int wmi_addba_rx_resp_edma(struct wil6210_priv *wil, u8 mid, u8 cid,
1425 1425
1426void update_supported_bands(struct wil6210_priv *wil); 1426void update_supported_bands(struct wil6210_priv *wil);
1427 1427
1428void wil_clear_fw_log_addr(struct wil6210_priv *wil);
1428#endif /* __WIL6210_H__ */ 1429#endif /* __WIL6210_H__ */