* [PATCH] NFC: Add error mapping for Directed Advertising DISCOVERY_TEAR_DOWN
@ 2022-04-29 1:56 Meng Tang
2022-04-29 7:30 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Meng Tang @ 2022-04-29 1:56 UTC (permalink / raw)
To: krzysztof.kozlowski, davem, kuba, pabeni; +Cc: netdev, linux-kernel, Meng Tang
When a DISCOVERY_TEAR_DOWN occurs. Since the operation is analogous
to conventional connection creation map this to the usual ENOLINK
error.
Signed-off-by: Meng Tang <tangmeng@uniontech.com>
---
net/nfc/nci/lib.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/nfc/nci/lib.c b/net/nfc/nci/lib.c
index 473323f8067b..873854c5d180 100644
--- a/net/nfc/nci/lib.c
+++ b/net/nfc/nci/lib.c
@@ -57,6 +57,9 @@ int nci_to_errno(__u8 code)
case NCI_STATUS_NFCEE_INTERFACE_ACTIVATION_FAILED:
return -ECONNREFUSED;
+ case NCI_STATUS_DISCOVERY_TEAR_DOWN:
+ return -ENOLINK;
+
case NCI_STATUS_RF_TRANSMISSION_ERROR:
case NCI_STATUS_NFCEE_TRANSMISSION_ERROR:
return -ECOMM;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFC: Add error mapping for Directed Advertising DISCOVERY_TEAR_DOWN
2022-04-29 1:56 [PATCH] NFC: Add error mapping for Directed Advertising DISCOVERY_TEAR_DOWN Meng Tang
@ 2022-04-29 7:30 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-29 7:30 UTC (permalink / raw)
To: Meng Tang, davem, kuba, pabeni; +Cc: netdev, linux-kernel
On 29/04/2022 03:56, Meng Tang wrote:
> When a DISCOVERY_TEAR_DOWN occurs. Since the operation is analogous
> to conventional connection creation map this to the usual ENOLINK
> error.
>
> Signed-off-by: Meng Tang <tangmeng@uniontech.com>
> ---
> net/nfc/nci/lib.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/nfc/nci/lib.c b/net/nfc/nci/lib.c
> index 473323f8067b..873854c5d180 100644
> --- a/net/nfc/nci/lib.c
> +++ b/net/nfc/nci/lib.c
> @@ -57,6 +57,9 @@ int nci_to_errno(__u8 code)
> case NCI_STATUS_NFCEE_INTERFACE_ACTIVATION_FAILED:
> return -ECONNREFUSED;
>
> + case NCI_STATUS_DISCOVERY_TEAR_DOWN:
This define is not used. At least I could not find it, so maybe instead
it should be entirely dropped.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-29 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-29 1:56 [PATCH] NFC: Add error mapping for Directed Advertising DISCOVERY_TEAR_DOWN Meng Tang
2022-04-29 7:30 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).