Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp27911pxb; Tue, 12 Apr 2022 15:52:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFbjk0q6u4PQ+lEqbPWihNtBviudVrCHQZky5pGP/Wjpif8l+UBOayzVVSW35FJpO7g3gu X-Received: by 2002:a05:6a00:10d3:b0:4fe:5d:75c8 with SMTP id d19-20020a056a0010d300b004fe005d75c8mr39600632pfu.6.1649803938678; Tue, 12 Apr 2022 15:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649803938; cv=none; d=google.com; s=arc-20160816; b=DZT89iQXZ3ngjtQs3L6Sq/DbtjSSLWwLKrplToBj7gcah6c4/NhLaFiJO0RIg9AmYg zc62jKB22+LH4OWZrZKXG7dhf5ANXQLBuURTQEgdr85Irx9OYoFpIq5ozq9ov8177ZUk P7bfHUzMEt8MAN3lzVCszMDH8zc1oHZQxrPmKs0a4LkIWsQAy526YADkPeZhDehjtZnk 2uhDzmV9bSx/JOxaVzUj87kVlv9tQFkuJVtcv4hjzQwYkIWt7sU6tD6TsIrj1BOUKkcS gq2DUPkpFpMLy6iYiNKgvezyMzLcl8ZrLB274xrC44VaM7lGUmOz9L+hbNgXi9kDiFCL qg2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=v8RzyST7saizguP9YNR7p0PMunWg0Gzwx9hn1iwbjTA=; b=NRoH8LpAhpup8Ui3UBhZW7k9MaACNU330qixch+sbcKL8hSKtkyJfsFbrQv+GZbA7I 5okTo+NAZjlpr65k6cjOSq028XIqOGeSuUUwg7wsxjLVsKTz7FIOvqTRp/+uo+/xCdZK MoXeCS2oSkV3JBv7Q7haVvuAZUoJjTF5gzevKv6Eu6+DAMrEoK5IXbCkaTjkpKMBiRtQ T0MALPjByMdY9akXQD6ctoEaByFuCItFVqIpicMgfd1DIhYtqkpzjZHN7LOoo1wzf+G3 CgikCAHyydwU9sa8sOmBsOe+3+MQ77rO3LVc1nhMwtnbC2ne1aG5KL05uckhGnuwLaxo JrNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z7QXAefw; spf=softfail (google.com: domain of transitioning linux-bluetooth-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u18-20020a170902a61200b00155f0855954si11510734plq.524.2022.04.12.15.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:52:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-bluetooth-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z7QXAefw; spf=softfail (google.com: domain of transitioning linux-bluetooth-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D00A71C71C8; Tue, 12 Apr 2022 14:33:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233251AbiDLAAX (ORCPT + 99 others); Mon, 11 Apr 2022 20:00:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232533AbiDLAAW (ORCPT ); Mon, 11 Apr 2022 20:00:22 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08E4C2B271 for ; Mon, 11 Apr 2022 16:58:07 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id q142so15529553pgq.9 for ; Mon, 11 Apr 2022 16:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=v8RzyST7saizguP9YNR7p0PMunWg0Gzwx9hn1iwbjTA=; b=Z7QXAefwsaWLvDXImsn9vAHqftyDm6EJ7uap6AnRnAnXMSTaJqZxxFy7ZBQikfNvgL MSVB3bpf0p2ANMtXE+26q9yFVPTHXkOYcvNsczmyE852hlHweS6DpJmZzQOUowJjbIpG oKKW4Mh2VlMY4QoeKHioZonKlP22HiEylHUMJ9uI2gJoCGc31axfC/slZVy2s8qsI4ds St/Mnjwm9jTcRn5zXVRfJcBqsTsWvlQdeZQSUgQ+uAc8GJkgqoiVQUsXQS8GcRQs6wiO 0xg65xU4AjasBTtSrH3FoAELNrfIvaevmqofdzaOQ+qskfB6/1kIyION+QyzroxoUIgN +GkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=v8RzyST7saizguP9YNR7p0PMunWg0Gzwx9hn1iwbjTA=; b=vb9o/Qs8343j4M5Gy6S+28wgBSd3mphEmKA43I+HHt/DhqyuvhAXrrQCiEbNBS+6EO RO6lWSIDaZqO3crqFlWF7pTvtRnFDGNVD7LI6JIfc1NgERFNtC8EnaDFFiptSFeqoUba TOL7DLKCouUxCCosDJgHxQ0f0+r88vj3lgi01VqHq/P9NU+gszNIkdS//NKQOJell/OF Dh3XGp5CVRvRHXL9jTTLKgywHSNXLoGYvB3XWa3UavIPubvDh+QvNYBtVScXjKKTZW2O bM8Gc5TLVW8+FZ2E64186o/4smwXggZDQ95yZgN04Dnu7erl5wjkAXWTn7qETH7lnz0M H/FA== X-Gm-Message-State: AOAM530s6w7TffIR17RtxuPBcZ+PsVW6j4bxrhscgrSgDispQcf5SSz/ 23mhKuIIfRWxIiiIexaWXcDiZ7Bd01E= X-Received: by 2002:aa7:9283:0:b0:505:fe1e:f6b with SMTP id j3-20020aa79283000000b00505fe1e0f6bmr269759pfa.29.1649721486304; Mon, 11 Apr 2022 16:58:06 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id w92-20020a17090a6be500b001cb9ff8dfbcsm572515pjj.33.2022.04.11.16.58.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 16:58:05 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] btdev: Fix not cleanup ssp_status and ssp_auto_complete Date: Mon, 11 Apr 2022 16:58:02 -0700 Message-Id: <20220411235804.3776702-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This fixes not clenup ssp_status and ssp_auto_complete flags on auth_complete. --- emulator/btdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index f70fa9136..ccfaed36b 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -1366,6 +1366,11 @@ static void auth_complete(struct btdev_conn *conn, uint8_t status) ev.status = status; send_event(conn->dev, BT_HCI_EVT_AUTH_COMPLETE, &ev, sizeof(ev)); + + conn->dev->ssp_status = 0; + conn->dev->ssp_auth_complete = false; + conn->link->dev->ssp_status = 0; + conn->link->dev->ssp_auth_complete = false; } static int cmd_link_key_reply_complete(struct btdev *dev, const void *data, -- 2.35.1