Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2182822lqa; Tue, 30 Apr 2024 10:09:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUfj3RgTp721gaHoOTME+PYbIToPB7Aj+v2jSaBhx8yJmOTWn0OQad6q5miHzRK4X3l6RYgPk392icxwnSs3m+BVr1Jt0jmzOZ+inE8NA== X-Google-Smtp-Source: AGHT+IGDpmsAfZDN7AqnRUC1V+uLmx24hFIADoUrVvGJ7aba82ZEtLzhk+1epcaNGDCtSkblXQVS X-Received: by 2002:a05:6870:ed86:b0:23a:fb32:85a9 with SMTP id fz6-20020a056870ed8600b0023afb3285a9mr56495oab.47.1714496952446; Tue, 30 Apr 2024 10:09:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714496952; cv=pass; d=google.com; s=arc-20160816; b=kXnDUGKH2fbfgUpooDKky0KZUOIcBgfm+vP2hs9Rtz7b6D65+Qmn7vtI5dHx0RsS9O 66XJzXHHO2o1Uq+wZxASrHG3gJnA9OtmCmT6LKRhm/a8/u6atOFzwxyaLFJVUsmFg6Ah D8FJVidiMj/XFqT8/PZ5qLltxW2SkifOaizRPRvVCotTppsbilCanrQeEOPSfYEBItRH vN3RQK41EGvPE5nnXB3ewOXa3snn00rY8U5CJRObIGMJ3vnf83mlsk0zBwbioak+u941 JxWJlVDmalP15OeWi92XwR0qV8mu7f3EqXfebSy2PVDdDj6F4fF6+GwozC/xhVT8XgDb a2RA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=AtWFPwCEckCcZ554Rmd7I2KtikjO1QtZiDbRHvrQXaE=; fh=+aSw0fK6FtyziqO/yF6I4VvSTruYNb70hawIMsvo1Hw=; b=jy2cE/foITjFM3PjVIWG8oC81C72bOWKzDSAA7kp1E3U78sjEXsaWC1aARH39hZn5c m6LI6FfOEVRuhzoSaGXPNA1gjhYR1IJON3/2PQGg2Ba61zDzPYre/RqllVfCPndwAORE 9v7ciNY5h41mdTas93AL717KCj2/9IstBGdBgps7CQVG2p6Ahx9NUYWN28L3wBZtDYoh CnsRXQ8AUkJJwibM0z7IOQYcJpKrmSNH2KI6ygRGpVLBKilTbHVioAQPbvn72bhAex63 CxRwrpC5Q6cUBxv69kXvOl1IGyRYePxnTjvqK9rTNK7KknC0TUYiF5t4C8Q+CGjxRQai CLGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z2qZqwdl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x3-20020a05622a000300b0043ab1af225asi8021487qtw.422.2024.04.30.10.09.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 10:09:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z2qZqwdl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 280731C22FF1 for ; Tue, 30 Apr 2024 17:09:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6DD217F39E; Tue, 30 Apr 2024 17:08:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z2qZqwdl" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CBDB173351; Tue, 30 Apr 2024 17:08:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714496931; cv=none; b=vFs5MOgpziunk8gxtRIUDNmnEpx9JKA46weKhD8bKhlUGkl2a9c/FprACx9p2pV6M8bRHGv7P3nOSvQa7b7XXydGzMaDfTHpCq+/RKf7V3kspYz01zqBSfTbBwMfh8FXyaEgiFucY1IRYrrEpaeZ1rb1DkQjR8EEwoar4jkkrTk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714496931; c=relaxed/simple; bh=kN2nfYaW+kqi6Y9cBOHDijd6fcDAfmABLSN9IDfyJWY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hwgqxpmwEtLIIzHOW7xLNALLgiIhZvMZUuvGHlH6E3aQSs7adGwnUTTd73d6+yiuKkSEZ9gHV3I1K5aQ+VKIRVLiDS4bCErLxhX9UFxsdFT+A1qoW5NfhYDLR80kjaN7t72rafXyWiwlc6KBd0rnKIZXpew0guVvNodNKjaEhIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z2qZqwdl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3738C2BBFC; Tue, 30 Apr 2024 17:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714496930; bh=kN2nfYaW+kqi6Y9cBOHDijd6fcDAfmABLSN9IDfyJWY=; h=From:To:Cc:Subject:Date:From; b=Z2qZqwdll04May3CXSNcjHEwDnXHdOfX0z8EYaPg8+rHMKMkFntfBAhgZNGUnUFsx TmCEtu+rpb5Ucv30HLl7wLXs90FWu3um65AQenWbgpIItuic+MLid1zu1beD0sPTTa rJhkcny0kxSu6du89qiFvpaWupbBPUXVT36mbbhJiA3pRUOI+MWJd0R/F8R780j/YV 8quJS++aNije9JRjvKHk0JFpC9JNbODL/2LmjLw4eZJTfIRZzNcAy5lfJSDWo0HV92 kbFTzg5rLbLGfFliA6PzuepWK9bTt4SnHCZSul2XztDifa4M/Yc0i8sCG3EqtL5RzS RJl4NvClsUzuA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1s1qyJ-0000000047Q-3fzL; Tue, 30 Apr 2024 19:08:52 +0200 From: Johan Hovold To: Marcel Holtmann , Luiz Augusto von Dentz Cc: Doug Anderson , Janaki Ramaiah Thota , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 0/3] Bluetooth: qca: generalise device address check Date: Tue, 30 Apr 2024 19:07:38 +0200 Message-ID: <20240430170741.15742-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The QCA default device address apparently comes from the NVM configuration file and can differ quite a bit between controllers. This series adds support for storing the default address when parsing the configuration file and using it to determine whether the controller has been provisioned with an address. This makes sure that devices without a unique address start as unconfigured unless a valid address has been provided in the devicetree. Included in v2 are two preparatory but otherwise independent fixes that adds the missing sanity checks when parsing the firmware files and makes sure that the parser can handle configuration files for WCN3xxx. Johan Changes in v2: - add missing firmware sanity checks (new patch) - fix nvm configuration parsing (new patch) - make sure to set the BD_ADDR quirk flag also when the controller returns BDADDR_ANY Johan Hovold (3): Bluetooth: qca: add missing firmware sanity checks Bluetooth: qca: fix NVM configuration parsing Bluetooth: qca: generalise device address check drivers/bluetooth/btqca.c | 83 +++++++++++++++++++++++++++++++-------- drivers/bluetooth/btqca.h | 2 + 2 files changed, 68 insertions(+), 17 deletions(-) -- 2.43.2