Lines Matching +full:- +full:eproto

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2014-2015 STMicroelectronics SAS. All rights reserved.
41 return -EINVAL; in st21nfca_factory_mode()
47 test_and_set_bit(ST21NFCA_FACTORY_MODE, &hdev->quirks); in st21nfca_factory_mode()
50 clear_bit(ST21NFCA_FACTORY_MODE, &hdev->quirks); in st21nfca_factory_mode()
53 return -EINVAL; in st21nfca_factory_mode()
101 HCI_DM_GET_INFO, skb->len); in st21nfca_hci_dm_get_info()
103 r = -ENOMEM; in st21nfca_hci_dm_get_info()
107 if (nla_put(msg, NFC_ATTR_VENDOR_DATA, skb->len, skb->data)) { in st21nfca_hci_dm_get_info()
109 r = -ENOBUFS; in st21nfca_hci_dm_get_info()
136 HCI_DM_GET_DATA, skb->len); in st21nfca_hci_dm_get_data()
138 r = -ENOMEM; in st21nfca_hci_dm_get_data()
142 if (nla_put(msg, NFC_ATTR_VENDOR_DATA, skb->len, skb->data)) { in st21nfca_hci_dm_get_data()
144 r = -ENOBUFS; in st21nfca_hci_dm_get_data()
176 r = nfc_llc_stop(hdev->llc); in st21nfca_hci_dm_reset()
180 return nfc_llc_start(hdev->llc); in st21nfca_hci_dm_reset()
192 return -EPROTO; in st21nfca_hci_get_param()
194 r = nfc_hci_get_param(hdev, param->gate, param->data, &skb); in st21nfca_hci_get_param()
199 HCI_GET_PARAM, skb->len); in st21nfca_hci_get_param()
201 r = -ENOMEM; in st21nfca_hci_get_param()
205 if (nla_put(msg, NFC_ATTR_VENDOR_DATA, skb->len, skb->data)) { in st21nfca_hci_get_param()
207 r = -ENOBUFS; in st21nfca_hci_get_param()
237 info->vendor_info.rx_skb = skb; in st21nfca_hci_loopback_event_received()
240 nfc_err(&hdev->ndev->dev, "Unexpected event on loopback gate\n"); in st21nfca_hci_loopback_event_received()
242 complete(&info->vendor_info.req_completion); in st21nfca_hci_loopback_event_received()
256 return -EPROTO; in st21nfca_hci_loopback()
258 reinit_completion(&info->vendor_info.req_completion); in st21nfca_hci_loopback()
259 info->vendor_info.rx_skb = NULL; in st21nfca_hci_loopback()
264 r = -EPROTO; in st21nfca_hci_loopback()
268 wait_for_completion_interruptible(&info->vendor_info.req_completion); in st21nfca_hci_loopback()
269 if (!info->vendor_info.rx_skb || in st21nfca_hci_loopback()
270 info->vendor_info.rx_skb->len != data_len) { in st21nfca_hci_loopback()
271 r = -EPROTO; in st21nfca_hci_loopback()
275 msg = nfc_vendor_cmd_alloc_reply_skb(hdev->ndev, in st21nfca_hci_loopback()
278 info->vendor_info.rx_skb->len); in st21nfca_hci_loopback()
280 r = -ENOMEM; in st21nfca_hci_loopback()
284 if (nla_put(msg, NFC_ATTR_VENDOR_DATA, info->vendor_info.rx_skb->len, in st21nfca_hci_loopback()
285 info->vendor_info.rx_skb->data)) { in st21nfca_hci_loopback()
287 r = -ENOBUFS; in st21nfca_hci_loopback()
293 kfree_skb(info->vendor_info.rx_skb); in st21nfca_hci_loopback()
360 init_completion(&info->vendor_info.req_completion); in st21nfca_vendor_cmds_init()