summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/fw_inc.c
diff options
context:
space:
mode:
authorLazar Alexei <qca_ailizaro@qca.qualcomm.com>2017-01-20 13:49:45 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2017-01-27 19:49:26 +0200
commita351f2f537b711bed3d0f6a75d7e9fddcbe51ffe (patch)
treeca9b581a1675697fdf1d7b7e38e1c172bff9dd13 /drivers/net/wireless/ath/wil6210/fw_inc.c
parent849a564b7e28db7afed18d4b921303b7bd883112 (diff)
downloadtalos-obmc-linux-a351f2f537b711bed3d0f6a75d7e9fddcbe51ffe.tar.gz
talos-obmc-linux-a351f2f537b711bed3d0f6a75d7e9fddcbe51ffe.zip
wil6210: support loading dedicated image for sparrow-plus devices
Driver may be used in platforms where some use sparrow cards while other use sparrow-plus cards, where different FW image is needed. Add the capability to load dedicated FW image in case sparrow-plus card is detected and fallback to default image if such does not exist. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/fw_inc.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/fw_inc.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/fw_inc.c b/drivers/net/wireless/ath/wil6210/fw_inc.c
index 8f40eb301924..f4901587c005 100644
--- a/drivers/net/wireless/ath/wil6210/fw_inc.c
+++ b/drivers/net/wireless/ath/wil6210/fw_inc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 Qualcomm Atheros, Inc.
+ * Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -537,3 +537,22 @@ out:
release_firmware(fw);
return rc;
}
+
+/**
+ * wil_fw_verify_file_exists - checks if firmware file exist
+ *
+ * @wil: driver context
+ * @name: firmware file name
+ *
+ * return value - boolean, true for success, false for failure
+ */
+bool wil_fw_verify_file_exists(struct wil6210_priv *wil, const char *name)
+{
+ const struct firmware *fw;
+ int rc;
+
+ rc = request_firmware(&fw, name, wil_to_dev(wil));
+ if (!rc)
+ release_firmware(fw);
+ return rc != -ENOENT;
+}
OpenPOWER on IntegriCloud