提交 72b06f75 编写于 作者: E Eric Lapuyade 提交者: John W. Linville

NFC: Implement HCP reaggregation allocation error case

We can now report an ENOMEM error up to the HCI layer.
Signed-off-by: NEric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 1c215d79
...@@ -717,12 +717,18 @@ void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev) ...@@ -717,12 +717,18 @@ void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev)
} }
EXPORT_SYMBOL(nfc_hci_get_clientdata); EXPORT_SYMBOL(nfc_hci_get_clientdata);
void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err) static void nfc_hci_failure(struct nfc_hci_dev *hdev, int err)
{ {
/* TODO: lower layer has permanent failure. /*
* TODO: lower layer has permanent failure.
* complete potential HCI command or send an empty tag discovered event * complete potential HCI command or send an empty tag discovered event
*/ */
} }
void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err)
{
nfc_hci_failure(hdev, err);
}
EXPORT_SYMBOL(nfc_hci_driver_failure); EXPORT_SYMBOL(nfc_hci_driver_failure);
void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb) void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb)
...@@ -755,9 +761,8 @@ void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb) ...@@ -755,9 +761,8 @@ void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb)
hcp_skb = nfc_alloc_recv_skb(NFC_HCI_HCP_PACKET_HEADER_LEN + hcp_skb = nfc_alloc_recv_skb(NFC_HCI_HCP_PACKET_HEADER_LEN +
msg_len, GFP_KERNEL); msg_len, GFP_KERNEL);
if (hcp_skb == NULL) { if (hcp_skb == NULL) {
/* TODO ELa: cannot deliver HCP message. How to nfc_hci_failure(hdev, -ENOMEM);
* propagate error up? return;
*/
} }
*skb_put(hcp_skb, NFC_HCI_HCP_PACKET_HEADER_LEN) = pipe; *skb_put(hcp_skb, NFC_HCI_HCP_PACKET_HEADER_LEN) = pipe;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册