Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp403793imw; Tue, 12 Jul 2022 23:56:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t97yELh+NouQW96G5TMl1vKUdnZREwqrZ53Pw2nBk1MDaetIKlemA9dqkyfCb6vNmv11wR X-Received: by 2002:a17:907:1c12:b0:72b:4a03:2290 with SMTP id nc18-20020a1709071c1200b0072b4a032290mr1952860ejc.163.1657695362224; Tue, 12 Jul 2022 23:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657695362; cv=none; d=google.com; s=arc-20160816; b=WloVvUnNGXjriS1CTTyNizKQS065XxKwwsvG4S7HdDUpDVBFNdlhyC/ES8Gj/e5ICH /ucrofXlCASXS99XQvLIj4pfmHSU0D+EvpaVr2Ny/rlgAOyuNcqa4DMCBDALrcN8fuB0 6bGYBm29qHCX+sSM03nsrHqzTcqJ7BVdyEVZAY3Cbx9mbp3XcytWarCr5pC5YmfocmSh rN10QON3xPqPGq7kRLz6u49T6WhA3S8lTsH/ZYwjo3k7U90mdMAIkUJmEORe06sSCYFO pxEoA2P6Eb2dP+bKjPdrrWlwPYQSaeNujjjJHU3ZONi/bStBPNrzD9vurcsO2200Haol /tyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=8n8+PO3A95/qKneSFHtNBTYCjF+JHU9XIFkvb+rLAQ8=; b=BnlAk08BBmtZpxT3hqzZSEd2y+k4NA1N9kf77Ahul3plZ0OrHsuoIOoF2xdKJD8UlT f03VQt5yBaYZg7bHXRThhC8qQ4HE1SDHUdAtBMnZx3dT7fAGMpUHeQG/eu12pjAx7R9S AgedGKPr5J/nHLPwcnwzP11m2LROPDwp6nJj3+srVJM09JlV09gHLG4w+zX4Kijb0mDz PdkcqLzeWz5l+SAbfmNpQrN+i0dCkrZTcN3tTRQMU8kGNvVil6m2CZ8j/NofOYH9Nxh7 GLglr8QpeXOXjC7vtHf6qILcyyxidcKluI//D2/nanKxzQ//8xTjrl3HRNRyud/SowZS 1KZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uPq9DHAs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a50eb88000000b0043a83380210si15617230edr.41.2022.07.12.23.55.14; Tue, 12 Jul 2022 23:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uPq9DHAs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234489AbiGMGxp (ORCPT + 99 others); Wed, 13 Jul 2022 02:53:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234412AbiGMGxX (ORCPT ); Wed, 13 Jul 2022 02:53:23 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E442AE0F45; Tue, 12 Jul 2022 23:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1657695203; x=1689231203; h=from:to:cc:subject:date:message-id:mime-version; bh=8n8+PO3A95/qKneSFHtNBTYCjF+JHU9XIFkvb+rLAQ8=; b=uPq9DHAsMbPbm87n+OZip+1/u9dmsK3nj53IvftZlE2uj4BdP+9/FOFD V2u5BCQY/lzi38vaGYLbCWEM3TMfqwZA4ah24JUyLk7CZnTRafs8iQui8 nMj6moLFz3AM2T+WYj1/hMTbN7n9h5k1fyM7XIMgOAGwi8Iq/sDPkwRjR s=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 12 Jul 2022 23:53:22 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 23:53:22 -0700 Received: from zijuhu-gv.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 12 Jul 2022 23:53:19 -0700 From: Zijun Hu To: , , , , , , , , CC: , , , Subject: [PATCH v1] Bluetooth: hci_sync: Correct hci_set_event_mask_page_2_sync() event mask Date: Wed, 13 Jul 2022 14:53:14 +0800 Message-ID: <1657695194-25801-1-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Event HCI_Truncated_Page_Complete should belong to central and HCI_Peripheral_Page_Response_Timeout should belong to peripheral, but hci_set_event_mask_page_2_sync() take these two events for wrong roles, so correct it by this change. Signed-off-by: Zijun Hu --- net/bluetooth/hci_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 7cb310051879..c72533bb9834 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -3602,7 +3602,7 @@ static int hci_set_event_mask_page_2_sync(struct hci_dev *hdev) if (lmp_cpb_central_capable(hdev)) { events[1] |= 0x40; /* Triggered Clock Capture */ events[1] |= 0x80; /* Synchronization Train Complete */ - events[2] |= 0x10; /* Peripheral Page Response Timeout */ + events[2] |= 0x08; /* Truncated Page Complete */ events[2] |= 0x20; /* CPB Channel Map Change */ changed = true; } @@ -3614,7 +3614,7 @@ static int hci_set_event_mask_page_2_sync(struct hci_dev *hdev) events[2] |= 0x01; /* Synchronization Train Received */ events[2] |= 0x02; /* CPB Receive */ events[2] |= 0x04; /* CPB Timeout */ - events[2] |= 0x08; /* Truncated Page Complete */ + events[2] |= 0x10; /* Peripheral Page Response Timeout */ changed = true; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project