From patchwork Tue Jun 20 10:03:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 13285547 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D98ACEB64DC for ; Tue, 20 Jun 2023 10:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230433AbjFTKFA (ORCPT ); Tue, 20 Jun 2023 06:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231979AbjFTKEg (ORCPT ); Tue, 20 Jun 2023 06:04:36 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F64A1711 for ; Tue, 20 Jun 2023 03:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687255475; x=1718791475; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W3xD8G1wySQQD0iG3yN6F0ZMGXcxd5xUWRsn/UvFeXU=; b=n9PB3Fn/hJkwgXqwPYLkmKopBl307XmSOSvE1aCwt0WPrmIwjSbd/qJF NierTbbnB3nh+n1bpF7FsqJS4+GM+nHv9JKfRSTZ3aN7+SaFQi7jlS7Hd AztKVxA76RA2ksD16XJAr0LT2AWfjaNULyemwoxy808weEeVkyS2O/vvX zuEmCPQwIoTK+mPNtyssDmI8H7MRDXUaSrC0HaR1UTxxf/DzD+jy3KWqy M9F24AU/HgzWJkKIGxp00P9h00LJd84bUr7tFxrwez8iikLUrL86GDX55 jEt2emR5uzffdi9b2V4K4iI6Mt+j1H1wMOGkq89HeVeSdtmbGejO9cGD9 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="359819576" X-IronPort-AV: E=Sophos;i="6.00,256,1681196400"; d="scan'208";a="359819576" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 03:04:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="838143166" X-IronPort-AV: E=Sophos;i="6.00,256,1681196400"; d="scan'208";a="838143166" Received: from rafist-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.208.68]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 03:04:31 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 06/19] wifi: iwlwifi: nvm: handle EHT/320 MHz regulatory flag Date: Tue, 20 Jun 2023 13:03:52 +0300 Message-Id: <20230620125813.2c5e886c08f3.Ibc5c27d973d0590e2dea1f50435f9cf3ba8c2c09@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230620100405.45117-1-gregory.greenman@intel.com> References: <20230620100405.45117-1-gregory.greenman@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg Handle the regulatory EHT/320 MHz flags from firmware just like any other flags before it. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index d79d5453c2dc..39f13518ca5b 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1567,10 +1567,17 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, if (!reg_capa.allow_160mhz) flags |= NL80211_RRF_NO_160MHZ; + + if (!reg_capa.allow_320mhz) + flags |= NL80211_RRF_NO_320MHZ; } + if (reg_capa.disable_11ax) flags |= NL80211_RRF_NO_HE; + if (reg_capa.disable_11be) + flags |= NL80211_RRF_NO_EHT; + return flags; }