Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp937201pxb; Thu, 30 Sep 2021 22:47:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzUBp2DHiqjh2+Qu7xBoj+g7sVNloBCZwedFSdJhvFQFXafYK8Iu6lIz5a9subb6T0EkKX X-Received: by 2002:a17:907:211a:: with SMTP id qn26mr4286305ejb.99.1633067237964; Thu, 30 Sep 2021 22:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633067237; cv=none; d=google.com; s=arc-20160816; b=Gakc+T6kwqmNCtkKxTIPnZ1/ZeJQCO+wFZdQqVfWPwgWSX1kxxXqb1nA2oinePY/2i h2sqKdjPtItMPnDr58jJgprgY+ijw3X0OcaJN6XDxcEDUTEzm9vALchWTGtqYb9Zu1At 2aOqw1GYgcDtNA8JyqQBdUR0ulUpAdmoH3jtqthE8HBBEIOiy1be1h0xkwWA++xpnXGX yoeLHSSYYlWhvuP5AziWNw58XFjAaDZ8fN/J3kqKR5oGJn8jK1xW88pmIN9P6OxUmPG+ snJejQgn7eXfi1ElULuzhHodDr5GTrZvMq9qNn8R27EDLj5m1uOHW/T7UvsWO8o2JdD4 pp8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=GRCIoXoiwK9an65h4tkFRawxy2Ww9PIugWTJQaloXTQ=; b=KdCHC7u6Xt9et2gjGO3TGtcySed797g6/KLl3c0IopgwzoO/2ZDlpbmUaXbX8akm2O 5a3X2CImidd175Zbp73ZYyMUhWL6VaWSP8qdAYHLDiG0ZMvtc3G7pXEsvucGt9v2VHRE tVhALcir4ZdvE3ZhOy5Ajs/FsPXM+y67XS4Y7bAP7ySP3mrkv/VmJJOg0lPXK81x6Ta2 6jQR2A8JqQdxWnoMSeskBwxxxuA+C8S91u1ajgnjQPA41YgZcHEvgBg/RQQ65C+FPnKR 4kcZioAgyq0XIAYAP+po3ICblT/xdZuHdNHcWEkv50YTPzeHLnsp4oSlbPbTaogOKXA3 jcrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si3694135edm.216.2021.09.30.22.46.35; Thu, 30 Sep 2021 22:47:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230483AbhJAFp1 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 1 Oct 2021 01:45:27 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:40699 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241958AbhJAFp0 (ORCPT ); Fri, 1 Oct 2021 01:45:26 -0400 Received: from smtpclient.apple (p5b3d2185.dip0.t-ipconnect.de [91.61.33.133]) by mail.holtmann.org (Postfix) with ESMTPSA id 89502CED25; Fri, 1 Oct 2021 07:43:40 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: [RFC PATCH] Bluetooth: hci_sock: Set flag to all sockets From: Marcel Holtmann In-Reply-To: <20211001035931.50485-1-hj.tedd.an@gmail.com> Date: Fri, 1 Oct 2021 07:43:40 +0200 Cc: linux-bluetooth@vger.kernel.org, Tedd Ho-Jeong An Content-Transfer-Encoding: 8BIT Message-Id: References: <20211001035931.50485-1-hj.tedd.an@gmail.com> To: Tedd Ho-Jeong An X-Mailer: Apple Mail (2.3654.120.0.1.13) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Tedd, > The mgmt_limited_event() send the event to the socket that matches the > flag type, but also it skips to the given socket object in the > parameter. > > For Local Out of Band Data Updated Event and Experimental Feature > Changed Event, it sets flags only for the socket which the change was > triggered, the event cannot be sent to the client via any sockets > because the flag is not set for other sockets and it doens't send to the > socket which the change was triggered. > > This patch adds the function that sets the flag for all available > management sockets, so the mgmt_limited_event() still can send the event > to the management sockets other than the one through which the change > was triggered. actually that is on purpose. Only the socket that used a specific mgmt commands gets to see the new events. So if you have a second listening socket that just cares about the events, it has to at least issue the “read” command to tell mgmt that it does understand it. There is no point in sending out signals to all mgmt sockets if you haven’t read an initial status first. The updates would make no sense to you. Regards Marcel