All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: luca@coelho.fi, linux-wireless@vger.kernel.org
Subject: [PATCH 03/12] iwlwifi: mvm: read 6E enablement flags from DSM and pass to FW
Date: Sun, 24 Oct 2021 18:20:28 +0300	[thread overview]
Message-ID: <iwlwifi.20211024181719.2fa34d31383c.I6504005c60882c94e6e58f64cab4e42e6481ce08@changeid> (raw)
In-Reply-To: <20211024152037.332948-1-luca@coelho.fi>

From: Luca Coelho <luciano.coelho@intel.com>

We need to call a new DSM function and pass the values to the firmware
in order to allow enablement of 6E support by the OEMs via ACPI.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/acpi.h |  1 +
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c  | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
index a30b95a01144..4aaa8a6b071b 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
@@ -109,6 +109,7 @@ enum iwl_dsm_funcs_rev_0 {
 	DSM_FUNC_QUERY = 0,
 	DSM_FUNC_DISABLE_SRD = 1,
 	DSM_FUNC_ENABLE_INDONESIA_5G2 = 2,
+	DSM_FUNC_ENABLE_6E = 3,
 	DSM_FUNC_11AX_ENABLEMENT = 6,
 	DSM_FUNC_ENABLE_UNII4_CHAN = 7,
 	DSM_FUNC_ACTIVATE_CHANNEL = 8
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index e64b6468d1a1..6063b2ffe266 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1177,7 +1177,6 @@ static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
 				   &iwl_guid, &value);
 	if (!ret)
 		cmd.oem_11ax_allow_bitmap = cpu_to_le32(value);
-	/* apply more config masks here */
 
 	ret = iwl_acpi_get_dsm_u32((&mvm->fwrt)->dev, 0,
 				   DSM_FUNC_ENABLE_UNII4_CHAN,
@@ -1191,7 +1190,14 @@ static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
 	if (!ret)
 		cmd.chan_state_active_bitmap = cpu_to_le32(value);
 
+	ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0,
+				   DSM_FUNC_ENABLE_6E,
+				   &iwl_guid, &value);
+	if (!ret)
+		cmd.oem_uhb_allow_bitmap = cpu_to_le32(value);
+
 	if (cmd.config_bitmap ||
+	    cmd.oem_uhb_allow_bitmap ||
 	    cmd.oem_11ax_allow_bitmap ||
 	    cmd.oem_unii4_allow_bitmap ||
 	    cmd.chan_state_active_bitmap) {
@@ -1219,6 +1225,9 @@ static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
 				le32_to_cpu(cmd.oem_unii4_allow_bitmap),
 				le32_to_cpu(cmd.chan_state_active_bitmap),
 				cmd_ver);
+		IWL_DEBUG_RADIO(mvm,
+				"sending LARI_CONFIG_CHANGE, oem_uhb_allow_bitmap=0x%x\n",
+				le32_to_cpu(cmd.oem_uhb_allow_bitmap));
 		ret = iwl_mvm_send_cmd_pdu(mvm,
 					   WIDE_ID(REGULATORY_AND_NVM_GROUP,
 						   LARI_CONFIG_CHANGE),
-- 
2.33.0


  parent reply	other threads:[~2021-10-24 15:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24 15:20 [PATCH 00/12] iwlwifi: updates intended for v5.16 2021-10-24 part 2 Luca Coelho
2021-10-24 15:20 ` [PATCH 01/12] iwlwifi: fw: uefi: add missing include guards Luca Coelho
2021-10-24 15:20 ` [PATCH 02/12] iwlwifi: yoyo: support for ROM usniffer Luca Coelho
2021-10-24 15:20 ` Luca Coelho [this message]
2021-10-24 15:20 ` [PATCH 04/12] iwlwifi: mvm: don't get address of mvm->fwrt just to dereference as a pointer Luca Coelho
2021-10-24 15:20 ` [PATCH 05/12] iwlwifi: mvm: update RFI TLV Luca Coelho
2021-10-24 15:20 ` [PATCH 06/12] iwlwifi: mvm: d3: use internal data representation Luca Coelho
2021-10-24 15:20 ` [PATCH 07/12] iwlwifi: rename GEO_TX_POWER_LIMIT to PER_CHAIN_LIMIT_OFFSET_CMD Luca Coelho
2021-10-24 15:20 ` [PATCH 08/12] iwlwifi: mvm: fix WGDS table print in iwl_mvm_chub_update_mcc() Luca Coelho
2021-10-24 15:20 ` [PATCH 09/12] iwlwifi: mvm: remove session protection on disassoc Luca Coelho
2021-10-24 15:20 ` [PATCH 10/12] iwlwifi: rename CHANNEL_SWITCH_NOA_NOTIF to CHANNEL_SWITCH_START_NOTIF Luca Coelho
2021-10-24 15:20 ` [PATCH 11/12] iwlwifi: mvm: extend session protection on association Luca Coelho
2021-10-24 15:20 ` [PATCH 12/12] iwlwifi: bump FW API to 67 for AX devices Luca Coelho

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=iwlwifi.20211024181719.2fa34d31383c.I6504005c60882c94e6e58f64cab4e42e6481ce08@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.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.