Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1504884iob; Fri, 29 Apr 2022 06:52:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF9aNbKJsfyNwH/g+gFnw2JsjVS9bFpsxgmHQncBPnM0mrBErimRtmX8nELxG8K+UnhI8K X-Received: by 2002:a17:902:e803:b0:15c:e281:de8f with SMTP id u3-20020a170902e80300b0015ce281de8fmr32854214plg.13.1651240363144; Fri, 29 Apr 2022 06:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651240363; cv=none; d=google.com; s=arc-20160816; b=NRq17UyjhvHdO+iq0rkiP3wLbeLtgHrlRBiYescHKaUDjwgtamXajU/669WNsCTbIo yjOTsrWV6xLuQRtx5qIjepaCrFh60IFILvd2u3PNyaWsTE52zon/W6KrNEJPS73fONCx gPWVaSm5+1sZrK0+XhBhsryfEENwhuOKxEk1gnBacgLrGrC1/kICJ0P+w/4dbgdUIrex 766CSdLhOu+dlkpfkRqqcIZUipajZPubnRxGVTIzira2piHq1V7fZXIN4qWkt6uz9nic o/Ql5J2QEGfxvGwwaO/pfbhMt+z44HUu1cTo5i8pxEZygSgfMbm08r1IPG9Vq57v6+qg NwFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=mDeKIjge5UCNL2vhJlx7FXkmckcjOO7ACzR35FNNMx4=; b=ZwCHL9jZwYeeeRSgaUupbW33XcaRoX1s0JQ0hjgOdWQpYxkLJHO7WugRs6R7dHXCOo 8EmqM+7BmDCCA1uZRj6Y7y+mcYO4qzDIDU2aLvXgSZK7crDFaIlt+Mun8UIpTtdPKtsC NPIi7sZJLl3JBl8Vf5uSBo948vmcp3ZS70rre67cNQ2a4VL3wtq28rKVQs0PNJLsSyPq 0XiD4onnX5yv455sIrXH51lLRO+cvmqRQdUM2aPkPpQJAgKbGdrBkBds6ZqMCIrUbcwf eTvY/g9EX158u8RU4kRJ/WC9lc2D6U5+lx2+6tGQL/VnFhOFq3wkpJExruvf1ILRjz9M aNxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a170902d10100b00153b2d16516si6324252plw.286.2022.04.29.06.52.26; Fri, 29 Apr 2022 06:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354109AbiD2CAZ (ORCPT + 99 others); Thu, 28 Apr 2022 22:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231824AbiD2CAZ (ORCPT ); Thu, 28 Apr 2022 22:00:25 -0400 Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 337E9BF524 for ; Thu, 28 Apr 2022 18:57:07 -0700 (PDT) X-QQ-mid: bizesmtp62t1651197407tc0g5311 Received: from localhost.localdomain ( [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 29 Apr 2022 09:56:41 +0800 (CST) X-QQ-SSF: 01400000000000E0M000000A0000000 X-QQ-FEAT: RUa2qNdlQy9gFLfsF33WW446EZUtx6dfowP/F7KcjhQyvOoiWiQcE9hUBCHLR UUYdI/rq8v4KImt3IGVHMav3cWM0Obywaj/NMo+3zg+4SwnZDaAiD9oCKAkGfK5Vz5UK9fC Naf6gMWSjsA+hNHccfugoAO2CN/RIJY9RShv0GGZ62CGXUlKqOG5RTHObLgKhDv6NLZb8uX lJTtnsvxR8hJpzuBKfIkej/cFQ7MuaKYO/lUQfNCGBUBHCjXA1r1UUh9Xp+wsVjPvWhQJMN lIY20AMiC0IymSGJRZzDMLa0OJOUev9IzNuyOTx75L/wDL3Nexc0ih7IgpkPGQJPGQpo1bD vnBD7xq3dAQuEmwuLcBvZpZd/0tLg== X-QQ-GoodBg: 1 From: Meng Tang To: krzysztof.kozlowski@linaro.org, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Meng Tang Subject: [PATCH] NFC: Add error mapping for Directed Advertising DISCOVERY_TEAR_DOWN Date: Fri, 29 Apr 2022 09:56:40 +0800 Message-Id: <20220429015640.32537-1-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign3 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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