Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp525157lqo; Fri, 10 May 2024 07:09:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvBBUUprKw8mh4amUhYjVW3hU0sEwoWEvhxCVMzF0qnV1JiPLb1lcTUjgzRzPBCVSIZwNSktYEfm8ORFDCBkcx7CBTc2aNCWdEPeHkTQ== X-Google-Smtp-Source: AGHT+IGHxaGeBeBicG01MVzamzY3L3EKqv4ON4GFDFT0Z4kBOSqAJxK5PyevYVomgzYjipiQ9Yzs X-Received: by 2002:a17:907:7da3:b0:a58:e3d9:e2d6 with SMTP id a640c23a62f3a-a5a2d672f76mr249667966b.56.1715350143415; Fri, 10 May 2024 07:09:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715350143; cv=pass; d=google.com; s=arc-20160816; b=D7MTmex+pmqvLu/5kZuHmlFASe8H2zjBKcoWsLa65zHxd/51RKMmXxhM3FPml7xh0b lrk9EiHmb7M5DKP0/P9irZCWiM036opP7rflI/bdF9Gk/w8ODrS3PtHtrOsxnboWaOlg KNE82+n11fwuM2uAIfliJ8wB1T/QzGOrZtsgw0So5nU+F/zYz72tWvU1WpWg+zm277/G PIA1RhjLeTKlVspwQ0Inq5ZYfTGYvjbSZY52kXZxB+FOkUDz9t7J0tu2Gy0b8nXk2iFc FDn5CGe9TEOoICafcCBtV8jwhCgLjBCAARiothQVrk5R+FqRE63wZN/+ok45Rb2CkzS2 +EVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=0TMKcRDhXTxryTytF4HChgdRc3UltBE7rX/JooD61f4=; fh=9HNj+tMBTZWzUhymXY3IrsbQyNBFbKT9CyriZU5mYCw=; b=SP9NVv3OcBeKJ5VWJP3nSQ+bRtVYXQ6kpKkDXDEldCrxE4vzbJCTzvToauaU2EpUnu 5ISoBgrz9PSR/EJgclomeIe4TmyHh6Ly/HBsyhGdpl0EFBES/pqgtcKhON6cFTfaEsfd 2Qzt/LmtcFkB76VwsdSOIeorEjKSRdm2FgYHwcZnao0KItJiX2MglzebjQYS58HO1u4w RNdp5NEjiPA95ZrQ5B4Gpq2TT6jU2eR0/9k3Shct0PbeOY+5umEYNj2SAn0dRAj3xTtx 1dWbKth4F/QyJMvn9qDNIa9sTBQ/ScR3jJqpRlQPyQ5eQkNB2gh1C5fWEC5+s9rHjRcd zyBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NRGi0tiO; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1797da63si210962466b.269.2024.05.10.07.09.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:09:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NRGi0tiO; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 212321F24066 for ; Fri, 10 May 2024 14:09:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76A70171E7C; Fri, 10 May 2024 14:07:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NRGi0tiO" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 F3EE2171E61 for ; Fri, 10 May 2024 14:07:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350033; cv=none; b=K8aTLeEnFAOslWnp6b0I/xY6AYskj3ISexg65xHSmVPoGiAkts6SVqXNkJX26jlxPbOIl2cwUOfHqqMEXCybPteF4ApvAGdcE7a2e4xdX+w39ejMmbwzH6bBpmdWrMnHQmRGEY2UMNdEiHXyF4PxSo47lu9B4HwtMjXhUMUs72w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350033; c=relaxed/simple; bh=QSc/7E5BhoUPb8uyhk1R27PsivVec6FiuYt5YixMIhU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UE5uIrl54C0fYSRtObbA9C9p65UAp7E2tnEsvWZk8OA2UO72oX4XcnNBh4qMtO+cZUi3XT09JUA8qtXqLuQBDKMNk/C/m4fGXB39UE+OGwapR1LSNHGIxxCQz/y9iM+2O8pbGsHBd233CFXKaJJO2DZbtYegWQtP0xWtbrxt2Y4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NRGi0tiO; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350032; x=1746886032; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QSc/7E5BhoUPb8uyhk1R27PsivVec6FiuYt5YixMIhU=; b=NRGi0tiOZCw72u1vxp3Kqo0kin4cHpgmwzMabfKx3ADpU10wzwjEpmza VFL0obE4SacWC54mOuWTjWXKAVIsUVWs1S628baKilEdAcEHaFP+JTQTr Eu/r3t9NbszkvyVHY25aAKxRZ6b15pBGhP+2x7SHCCSQA2nAgIGsNbVG9 zMiHMYv9kwFtsZ2uU0fqtGCdb8PicbBqQdnYbjXjU1ri/JDPXP0GRR6ud qqW3CgWJN4tWUeeUnnG9CIbMbLXVwafWaGcH95K7yYQioTlkfcf8X9V8T /JNo8mcRWh0z87CqEGU7GTlnepeeLHCBAEsdMXXP9bs4RSWIKeNHLt35H A==; X-CSE-ConnectionGUID: uS5+TMbRTsuA1dNnnpU2rA== X-CSE-MsgGUID: XYodZbBqQIi44DNIXeLKaQ== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125595" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125595" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:11 -0700 X-CSE-ConnectionGUID: te6+elvUQqK602VZqnE96Q== X-CSE-MsgGUID: iVe8kYeTTtWl4gIREmB+NQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101895" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:10 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Andrei Otcheretianski , Luciano Coelho Subject: [PATCH 11/14] wifi: iwlwifi: mvm: Don't set NO_HT40+/- flags on 6 GHz band Date: Fri, 10 May 2024 17:06:38 +0300 Message-Id: <20240510170500.b0d51b2229f8.I092e21cde43320ffc2eff17f5748ff9c87c87fcf@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Andrei Otcheretianski These flags are not needed on 6 GHz channels, and anyway they were set incorrectly. This in turn resulted in alternating channel flags, preventing reg domain rules to be merged together, so cfg80211 couldn't even send them to the user space, as the regulatory domain was too large. Fix it. Signed-off-by: Andrei Otcheretianski Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 149903f52567..cf5c9500af8c 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1625,11 +1625,15 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, flags &= ~NL80211_RRF_NO_HT40PLUS; if (nvm_chan[ch_idx] >= FIRST_2GHZ_HT_MINUS) flags &= ~NL80211_RRF_NO_HT40MINUS; - } else if (nvm_flags & NVM_CHANNEL_40MHZ) { + } else if (ch_idx < NUM_2GHZ_CHANNELS + NUM_5GHZ_CHANNELS && + nvm_flags & NVM_CHANNEL_40MHZ) { if ((ch_idx - NUM_2GHZ_CHANNELS) % 2 == 0) flags &= ~NL80211_RRF_NO_HT40PLUS; else flags &= ~NL80211_RRF_NO_HT40MINUS; + } else if (nvm_flags & NVM_CHANNEL_40MHZ) { + flags &= ~NL80211_RRF_NO_HT40PLUS; + flags &= ~NL80211_RRF_NO_HT40MINUS; } if (!(nvm_flags & NVM_CHANNEL_80MHZ)) -- 2.34.1