Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1619084pxy; Thu, 29 Apr 2021 10:39:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVAAZbaB1hBxEC2eSuAigrxTBKyqw22YvMneyb5FRqG2340fgq1yW8asB90Zv5JDv7mKDr X-Received: by 2002:a63:2143:: with SMTP id s3mr790221pgm.429.1619717963412; Thu, 29 Apr 2021 10:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619717963; cv=none; d=google.com; s=arc-20160816; b=WzhBD4Vk8guUeEsVOCjsN5WFgJM5IzhPBQDVigBUcLbHgY8P5oDcP6TldiNwbNKMLa 7LWxMeACA/mpqcg3nK/dhRCmdUKivmv8djqSfQLBombOOXtLiKsRe+u/szn7P2GTAaQk pdXMORo89lWHdhwCgp8qBoNUUXAeobFy/TMHv+CxFxuTRe+DS8GaxT8+5xdpVDBfIuOz U120ChuJvi3tpY/9UagZJsKcjoBJyNvR8vRxbVwK0HrChbBkjueh0Bx2bPYcB/lzIFBS MHvD16eqtQ/6S1Vknyny24ObSEsZ1yANMTdFoRwuTR8jc53H2GO/99EeQ08XfWskh4vj LuiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=WpMEHPbds2Rhg3l6Bk0VFJZGn5ipo4apAqnWrKsE5c4=; b=inohiTm5mxvNcR0XxTPTxxye/CaH5j+QA3Xn+bMXLHQtMJUg+K0NXtTCsbTNUPtXxW puKm0Xk6v+wJvQm7v7bQFBHnT9LzF68iBtC5IhfJVykxoQZg7+dahydSjHb7SNt5oc8p efaEJvtVx0EeidN/CgxXk/1DhJtW06hNikjiSep9iPxLkVJqExiXtv2AqNnCUFCjMFUi 4cIrppwAd3tXJ4NCB442p4jILYBX+ZOCa3Q0zuGAUMkfdNmpxwpqq9SPWrpkp0F6KUzj TizKfxnxFxCCtCDToISNGFhEaz7o6xslX1KqABnfMkUHMLAyMGkyOnCMOO1zdp94tsRn R19A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UkLmhq21; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx13si4185610pjb.10.2021.04.29.10.39.10; Thu, 29 Apr 2021 10:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UkLmhq21; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241001AbhD2RjM (ORCPT + 99 others); Thu, 29 Apr 2021 13:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240968AbhD2RjG (ORCPT ); Thu, 29 Apr 2021 13:39:06 -0400 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B328C06138B for ; Thu, 29 Apr 2021 10:38:18 -0700 (PDT) Received: by mail-qt1-x84a.google.com with SMTP id j3-20020ac874c30000b02901bab5879d6aso8465350qtr.0 for ; Thu, 29 Apr 2021 10:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=WpMEHPbds2Rhg3l6Bk0VFJZGn5ipo4apAqnWrKsE5c4=; b=UkLmhq21G9yc49Z2YWhYMcMJfpH4lMjNSOHTQ3p6SDiJI/yS+IxzvfHobHXQ9br85T Jx8T8/MJykCPgA5QYmKHmrktKQX5DECpwYJmhbyB4D/31LwoujpBkp3s2DTHPeC7Zm4Y OvW059QSWPjthG0jxddJIB7lpZi4iUxdDngi8UNzJGiis4K6Ww4tUvxB9nIi2PvUFeEv W4ufOBaZD8a7ysZbTWIb6mKx4fqMAyyZcPxPbo1090QhGw6l+ZtO2llLVUsVDNqmZKic 9eL3NcNaU3I+SXFwxdQae/89tC6dowvLsyvDRgDmh5vAGSwzSHyQZsihkws/P3g+s15K FLQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=WpMEHPbds2Rhg3l6Bk0VFJZGn5ipo4apAqnWrKsE5c4=; b=SC+tZwiO6ELUIba2VbqD6lMAYABtzEnLARmnCc4FjqJrj5eKANelJPdpfsmiLjpPmF IoA7JqZMkNXvDUCoK7mVt+KwqM+XrdfuQjuLIwyBjYwC8y2jLoPpymYIogxlMWzlhhUh xjfQn/T1SbjO4pl0oOLBJ0mIAsigvi/WyTlA3xsxFI2F7bDp1TzpZQGQPKDO4OpdSrSW QgeKBv75BH3n5wgt/jyMOlszP7AnMZsx5BmjbAPMI96IPPyCXyflV4vIdZhiCM/MSqSY 2c1gKILUGDya7Z3kG3xnAPqjnICfu9TIGjEE0QqBXlHPhhB6QNP6sERATIYZhabo6kVG zOpw== X-Gm-Message-State: AOAM531OV+ARFfQYFM6Sd/IXNjcPUTNt9dJOPqY0GeYMCuv3sHf7HdMG d/N+S466Nn52Gg1rFGUijf7nQ0pXe3kv X-Received: from yudiliu.mtv.corp.google.com ([2620:15c:202:201:b87a:317b:6a3:155c]) (user=yudiliu job=sendgmr) by 2002:a05:6214:2b0:: with SMTP id m16mr957921qvv.4.1619717897610; Thu, 29 Apr 2021 10:38:17 -0700 (PDT) Date: Thu, 29 Apr 2021 10:38:12 -0700 Message-Id: <20210429103751.v1.1.Ic231ad3cfa66df90373578777cf7cdc7f0e8f2ae@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.31.1.527.g47e6f16901-goog Subject: [PATCH v1] Bluetooth: Add a new MGMT error code for 0x3E HCI error From: Yu Liu To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, chromeos-bluetooth-upstreaming@chromium.org Cc: Yu Liu , Abhishek Pandit-Subedi , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is to enable us to retry the pairing in the user space if this failure is encountered Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Yu Liu --- Changes in v1: - Initial change include/net/bluetooth/mgmt.h | 1 + net/bluetooth/mgmt.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index a03c62b1dc2f..78b94577a7d8 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h @@ -45,6 +45,7 @@ #define MGMT_STATUS_RFKILLED 0x12 #define MGMT_STATUS_ALREADY_PAIRED 0x13 #define MGMT_STATUS_PERMISSION_DENIED 0x14 +#define MGMT_STATUS_CONNECT_NOT_ESTD 0x15 struct mgmt_hdr { __le16 opcode; diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index b44e19c69c44..9e44c04d4212 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -271,7 +271,7 @@ static const u8 mgmt_status_table[] = { MGMT_STATUS_INVALID_PARAMS, /* Unsuitable Connection Interval */ MGMT_STATUS_TIMEOUT, /* Directed Advertising Timeout */ MGMT_STATUS_AUTH_FAILED, /* Terminated Due to MIC Failure */ - MGMT_STATUS_CONNECT_FAILED, /* Connection Establishment Failed */ + MGMT_STATUS_CONNECT_NOT_ESTD, /* Connection Establishment Failed */ MGMT_STATUS_CONNECT_FAILED, /* MAC Connection Failed */ }; -- 2.31.1.527.g47e6f16901-goog