From patchwork Thu Sep 19 14:25:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 11152673 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A42314ED for ; Thu, 19 Sep 2019 14:26:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13B422053B for ; Thu, 19 Sep 2019 14:26:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="nsPhScAm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732154AbfISOZ4 (ORCPT ); Thu, 19 Sep 2019 10:25:56 -0400 Received: from mail-eopbgr780077.outbound.protection.outlook.com ([40.107.78.77]:37536 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389194AbfISOZz (ORCPT ); Thu, 19 Sep 2019 10:25:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XCt1lN1QRO3GnR6FCyPSHXakMUHl8GRoaXjsr6tF9Cw51DkTQ68feQouj80xC/WFdS/3Z9sr3DCVcA1LT+Rc3CKER8w0FPYmR/7/BCflWBb+QQrgk6xLajaokDsaOXlzNeBKvOi4JLQ1pIe3Y/rzOjtRD0cgtBpTtwoGg/d4xaYd8At0J4n1oKhvLJ0pT8ot5bfMlIwgVeVDBNdhoCwr42F6cW2wMA6e6J2vwix4OSIkkqPhDmbW7yJ/2dFjXFAwGkFFLfICG5dyRRurGnaEYAwQWiBLNdauZ9a7dXSXHCQJdcVRxKKmQ/jLi5X52HWq145C2KeZ5AaM1wFC4ffOvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C16t5u2fKbZMsb1XpkROFbJsoHmvNiTqn1575XyqEhE=; b=GXEuKVaG4Y8GQx1Tlp//lDwelelULXa6IQYe1iBHdS+BLxken6l0SviaGX1IfsYXfY35fBI0E0cZRtvmrd8JsjFnLWWH4of1ilAN1NHb+cBETaWcvRF+/GG7Dz8RR7f27u1WtzpuJfZ1qSZX30tZ2pi3Deby535OR0nT/Kxr9VUalwOzBcL2g19zOf6eXc8D0vHlTLUpLbnmIx0mf5bHrIDMELETxGR9ORbgPd+9fmVBrb4HLOLjGsvgL3jhvgygx6F2eC2kgh++DuKJn8U6qCx94OPCF6Bi2cK2f04rGM50gpFrJNy8lPqhPXfEaBRp2F4nsqg7zlv7dFx5MMdssw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C16t5u2fKbZMsb1XpkROFbJsoHmvNiTqn1575XyqEhE=; b=nsPhScAmIkhNDOabs69vg34UeCFarmmwRwwVpAsEnazVCDKBUin+zPtcRaa7X1bTtXhLSPYIyaBc8c1YO9fqPXsm5R3N6zqtioEfqiG9OtuT1SgHtUeV4F08gZ4dVBfDN7VztPU2vQbLxOydCjd4yMRY3leJVQBXeZ8FKspVLpE= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (20.179.149.217) by MN2PR11MB4144.namprd11.prod.outlook.com (20.179.150.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20; Thu, 19 Sep 2019 14:25:44 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::45dc:e073:4446:4bf8]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::45dc:e073:4446:4bf8%3]) with mapi id 15.20.2263.023; Thu, 19 Sep 2019 14:25:44 +0000 From: Jerome Pouiller To: "devel@driverdev.osuosl.org" , "linux-wireless@vger.kernel.org" CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , David Le Goff , Jerome Pouiller Subject: [PATCH v3 13/20] staging: wfx: introduce "secure link" Thread-Topic: [PATCH v3 13/20] staging: wfx: introduce "secure link" Thread-Index: AQHVbvYfrCIcxTTgIEK3tLiPVFGBUw== Date: Thu, 19 Sep 2019 14:25:43 +0000 Message-ID: <20190919142527.31797-14-Jerome.Pouiller@silabs.com> References: <20190919142527.31797-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20190919142527.31797-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 02834f8b-23d6-4cf2-2b8a-08d73d0d421f x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600167)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:MN2PR11MB4144; x-ms-traffictypediagnostic: MN2PR11MB4144: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1284; x-forefront-prvs: 016572D96D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(396003)(376002)(366004)(39850400004)(346002)(52314003)(199004)(189003)(86362001)(66066001)(66574012)(2616005)(14454004)(478600001)(54906003)(8676002)(71190400001)(966005)(36756003)(71200400001)(7736002)(316002)(305945005)(110136005)(6436002)(256004)(81156014)(14444005)(6486002)(6512007)(6306002)(186003)(11346002)(91956017)(486006)(446003)(26005)(2501003)(99286004)(66446008)(66946007)(76176011)(476003)(66556008)(64756008)(66476007)(4326008)(102836004)(6506007)(107886003)(5660300002)(30864003)(76116006)(25786009)(81166006)(1076003)(8936002)(2906002)(3846002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4144;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /+9ZJgzTLQboUjj8Pqe09y+y1MGkNopZEahI2ELYNlNlvzsJxKydSk3HwRD1ap6a4Dbr8R3HkkW8FTwWOuCVn+1shpi0lZbKTl4xn2qDO5pm++nplJR4yiH/CrWN/+0jiA+rMp8sZs50ZOyt975HLI1QfPpdRsmImGE0bebG/5COJbXQsyepab/PzNQgE9F8z1IqlqgnsDVC6cPEE7cInAVzCvWcw577azYoOPKR9firQ1RD4RYX6PFqQkUN1befTt3vw9mJeZcJhMT51Z/e3SukG5O0WY+rTiRzICRGqUOzbgOtL0JwA2r7byODNB7HOg/Kg3N87YRDyLCgt+uIh165WMm1qDP/06TPAvKlEtrWcDnaog4KIxmNUo2ZGwBmhnSSq9RsFCiOwzCZc4J3JoDUr0o+Oh0LFfEVBZaofYU= Content-ID: <6065759C6EC58D419EC51B1CE954944B@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02834f8b-23d6-4cf2-2b8a-08d73d0d421f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2019 14:25:43.9268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VLlg+9PS7J7XVVnhlFYURo7Ox73d+WJc1KcahnRMb7UtyHSpxTIm9oE1gxzhEBMmD3msykJswxjfDgAqXVHryg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4144 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller 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 --- drivers/staging/wfx/bh.c | 31 +++++++++++++++++++-- drivers/staging/wfx/debug.c | 17 ++++++++++++ drivers/staging/wfx/hif_rx.c | 17 ++++++++++++ drivers/staging/wfx/hif_tx.c | 6 ++++ drivers/staging/wfx/hif_tx.h | 1 + drivers/staging/wfx/main.c | 36 ++++++++++++++++++++++++ drivers/staging/wfx/main.h | 2 ++ drivers/staging/wfx/secure_link.h | 46 +++++++++++++++++++++++++++++++ drivers/staging/wfx/wfx.h | 2 ++ 9 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 drivers/staging/wfx/secure_link.h diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index c94c9c401a69..d321fd312d55 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -12,6 +12,7 @@ #include "wfx.h" #include "hwio.h" #include "traces.h" +#include "secure_link.h" #include "hif_rx.h" #include "hif_api_cmd.h" @@ -74,7 +75,18 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) hif = (struct hif_msg *) skb->data; WARN(hif->encrypted & 0x1, "unsupported encryption type"); if (hif->encrypted == 0x2) { - BUG(); // Not yet implemented + if (wfx_sl_decode(wdev, (void *) hif)) { + dev_kfree_skb(skb); + // If frame was a confirmation, expect trouble in next + // exchange. However, it is harmless to fail to decode + // an indication frame, so try to continue. Anyway, + // piggyback is probably correct. + return piggyback; + } + le16_to_cpus(hif->len); + computed_len = round_up(hif->len - sizeof(hif->len), 16) + + sizeof(struct hif_sl_msg) + + sizeof(struct hif_sl_tag); } else { le16_to_cpus(hif->len); computed_len = round_up(hif->len, 2); @@ -166,7 +178,22 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) hif->seqnum = wdev->hif.tx_seqnum; wdev->hif.tx_seqnum = (wdev->hif.tx_seqnum + 1) % (HIF_COUNTER_MAX + 1); - data = hif; + if (wfx_is_secure_command(wdev, hif->id)) { + len = round_up(len - sizeof(hif->len), 16) + sizeof(hif->len) + + sizeof(struct hif_sl_msg_hdr) + sizeof(struct hif_sl_tag); + // AES support encryption in-place. However, mac80211 access to + // 802.11 header after frame was sent (to get MAC addresses). + // So, keep origin buffer clear. + data = kmalloc(len, GFP_KERNEL); + if (!data) + goto end; + is_encrypted = true; + ret = wfx_sl_encode(wdev, hif, data); + if (ret) + goto end; + } else { + data = hif; + } WARN(len > wdev->hw_caps.size_inp_ch_buf, "%s: request exceed WFx capability: %zu > %d\n", __func__, len, wdev->hw_caps.size_inp_ch_buf); 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 +#include #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; diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index ba8ea4f3c91b..dd5f1dea4e85 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -11,6 +11,7 @@ #include "hif_rx.h" #include "wfx.h" +#include "secure_link.h" #include "hif_api_cmd.h" static int hif_generic_confirm(struct wfx_dev *wdev, struct hif_msg *hif, void *buf) @@ -46,6 +47,8 @@ static int hif_generic_confirm(struct wfx_dev *wdev, struct hif_msg *hif, void * } else { wdev->hif_cmd.buf_send = NULL; mutex_unlock(&wdev->hif_cmd.lock); + if (cmd != HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS) + mutex_unlock(&wdev->hif_cmd.key_renew_lock); } return status; } @@ -68,11 +71,25 @@ static int hif_startup_indication(struct wfx_dev *wdev, struct hif_msg *hif, voi return 0; } +static int hif_keys_indication(struct wfx_dev *wdev, struct hif_msg *hif, void *buf) +{ + struct hif_ind_sl_exchange_pub_keys *body = buf; + + // Compatibility with legacy secure link + if (body->status == SL_PUB_KEY_EXCHANGE_STATUS_SUCCESS) + body->status = 0; + if (body->status) + dev_warn(wdev->dev, "secure link negociation error\n"); + wfx_sl_check_pubkey(wdev, body->ncp_pub_key, body->ncp_pub_key_mac); + return 0; +} + static const struct { int msg_id; int (*handler)(struct wfx_dev *wdev, struct hif_msg *hif, void *buf); } hif_handlers[] = { { HIF_IND_ID_STARTUP, hif_startup_indication }, + { HIF_IND_ID_SL_EXCHANGE_PUB_KEYS, hif_keys_indication }, }; void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 781a6e28dbad..f8ab871aa188 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -20,6 +20,7 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *hif_cmd) init_completion(&hif_cmd->ready); init_completion(&hif_cmd->done); mutex_init(&hif_cmd->lock); + mutex_init(&hif_cmd->key_renew_lock); } static void wfx_fill_header(struct hif_msg *hif, int if_id, unsigned int cmd, size_t size) @@ -59,6 +60,9 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, siz if (wdev->chip_frozen) return -ETIMEDOUT; + if (cmd != HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS) + mutex_lock(&wdev->hif_cmd.key_renew_lock); + mutex_lock(&wdev->hif_cmd.lock); WARN(wdev->hif_cmd.buf_send, "data locking error"); @@ -107,6 +111,8 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, siz "WSM request %s%s%s (%#.2x) on vif %d returned status %d\n", get_hif_name(cmd), mib_sep, mib_name, cmd, vif, ret); + if (cmd != HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS) + mutex_unlock(&wdev->hif_cmd.key_renew_lock); return ret; } diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index 31f2a02c8466..6f2ea2f3a77d 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -23,6 +23,7 @@ struct wfx_scan_params { struct wfx_hif_cmd { struct mutex lock; + struct mutex key_renew_lock; struct completion ready; struct completion done; bool async; diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 8973eeb60eb8..0cfd6b2ec8d1 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -27,6 +27,7 @@ #include "bh.h" #include "sta.h" #include "debug.h" +#include "secure_link.h" #include "hif_api_cmd.h" #include "wfx_version.h" @@ -39,6 +40,10 @@ static int gpio_wakeup = -2; module_param(gpio_wakeup, int, 0644); MODULE_PARM_DESC(gpio_wakeup, "gpio number for wakeup. -1 for none."); +static char *slk_key; +module_param(slk_key, charp, 0600); +MODULE_PARM_DESC(slk_key, "secret key for secure link (expect 64 hexdecimal digits)."); + static const struct ieee80211_ops wfx_ops = { .start = wfx_start, .stop = wfx_stop, @@ -84,6 +89,29 @@ struct gpio_desc *wfx_get_gpio(struct device *dev, int override, const char *lab return ret; } +static void wfx_fill_sl_key(struct device *dev, struct wfx_platform_data *pdata) +{ + const char *ascii_key = NULL; + int ret = 0; + + if (slk_key) + ascii_key = slk_key; + if (!ascii_key) + ret = of_property_read_string(dev->of_node, "slk_key", &ascii_key); + if (ret == -EILSEQ || ret == -ENODATA) + dev_err(dev, "ignoring malformatted key from DT\n"); + if (!ascii_key) + return; + + ret = hex2bin(pdata->slk_key, ascii_key, sizeof(pdata->slk_key)); + if (ret) { + dev_err(dev, "ignoring malformatted key: %s\n", ascii_key); + memset(pdata->slk_key, 0, sizeof(pdata->slk_key)); + return; + } + dev_err(dev, "secure link is not supported by this driver, ignoring provided key\n"); +} + struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_data *pdata, const struct hwbus_ops *hwbus_ops, @@ -113,6 +141,7 @@ struct wfx_dev *wfx_init_common(struct device *dev, wdev->hwbus_ops = hwbus_ops; wdev->hwbus_priv = hwbus_priv; memcpy(&wdev->pdata, pdata, sizeof(*pdata)); + wfx_fill_sl_key(dev, &wdev->pdata); init_completion(&wdev->firmware_ready); wfx_init_hif_cmd(&wdev->hif_cmd); @@ -167,6 +196,12 @@ int wfx_probe(struct wfx_dev *wdev) goto err1; } + err = wfx_sl_init(wdev); + if (err && wdev->hw_caps.capabilities.link_mode == SEC_LINK_ENFORCED) { + dev_err(wdev->dev, "chip require secure_link, but can't negociate it\n"); + goto err1; + } + for (i = 0; i < ARRAY_SIZE(wdev->addresses); i++) { eth_zero_addr(wdev->addresses[i].addr); macaddr = of_get_mac_address(wdev->dev->of_node); @@ -198,6 +233,7 @@ int wfx_probe(struct wfx_dev *wdev) void wfx_release(struct wfx_dev *wdev) { wfx_bh_unregister(wdev); + wfx_sl_deinit(wdev); } static int __init wfx_core_init(void) diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index f7c65999a493..2c9c215455ce 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -14,12 +14,14 @@ #include #include "bus.h" +#include "hif_api_general.h" struct wfx_dev; struct wfx_platform_data { /* Keyset and ".sec" extention will appended to this string */ const char *file_fw; + unsigned char slk_key[API_KEY_VALUE_SIZE]; struct gpio_desc *gpio_wakeup; /* * if true HIF D_out is sampled on the rising edge of the clock diff --git a/drivers/staging/wfx/secure_link.h b/drivers/staging/wfx/secure_link.h new file mode 100644 index 000000000000..e2da1c73c760 --- /dev/null +++ b/drivers/staging/wfx/secure_link.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2019, Silicon Laboratories, Inc. + */ +#ifndef WFX_SECURE_LINK_H +#define WFX_SECURE_LINK_H + +#include "hif_api_general.h" + +struct wfx_dev; + + +struct sl_context { +}; + +static inline bool wfx_is_secure_command(struct wfx_dev *wdev, int cmd_id) +{ + return false; +} + +static inline int wfx_sl_decode(struct wfx_dev *wdev, struct hif_sl_msg *m) +{ + return -EIO; +} + +static inline int wfx_sl_encode(struct wfx_dev *wdev, struct hif_msg *input, struct hif_sl_msg *output) +{ + return -EIO; +} + +static inline int wfx_sl_check_pubkey(struct wfx_dev *wdev, uint8_t *ncp_pubkey, uint8_t *ncp_pubmac) +{ + return -EIO; +} + +static inline int wfx_sl_init(struct wfx_dev *wdev) +{ + return -EIO; +} + +static inline void wfx_sl_deinit(struct wfx_dev *wdev) +{ +} + + +#endif diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index bf9de11f8896..7adb5bf67e90 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -15,6 +15,7 @@ #include "bh.h" #include "main.h" +#include "secure_link.h" #include "hif_tx.h" #include "hif_api_general.h" @@ -33,6 +34,7 @@ struct wfx_dev { struct completion firmware_ready; struct hif_ind_startup hw_caps; struct wfx_hif hif; + struct sl_context sl; int chip_frozen; struct wfx_hif_cmd hif_cmd;