linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@csie.org>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
	Loic Poulain <loic.poulain@gmail.com>,
	linux-bluetooth@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 13/15] Bluetooth: btbcm: Add default address for BCM43430A0
Date: Thu, 15 Nov 2018 17:36:01 +0800	[thread overview]
Message-ID: <20181115093603.26729-14-wens@csie.org> (raw)
In-Reply-To: <20181115093603.26729-1-wens@csie.org>

The BCM43430A0 has the default MAC address 43:43:A0:12:1F:AC if none
is given. This address was found when enabling Bluetooth on a bunch of
boards with the AMPAK AP6210 module, all sharing the same address. It
also contains the sequence 4343A0, which is suspicious as that is also
the name the chip identifies itself as.

Add this to the list of default MAC addresses and leave it to the user
to configure a valid one.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/bluetooth/btbcm.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index 22d4b530da03..08e1f3dd4e03 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -34,6 +34,7 @@
 
 #define BDADDR_BCM20702A0 (&(bdaddr_t) {{0x00, 0xa0, 0x02, 0x70, 0x20, 0x00}})
 #define BDADDR_BCM20702A1 (&(bdaddr_t) {{0x00, 0x00, 0xa0, 0x02, 0x70, 0x20}})
+#define BDADDR_BCM43430A0 (&(bdaddr_t) {{0xac, 0x1f, 0x12, 0xa0, 0x43, 0x43}})
 #define BDADDR_BCM4324B3 (&(bdaddr_t) {{0x00, 0x00, 0x00, 0xb3, 0x24, 0x43}})
 #define BDADDR_BCM4330B1 (&(bdaddr_t) {{0x00, 0x00, 0x00, 0xb1, 0x30, 0x43}})
 
@@ -73,11 +74,15 @@ int btbcm_check_bdaddr(struct hci_dev *hdev)
 	 *
 	 * The address 43:30:B1:00:00:00 indicates a BCM4330B1 controller
 	 * with waiting for configuration state.
+	 *
+	 * The address 43:43:A0:12:1F:AC indicates a BCM43430A0 controller
+	 * with no configured address.
 	 */
 	if (!bacmp(&bda->bdaddr, BDADDR_BCM20702A0) ||
 	    !bacmp(&bda->bdaddr, BDADDR_BCM20702A1) ||
 	    !bacmp(&bda->bdaddr, BDADDR_BCM4324B3) ||
-	    !bacmp(&bda->bdaddr, BDADDR_BCM4330B1)) {
+	    !bacmp(&bda->bdaddr, BDADDR_BCM4330B1) ||
+	    !bacmp(&bda->bdaddr, BDADDR_BCM43430A0)) {
 		bt_dev_info(hdev, "BCM: Using default device address (%pMR)",
 			    &bda->bdaddr);
 		set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
-- 
2.19.1


  parent reply	other threads:[~2018-11-15  9:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15  9:35 [PATCH v2 00/15] ARM: sunxi: Enable Broadcom-based Bluetooth controllers Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 01/15] dt-bindings: net: broadcom-bluetooth: Fix external clock names Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 02/15] dt-bindings: net: broadcom-bluetooth: Add VBAT and VDDIO supplies Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 03/15] dt-bindings: net: broadcom-bluetooth: Add BCM20702A1 compatible string Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 04/15] dt-bindings: net: broadcom-bluetooth: Add BCM4330 " Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 05/15] Bluetooth: hci_bcm: Handle deferred probing for the clock supply Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 06/15] Bluetooth: hci_bcm: Simplify clk_get error handling Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 07/15] Bluetooth: hci_bcm: Use "txco" and "extclk" to get clock reference Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 08/15] Bluetooth: hci_bcm: Add support for LPO clock Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 09/15] Bluetooth: hci_bcm: Add support for regulator supplies Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 10/15] Bluetooth: hci_bcm: Wait for device to come out of reset after power on Chen-Yu Tsai
2018-11-15  9:35 ` [PATCH v2 11/15] Bluetooth: hci_bcm: Add BCM20702A1 variant Chen-Yu Tsai
2018-11-15  9:36 ` [PATCH v2 12/15] Bluetooth: hci_bcm: Add compatible string for BCM4330 Chen-Yu Tsai
2018-11-15  9:36 ` Chen-Yu Tsai [this message]
2018-11-15  9:36 ` [PATCH v2 14/15] ARM: dts: sunxi: Enable Broadcom-based Bluetooth for multiple boards Chen-Yu Tsai
2018-11-15  9:36 ` [PATCH v2 15/15] arm64: dts: allwinner: a64: bananapi-m64: Add Bluetooth device node Chen-Yu Tsai
2018-11-28  4:25 ` [PATCH v2 00/15] ARM: sunxi: Enable Broadcom-based Bluetooth controllers Chen-Yu Tsai
2018-12-03 15:51   ` Chen-Yu Tsai
2018-12-14 12:42 ` Ondřej Jirman

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=20181115093603.26729-14-wens@csie.org \
    --to=wens@csie.org \
    --cc=devicetree@vger.kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).