[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABBYNZKTiZ0tDGpwhnfEuTTpRX1ww3dURvXpRswpfU2byrww6A@mail.gmail.com>
Date: Mon, 21 Jul 2025 09:34:55 -0400
From: Luiz Augusto von Dentz <luiz.dentz@...il.com>
To: Chris Down <chris@...isdown.name>
Cc: linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com, Jaganath Kanakkassery <jaganath.k.os@...il.com>
Subject: Re: [PATCH] Bluetooth: hci_event: Mask data status from LE ext adv reports
Hi Chris,
On Sat, Jul 19, 2025 at 12:04 PM Chris Down <chris@...isdown.name> wrote:
>
> Hi Luiz,
>
> >Try to capture one of them using btmon and then add to the patch description.
>
> Thanks, I have one now and will add for v2.
>
> >> >> - if (evt_type == LE_EXT_ADV_NON_CONN_IND ||
> >> >> - evt_type & LE_EXT_ADV_DIRECT_IND)
> >> >> + if (pdu_type == LE_EXT_ADV_NON_CONN_IND ||
> >> >
> >> >I'm not sure I would keep checking for LE_EXT_ADV_NON_CONN_IND, maybe
> >> >just return LE_ADV_NONCONN_IND, LE_EXT_ADV_NON_CONN_IND is not
> >> >actually a bit it is the absence of any bits being set, so I guess the
> >> >only invalid adv are the ones for legacy which seem to require a bit
> >> >to be set.
> >>
> >> So are you thinking of doing this?
> >>
> >> if (!(pdu_type & ~(LE_EXT_ADV_DIRECT_IND)))
> >> return LE_ADV_NONCONN_IND;
> >
> >We can probably return early on if (!evt_type) return
> >LE_ADV_NONCONN_IND since there is no point in evaluating it if it is
> >zero.
>
> I guess you meant `if (!pdu_type)`? That correctly handles the 0x40 case (where
> pdu_type becomes 0), but it would miss non-connectable directed advertisements
> (PDU type 0x04), right? Or maybe you meant something else?
Yes, we can just test for !pdu_type and return LE_ADV_NONCONN_IND
skipping any testing of bits.
--
Luiz Augusto von Dentz
Powered by blists - more mailing lists