All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avinash Bhatt <avinash.bhatt@intel.com>
To: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	johannes@sipsolutions.net, miriam.rachel.korenblit@intel.com,
	linux-kernel@vger.kernel.org, kobi.guetta@intel.com,
	emmanuel.grumbach@intel.com, avinash.bhatt@intel.com
Subject: [PATCH v2 3/3] wifi: iwlwifi: dt: use Device Tree as fallback BIOS configuration source
Date: Mon,  4 May 2026 12:53:27 +0300	[thread overview]
Message-ID: <20260504095327.30892-4-avinash.bhatt@intel.com> (raw)
In-Reply-To: <20260504095327.30892-1-avinash.bhatt@intel.com>

When neither UEFI variables nor ACPI methods provide a BIOS
configuration table, fall back to Device Tree. This preserves the
existing UEFI -> ACPI priority order and extends it with DT as the
lowest-priority source.

Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/regulatory.c  | 3 +++
 drivers/net/wireless/intel/iwlwifi/mld/mld.c        | 3 +++
 drivers/net/wireless/intel/iwlwifi/mld/regulatory.c | 5 ++++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
index 55128caac7ed..10bb4d2f64cf 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
@@ -8,6 +8,7 @@
 #include "regulatory.h"
 #include "fw/runtime.h"
 #include "fw/uefi.h"
+#include "fw/dt.h"
 
 #define GET_BIOS_TABLE(__name, ...)					\
 do {									\
@@ -16,6 +17,8 @@ do {									\
 		ret = iwl_uefi_get_ ## __name(__VA_ARGS__);		\
 	if (ret < 0)							\
 		ret = iwl_acpi_get_ ## __name(__VA_ARGS__);		\
+	if (ret < 0)							\
+		ret = iwl_dt_get_ ## __name(__VA_ARGS__);		\
 	return ret;							\
 } while (0)
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.c b/drivers/net/wireless/intel/iwlwifi/mld/mld.c
index 495e9d8f3af6..a3e93112caff 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/mld.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.c
@@ -12,6 +12,7 @@
 #include "fw/api/coex.h"
 #include "fw/dbg.h"
 #include "fw/uefi.h"
+#include "fw/dt.h"
 
 #include "mld.h"
 #include "mlo.h"
@@ -418,6 +419,8 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
 	iwl_mld_get_bios_tables(mld);
 	iwl_uefi_get_sgom_table(trans, &mld->fwrt);
 	mld->bios_enable_puncturing = iwl_uefi_get_puncturing(&mld->fwrt);
+	if (!mld->bios_enable_puncturing)
+		mld->bios_enable_puncturing = iwl_dt_get_puncturing(&mld->fwrt);
 
 	iwl_mld_hw_set_regulatory(mld);
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/regulatory.c b/drivers/net/wireless/intel/iwlwifi/mld/regulatory.c
index 659243ada86c..1c7d2136b2e3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/regulatory.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/regulatory.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2024-2025 Intel Corporation
+ * Copyright (C) 2024-2026 Intel Corporation
  */
 
 #include <linux/dmi.h>
@@ -8,6 +8,7 @@
 #include "fw/regulatory.h"
 #include "fw/acpi.h"
 #include "fw/uefi.h"
+#include "fw/dt.h"
 
 #include "regulatory.h"
 #include "mld.h"
@@ -64,6 +65,8 @@ void iwl_mld_get_bios_tables(struct iwl_mld *mld)
 	}
 
 	iwl_uefi_get_uats_table(mld->trans, &mld->fwrt);
+	if (!mld->fwrt.ap_type_cmd_valid)
+		iwl_dt_get_uats_table(&mld->fwrt);
 	iwl_uefi_get_uneb_table(mld->trans, &mld->fwrt);
 
 	iwl_bios_get_phy_filters(&mld->fwrt);
-- 
2.34.1


  parent reply	other threads:[~2026-05-04  9:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04  9:53 [PATCH v2 0/3] wifi: iwlwifi: add Device Tree hardware integration information Avinash Bhatt
2026-05-04  9:53 ` [PATCH v2 1/3] dt-bindings: net: wireless: intel,iwlwifi: add binding Avinash Bhatt
2026-05-05  9:15   ` Krzysztof Kozlowski
2026-05-12  9:59     ` Bhatt, Avinash
2026-05-04  9:53 ` [PATCH v2 2/3] wifi: iwlwifi: dt: add Device Tree BIOS configuration infrastructure Avinash Bhatt
2026-05-05  9:18   ` Krzysztof Kozlowski
2026-05-12 10:03     ` Bhatt, Avinash
2026-05-13 18:16       ` Krzysztof Kozlowski
2026-05-04  9:53 ` Avinash Bhatt [this message]
2026-05-05  9:19 ` [PATCH v2 0/3] wifi: iwlwifi: add Device Tree hardware integration information Krzysztof Kozlowski
2026-05-12 10:07   ` Bhatt, Avinash
2026-05-13 18:18     ` Krzysztof Kozlowski
2026-06-03  6:39       ` Bhatt, Avinash

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=20260504095327.30892-4-avinash.bhatt@intel.com \
    --to=avinash.bhatt@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=kobi.guetta@intel.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.