public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Janaki Ramaiah Thota <quic_janathot@quicinc.com>,
	Johan Hovold <johan+linaro@kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Stephen Boyd <swboyd@chromium.org>
Subject: Re: [PATCH] Bluetooth: qca: fix invalid device address check
Date: Thu, 25 Apr 2024 18:13:55 +0200	[thread overview]
Message-ID: <ZiqBQ3r3gRk2HBir@hovoldconsulting.com> (raw)
In-Reply-To: <CAD=FV=X5DGd9E40rve7bV7Z1bZx+oO0OzjsygEGQz-tJ=XbKBg@mail.gmail.com>

On Thu, Apr 25, 2024 at 11:22:50PM +0800, Doug Anderson wrote:

> Quick question. I haven't spent lots of time digging into the
> Bluetooth subsystem, but it seems like if the device tree property is
> there it should take precedence anyway, shouldn't it? In other words:
> if we think there is built-in storage for the MAC address but we also
> see a device tree property then we need to decide which of the two we
> are going to use. Are there any instances where there's a bogus DT
> property and we want the built-in storage to override it?

I guess we could decide to implement something like that, but note that
a devicetree may have an all-zero address defined by default which the
boot firmware may or may not fill in.

So we can't just use the presence of the address property as an
indication that the device has an address, but we could of course parse
it and see if it's non-zero first. (Actually, I think this bit about
checking for a non-zero address is already implemented.)

Note however that we still need to determine when the controller address
is invalid for the common case where there is no devicetree property and
user space needs to provide an address before the controller can be used.

Johan

  reply	other threads:[~2024-04-25 16:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16  9:15 [PATCH] Bluetooth: qca: fix invalid device address check Johan Hovold
2024-04-16  9:56 ` bluez.test.bot
2024-04-16 15:10 ` [PATCH] " patchwork-bot+bluetooth
2024-04-22 17:50 ` Doug Anderson
2024-04-23  9:08   ` Johan Hovold
2024-04-23 15:09     ` Doug Anderson
2024-04-25  8:40       ` Johan Hovold
2024-04-25 15:01         ` Janaki Ramaiah Thota
2024-04-25 15:58           ` Johan Hovold
2024-04-26  6:23             ` Janaki Ramaiah Thota
2024-04-26 10:42               ` Janaki Ramaiah Thota
2024-04-26 12:45                 ` Johan Hovold
2024-04-26 14:15                   ` Johan Hovold
2024-04-25 15:22         ` Doug Anderson
2024-04-25 16:13           ` Johan Hovold [this message]
2024-04-25 16:19             ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZiqBQ3r3gRk2HBir@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=dianders@chromium.org \
    --cc=johan+linaro@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=mka@chromium.org \
    --cc=quic_janathot@quicinc.com \
    --cc=stable@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox