From patchwork Thu Nov 15 09:36:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 10684021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7518214E2 for ; Thu, 15 Nov 2018 09:39:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 632292BB5E for ; Thu, 15 Nov 2018 09:39:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 574952BEFB; Thu, 15 Nov 2018 09:39:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40A162BB5E for ; Thu, 15 Nov 2018 09:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H/3cxL+qOiMYqQVn9ZAXYbt7PeBwiRF6s0kHBnO9RQ0=; b=obCm87Si0VZvKY JAuGsVVHHRwNaXwpbHJpa2MB9BvINi17/tLw5jD7KAPb7RJ05M0VQnffYfcl7hNuV7YFAS1aGie4Z ow6A/pt5Yjl+WH6XjOznhcDrnAHu2frr6/oNYivuB+YKmmXv0H23kwM+iwr73Fm9qL/tDLCpyigEV UhU89NVyxYTTQczpcep4C0SPSDiIyfbGhZZn5iJmJgbl7FMG8oEWwYYq+vn32imxT9h7cVHulplF2 aYqXgsuNqi4QKcxBIVZpJoHaZ9KzOYox1L2/SvRsZIMcORhWWwctnG2FKUaxx1rYX3Xy1rL3hJub/ fzL2bZM8sFwIRoMN9C8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNE7M-0003y9-8m; Thu, 15 Nov 2018 09:39:20 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNE4o-0001S8-EC for linux-arm-kernel@bombadil.infradead.org; Thu, 15 Nov 2018 09:36:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZyuhIAR5tXvYogE+IM1BdyhTGcCO5t58gltbbUIEqJ4=; b=sgD579dTviLDjBSXDzhhfjsrSr /4WJQ07n8AEJbJ0tGkb7hV2WW6Mm/Z08BhcShdYB5BLFtDHsmnkVlHSaLoZofuinoRyUwRlQFiw2V CMWq2ojPDAvEpzIlo17isW70emwOZG8AiSCYpR92gFSMv8+uSiLxbw2wjavRZ0OWVDy+KdgowBfF3 md5kQPUST0aKQLbvpsS1zx3RzZUfvIoFTL0n4X33U+/ezhvVUEB4OzSAkyCC1T4NFPI3I+zOwbUln zQVX21z6t2W7Yi9RvhtjJDIlq6G32lDs50+Q7GlNepRD0e6ahzJbJM7s9J/xxnlOP5M413H4+zJqC 0E70Ccyg==; Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNE4k-0000jl-L4 for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2018 09:36:40 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id 084085FDB1; Thu, 15 Nov 2018 17:36:05 +0800 (CST) From: Chen-Yu Tsai To: Marcel Holtmann , Johan Hedberg , Rob Herring , Mark Rutland , Maxime Ripard Subject: [PATCH v2 13/15] Bluetooth: btbcm: Add default address for BCM43430A0 Date: Thu, 15 Nov 2018 17:36:01 +0800 Message-Id: <20181115093603.26729-14-wens@csie.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115093603.26729-1-wens@csie.org> References: <20181115093603.26729-1-wens@csie.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181115_043638_969215_E85473BC X-CRM114-Status: GOOD ( 13.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Chen-Yu Tsai , Loic Poulain , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);