summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/debug.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2019-09-19 14:25:43 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-04 10:47:35 +0200
commit846239f641db5af8dd952575a65808281f2d849e (patch)
tree2a26524b1b29e85026ffe5f20b742c91848fdf89 /drivers/staging/wfx/debug.c
parentf95a29d40782f4f0052a692a822de3ba044b19ff (diff)
staging: wfx: introduce "secure link"
Chip support encryption of the link between host and chip. This feature is called "secure link". Driver code on github[1] support it. However, it relies on mbedtls for cryptographic functions. So, I decided to not import this feature in current patch. However, in order to keep code synchronized between github and kernel, I imported all code related to this feature, even if most of it is just no-op. [1]: https://github.com/SiliconLabs/wfx-linux-driver/ Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20190919142527.31797-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/debug.c')
-rw-r--r--drivers/staging/wfx/debug.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c
index 0a328c96eaa0..f79693a4be7f 100644
--- a/drivers/staging/wfx/debug.c
+++ b/drivers/staging/wfx/debug.c
@@ -6,6 +6,7 @@
* Copyright (c) 2010, ST-Ericsson
*/
#include <linux/debugfs.h>
+#include <linux/crc32.h>
#include "debug.h"
#include "wfx.h"
@@ -53,6 +54,21 @@ const char *get_reg_name(unsigned long id)
return get_symbol(id, wfx_reg_print_map);
}
+static ssize_t wfx_burn_slk_key_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct wfx_dev *wdev = file->private_data;
+
+ dev_info(wdev->dev, "this driver does not support secure link\n");
+ return -EINVAL;
+}
+
+static const struct file_operations wfx_burn_slk_key_fops = {
+ .open = simple_open,
+ .write = wfx_burn_slk_key_write,
+};
+
struct dbgfs_hif_msg {
struct wfx_dev *wdev;
struct completion complete;
@@ -146,6 +162,7 @@ int wfx_debug_init(struct wfx_dev *wdev)
struct dentry *d;
d = debugfs_create_dir("wfx", wdev->hw->wiphy->debugfsdir);
+ debugfs_create_file("burn_slk_key", 0200, d, wdev, &wfx_burn_slk_key_fops);
debugfs_create_file("send_hif_msg", 0600, d, wdev, &wfx_send_hif_msg_fops);
return 0;