From patchwork Mon Jan 29 19:21:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768009 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 E466D3C46E for ; Mon, 29 Jan 2024 19:22:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556139; cv=none; b=YV50/TxBjCIKl7MW72kV8vVQyEYoFeCBGYcm6dcOID1YzmpvgBREhDU/cxZV6QNLEqRiAKV/y5uCMKMVH4yBncaFm+530elCfx+qYyH3zbx6qGZyYn8K8NA1oFpXpWASRyDXhIBLmDyoIIpFe2TeO5l4hL1OFRs0InMDtq1VqKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556139; c=relaxed/simple; bh=2P18XZ1idB2abb9HeIkzStILMnV64Xj3wi//DtBxvlc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cwp5CNN8xcl46ZMLfsSUrC/+Yvyb8R/j9zna9h/A9EjrVYAb64DpCykWyAHFiGGMyy7u2ay364IKyx4ucztupXuKp47mOCYpQawFatCvw2ztG1UOJDY/1p2ADmx6tJo87j2HunKQBQwaQeI8R7SrwlNEmo5PhzG8WNhk50OJzQA= 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=YgFbrId2; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YgFbrId2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556138; x=1738092138; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2P18XZ1idB2abb9HeIkzStILMnV64Xj3wi//DtBxvlc=; b=YgFbrId2UynjuNYz8Wh/0f4NH8YE2e5V7NmdbwaU4OiZkG5X2NkYICq7 fcwYH0MDaVlFOOeFMkGk0FfbuTPlMn0XuoTUXnCWWVjgTRuuPLWQA5ZQz j7eT7Yui2/BeDvVcyfJQzvkhCmoKyELMh9QLTrcgQo6hOS5Yol6INjPGk TCToc25/Lp3Nqt45SKmQ8KpiAXjgKsAg66vrDeteOnaJJ5LZuGBSj9wzK VuDv92g/xR9ZtA/hDkb6TAkD/Dd9sjdr4+saIYIXf4ExJzaMMLq7vgHAR BvCkwj/tFlrJ81UE7aJCj9sDJxLtIt5wSmzNz+s+KOOBkSDS8+nx01I29 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2942941" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2942941" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459040" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:17 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Gregory Greenman Subject: [PATCH 01/15] wifi: iwlwifi: fix EWRD table validity check Date: Mon, 29 Jan 2024 21:21:49 +0200 Message-Id: <20240129211905.448ea2f40814.Iffd2aadf8e8693e6cb599bee0406a800a0c1e081@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 EWRD ACPI table contains up to 3 additional sar profiles. According to the BIOS spec, the table contains a n_profile variable indicating how many additional profiles exist in the table. Currently we check that n_profiles is not <= 0. But according to the BIOS spec, 0 is a valid value, and it can't be < 0 anyway because we receive that from ACPI as an unsigned integer. Fixes: 39c1a9728f93 ("iwlwifi: refactor the SAR tables from mvm to acpi") Signed-off-by: Miri Korenblit Reviewed-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c index dd68d382d7de..9be91e6a9882 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c @@ -767,7 +767,7 @@ int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt) * from index 1, so the maximum value allowed here is * ACPI_SAR_PROFILES_NUM - 1. */ - if (n_profiles <= 0 || n_profiles >= ACPI_SAR_PROFILE_NUM) { + if (n_profiles >= ACPI_SAR_PROFILE_NUM) { ret = -EINVAL; goto out_free; } From patchwork Mon Jan 29 19:21:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768436 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 C7A2A11C85 for ; Mon, 29 Jan 2024 19:22:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556142; cv=none; b=tL015eTDsZ4Rlx2WVespPuO56o3nJo9HIyCECdhxwUK2Iwo3ARxybRkCCBodDmggLhTZ5Q/P58aMxzAHW5pLKlyOphKmv9+RXSRyO2hV6TY24H7XKA92tMS/vGmNxM/vu+RN/eXjlVGxQgiGMs76Kh4If6I+OO8BbNSUb2VOwtk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556142; c=relaxed/simple; bh=tA3WjDpQfQkCnpitqsZ8A3Z5rbYOMmTMx3Y2jJlnqwY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MuDAax5XRy6iSzXh6R5XuPuW8n5zejbxdYxHDeKsoZdKk4kC5HQItkX+ILrPcQCXXC8fodkbc6WzP6oBIcF2kWG/0pi2uGON9s5KJ0ouKF8/TrY9fXVHLsoe+Cm5vJgS6IA6e4LozJJ/Ji4xCzNCdrY8u/YDlVtDuO+wMmEaPAs= 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=DkFDRmpb; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DkFDRmpb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556141; x=1738092141; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tA3WjDpQfQkCnpitqsZ8A3Z5rbYOMmTMx3Y2jJlnqwY=; b=DkFDRmpbfigfNAC/eHOXj6gJFjXU424BHu9DvQOeHEYHlaCtWRW+vJPk PQ50VrNyrx5zThSL/CJbfxM1Kihr4lvMs1Udd6vljzdDQdVurYgmkeSNv odULmOB3U+3TTjq2Sx5TDH7CP7OhF6wWW+UxbuPO1WaTBZ8VTbh0zjA8I N4z5N2/QZDZ50ljH3C1Re8cNMw8tpK5ASg/ZF556+Pvu6XFeW8++uMc9d XBge6poqwvUOYgDeWCYXoNqYY4MBtl4p7jFzUh8y0BA5NtOkrncVB4Gzj mTv9i4Jbz79PkSYlWwtDAbeecgry+eywq+yoR6xHy8OZphGoJCr76AAZq Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2942953" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2942953" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459058" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:19 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ayala Beker , Johannes Berg , Gregory Greenman Subject: [PATCH 02/15] wifi: iwlwifi: mvm: add support for TID to link mapping neg request Date: Mon, 29 Jan 2024 21:21:50 +0200 Message-Id: <20240129211905.aab9819c378d.Icf6b79a362763e2e8b85959471f303b586617242@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Ayala Beker Add support for handling TID to link mapping negotiation request and decide whether to accept it or not. Accept the request if all TIDs are mapped to the same link set, otherwise reject it. Signed-off-by: Ayala Beker Reviewed-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 5 +++++ .../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index c82af4ac27ec..d19e478f382b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -263,6 +263,9 @@ static const u8 tm_if_types_ext_capa_sta[] = { __bf_shf(IEEE80211_EML_CAP_EMLSR_PADDING_DELAY) | \ IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_64US << \ __bf_shf(IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY)) +#define IWL_MVM_MLD_CAPA_OPS FIELD_PREP_CONST( \ + IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP, \ + IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME) static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = { { @@ -272,6 +275,7 @@ static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = { .extended_capabilities_len = sizeof(he_if_types_ext_capa_sta), /* relevant only if EHT is supported */ .eml_capabilities = IWL_MVM_EMLSR_CAPA, + .mld_capa_and_ops = IWL_MVM_MLD_CAPA_OPS, }, { .iftype = NL80211_IFTYPE_STATION, @@ -280,6 +284,7 @@ static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = { .extended_capabilities_len = sizeof(tm_if_types_ext_capa_sta), /* relevant only if EHT is supported */ .eml_capabilities = IWL_MVM_EMLSR_CAPA, + .mld_capa_and_ops = IWL_MVM_MLD_CAPA_OPS, }, }; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 770e4c4e909a..9653d335d573 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -1330,6 +1330,24 @@ static bool iwl_mvm_mld_can_activate_links(struct ieee80211_hw *hw, return ret; } +static enum ieee80211_neg_ttlm_res +iwl_mvm_mld_can_neg_ttlm(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_neg_ttlm *neg_ttlm) +{ + u16 map; + u8 i; + + /* Verify all TIDs are mapped to the same links set */ + map = neg_ttlm->downlink[0]; + for (i = 0; i < IEEE80211_TTLM_NUM_TIDS; i++) { + if (neg_ttlm->downlink[i] != neg_ttlm->uplink[i] || + neg_ttlm->uplink[i] != map) + return NEG_TTLM_RES_REJECT; + } + + return NEG_TTLM_RES_ACCEPT; +} + const struct ieee80211_ops iwl_mvm_mld_hw_ops = { .tx = iwl_mvm_mac_tx, .wake_tx_queue = iwl_mvm_mac_wake_tx_queue, @@ -1425,4 +1443,5 @@ const struct ieee80211_ops iwl_mvm_mld_hw_ops = { .change_vif_links = iwl_mvm_mld_change_vif_links, .change_sta_links = iwl_mvm_mld_change_sta_links, .can_activate_links = iwl_mvm_mld_can_activate_links, + .can_neg_ttlm = iwl_mvm_mld_can_neg_ttlm, }; From patchwork Mon Jan 29 19:21:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768008 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 3B17048790 for ; Mon, 29 Jan 2024 19:22:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556146; cv=none; b=Td0VVwSGrNtXCleLRpYeNQez599vww5awtf3jirNWa9TtFEiPUorZwIYkQF2B+qEWQJpPuZJ3Ra1fokDkoIDDbK9whJeUwKzFjnE9Q9lI8uKEFHpW7O4CkPZxcrsdKiHKEvdkhpFDANhHuo1FozEA21K6z+/+vQECOmoDjx+F2U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556146; c=relaxed/simple; bh=ejLnDNNdfVtGVvRUyZvvbi0tx+hNy9zTWm5AkPVZRYs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TDQ3dnW8A9YQZndyPVlfNW1BPzjNcPZ0i7LWLFPl3QYYLONn5QCUUBaGHzf0HC3dSHeySeAVU8GHZDLoB56U9P4Fa3i1dXGd1kB+l5QLOl8IhREIxGBygkvEqAISvH2hWLpZzMzEEQGrr+G4YdG7IIgveYozid/KTwZ7I+G10qU= 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=jb1hN88i; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jb1hN88i" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556145; x=1738092145; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ejLnDNNdfVtGVvRUyZvvbi0tx+hNy9zTWm5AkPVZRYs=; b=jb1hN88iP/eaGvUJYHGA6LSwzOpIe/oSqOxi3yedh9K+myXyjOvcbwYq qhCd4ajTYVRuJDrrnMA9K1uA5hzcgMu3h3vYZd5zoJ3It9r4ObLQCHrLS 2xfKQJXYRLUdwopdmjB/vslE1sgTL2yVEqEUWUMrr2VCW1TucyQUXeuTQ X2wjNYZBPT5URhzSvxLSaJP5x25aCkDQ0DNe0zJXuafh8P/hO3H2W0KQE h04wpsnw2sKC5faMWHO57KPqmONMBismOtpkIKfxA1JQpidngbMrxPeAf rBDF09/JhcV7uDxb7yfYkTjBaZKS6TpKPOlLi8KttOIRJFozhV0h9wefJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2942964" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2942964" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459068" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:22 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 03/15] wifi: iwlwifi: mvm: d3: fix IPN byte order Date: Mon, 29 Jan 2024 21:21:51 +0200 Message-Id: <20240129211905.138ed8a698e3.I1b66c386e45b5392696424ec636474bff86fd5ef@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Johannes Berg The IPN is reported by the firmware in 6 bytes little endian, but mac80211 expects big endian so it can do memcmp() on it. We used to store this as a u64 which was filled in the right way, but never used. When implementing that it's used, we changed it to just be 6 bytes, but lost the conversion. Add it back. Fixes: 04f78e242fff ("wifi: iwlwifi: mvm: Add support for IGTK in D3 resume flow") Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 61aeb7f6604b..6ab9def2c670 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2194,7 +2194,10 @@ static void iwl_mvm_convert_gtk_v3(struct iwl_wowlan_status_data *status, static void iwl_mvm_convert_igtk(struct iwl_wowlan_status_data *status, struct iwl_wowlan_igtk_status *data) { + int i; + BUILD_BUG_ON(sizeof(status->igtk.key) < sizeof(data->key)); + BUILD_BUG_ON(sizeof(status->igtk.ipn) != sizeof(data->ipn)); if (!data->key_len) return; @@ -2206,7 +2209,10 @@ static void iwl_mvm_convert_igtk(struct iwl_wowlan_status_data *status, + WOWLAN_IGTK_MIN_INDEX; memcpy(status->igtk.key, data->key, sizeof(data->key)); - memcpy(status->igtk.ipn, data->ipn, sizeof(data->ipn)); + + /* mac80211 expects big endian for memcmp() to work, convert */ + for (i = 0; i < sizeof(data->ipn); i++) + status->igtk.ipn[i] = data->ipn[sizeof(data->ipn) - i - 1]; } static void iwl_mvm_convert_bigtk(struct iwl_wowlan_status_data *status, From patchwork Mon Jan 29 19:21:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768435 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 54A3F4CB28 for ; Mon, 29 Jan 2024 19:22:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556149; cv=none; b=SJRXEl03gp/B4852Hp8bBdDtkfhBRn7T0XvFDNMmmCVHK6KBQre14bqToHe7KAhXPnVt4G6uwJPfXeZryDXxH4yyBCCGQvu6JFVwCs+pIMr3xhNG2GF/YWN53OdNWlMhiBGfVPjUjcXBbQ8gaHkY3JJp9Cagi9qVerQMUCAc030= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556149; c=relaxed/simple; bh=iyl51KOPMu5vxC3twfHTuHwunnTyidBauDRM0OI+wWU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qr1kNsCDRZcqupmzd01MCkiwHnvMz9FAuv/Z7zEVDj6CthrdWBdQ8jO7+TsdRFWSF5OhC5MdzLcmak7VnXF3XkMMhRQM+tc1y460aJFjQveFslu0TDNIm+MT2kfkWy3VJ+8lHrR1hdo81e13v5QIZWqUaYGEB8dTi1N5me6mjZI= 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=OwNthexf; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OwNthexf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556148; x=1738092148; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iyl51KOPMu5vxC3twfHTuHwunnTyidBauDRM0OI+wWU=; b=OwNthexfBpntdyRE3Q9qd+0EtLHYlwmpHEPK00t15In81PixTEk5lPb+ 5FLFqNgLQQW/MJK4chZjYsy/G6TU0qKc8NRESqsB/Mmv9YKXLlp3aYS6n GBLL/k1CMdw8T4Ir8kiWQQAhQNufakGNKgEPS1WfUlV2SgelJ6lKXAYXl JudrVGmpZByuJnHW7TXIbB+5H9Qw7AOOuYlhR6sfav9ivcfBrCs3JH+GK e4A+2lAZZC1Izel7jAIIt4WwNAcHgP8mHgeh0qhd0lVTDkbXaYtR3WPaz PSnij4COyeCMd5NH6hXASsECTGV30tBpYRBLn/geR4BhXET7k5lEJgSHT A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2942979" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2942979" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459083" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:26 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Colin Ian King , Gregory Greenman Subject: [PATCH 04/15] wifi: iwlwifi: Fix spelling mistake "SESION" -> "SESSION" Date: Mon, 29 Jan 2024 21:21:52 +0200 Message-Id: <20240129211905.ff31e9385d29.I3a224e6a9294fdec431919fb4ec9315801e77454@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Colin Ian King There is a spelling mistake in a WARN message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c index aceab96bcb97..703ccdd4d967 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c @@ -929,7 +929,7 @@ void iwl_mvm_rx_session_protect_notif(struct iwl_mvm *mvm, if (WARN(ver > 2 && mvmvif->time_event_data.link_id >= 0 && mvmvif->time_event_data.link_id != notif_link_id, - "SESION_PROTECTION_NOTIF was received for link %u, while the current time event is on link %u\n", + "SESSION_PROTECTION_NOTIF was received for link %u, while the current time event is on link %u\n", notif_link_id, mvmvif->time_event_data.link_id)) goto out_unlock; From patchwork Mon Jan 29 19:21:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768007 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 F303D4CB3D for ; Mon, 29 Jan 2024 19:22:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556151; cv=none; b=IfkTqj2SKI7pU6NsMkdr7591WDT3tTe9kbFUgZ7xoLA0QzbXMzjMuxPDWI7+9iS+yBcbr3N45atUoEMAuaCFicamXG2QDrT4YIA5GJ6E9dyBtwj4Qf42tzk487lQMp+X8gtor5/76G/iGE01BFTIXE2d+2DqJeJ/KlvYiL7UELs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556151; c=relaxed/simple; bh=ADvjdc4lhZAHOadb/rr+hQ3aeNFfua/KeKvxV+YndwA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qR/E8+KGI6QGPwCIJnyIPRZDvddDKZ02DpyzjHRo5mzbNMEYL08ajy4ATOQYpRP1DcJIcT9t3gef1NC2/Dd+X/KX+5rxYpzIm24VQ/D1uDYRLV1KFTRzpe7yscA69y4ObGvc6Y+NIfJA6tMWRKDmhVhbuYPxlXPytzpduTVOSuA= 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=V7wONPF6; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="V7wONPF6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556151; x=1738092151; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ADvjdc4lhZAHOadb/rr+hQ3aeNFfua/KeKvxV+YndwA=; b=V7wONPF65W+FkZ4UpoIWOMkl+a6dK+izYfeX0bErPozILmxKxC26ekLj O7FzkeALzyluDi1m/7AoEypAd/8lljKUc/JkaQ7zDO4ezw0FaFmEkHNCq AA0uuoWwejteicc6XHsw6ZiuWYR4BA/QgAr3/31iTaZf5dyE2vgoPaXKi UUnaZfYUeIiYTB4l0c5DPuqsonDsuVzxgwPF29j70vKgMF1FP1boPaJD2 LqS8yFb8Gu8gDWoumqgm3jkfjmaG06cLswcxffmmpnFmoMgickdK+VjCm MWDNMGGsaRkQfLCT4fyQ7caKATSbrJftIVyHKaTC5OlpkRQ1o/WXNmcz0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2942985" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2942985" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459089" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:28 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 05/15] wifi: iwlwifi: mvm: don't set trigger frame padding in AP mode Date: Mon, 29 Jan 2024 21:21:53 +0200 Message-Id: <20240129211905.f5eeb717212e.I60fa4843a8634922281580b925db2c2699e3a7bc@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Johannes Berg This field is reserved in AP mode, don't set any bits in it. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 1 - 1 file changed, 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 a7152d65eefa..0b2b0c320cb0 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -749,7 +749,6 @@ static const struct ieee80211_sband_iftype_data iwl_he_eht_capa[] = { .mac_cap_info[0] = IEEE80211_HE_MAC_CAP0_HTC_HE, .mac_cap_info[1] = - IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US | IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8, .mac_cap_info[3] = IEEE80211_HE_MAC_CAP3_OMI_CONTROL, From patchwork Mon Jan 29 19:21:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768434 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 C99F64C637 for ; Mon, 29 Jan 2024 19:22:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556154; cv=none; b=hwhM55q3t0A3fGYzPTPkxYMhpWGdmgpeIN2mffPxlQFfgLL2IxsaFVuNXmpp4aiQAWBM9H60ZW9ojJ5IXssLi0XoTTVk0mr2FXlH0KG/QhoNr1qXmAQ3AVdUOHcnUr8+oUu2hBP7FNuxa6NZxNnrXirR30+wRlPtx/xfN9iC6Ck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556154; c=relaxed/simple; bh=tkLnG0i1VgaL83jl/sFa7p5JG1+HzQ8JPs0in2ZlH2Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SRePc83DovkXx13HW7MM0UKng78xyiPrKjGqxEHyr1C0E0yRKAYnlvDVjqq6CkkRIGbCTpKT/m/LtAMBxoRne9AYaBFWWKNBdgeVxURFjtNtYEnyZu1d0HbS0C9BvnXyeZf6S25f+qbhIX9oOCWD2xKtfuVw2HDWj6fQyfA98O4= 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=oBJRXeil; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oBJRXeil" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556153; x=1738092153; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tkLnG0i1VgaL83jl/sFa7p5JG1+HzQ8JPs0in2ZlH2Q=; b=oBJRXeil7JEJXP/9t0CJpTGsfGcRjN2UJ7Ti9FAk3ziJxU6yp8kK4sZz xh/JV/vX9xOquMdMDd/jcP9Te0hqxv7sP782vqiud+X66K9HKLjb1L4T9 V0ibHfThtsBh0TXGm3gat52XUm+hxKcxdkEW6KVwEblhQztJRf6fUtuJ4 xwdCU1X6VoS9mz7YVktVqyIeuRrIkZ5q5a4vyEKUtqBhGgZAzNiIL3XHZ BvPwpP+U7/KIklnMY0SSnw5SAFW2KZ0FfFprm9nUjejiEHk9MATHS3QSj /wpkJHBAIl2qj4fhqI74VswItNdd2VxgWlTy2TByzXvJUE9PL3JliddpD A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2942999" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2942999" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459101" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:31 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Mukesh Sisodiya , Gregory Greenman Subject: [PATCH 06/15] wifi: iwlwifi: always have 'uats_enabled' Date: Mon, 29 Jan 2024 21:21:54 +0200 Message-Id: <20240129211905.bdc5fb20f00a.I902d801d79873c5c9cd51cef8e8226e2acefe88d@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Johannes Berg We check this in code that'd be complicated to put under ifdef (CONFIG_ACPI), so just always have 'uats_enabled'. Fixes: 4a9bb5b4d949 ("wifi: iwlwifi: fw: Add support for UATS table in UHB") Signed-off-by: Johannes Berg Reviewed-by: Mukesh Sisodiya Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h index 1ec2bcdf92b8..048830bb09f2 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h @@ -176,10 +176,10 @@ struct iwl_fw_runtime { struct iwl_sar_offset_mapping_cmd sgom_table; bool sgom_enabled; u8 reduced_power_flags; - bool uats_enabled; struct iwl_uats_table_cmd uats_table; u8 uefi_tables_lock_status; #endif + bool uats_enabled; }; void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans, From patchwork Mon Jan 29 19:21:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768006 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 E6A0F4C637 for ; Mon, 29 Jan 2024 19:22:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556157; cv=none; b=nlUNuxeIngNETIuoVDVRr4N8jo7VRLUhqR8B5HXhjrMExEvswFr38cRSsKe15qoj5qV6R4M3tItk3EvH3kBR7AIp0at5PeVBmFHdfJ+Wsgra8f4+pp/BIQLBa00qcb40XjwxJIl6CVPq+XG8d9/YGx0/JOy02ryqg1fZLdl+Wv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556157; c=relaxed/simple; bh=/t0g9T/AywlIcDrgWK32WRnEm7dIGnpKGdRCT/vuz0M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ef3+2IUd3T2IMh11iZERdtf8OqtG1v9HZ4+y+sRhM/LezjoOAkon3dNcInSSD1G6dSGVBP2e4HnIltJ3wzZ53WAbZvTNWtvJ7R6V32pq7gfmuUyL7qCYeZpeu1kFDsJQ/XviLYmD+cqip2rbnkdmixWi+ctD04kp2gumfRyJVjw= 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=F1EoO9Wp; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="F1EoO9Wp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556157; x=1738092157; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/t0g9T/AywlIcDrgWK32WRnEm7dIGnpKGdRCT/vuz0M=; b=F1EoO9WpZKusowELQ3h988Z7lsUq6tchofZfJ9taFtUyoS4re6x1bZfw mOBAOWKB1av9WNGKK2/ruGeG2T6hozC36SBv7DaICXmkMAn0PdqldNNDb fuSg+Q6faxwHJWwoy5sKzckVFgwq4IHRyfC0Ixrrpn4Oet3hzw7RozMmQ nAf9Be7VwZ8EnAbVNnkNfmmw5sD7HJnnc0BOvR3Vo18aBRJ6SbKA7IlYe bjXCkc2JXkJd61lmPBGhmJtySo1K3j0i/SnnCGxQ5cFkjRG67P0Mhb3CE 7lD0nQz8kI4Dq0WXx6B6Alp3yZeXQahD7HOM1Jt3hXLodhUl0r+ks+0+U w==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943019" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943019" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459106" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:34 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Avraham Stern , Gregory Greenman Subject: [PATCH 07/15] wifi: iwlwifi: mvm: Fix FTM initiator flags Date: Mon, 29 Jan 2024 21:21:55 +0200 Message-Id: <20240129211905.6cad71069e87.I7f9fd5239cfd2244f155f88419980e6e91d00ff2@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Ilan Peer When secure LTF is used MFP must also be set. Signed-off-by: Ilan Peer Reviewed-by: Avraham Stern Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c index 233ae81884a0..4863a3c74640 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* * Copyright (C) 2015-2017 Intel Deutschland GmbH - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation */ #include #include @@ -821,9 +821,10 @@ iwl_mvm_ftm_put_target_v8(struct iwl_mvm *mvm, struct ieee80211_vif *vif, * If secure LTF is turned off, replace the flag with PMF only */ flags = le32_to_cpu(target->initiator_ap_flags); - if ((flags & IWL_INITIATOR_AP_FLAGS_SECURED) && - !IWL_MVM_FTM_INITIATOR_SECURE_LTF) { - flags &= ~IWL_INITIATOR_AP_FLAGS_SECURED; + if (flags & IWL_INITIATOR_AP_FLAGS_SECURED) { + if (!IWL_MVM_FTM_INITIATOR_SECURE_LTF) + flags &= ~IWL_INITIATOR_AP_FLAGS_SECURED; + flags |= IWL_INITIATOR_AP_FLAGS_PMF; target->initiator_ap_flags = cpu_to_le32(flags); } From patchwork Mon Jan 29 19:21:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768433 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 A29D94C637 for ; Mon, 29 Jan 2024 19:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556160; cv=none; b=hyo67X+8HS2vyswe3kLTW0rUaTFlHQGHIau2CAJnqIiNX3BlwgPhiF3bAGyTL29H7cjwBRX1M4QCBkprN8HdkZzmT9zsxt4VRCHPql62jvWQjBFYap7XPzMLlkx34ANKm4bO63E7HLiOmCi8abjXYkbIbX5QBWwrD1Bitb0UNaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556160; c=relaxed/simple; bh=j9HUXOoLZg7s58T+gGaWpTUnZOiOZDb2j+Wn0Wjgsjc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WB/fz+BEdkU7NqEsJZM3KMmKeklzThkUk9K8x1Gc7E5RW/VxKPBcS6rVFNW86SpyhbR2Fu/eCQ2APqnDMxUOn/bkAMvnu7LWn69qwQ6oZnxSWeafiy4e30qbQSfZuBIPSoeP1NWLDU36aMPczTASHG7wRwyqOPiF9tPcgQV5qm8= 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=AjPWFIdw; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AjPWFIdw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556159; x=1738092159; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j9HUXOoLZg7s58T+gGaWpTUnZOiOZDb2j+Wn0Wjgsjc=; b=AjPWFIdweyhL7ETes/y8qUbyB1P3arDpAP6xsbXiVEcu/sTg0MP0lbeU ZFu5EUg6hdyumVz+YkerUWZ8Y3ryTovVbA1fkOpQ0icRydWrBiegzoHAq dMoGnswX7MdmaOrfabMDrCy8gI2N3Z0WUGaRiCSCJNS9jJYfv/4j6rSYY JNNIi/YEg2YHJPhbMfjzxT2DOuPzdFcmNUr9ZdHog3mdSA5U8fqd3oaHW 1whcBh62xtSoTf5sQrP/d8WcVumFaj3O7FQxFwHXC4RE91XQcCtXY8kNC d94q+8yRRPdx+WxBIsNymjvqFq329tahMsaWr8Q+9wywa+n0wBZGJacKP g==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943030" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943030" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459111" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:37 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 08/15] wifi: iwlwifi: mvm: Add support for removing responder TKs Date: Mon, 29 Jan 2024 21:21:56 +0200 Message-Id: <20240129211905.6a331dfda242.Ia76dc4a9d399f1f68ac6b157d844b63f74d5159f@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Ilan Peer When removing a PASN station, the TK must be removed before the station is removed as otherwise the FW would assert. To handle this, store the key configuration, and use it to remove the key when the station is removed. Signed-off-by: Ilan Peer Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- .../wireless/intel/iwlwifi/mvm/ftm-responder.c | 7 ++++++- drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c | 15 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 ++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 15 ++++----------- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 3 ++- 5 files changed, 31 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c index 8f10590f9cdd..dc8c9315b834 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c @@ -12,6 +12,7 @@ struct iwl_mvm_pasn_sta { struct list_head list; struct iwl_mvm_int_sta int_sta; u8 addr[ETH_ALEN]; + struct ieee80211_key_conf keyconf; }; struct iwl_mvm_pasn_hltk_data { @@ -303,6 +304,10 @@ static void iwl_mvm_resp_del_pasn_sta(struct iwl_mvm *mvm, { list_del(&sta->list); + if (sta->keyconf.keylen) + iwl_mvm_sec_key_del_pasn(mvm, vif, BIT(sta->int_sta.sta_id), + &sta->keyconf); + if (iwl_mvm_has_mld_api(mvm->fw)) iwl_mvm_mld_rm_sta_id(mvm, sta->int_sta.sta_id); else @@ -357,7 +362,7 @@ int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm, return -ENOBUFS; ret = iwl_mvm_add_pasn_sta(mvm, vif, &sta->int_sta, addr, - cipher, tk, tk_len); + cipher, tk, tk_len, &sta->keyconf); if (ret) { kfree(sta); return ret; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c index ea3e9e9c6e26..a1ce08a5527c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c @@ -335,6 +335,21 @@ static int _iwl_mvm_sec_key_del(struct iwl_mvm *mvm, return ret; } +int iwl_mvm_sec_key_del_pasn(struct iwl_mvm *mvm, + struct ieee80211_vif *vif, + u32 sta_mask, + struct ieee80211_key_conf *keyconf) +{ + u32 key_flags = iwl_mvm_get_sec_flags(mvm, vif, NULL, keyconf) | + IWL_SEC_KEY_FLAG_MFP; + + if (WARN_ON(!sta_mask)) + return -EINVAL; + + return __iwl_mvm_sec_key_del(mvm, sta_mask, key_flags, keyconf->keyidx, + 0); +} + int iwl_mvm_sec_key_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 9a89b91519db..e148ef02ff73 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -2402,6 +2402,10 @@ int iwl_mvm_sec_key_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ieee80211_key_conf *keyconf); +int iwl_mvm_sec_key_del_pasn(struct iwl_mvm *mvm, + struct ieee80211_vif *vif, + u32 sta_mask, + struct ieee80211_key_conf *keyconf); void iwl_mvm_sec_key_remove_ap(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_vif_link_info *link, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 2a3ca9785974..d57fcbe4f8ac 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -4298,12 +4298,12 @@ u16 iwl_mvm_tid_queued(struct iwl_mvm *mvm, struct iwl_mvm_tid_data *tid_data) int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_int_sta *sta, u8 *addr, u32 cipher, - u8 *key, u32 key_len) + u8 *key, u32 key_len, + struct ieee80211_key_conf *keyconf) { int ret; u16 queue; struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); - struct ieee80211_key_conf *keyconf; unsigned int wdg_timeout = iwl_mvm_get_wd_timeout(mvm, vif, false, false); bool mld = iwl_mvm_has_mld_api(mvm->fw); @@ -4328,12 +4328,6 @@ int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, if (ret) goto out; - keyconf = kzalloc(sizeof(*keyconf) + key_len, GFP_KERNEL); - if (!keyconf) { - ret = -ENOBUFS; - goto out; - } - keyconf->cipher = cipher; memcpy(keyconf->key, key, key_len); keyconf->keylen = key_len; @@ -4354,10 +4348,9 @@ int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, 0, NULL, 0, 0, true); } - kfree(keyconf); - return 0; out: - iwl_mvm_dealloc_int_sta(mvm, sta); + if (ret) + iwl_mvm_dealloc_int_sta(mvm, sta); return ret; } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h index b33a0ce096d4..4668f413abd3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h @@ -574,7 +574,8 @@ void iwl_mvm_csa_client_absent(struct iwl_mvm *mvm, struct ieee80211_vif *vif); void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk); int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_int_sta *sta, u8 *addr, u32 cipher, - u8 *key, u32 key_len); + u8 *key, u32 key_len, + struct ieee80211_key_conf *key_conf_out); void iwl_mvm_cancel_channel_switch(struct iwl_mvm *mvm, struct ieee80211_vif *vif, u32 id); From patchwork Mon Jan 29 19:21:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768005 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 53B8C48790 for ; Mon, 29 Jan 2024 19:22:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556163; cv=none; b=olHXGJagJVA+10gfQO08mMrdvVHH3tR3tIhERki3hm7jaCjWYJliJhsGFGlAC3Y6AA5vxH9L+bywAGph9ANhmg3WbjbpEPDNY1wcc0iFcSq0ZJ+7JESGLQ+KQVzAH9SdT97shOvMeNxdtf2Kp4sFrN/sWJNtYh62qPV46l8VCKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556163; c=relaxed/simple; bh=fD3YJXmtD6uf4ZvGAQmSof+tTpHB9RZag9ydrtlONyQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Moj0xPmGOWVjGky+aIMvPedDPAz0AOaRUZCErkZpxd7BVZ//N8RUYBcYWX8/G41Nm0PkzPLM1Ibc6q20iP+iEnUBU1JhfMP0kgf9+JeJiQySKyGtsLm36he+B2kUFB40/wGRtoZkKFb3PfQkr9LvSaxo7oyA90/TlFhyW/1wj1A= 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=J3huNYbM; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="J3huNYbM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556163; x=1738092163; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fD3YJXmtD6uf4ZvGAQmSof+tTpHB9RZag9ydrtlONyQ=; b=J3huNYbM1G6Af7dIjj7I6rynwd1WLYWDFdW0aCPO/gq4OEGdndN+mhpO 3y79kyTwO6oDZpRXJs7U3EXW3eYXVWIyE9cM61/jiy/Kxp7/R9M5N8Ctl S7CY4CZiVvfQWHPNrmR/9dq7YqW4aml5T2+QF/oxD4J/4oh0dWJfvN8jX IoYQt9oeFsa/df6yws4m75ThuNygvXy1wmxWQnoZz19mjW4nO5+QPJXwg VmB9Wlrq47lPxEAiyiRs9O71b+2hhdgWmpXDSgto5ypqw2yKX9WlCwJRw KtIFDUsx7A0Mgx+1f4YRGa/FZIzVZrjMFygnWKAZR/EA9kSegI7y6fzlM g==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943037" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943037" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459126" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:41 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 09/15] wifi: iwlwifi: remove Gl A-step remnants Date: Mon, 29 Jan 2024 21:21:57 +0200 Message-Id: <20240129211905.8929a06c3a55.I3c21305e4b7fa3aba938bc860269e848fe262e88@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Johannes Berg The IWL_DEVICE_GL_A macro is no longer used, and couldn't be, so remove it. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index 20799a0fbc07..b0b003a6a46e 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c @@ -129,10 +129,6 @@ static const struct iwl_base_params iwl_bz_base_params = { IWL_DEVICE_BZ_COMMON, \ .ht_params = &iwl_22000_ht_params -#define IWL_DEVICE_GL_A \ - IWL_DEVICE_BZ_COMMON, \ - .ht_params = &iwl_gl_a_ht_params - /* * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an * A-MPDU, with additional overhead to account for processing time. From patchwork Mon Jan 29 19:21:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768432 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 EB53A48790 for ; Mon, 29 Jan 2024 19:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556166; cv=none; b=b3ZhxdRdN4MSrvF7Tsk0xl6QJXE5B0R++r3vmMw24etUTZm3a8JelCeDHLqCAR8+rg/nP96AoYqnk/ZoVyBrRIg/11dvRBFCJQjC+IIHRfqmBBdHMRUFO1+uYCAwg50d8VxxGqs3mApRu/n59FLS77kKgYqUmhCvEF7+3b5q8FU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556166; c=relaxed/simple; bh=BSGfhYrgoFz1LAEopbG3O+q4l3m3wXsIgUz+py9/55E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DBfpzaqvVtjH2GtczVbezFHwng+bi+mJCKyUy9uP39ihBF1gVIKUI/wHr/KHyfX7aT1Tje/VhhHTIBw1sCBFCGOCoW5Wgglj9oorvXRwxpbEl2ejDGiSbpfP/TrdWL/cNzL5QDYTDRVWICKDsgHpzVCOwKdpzpvn8d4sRuA5+Oo= 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=GVuB+ige; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GVuB+ige" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556166; x=1738092166; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BSGfhYrgoFz1LAEopbG3O+q4l3m3wXsIgUz+py9/55E=; b=GVuB+igeR2nZIbOIK/sLKBQzjamBK7WwV/RDyp1owK0Awi3xFcn4VB3i HcuwwLmL1EwDjndpfC0XMdhNSr9xznR5TWesQI1ujxFf+5FS2hy343f9G 1sIzAQCTyQlEUu6BKQPzhH6CzE9pxHrhfRq54L8UHhmUOhkuYNz2qCyPM kMGie4UCvu4Rju+mmD588Wvf/B6l43pVzbMgP7A621uVay7D43OSI5OjK Vh3UoCmvSdMbGAXJmAbsWS7xiXQBr94J3cvHKuYjiUzKRcUQ5Ejz6ZH3O xEXo1zlyhpjtCArna+3xFy2UlQo5J4Ki6JC5XiYUOHfoTBFSZ5YrJJilb A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943042" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943042" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459133" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:43 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 10/15] wifi: iwlwifi: mvm: use FW rate for non-data only on new devices Date: Mon, 29 Jan 2024 21:21:58 +0200 Message-Id: <20240129211905.e59056d0a8cc.Iccc4c5c1753921d3d85241ede812a150fb05b898@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Johannes Berg With MLO connections we need to let the firmware pick the rate as we don't know the link the frame might be transmitted on (in some cases we do know, but we'd rather always use the FW and find bugs.) We _did_ end up finding bugs and fixing them, but older devices likely won't get fixed as we don't have a need for this there, they cannot support MLO. Thus, go back to picking a rate on the host for the relevant frames on older (pre-Bz) devices. Fixes: 499d02790495 ("wifi: iwlwifi: Use FW rate for non-data frames") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 33 ++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index db986bfc4dc3..79eb6394e5a7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -520,6 +520,31 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm, } } +static bool iwl_mvm_use_host_rate(struct iwl_mvm *mvm, + struct iwl_mvm_sta *mvmsta, + struct ieee80211_hdr *hdr, + struct ieee80211_tx_info *info) +{ + if (unlikely(!mvmsta)) + return true; + + if (unlikely(info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT)) + return true; + + if (likely(ieee80211_is_data(hdr->frame_control) && + mvmsta->sta_state >= IEEE80211_STA_AUTHORIZED)) + return false; + + /* + * Not a data frame, use host rate if on an old device that + * can't possibly be doing MLO (firmware may be selecting a + * bad rate), if we might be doing MLO we need to let FW pick + * (since we don't necesarily know the link), but FW rate + * selection was fixed. + */ + return mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ; +} + /* * Allocates and sets the Tx cmd the driver data pointers in the skb */ @@ -556,12 +581,12 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, flags |= IWL_TX_FLAGS_ENCRYPT_DIS; /* - * For data and mgmt packets rate info comes from the fw. Only + * For data and mgmt packets rate info comes from the fw (for + * new devices, older FW is somewhat broken for this). Only * set rate/antenna for injected frames with fixed rate, or - * when no sta is given. + * when no sta is given, or with older firmware. */ - if (unlikely(!sta || - info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT)) { + if (unlikely(iwl_mvm_use_host_rate(mvm, mvmsta, hdr, info))) { flags |= IWL_TX_FLAGS_CMD_RATE; rate_n_flags = iwl_mvm_get_tx_rate_n_flags(mvm, info, sta, From patchwork Mon Jan 29 19:21:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768004 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 945386F08E for ; Mon, 29 Jan 2024 19:22:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556169; cv=none; b=eWv5H94xLHA5WqScpUs2wspM9lYBf6T9Nx1vM/PxbPVzxVb7H2xPkHm3G+EOgP/QhVZyVykCoYqMgPAW1pKD10SYLiEdbFOJZw4cjoDEf2kmN+h1iLPC3tL37kyW4St/XP+oJM/jaVhYvQ/0y/l0MMLzOgWTyVWKWFqiR5cEj7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556169; c=relaxed/simple; bh=MslHVZ1NfqB1BAd6L6h1fG4tXjUWXHKNAaQZFB2udUE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fQi/r23P3YXYt2LxCEDSXXFVZG0MDxemAY49VqkczkRDwYJWbTg6KGcuDYcMeHpCoHCfMU/xYqVBdeJCan4l3tK1U8QdN7jHdn+EUx6/Oahi5/DeDsj2FxabdJLSWlcmcya3eBMEvgE6tHUjnzgyAoVcx87PBB6ewVKVr9go9Ys= 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=c0xgdhOW; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="c0xgdhOW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556168; x=1738092168; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MslHVZ1NfqB1BAd6L6h1fG4tXjUWXHKNAaQZFB2udUE=; b=c0xgdhOWkZr9HaLwlVN+Ty9rNS0yLYhm1QufVWJNgRr9ncNgNrGIPIe1 RQir6HtRWhsrVflJ5f12pvs9QzOVh5cCmXHIZ8QUaYZV/xXaxpscRbBrd qLp6CTLTzcwivA2YVi2uM4jH4H+TwtoE++L0gZLwzakO+YA2z8IBhoDrA HEshDlSTJyH5EZ8+4dGyNO5lukKxUcwOCaFfkxyBfwCgMISN82+h1ZuE2 Q9pBBirXVB+l5Som29WPUUcoik+Gfolvzp1uWuB1sgiw+ly8E4pb3rpq8 4fl5+GwF2Mx9I8cjKhltLn+odgWM15nw+njt4XKyAlV5wwV++/sz7GSnN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943051" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943051" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459142" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:46 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach , Johannes Berg Subject: [PATCH 11/15] wifi: iwlwifi: mvm: fix the TLC command after ADD_STA Date: Mon, 29 Jan 2024 21:21:59 +0200 Message-Id: <20240129211905.1deca7eaff14.I597abd7aab36fdab4aa8311a48c98a3d5bd433ba@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Emmanuel Grumbach ADD_STA resets the link quality data inside the firmware. This is not supposed to happen and has been fixed for newer devices. For older devices (AX201 and down), this makes us send frames with rates that are not in the TLC table. Fixes: 5a86dcb4a908 ("wifi: iwlwifi: mvm: update station's MFP flag after association") Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index d19e478f382b..0ec1156c89c5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -3804,13 +3804,17 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm, mvm_sta->authorized = true; - iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); - /* MFP is set by default before the station is authorized. * Clear it here in case it's not used. */ - if (!sta->mfp) - return callbacks->update_sta(mvm, vif, sta); + if (!sta->mfp) { + int ret = callbacks->update_sta(mvm, vif, sta); + + if (ret) + return ret; + } + + iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); return 0; } From patchwork Mon Jan 29 19:22:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768431 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 245196F097 for ; Mon, 29 Jan 2024 19:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556172; cv=none; b=Fm8A/rPfD+pZo/F1id2q0554NJTSOXOOatxmpKaPD2R1i3eN9rAmYPOCoccXmjE0UrNtChWTBXwTBcx5EDnuSIiLcgEoUiTsyfYs9ypvIB4MZx0qVBwtHEUW7BVQptQpG7txDNSDGg38ExfBIQtA/77ztqGWjQhCVZtC16nbpMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556172; c=relaxed/simple; bh=bvG3FsJilsj3MvwF97Snbcu91O9tfBlRJDPv5wzY5Yg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Y+doPWdtK+fPQIaWDkNASj/TOO4KY5nO1E5UQ1ywNgVbLP2NOUF0ltnJ/58kf044lpsTcXCo/UDV0G0coMrMgrdN0ECRA045ctiqV7PjKPRs3SNUItGLuOBqhseqZVgHuUqbxvd6dKCEQvFBfqCBQnMNfPoPO5pF+7Cbw93hI+Q= 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=mOhI/jv2; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mOhI/jv2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556171; x=1738092171; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bvG3FsJilsj3MvwF97Snbcu91O9tfBlRJDPv5wzY5Yg=; b=mOhI/jv278zRxTNNwD0jtRzWmCl3muqhQErzw8GYuUSsKw1tzZOYCbKE LxT/2UdzxypEgSaC4vM4XRYTbwkWzWoqEbGHoIfUboY8AMY5PLIEDm7Aq u7S3VZujMcJlYLw4j2EH+xrIODgq105tIJRHJhNXoZbzLFg1fOg7Yuik1 CVLDlP3q4Ups0bmoc0gyJaHNvgoQ7NqxseOf6SoczZ7S+45PT7s2nInOa hTyV6QpAR5DDTIWZII7K4F1cVNagQ4BoVdfkZpWtjACdnh+8LCiuAmXHU bZ0MTFcXdXpShblU5EqbyonxDz6s0SRRY0WXDNUps18QyGZSYmKDFJ6Ko g==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943056" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943056" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459154" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:48 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mukesh Sisodiya , Gregory Greenman Subject: [PATCH 12/15] wifi: iwlwifi: pcie: Add the PCI device id for new hardware Date: Mon, 29 Jan 2024 21:22:00 +0200 Message-Id: <20240129211905.fde32107e0a3.I597cff4f340e4bed12b7568a0ad504bd4b2c1cf8@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Mukesh Sisodiya Add the support for a new PCI device id. Signed-off-by: Mukesh Sisodiya Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index c80b02503b41..bbc8dc390bdc 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -502,6 +502,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { /* Bz devices */ {IWL_PCI_DEVICE(0x2727, PCI_ANY_ID, iwl_bz_trans_cfg)}, + {IWL_PCI_DEVICE(0x272D, PCI_ANY_ID, iwl_bz_trans_cfg)}, {IWL_PCI_DEVICE(0x272b, PCI_ANY_ID, iwl_bz_trans_cfg)}, {IWL_PCI_DEVICE(0xA840, PCI_ANY_ID, iwl_bz_trans_cfg)}, {IWL_PCI_DEVICE(0x7740, PCI_ANY_ID, iwl_bz_trans_cfg)}, From patchwork Mon Jan 29 19:22:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768003 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 D956A6F09C for ; Mon, 29 Jan 2024 19:22:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556174; cv=none; b=XvNgrGIkKq1lZAdXXPlGOibaf8cFLniAuqj8J/uSEeVkUdLqJhHZQwBXRIKM9K3qZEkYPDc7TPEcJnPzkPFB/BPooOh3CGS+uzmdk76ldHAs9QGG8aeGXnRjG6EUU2cIle9XA5YfouqpOlXwWC8OZErcfaWIUsBcgxtVeUnzhqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556174; c=relaxed/simple; bh=c+vPDkmwUSa32ZO96dg7yOMX2CuR9fbYM7OUZ7/mxKQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rmW6/9w7r8HyV7cFiFEly26Jg6Tdx1H+JoWYyFX0ZxffGiHfYL2WZBBcECGdhZNektNb7ADK39zU57G/XeK//dSJD4alyEGOFK/DlxwwOX00Ba9aGBmct1ocCVNCecd1YaOLQc2bYmU8e5M5jHrnbRpRVCSZhmuIZGfcIrF2IsU= 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=jcvilkBs; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jcvilkBs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556173; x=1738092173; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c+vPDkmwUSa32ZO96dg7yOMX2CuR9fbYM7OUZ7/mxKQ=; b=jcvilkBsWY2owA1KPjE8GEX4kDO2ve84amO4XuVP0D7YF47ymXUOuttB 6+THn0UNJqo2FPNYD81eAQJWLiyD/DVuepIoAbvbJo2205BNCqRnZSsp7 9afPCB3Zzfd9EBBRjJgtxJIz0Rcv8LGcJy66scBukOZivrfFLN5SsJqKq P9uyuhuA6Art4Q4c3cgm14Ow3/EQnxgWbbzGf7eJNmpDhphrl3cYnSL9n vCqk4QAY4hApyZqTTyhQ7clG/47RMvso5KmGMVF/bUiX1mrlEYvRNhgov H1aJ6Nu0RZRIHw60UZYIgOtYuK/N2805cmQwqpS0XALA7elmXqtENptHW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943065" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943065" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459161" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:51 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Daniel Gabay , Gregory Greenman Subject: [PATCH 13/15] wifi: iwlwifi: mvm: support SPP A-MSDUs Date: Mon, 29 Jan 2024 21:22:01 +0200 Message-Id: <20240129211905.15e4570e471f.I87cf284d3b19bb9f5558f0f33afaace6d6492acb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Johannes Berg If the firmware has the necessary support, enable SPP A-MSDUs. Signed-off-by: Johannes Berg Signed-off-by: Daniel Gabay Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | 4 +++- drivers/net/wireless/intel/iwlwifi/fw/file.h | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 5 +++++ drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 +++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h b/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h index d62fed543276..d7f8a276b683 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2012-2014, 2018-2021 Intel Corporation + * Copyright (C) 2012-2014, 2018-2021, 2023 Intel Corporation * Copyright (C) 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -109,6 +109,7 @@ enum iwl_sta_flags { * @STA_KEY_FLG_EN_MSK: mask for encryption algorithmi value * @STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from * station info array (1 - n 1X mode) + * @STA_KEY_FLG_AMSDU_SPP: SPP (signaling and payload protected) A-MSDU * @STA_KEY_FLG_KEYID_MSK: the index of the key * @STA_KEY_FLG_KEYID_POS: key index bit position * @STA_KEY_NOT_VALID: key is invalid @@ -129,6 +130,7 @@ enum iwl_sta_key_flag { STA_KEY_FLG_EN_MSK = (7 << 0), STA_KEY_FLG_WEP_KEY_MAP = BIT(3), + STA_KEY_FLG_AMSDU_SPP = BIT(7), STA_KEY_FLG_KEYID_POS = 8, STA_KEY_FLG_KEYID_MSK = (3 << STA_KEY_FLG_KEYID_POS), STA_KEY_NOT_VALID = BIT(11), diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h index bfc39bd5bbc6..b216da7d95fc 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h @@ -383,6 +383,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t; * channels even when these are not enabled. * @IWL_UCODE_TLV_CAPA_DUMP_COMPLETE_SUPPORT: Support for indicating dump collection * complete to FW. + * @IWL_UCODE_TLV_CAPA_SPP_AMSDU_SUPPORT: Support SPP (signaling and payload + * protected) A-MSDU. * * @NUM_IWL_UCODE_TLV_CAPA: number of bits used */ @@ -468,6 +470,7 @@ enum iwl_ucode_tlv_capa { IWL_UCODE_TLV_CAPA_PSC_CHAN_SUPPORT = (__force iwl_ucode_tlv_capa_t)98, IWL_UCODE_TLV_CAPA_BIGTK_SUPPORT = (__force iwl_ucode_tlv_capa_t)100, + IWL_UCODE_TLV_CAPA_SPP_AMSDU_SUPPORT = (__force iwl_ucode_tlv_capa_t)103, IWL_UCODE_TLV_CAPA_DRAM_FRAG_SUPPORT = (__force iwl_ucode_tlv_capa_t)104, IWL_UCODE_TLV_CAPA_DUMP_COMPLETE_SUPPORT = (__force iwl_ucode_tlv_capa_t)105, IWL_UCODE_TLV_CAPA_SYNCED_TIME = (__force iwl_ucode_tlv_capa_t)106, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 0ec1156c89c5..843544cfcfe9 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -495,6 +495,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) IWL_UCODE_TLV_CAPA_TIME_SYNC_BOTH_FTM_TM)) hw->wiphy->hw_timestamp_max_peers = 1; + if (fw_has_capa(&mvm->fw->ucode_capa, + IWL_UCODE_TLV_CAPA_SPP_AMSDU_SUPPORT)) + wiphy_ext_feature_set(hw->wiphy, + NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT); + ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS); hw->wiphy->features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c index a1ce08a5527c..bbd37a95d4c8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c @@ -104,6 +104,9 @@ u32 iwl_mvm_get_sec_flags(struct iwl_mvm *mvm, (keyconf->keyidx == 4 || keyconf->keyidx == 5))) flags |= IWL_SEC_KEY_FLAG_MFP; + if (keyconf->flags & IEEE80211_KEY_FLAG_SPP_AMSDU) + flags |= IWL_SEC_KEY_FLAG_SPP_AMSDU; + return flags; } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index d57fcbe4f8ac..8ffbb8efda73 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -3559,6 +3559,9 @@ static int iwl_mvm_send_sta_key(struct iwl_mvm *mvm, key_flags = cpu_to_le16(keyidx); key_flags |= cpu_to_le16(STA_KEY_FLG_WEP_KEY_MAP); + if (key->flags & IEEE80211_KEY_FLAG_SPP_AMSDU) + key_flags |= cpu_to_le16(STA_KEY_FLG_AMSDU_SPP); + switch (key->cipher) { case WLAN_CIPHER_SUITE_TKIP: key_flags |= cpu_to_le16(STA_KEY_FLG_TKIP); From patchwork Mon Jan 29 19:22:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768430 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 4BF1676023 for ; Mon, 29 Jan 2024 19:22:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556176; cv=none; b=DwCb4Y8olTEEfT7JIWZI7jXqqYnSKyrdWkkwhHrH3uI1Yomif5bsrLUSsnvd14QdAZbi2Ui4POuxwEfFwp/WNPA9KqDmzf5HTttL30Yjb/t7+txnVGjuJ1pfIPhYVAD/u8PhvC0960A9VHYGez4cH9W2H+YmtYGI8xsgul9ddoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556176; c=relaxed/simple; bh=O70zkGez4tfHwLZX6elerUerujlIi78znAbDouzjcY4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hc6xywncYKPxU2ueLFBqJldDHYiYbbP+9oXK7As605O5V4v2TebCyXz0hxQSKduRHFZ6nQB8UbwuT5nY4SvOEP8cJeqnWk04LkVg6YD7qGjQoNUnE1PJVuUhdDWoCHwSroV8GKryLGYKtC41IeIhYa/GvzNw8pRqL5CWGPnvK5k= 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=R5g2rVXT; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="R5g2rVXT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556176; x=1738092176; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=O70zkGez4tfHwLZX6elerUerujlIi78znAbDouzjcY4=; b=R5g2rVXTUYL7of3Wp9i54l3InbmslwanbZwblEULRZ4nT02kTNOtcCnA iTxeGS8H8J/qkVJbRkmV65Mc8vPKmC0Fn7a+QHAv4TWFR72vqMevxGMOO ZU/y/UPB1wEKhp8T4V3hZGdRNS4jGT5kHCWgFijCNW7olHdiBp7bzXrvh 1/EDnCLMvbuYhw9TJ1Te7WIy92Y+YYy+4Fxrx5YXr7Y9nfN51yEniY8ve 0bSC58VzOre42v+6bRJyUhL37b1gUE5fefA5AhL8/8vOP8SOCJWw7ng5F BhJ+KPdDH7WOQ7WMXLv4h/6mDWnW4J6PN40fDHLKb8Ter3IwNwGWg8bWG g==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943071" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943071" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459173" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:54 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Daniel Gabay , Gregory Greenman Subject: [PATCH 14/15] wifi: iwlwifi: mvm: log dropped packets due to MIC error Date: Mon, 29 Jan 2024 21:22:02 +0200 Message-Id: <20240129211905.41b0abbf1fd2.Ib6ec6a48ec7bebe769d1e1c1df96380a758a0975@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Daniel Gabay When we drop frames due to MIC error we want to have something printed in the logger (this won't be printed by default). Signed-off-by: Daniel Gabay Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 451af501c7a1..67062fe40152 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -401,8 +401,11 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_sta *sta, case IWL_RX_MPDU_STATUS_SEC_GCM: BUILD_BUG_ON(IEEE80211_CCMP_PN_LEN != IEEE80211_GCMP_PN_LEN); /* alg is CCM: check MIC only */ - if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) + if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) { + IWL_DEBUG_DROP(mvm, + "Dropping packet, bad MIC (CCM/GCM)\n"); return -1; + } stats->flag |= RX_FLAG_DECRYPTED | RX_FLAG_MIC_STRIPPED; *crypt_len = IEEE80211_CCMP_HDR_LEN; From patchwork Mon Jan 29 19:22:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 768002 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 C01937602D for ; Mon, 29 Jan 2024 19:22:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556179; cv=none; b=qTV1biGZ1LlhVTsCGeTuzZmZE7CEIf3o2m3AtGUXmTAfRACaOQtkGOONSpGn1ohinlwNtsYQuueimb+zHFl1L2klUK6+SBpgXUuDqpqVa2Y6wnoikIOjdwZ+Xa4duSwMT5F2+vvBrVXTwbwPopfSCsQHX+TrSKtsCekysxZUSSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556179; c=relaxed/simple; bh=PUc3+opYRkCpb7hn/Lq13gVx2epUSXGA6qUtJHO/Wfc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LOQvqT25rnoKS2lJWapvDc2wlRT6NovwRvf8TiModEUdg1WpLWbNJObNCFG2AuT7t1zQFSfdZCuHuK4Rv+2vZooA1e1I9uOodu+eszUGwYf+g4iN+tlCPkhgduFDUWsvexhxDKbl+CX74hskJhOsxHl1GOwTfSxd14jwe7wvq3c= 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=B7tDc/lb; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="B7tDc/lb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706556178; x=1738092178; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PUc3+opYRkCpb7hn/Lq13gVx2epUSXGA6qUtJHO/Wfc=; b=B7tDc/lb/m1IoCF93xNAOpLWPuLRPEFRZ2T1T74Req8TCg/AinCzLafL Pka0xicoQIh1lcMy6EXqFSQj9Nt2ilv6mtLtl6DrQIO7bp1QfMLMLbBKs A44IHsdbl6VoFyiQn9Yu8mLFkWP+BWbWZVi5tPuf2HE6qnRizdkVHD2Ss lkeLvvcGKvrjCChfF80efnLHShjwZaJTwd5HyRQGelWHCOC7uqDomV+zs mfR7ELBsUg+s6DsHrSV9+mblsGPPYtlt/4zk/9XPY5XJbzr1gwHvZCjWK CyFSF36IHowlxMAwCpBoh4NlK6kWq2M1cQYozFe3MVbsVB/zLJEqbk3I8 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="2943077" X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="2943077" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,227,1701158400"; d="scan'208";a="3459182" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 11:22:56 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 15/15] wifi: iwlwifi: mvm: refactor duplicate chanctx condition Date: Mon, 29 Jan 2024 21:22:03 +0200 Message-Id: <20240129211905.6fcde4051adf.I343934874612d21727ed167accaa967958b2c25b@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129192203.4189915-1-miriam.rachel.korenblit@intel.com> References: <20240129192203.4189915-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 From: Johannes Berg Refactor the check for using a chanctx's def vs. min_def, to have the same in both places and reuse it later. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 ++++-------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 13 +++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 843544cfcfe9..dbad30e61451 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -4810,8 +4810,8 @@ static void iwl_mvm_ftm_responder_chanctx_iter(void *_data, u8 *mac, data->responder = true; } -static bool iwl_mvm_is_ftm_responder_chanctx(struct iwl_mvm *mvm, - struct ieee80211_chanctx_conf *ctx) +bool iwl_mvm_is_ftm_responder_chanctx(struct iwl_mvm *mvm, + struct ieee80211_chanctx_conf *ctx) { struct iwl_mvm_ftm_responder_iter_data data = { .responder = false, @@ -4830,9 +4830,7 @@ static int __iwl_mvm_add_chanctx(struct iwl_mvm *mvm, { u16 *phy_ctxt_id = (u16 *)ctx->drv_priv; struct iwl_mvm_phy_ctxt *phy_ctxt; - bool use_def = iwl_mvm_is_ftm_responder_chanctx(mvm, ctx) || - iwl_mvm_enable_fils(mvm, ctx); - struct cfg80211_chan_def *def = use_def ? &ctx->def : &ctx->min_def; + struct cfg80211_chan_def *def = iwl_mvm_chanctx_def(mvm, ctx); int ret; lockdep_assert_held(&mvm->mutex); @@ -4898,9 +4896,7 @@ void iwl_mvm_change_chanctx(struct ieee80211_hw *hw, struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); u16 *phy_ctxt_id = (u16 *)ctx->drv_priv; struct iwl_mvm_phy_ctxt *phy_ctxt = &mvm->phy_ctxts[*phy_ctxt_id]; - bool use_def = iwl_mvm_is_ftm_responder_chanctx(mvm, ctx) || - iwl_mvm_enable_fils(mvm, ctx); - struct cfg80211_chan_def *def = use_def ? &ctx->def : &ctx->min_def; + struct cfg80211_chan_def *def = iwl_mvm_chanctx_def(mvm, ctx); if (WARN_ONCE((phy_ctxt->ref > 1) && (changed & ~(IEEE80211_CHANCTX_CHANGE_WIDTH | diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index e148ef02ff73..d414007c4755 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -2752,4 +2752,17 @@ void iwl_mvm_mld_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif, int iwl_mvm_mld_get_primary_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif, unsigned long usable_links); + +bool iwl_mvm_is_ftm_responder_chanctx(struct iwl_mvm *mvm, + struct ieee80211_chanctx_conf *ctx); + +static inline struct cfg80211_chan_def * +iwl_mvm_chanctx_def(struct iwl_mvm *mvm, struct ieee80211_chanctx_conf *ctx) +{ + bool use_def = iwl_mvm_is_ftm_responder_chanctx(mvm, ctx) || + iwl_mvm_enable_fils(mvm, ctx); + + return use_def ? &ctx->def : &ctx->min_def; +} + #endif /* __IWL_MVM_H__ */