Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
[linux-2.6-microblaze.git] / drivers / staging / wfx / secure_link.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2019, Silicon Laboratories, Inc.
4  */
5 #ifndef WFX_SECURE_LINK_H
6 #define WFX_SECURE_LINK_H
7
8 #include <linux/of.h>
9
10 #include "hif_api_general.h"
11
12 struct wfx_dev;
13
14
15 struct sl_context {
16 };
17
18 static inline bool wfx_is_secure_command(struct wfx_dev *wdev, int cmd_id)
19 {
20         return false;
21 }
22
23 static inline int wfx_sl_decode(struct wfx_dev *wdev, struct hif_sl_msg *m)
24 {
25         return -EIO;
26 }
27
28 static inline int wfx_sl_encode(struct wfx_dev *wdev,
29                                 const struct hif_msg *input,
30                                 struct hif_sl_msg *output)
31 {
32         return -EIO;
33 }
34
35 static inline int wfx_sl_check_pubkey(struct wfx_dev *wdev,
36                                       const u8 *ncp_pubkey,
37                                       const u8 *ncp_pubmac)
38 {
39         return -EIO;
40 }
41
42 static inline void wfx_sl_fill_pdata(struct device *dev,
43                                      struct wfx_platform_data *pdata)
44 {
45         if (of_find_property(dev->of_node, "slk_key", NULL))
46                 dev_err(dev, "secure link is not supported by this driver, ignoring provided key\n");
47 }
48
49 static inline int wfx_sl_init(struct wfx_dev *wdev)
50 {
51         return -EIO;
52 }
53
54 static inline void wfx_sl_deinit(struct wfx_dev *wdev)
55 {
56 }
57
58
59 #endif