diff mbox series

NFC: Add error mapping for Directed Advertising DISCOVERY_TEAR_DOWN

Message ID 20220429015640.32537-1-tangmeng@uniontech.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series NFC: Add error mapping for Directed Advertising DISCOVERY_TEAR_DOWN | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: edumazet@google.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Meng Tang April 29, 2022, 1:56 a.m. UTC
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(+)

Comments

Krzysztof Kozlowski April 29, 2022, 7:30 a.m. UTC | #1
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
diff mbox series

Patch

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;