From patchwork Sun Feb 18 17:51:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 774055 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 101E2376EE for ; Sun, 18 Feb 2024 17:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278728; cv=none; b=e35yw0UXH5sUuaCNnQm+3rBSaFH8tzpLj3dMOfvVz2C4ny0qvDskOiYg0lh1m7dl5Nk1sgUPc03yC34Nx3JSk6OYFzXNOjE93emKiHGnYLViHBMEhGcnBHg9xZEE5HAFU8fKQi/eRWNRhnYtVSbm73TDYtOP4C2ezzykGsf46nI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278728; c=relaxed/simple; bh=l1QNI+GfiWgKMyKVEKmBhJtMWhQKoUOmC1CmzP9NMm0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cAyVfZYNvjHToeM8v1+BoWvRwUjxspp/mVwkafYQwMjInmcchsMiwZjYOAXRhf9F4gUk/cBfXo1Cmq7hMCp6cKnNT9JQQcCy0CEBP9cUJohbrELgBqe6GhzHQI06rQZoe51ms7qlqJKs6s3G/jHg8UzgTq5HODKv7y+aRP8eir0= 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=lJuEhCt8; arc=none smtp.client-ip=198.175.65.18 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="lJuEhCt8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278726; x=1739814726; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l1QNI+GfiWgKMyKVEKmBhJtMWhQKoUOmC1CmzP9NMm0=; b=lJuEhCt8OdmSmYJ28Divs4X2u/Lj5VxUJ9M9MyVLUpYV23nbo1K8GZJ8 dYY3DR5lANTsAqYvSMRueNMdU7Z9Db0VZy1JcmNYwCKrLwt8gsUK/iJAX vlcEQfxIN7rIxKVYg+0uCv+MHaVhpRFFTf1U4V2m8kq2IqnzItE++4y+s NX7VRwRkqswzLA8fMshAlGy6ADK1Z1k6Y9St6+khOe2tHujzem6TgV0Ay Q3vBL2GBTtxbabSvctp2uoFYedBIYQrZT0HBM48+LVGhmZw/yxOy1ed1R 1H6R8NgpLSNbXYPXJc113Wu1eBGagczpC82YRPzdjdIcAV+DBLC0yBh2g w==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464970" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464970" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459413" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:03 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 01/11] wifi: iwlwifi: mvm: support wider-bandwidth OFDMA Date: Sun, 18 Feb 2024 19:51:42 +0200 Message-Id: <20240218194912.ca666ede5dd6.I357972823d20e9045e2c97dbb7ac24fe9f5a6e41@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 To support wider-bandwidth OFDMA we need to configure the PHY context in the firmware, which will in turn configure the DSP accordingly. Pass the relevant information down. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 5 +++-- .../wireless/intel/iwlwifi/mvm/debugfs-vif.c | 5 +++-- .../intel/iwlwifi/mvm/ftm-responder.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 ++++++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ .../net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 19 +++++++++++++++---- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index b6a9896bce25..9830a3c3600b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -720,7 +720,7 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct ieee80211_chanctx_conf *ctx; u8 chains_static, chains_dynamic; - struct cfg80211_chan_def chandef; + struct cfg80211_chan_def chandef, ap_def; int ret, i; struct iwl_binding_cmd_v1 binding_cmd = {}; struct iwl_time_quota_cmd quota_cmd = {}; @@ -742,12 +742,13 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif, return -EINVAL; } chandef = ctx->def; + ap_def = ctx->ap; chains_static = ctx->rx_chains_static; chains_dynamic = ctx->rx_chains_dynamic; rcu_read_unlock(); ret = iwl_mvm_phy_ctxt_add(mvm, mvmvif->deflink.phy_ctxt, &chandef, - chains_static, chains_dynamic); + &ap_def, chains_static, chains_dynamic); if (ret) return ret; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c index aa3c9c2cbd7f..51b01f7528be 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c @@ -592,7 +592,7 @@ static ssize_t iwl_dbgfs_rx_phyinfo_write(struct ieee80211_vif *vif, char *buf, for_each_vif_active_link(vif, link_conf, link_id) { struct ieee80211_chanctx_conf *chanctx_conf; - struct cfg80211_chan_def min_def; + struct cfg80211_chan_def min_def, ap_def; struct iwl_mvm_phy_ctxt *phy_ctxt; u8 chains_static, chains_dynamic; @@ -606,6 +606,7 @@ static ssize_t iwl_dbgfs_rx_phyinfo_write(struct ieee80211_vif *vif, char *buf, * everything here and use it after unlocking */ min_def = chanctx_conf->min_def; + ap_def = chanctx_conf->ap; chains_static = chanctx_conf->rx_chains_static; chains_dynamic = chanctx_conf->rx_chains_dynamic; rcu_read_unlock(); @@ -614,7 +615,7 @@ static ssize_t iwl_dbgfs_rx_phyinfo_write(struct ieee80211_vif *vif, char *buf, if (!phy_ctxt) continue; - ret = iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, &min_def, + ret = iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, &min_def, &ap_def, chains_static, chains_dynamic); } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c index dca36b0662c7..8e760300a1ab 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c @@ -438,7 +438,7 @@ int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif, rcu_read_unlock(); phy_ctxt = &mvm->phy_ctxts[*phy_ctxt_id]; - ret = iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, &ctx.def, + ret = iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, &ctx.def, &ctx.ap, ctx.rx_chains_static, ctx.rx_chains_dynamic); if (ret) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 229d87a786df..69f6a96b0cfb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1644,6 +1644,9 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, IEEE80211_VIF_SUPPORTS_CQM_RSSI; } + if (vif->p2p || iwl_fw_lookup_cmd_ver(mvm->fw, PHY_CONTEXT_CMD, 1) < 5) + vif->driver_flags |= IEEE80211_VIF_IGNORE_OFDMA_WIDER_BW; + if (vif->type == NL80211_IFTYPE_P2P_DEVICE) mvm->p2p_device_vif = vif; @@ -4651,7 +4654,7 @@ static int iwl_mvm_p2p_find_phy_ctxt(struct iwl_mvm *mvm, cfg80211_chandef_create(&chandef, channel, NL80211_CHAN_NO_HT); return iwl_mvm_phy_ctxt_add(mvm, mvmvif->deflink.phy_ctxt, - &chandef, 1, 1); + &chandef, NULL, 1, 1); } /* Execute the common part for MLD and non-MLD modes */ @@ -4772,7 +4775,7 @@ static int __iwl_mvm_add_chanctx(struct iwl_mvm *mvm, goto out; } - ret = iwl_mvm_phy_ctxt_add(mvm, phy_ctxt, def, + ret = iwl_mvm_phy_ctxt_add(mvm, phy_ctxt, def, &ctx->ap, ctx->rx_chains_static, ctx->rx_chains_dynamic); if (ret) { @@ -4850,7 +4853,7 @@ void iwl_mvm_change_chanctx(struct ieee80211_hw *hw, } iwl_mvm_bt_coex_vif_change(mvm); - iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, def, + iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, def, &ctx->ap, ctx->rx_chains_static, ctx->rx_chains_dynamic); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index ce78c21883e9..fcae5199ac90 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1810,9 +1810,11 @@ void iwl_mvm_rx_shared_mem_cfg_notif(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *iwl_mvm_get_free_phy_ctxt(struct iwl_mvm *mvm); int iwl_mvm_phy_ctxt_add(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, const struct cfg80211_chan_def *chandef, + const struct cfg80211_chan_def *ap, u8 chains_static, u8 chains_dynamic); int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, const struct cfg80211_chan_def *chandef, + const struct cfg80211_chan_def *ap, u8 chains_static, u8 chains_dynamic); void iwl_mvm_phy_ctxt_ref(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c index bac655834f32..e208e3c34c25 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c @@ -198,12 +198,16 @@ int iwl_mvm_phy_send_rlc(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, const struct cfg80211_chan_def *chandef, + const struct cfg80211_chan_def *ap, u8 chains_static, u8 chains_dynamic, u32 action) { int ret; int ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_CONTEXT_CMD, 1); + if (ver < 5 || !ap || !ap->chan) + ap = NULL; + if (ver >= 3 && ver <= 5) { struct iwl_phy_context_cmd cmd = {}; @@ -215,6 +219,11 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, chains_static, chains_dynamic); + if (ap) { + cmd.v5.sbb_bandwidth = iwl_mvm_get_channel_width(ap); + cmd.v5.sbb_ctrl_channel_loc = iwl_mvm_get_ctrl_pos(ap); + } + ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, 0, sizeof(cmd), &cmd); } else if (ver < 3) { @@ -255,6 +264,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, */ int iwl_mvm_phy_ctxt_add(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, const struct cfg80211_chan_def *chandef, + const struct cfg80211_chan_def *ap, u8 chains_static, u8 chains_dynamic) { int ret; @@ -267,7 +277,7 @@ int iwl_mvm_phy_ctxt_add(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, ctxt->width = chandef->width; ctxt->center_freq1 = chandef->center_freq1; - ret = iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, + ret = iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, ap, chains_static, chains_dynamic, FW_CTXT_ACTION_ADD); @@ -301,6 +311,7 @@ void iwl_mvm_phy_ctxt_ref(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt) */ int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, const struct cfg80211_chan_def *chandef, + const struct cfg80211_chan_def *ap, u8 chains_static, u8 chains_dynamic) { enum iwl_ctxt_action action = FW_CTXT_ACTION_MODIFY; @@ -324,7 +335,7 @@ int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, int ret; /* ... remove it here ...*/ - ret = iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, + ret = iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, NULL, chains_static, chains_dynamic, FW_CTXT_ACTION_REMOVE); if (ret) @@ -338,7 +349,7 @@ int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, ctxt->width = chandef->width; ctxt->center_freq1 = chandef->center_freq1; - return iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, + return iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, ap, chains_static, chains_dynamic, action); } @@ -358,7 +369,7 @@ void iwl_mvm_phy_ctxt_unref(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt) cfg80211_chandef_create(&chandef, ctxt->channel, NL80211_CHAN_NO_HT); - iwl_mvm_phy_ctxt_apply(mvm, ctxt, &chandef, 1, 1, + iwl_mvm_phy_ctxt_apply(mvm, ctxt, &chandef, NULL, 1, 1, FW_CTXT_ACTION_REMOVE); } From patchwork Sun Feb 18 17:51:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 774255 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 1747429CF8 for ; Sun, 18 Feb 2024 17:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278729; cv=none; b=s7gDt6Az9BVmKrlgc+f9CmtkAlEFjnXXSW4kz2+kfCZEZMxCJBzqVMe9s8ZBhDVgLo0mtoeTXSpqvYIhFgkEicujS1cqU8hTmnqRd5zuZRd8IByDwEIUjLiivHlgv6ZFcGhiBjt+WFPsWXRUVqPwtIaWABQdDkJ5uH9TIAFB+WI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278729; c=relaxed/simple; bh=Y75ZXRhJm6LsKhiSOI2p/+PPryjJmAYUsaaNDNR7nyA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EqKeFY7PuwB1KqpBAsup+ohy4Mw1Hj2sWlH7tVjlMytS9caM8d0g95GVP5Qw8M7L1L674tPD22xFlBG6Ooe5w8t/ztAeY5E5ke6mbSRtP3Z2zjSo4FgneiXPMsa+YuvvECYdL4a1AqGpqOKuLNXWByAVgMsrUZf0nHB6J4v+XQQ= 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=Ech2GSN9; arc=none smtp.client-ip=198.175.65.18 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="Ech2GSN9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278728; x=1739814728; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y75ZXRhJm6LsKhiSOI2p/+PPryjJmAYUsaaNDNR7nyA=; b=Ech2GSN9VG7ZvKsE09OljW4MHdbdAT8MG9s5DaiC8nw3tUuadft3Ft/X cqlu2TBhK6NFCKQlHgmTdRDzLd9lXYaF1fqpKvtHv2eAUM419ubKWawq/ 2kY9Bl1bE56F/bNB6XcRUPuK4msgNiRXtY8eELk83K6nPMviLooI8sciI 2vj3A9JB+LpC7eloTyi7nKSxYr7WOQAmXiVdBY1h5Avn0doHkEW8+sW/d amFwIix2znV8V4lo/jnLh9MckgyX0vmJQzbynuCWW3oUw+PfX3iWO17et DgdcmTrKOSCOm7FIoZpLV8jlN+/2zOXRALbPsSkPAgeZPL+oC0b5Qr9mJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464973" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464973" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459421" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:06 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 02/11] wifi: iwlwifi: mvm: partially support PHY context version 6 Date: Sun, 18 Feb 2024 19:51:43 +0200 Message-Id: <20240218194912.2156fca5b1a5.I57f47f26ec0d96ecfb1192039f72b1c6d4e8a357@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 version 6 command adds the puncture mask to the PHY context and is otherwise the same. Support that in the API definitions, but don't fill it yet. While at it, also mark the field as removed from the link context command since it moved from there to PHY context. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h | 10 ++++------ drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h | 9 +++++---- drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 6 +++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h b/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h index 200362e5ceca..c6d1f5644638 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h @@ -373,7 +373,7 @@ struct iwl_mac_config_cmd { * iwl_link_ctx_cfg_cmd::bss_color_disable * @LINK_CONTEXT_MODIFY_EHT_PARAMS: covers iwl_link_ctx_cfg_cmd::puncture_mask. * This flag can be set only if the MAC that this link relates to has - * eht_support set to true. + * eht_support set to true. No longer used since _VER_3 of this command. * @LINK_CONTEXT_MODIFY_ALL: set all above flags */ enum iwl_link_ctx_modify_flags { @@ -462,7 +462,7 @@ enum iwl_link_ctx_flags { * @bi: beacon interval in TU, applicable only when associated * @dtim_interval: DTIM interval in TU. * Relevant only for GO, otherwise this is offloaded. - * @puncture_mask: puncture mask for EHT + * @puncture_mask: puncture mask for EHT (removed in VER_3) * @frame_time_rts_th: HE duration RTS threshold, in units of 32us * @flags: a combination from &enum iwl_link_ctx_flags * @flags_mask: what of %flags have changed. Also &enum iwl_link_ctx_flags @@ -505,7 +505,7 @@ struct iwl_link_config_cmd { struct iwl_he_backoff_conf trig_based_txf[AC_NUM]; __le32 bi; __le32 dtim_interval; - __le16 puncture_mask; + __le16 puncture_mask; /* removed in _VER_3 */ __le16 frame_time_rts_th; __le32 flags; __le32 flags_mask; @@ -519,9 +519,7 @@ struct iwl_link_config_cmd { u8 ibss_bssid_addr[6]; __le16 reserved_for_ibss_bssid_addr; __le32 reserved3[8]; -} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1 and - * LINK_CONTEXT_CONFIG_CMD_API_S_VER_2 - */ +} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3 */ /* Currently FW supports link ids in the range 0-3 and can have * at most two active links for each vif. diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h b/drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h index 205d0413e626..08a2c416ce60 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h @@ -156,17 +156,18 @@ struct iwl_phy_context_cmd { __le32 lmac_id; union { __le32 rxchain_info; /* reserved in _VER_4 */ - struct { /* used for _VER_5 */ + struct { /* used for _VER_5/_VER_6 */ u8 sbb_bandwidth; u8 sbb_ctrl_channel_loc; - __le16 reserved; - } v5; + __le16 puncture_mask; /* added in VER_6 */ + }; }; __le32 dsp_cfg_flags; __le32 reserved; } __packed; /* PHY_CONTEXT_CMD_API_VER_3, * PHY_CONTEXT_CMD_API_VER_4, - * PHY_CONTEXT_CMD_API_VER_5 + * PHY_CONTEXT_CMD_API_VER_5, + * PHY_CONTEXT_CMD_API_VER_6 */ #endif /* __iwl_fw_api_phy_ctxt_h__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c index e208e3c34c25..5db44514d025 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c @@ -208,7 +208,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, if (ver < 5 || !ap || !ap->chan) ap = NULL; - if (ver >= 3 && ver <= 5) { + if (ver >= 3 && ver <= 6) { struct iwl_phy_context_cmd cmd = {}; /* Set the command header fields */ @@ -220,8 +220,8 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, chains_dynamic); if (ap) { - cmd.v5.sbb_bandwidth = iwl_mvm_get_channel_width(ap); - cmd.v5.sbb_ctrl_channel_loc = iwl_mvm_get_ctrl_pos(ap); + cmd.sbb_bandwidth = iwl_mvm_get_channel_width(ap); + cmd.sbb_ctrl_channel_loc = iwl_mvm_get_ctrl_pos(ap); } ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, From patchwork Sun Feb 18 17:51:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 774054 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 A14B26F084 for ; Sun, 18 Feb 2024 17:52:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278733; cv=none; b=D46tSPUnU4A3HtTRacKSOAsjfiZSQY873RoEsMzDZtd+/oVxbXRH7y8O5YqDwzv+UZF4yyJMMbONK30df/gsmgyv/0EMzwxoN7yq/bp3CLPCWKV8yVqtzWOx/rtu4RPINuihqyHxrYZFB1qMXMmIDOwXaXELzsXwxaDphjWLXWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278733; c=relaxed/simple; bh=2FzC/WzIwb0BSLiISODiQ6iAf3NV+DFXwGGnpP+Wc54=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mest7XhMcSQl7n71UdMpL/E/ugS1nIek9d/I2pI2lvQEVqoA58IqTfKkFYQ5dryZT3RWO0ocBWvxDANZpXbtXkn6NkjpgRJ/KB+d1PLtlb8xq1K0ysDx1daQNLBNweQy8QV8u1qqID2JTKuhaEQSRyZNCoGPMWv9Q36q0IHM0j4= 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=Qd2KT5R7; arc=none smtp.client-ip=198.175.65.18 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="Qd2KT5R7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278730; x=1739814730; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2FzC/WzIwb0BSLiISODiQ6iAf3NV+DFXwGGnpP+Wc54=; b=Qd2KT5R7LEh90/5MEy7nPDBMMORKU9VzB8Cemx+TqF/4EY4tk07mOgLr zSIY3mbQKRFgAWmi+T/UajF7eLtCb2qX4mKDx3rYy8RLP2AIBgMW/YZkY bXfR9HKz1i8BSBbU5z23o0jhfsmbqjW7huFYOx0OuEIDbyyVsbu6oU0WV tgV3H+vJXn+rMIYgU3P2MQjeg+BL+sUFt9PUNwQMdzmHb1DWsiSIIblAR RWR4/KkzXbWTMyYDHlZKia1vG/pCorR7lJ2dTtKnMc859/jIjt5VAtUpO mnkoj+iGezEJOfiC0/uYk4OjUIkWxR+/yF3M+505XLkZ5s7L4F1g7KEku w==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464975" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464975" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459424" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:08 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 03/11] wifi: iwlwifi: mvm: support PHY context version 6 Date: Sun, 18 Feb 2024 19:51:44 +0200 Message-Id: <20240218194912.16d9f5fc41df.I9eeb55787d8483f820f5790e8874761f598da314@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 Fill the new puncture mask in the PHY context command if supported. In this case, also don't send it in the link context command. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 129eefcc45d6..f13f13e6b71a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -204,7 +204,8 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, def = iwl_mvm_chanctx_def(mvm, ctx); if (iwlwifi_mod_params.disable_11be || - !link_conf->eht_support || !def) + !link_conf->eht_support || !def || + iwl_fw_lookup_cmd_ver(mvm->fw, PHY_CONTEXT_CMD, 1) >= 6) changes &= ~LINK_CONTEXT_MODIFY_EHT_PARAMS; else cmd.puncture_mask = cpu_to_le16(def->punctured); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c index 5db44514d025..ce264b386029 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2012-2014, 2018-2023 Intel Corporation + * Copyright (C) 2012-2014, 2018-2024 Intel Corporation * Copyright (C) 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2017 Intel Deutschland GmbH */ @@ -224,6 +224,9 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, cmd.sbb_ctrl_channel_loc = iwl_mvm_get_ctrl_pos(ap); } + if (ver == 6) + cmd.puncture_mask = cpu_to_le16(chandef->punctured); + ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, 0, sizeof(cmd), &cmd); } else if (ver < 3) { From patchwork Sun Feb 18 17:51:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 774254 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 7ACE829CF8 for ; Sun, 18 Feb 2024 17:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278734; cv=none; b=Z88ZLlCjnfvPoMNGywZhfHf66fEcGy9Kyo/3De2HOpM7bly4C1mvbP+hj18ZGxFtxyjVjUbC4uGrE2lz2Q7KQK5gqGe7VkRwYUWwC5lpL6E9dH69xf+OIeUKNBhnTyf+94wToYGn9IHR5gFI1cl5jaZX3vxbXFG4LfZJNRPSv7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278734; c=relaxed/simple; bh=qdg4yA3Ky3NutMLm1rG0BEaKDzI7hqzo2I/eE2lhZTI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=szk6yVCkk5GMzzPzjJoVmOS/6rbWljw6xoCNsXxX1c5OJxt7QBuYjYEogdijlFos5eNElwD37XmSpVGMPU7VFs+T3bfAfWpuvINyR68s/2r2w2I6Hgs+6Meb9SNdMQInzqPAYvX+HwzXO175ktMfYRh6BBjgZNUdrD0EG33cufg= 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=Svfg2r1w; arc=none smtp.client-ip=198.175.65.18 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="Svfg2r1w" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278732; x=1739814732; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qdg4yA3Ky3NutMLm1rG0BEaKDzI7hqzo2I/eE2lhZTI=; b=Svfg2r1wGqQLVYK5dRmRlkm87pdy8NdGEdIUc1I+W8I/JKtIc8QShXDv uzWPPQFhZr375kmeqtbzxnHGyVEpdbQVuORI+0HESNfYZ63rI83XgWsL+ I7cJ8h0zPxgfnRodt3qddiPUmpJsL/6uHXv7egbD86nNFDiUnUVhjpvDV KoOCE0asGqKQ8gt9oJ7irk3KorNb/r2CllbucSSnlE6M/rZf+hBwOcRZg YBjgAGtMKGwh8s0KTxZ8ka02li+t90IBlYIE1PIsoHHUeDzSguQfNBJpW gdiLjCMDP49ijJSr4HPtL2O7yjUnxcJSTx1XOaVwlbXYmIxqokzyRL6nU Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464977" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464977" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459428" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:10 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 04/11] wifi: iwlwifi: bump FW API to 90 for BZ/SC devices Date: Sun, 18 Feb 2024 19:51:45 +0200 Message-Id: <20240218194912.21cf0b641f12.I2f9196191f1ea78e96e92f9db8ecb3cc9bbfd9b3@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 Start supporting API version 90 for new devices. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index 14c5cc265fe3..18b1f2cf08cc 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c @@ -10,7 +10,7 @@ #include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_BZ_UCODE_API_MAX 89 +#define IWL_BZ_UCODE_API_MAX 90 /* Lowest firmware API version supported */ #define IWL_BZ_UCODE_API_MIN 80 diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c index dbbcb2d0968c..9b79279fd76c 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c @@ -10,7 +10,7 @@ #include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_SC_UCODE_API_MAX 89 +#define IWL_SC_UCODE_API_MAX 90 /* Lowest firmware API version supported */ #define IWL_SC_UCODE_API_MIN 82 From patchwork Sun Feb 18 17:51:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 774053 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 3BA4C6F092 for ; Sun, 18 Feb 2024 17:52:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278736; cv=none; b=o4O1IdgShwzFAwV5IxlJ2tf8Y9KkNaCZCfMXJTz4LKTq6t+OtFU6Ss3h/rMCvfnT8Lh9TCf7df8hDP1FjwqKj9/ANgYsK09tQ3GBYGljOmuOBXdJc1TwDOqqytEkgqjHbQSLRXG9r/WFeCy+MsKAZaRyxQ4oMt+RvHj/yANNspA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278736; c=relaxed/simple; bh=H64tbjNP2RlzcIhisbXjWc9o+rwoiErepWsnq16+38A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NUE9phQJ3RrqomiV+NggGi6dCkNQm70k6L1KuMHSfzYz8yHDMp8C54sv032YABDIZzERuQ/IVimJWd6pwKgsiZC+dzoKQ0i0NL1QdBpEk+MrpqIDznhW3Iqr9EJDXVAVwQPRpBxO/i8n8jXnLLtZaC9hGfSqc2eJnyutXqN78LI= 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=gVH15q80; arc=none smtp.client-ip=198.175.65.18 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="gVH15q80" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278735; x=1739814735; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H64tbjNP2RlzcIhisbXjWc9o+rwoiErepWsnq16+38A=; b=gVH15q80kMyBwQaJSVlI47Fs8jBHcnBJXBgxjmIrjQF3haPsA/bkRyqq CTi4tUVNdUrZ9DzjWZH1aRF1sSYYckYtsXzLl+60F1Ope8pTSO796X3jo VxXxaV/lRQYWZCofv69AMbUE+YrT6IvNH4N/N5geMBzGlhDg6bkoTf/jF +mJUw4XSmqeH3eUpsVNImnt17N1zTW4fu89EAqcEOdbv9Bmzo/AdVlvvT IIrtqi7dSN5IOwXwqceeX83xE98E2ltKeYodhMXEi0HXVgkCr47EhLiar 7CgwDjGcvO5JyhWFQos2kwx3/oiLYiiiCcYvz210vJXGCmGhiGskB+kCZ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464979" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464979" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459439" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:13 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg Subject: [PATCH 05/11] wifi: iwlwifi: mvm: unlock mvm if there is no primary link Date: Sun, 18 Feb 2024 19:51:46 +0200 Message-Id: <20240218194912.21de6e68d9e5.I3c0ebe577dec6b26ab6b4eac48035d6f35a8b0f8@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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: Benjamin Berg At that point in the code mvm->mutex has already been taken, so jump to out_noreset in order to unlock before returning the error. Fixes: 8c9bef26e98b ("wifi: iwlwifi: mvm: d3: implement suspend with MLO") Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 9830a3c3600b..6d5ed79b9fff 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -1290,8 +1290,10 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, mvmvif = iwl_mvm_vif_from_mac80211(vif); mvm_link = mvmvif->link[primary_link]; - if (WARN_ON_ONCE(!mvm_link)) - return -EINVAL; + if (WARN_ON_ONCE(!mvm_link)) { + ret = -EINVAL; + goto out_noreset; + } if (mvm_link->ap_sta_id == IWL_MVM_INVALID_STA) { /* if we're not associated, this must be netdetect */ From patchwork Sun Feb 18 17:51:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 774253 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 16B7E6F09B for ; Sun, 18 Feb 2024 17:52:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278740; cv=none; b=D8ERiJ1j8L1RzjTHYDcwUGcNVshxbeIhfvkQ1LvG61BBwziYK4+2JtwtRbxzHblstSHJeYSR9F9FLBUnQbVvEWQrwFBXZ/YpBqeuOnaSt4fzmoRTNSxU4O/bzwmGRvHBdfnEQocusGww/JUwSmg6W/aiaP8Krc2j3KnmZt7tzz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278740; c=relaxed/simple; bh=E/O9XedZypVz0nwdzwOTDsAnudt4pGVmD/yLRuUdTPE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AMB82kIiKSpYmj+vRYp+rua7sas67l4jSLVnhYmyfDhlpCUSI0L+fxjD8DGeQNRydHJhBf4aGHUOisXJaSONcCLlEvH8GPXheVzH/ZuWR4nwvQzlygiFyDUfycpWyuWsSE2dhuKVMgPxJNMgklR5xFTaRHOJ+lQmKawPGZxJHK8= 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=DTJK02f8; arc=none smtp.client-ip=198.175.65.18 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="DTJK02f8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278737; x=1739814737; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E/O9XedZypVz0nwdzwOTDsAnudt4pGVmD/yLRuUdTPE=; b=DTJK02f8IIAHioa1xVzR4crYwp78Ywy7x/jbay6k2w/PYSwcZqlfXvcy 8CjGxqDE9BZ3bDMb2YVTIFHMM5qZ9zouBp1vfey/1u1uy+NLpfXRcCiJj Ytwp5ZTUQPJ04Oi6vi1Nb/C2KBOD1CGSGn+qenOXgPrt1MGVwTM8amfBb Rthf58aDKSXztp3dWpJS3V6wLnIOFw7pN5pQ2MZ4F7dz7zKim+zzLgWV6 sEiv698YYpIa36cSKVfFY9F6JTNc9ZE7/UgUOIF1bOZ1QV6WWPdb5CxlA +f8i+d1vE1N99JMsyCOYw7bEabnOYr94r1RK+iWR9CcbgeGFTxDB308r2 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464981" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464981" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459442" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:15 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg Subject: [PATCH 06/11] wifi: iwlwifi: mvm: ensure offloading TID queue exists Date: Sun, 18 Feb 2024 19:51:47 +0200 Message-Id: <20240218194912.6632e6dc7b35.Ie6e6a7488c9c7d4529f13d48f752b5439d8ac3c4@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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: Benjamin Berg The resume code path assumes that the TX queue for the offloading TID has been configured. At resume time it then tries to sync the write pointer as it may have been updated by the firmware. In the unusual event that no packets have been send on TID 0, the queue will not have been allocated and this causes a crash. Fix this by ensuring the queue exist at suspend time. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 9 ++++++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 28 ++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 3 ++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 6d5ed79b9fff..70e03a9a937e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -1309,7 +1309,9 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, mvm->net_detect = true; } else { - struct iwl_wowlan_config_cmd wowlan_config_cmd = {}; + struct iwl_wowlan_config_cmd wowlan_config_cmd = { + .offloading_tid = 0, + }; wowlan_config_cmd.sta_id = mvm_link->ap_sta_id; @@ -1321,6 +1323,11 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, goto out_noreset; } + ret = iwl_mvm_sta_ensure_queue( + mvm, ap_sta->txq[wowlan_config_cmd.offloading_tid]); + if (ret) + goto out_noreset; + ret = iwl_mvm_get_wowlan_config(mvm, wowlan, &wowlan_config_cmd, vif, mvmvif, ap_sta); if (ret) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index f3efbec38253..491c449fd431 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1502,6 +1502,34 @@ static int iwl_mvm_sta_alloc_queue(struct iwl_mvm *mvm, return ret; } +int iwl_mvm_sta_ensure_queue(struct iwl_mvm *mvm, + struct ieee80211_txq *txq) +{ + struct iwl_mvm_txq *mvmtxq = iwl_mvm_txq_from_mac80211(txq); + int ret = -EINVAL; + + lockdep_assert_held(&mvm->mutex); + + if (likely(test_bit(IWL_MVM_TXQ_STATE_READY, &mvmtxq->state)) || + !txq->sta) { + return 0; + } + + if (!iwl_mvm_sta_alloc_queue(mvm, txq->sta, txq->ac, txq->tid)) { + set_bit(IWL_MVM_TXQ_STATE_READY, &mvmtxq->state); + ret = 0; + } + + local_bh_disable(); + spin_lock(&mvm->add_stream_lock); + if (!list_empty(&mvmtxq->list)) + list_del_init(&mvmtxq->list); + spin_unlock(&mvm->add_stream_lock); + local_bh_enable(); + + return ret; +} + void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk) { struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h index 4668f413abd3..b3450569864e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2012-2014, 2018-2023 Intel Corporation + * Copyright (C) 2012-2014, 2018-2024 Intel Corporation * Copyright (C) 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015-2016 Intel Deutschland GmbH */ @@ -571,6 +571,7 @@ void iwl_mvm_modify_all_sta_disable_tx(struct iwl_mvm *mvm, bool disable); void iwl_mvm_csa_client_absent(struct iwl_mvm *mvm, struct ieee80211_vif *vif); +int iwl_mvm_sta_ensure_queue(struct iwl_mvm *mvm, struct ieee80211_txq *txq); 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, From patchwork Sun Feb 18 17:51:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 774052 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 563A76F080 for ; Sun, 18 Feb 2024 17:52:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278747; cv=none; b=QGZDWJ1JUYp/Y5UOBltuUv9Axh0PLz8v+lBEm0xndfW3Jp7CvLhMONBLjbT8dTzw780lFJEWo/5Zv/uOLeAtYxHeh7ABXt3aWh7+aFthjnZxwEkSrnPlhEelahpV53P+Kg9Cd2oGi2qRfMaCegekNEsVL9WjZLvx5F+1Ci0s5sk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278747; c=relaxed/simple; bh=9zDHKr0sXLpcAQC2oU+jRY0kF5s2dE6lrdDWL1P+RFc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qe/iu5hojkMZDFqIVf1mrMqO0HE5Bg/gbt4unweNNPw6dStUnCEKL10HprUkS2AwvM2tk0Y/gNRdEc7oYPWYSG8jjyTciCsmVIS6bMgOI3sAeG0TdczoCig7mZ1Rml6oNkeqr9jLsANQTvo1evSkIj0NervDJ4oUkE1Eag30QBI= 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=oBoVRiLC; arc=none smtp.client-ip=198.175.65.18 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="oBoVRiLC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278740; x=1739814740; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9zDHKr0sXLpcAQC2oU+jRY0kF5s2dE6lrdDWL1P+RFc=; b=oBoVRiLCyp74s7QYlnP1VedEZ7LbK/eSDP3iqXusJ21D4qUDXMUx6lRQ kWWEA/PwTN2FVajifZgeH5c8HY5E2x2Vxie0+xeGoW9Z+NGBmEZ4PigLc ypUI8BUrwVij7HSc316nWtXSJE0CJrn7FxiAJitJ5UDljrs6yS8sc+ppT EsR8OFWs6ZlYqf8wwAEpDgMOkmyUTT21vZAXJovqVuQfERpIP1M0TTurY vyHh4qQkHF9U2q9Kzy/X8GxOED0qBScqFG3v/6L/4u2Q4Hm+tcMsHljEm 3UyHdZGdccUhu8BH2SyFkRkJ7qr7iseHDRpEilEcb3eoqkHGcM+dtF36i A==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464983" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464983" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459446" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:17 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 07/11] wifi: iwlwifi: api: fix kernel-doc reference Date: Sun, 18 Feb 2024 19:51:48 +0200 Message-Id: <20240218194912.5475d49bce86.I640a12bc799612e82c3e7a4d628bbb7760511297@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 is for iwl_tas_config_cmd_v4, not iwl_tas_config_cmd_v3. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h b/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h index 8c886569f01e..58034dfa7e70 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2012-2014, 2018-2023 Intel Corporation + * Copyright (C) 2012-2014, 2018-2024 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -462,7 +462,7 @@ struct iwl_tas_config_cmd_v3 { } __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */ /** - * struct iwl_tas_config_cmd_v3 - configures the TAS + * struct iwl_tas_config_cmd_v4 - configures the TAS * @override_tas_iec: indicates whether to override default value of IEC regulatory * @enable_tas_iec: in case override_tas_iec is set - * indicates whether IEC regulatory is enabled or disabled From patchwork Sun Feb 18 17:51: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: 774051 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 B57086F073 for ; Sun, 18 Feb 2024 17:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278751; cv=none; b=fTy+mL8w27Xa0CpHbYkZyRjnV3O4O8GWNgrhx5tDl2Tzi28jcuJzguzgdnsSjjZzlqJzOLEzX9yCVejg0o9MTbRrkLq4Fdz+NFsRrOLK11xNJUCNN8F7HM7AFSZloGbXvqW2EhTXBFEWcqczGq+K7idEBwg/qx+7CdS5lnvTJzg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278751; c=relaxed/simple; bh=G+YodfR4e2XXImQfdYALBKenslG2kJSn0i17Xvfpm5o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZVLWssCqtTjgkmcn0iuT50BJ7x0DRlWoeJOdqziUmbcsgfntFRC9OKLSPlWKnGGsq+9aAu4JDBmxdcaGVkLgcSGYq4Nh1pP/h4k8nuiiHd0n7orr+tB81q/2r74GBLwPJVGFlC8cbKOD2qI7BPeD2H7vI9Oo1jOvbiffYcSlLO4= 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=fu+McmBb; arc=none smtp.client-ip=198.175.65.18 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="fu+McmBb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278741; x=1739814741; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G+YodfR4e2XXImQfdYALBKenslG2kJSn0i17Xvfpm5o=; b=fu+McmBbBNjNeH6LalQWxtJbxRPi65W3MsL8Q0OAFZ8vWYb/ZzizmA2/ MEc9F54w5J3wmpwxwgjmNFDyLqcmTITxvzbENV2Efrpps5rQJrPp6mVJS A443nIo44h4bDemPSc6rX59m7JKht+iOdxAcJLGhT82efWnjBmI3RtIx3 snYhLvce+lsC4wR8Rw5vlokIEMn275TKoeJiXoKveC5reVGMdgkFx8EGu 4+kHiMd2LmHUfm7xZs8cjCN7QIObWQS81jvYTktDa8ijrWHTuyLEIu67v BLgwJMkDj/xzjtPlreWYzdtlNL/K2dTppnnZXHMxQEFl+fYd19+0UZ8Ll w==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464985" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464985" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459449" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:19 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 08/11] wifi: iwlwifi: iwl-fh.h: fix kernel-doc issues Date: Sun, 18 Feb 2024 19:51:49 +0200 Message-Id: <20240218194912.4a342ac06f0b.I604ea964a094b43df0ab29b06231c2f42d6bd79b@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 Clean up kernel-doc in iwl-fh.h. In one case, rename the (otherwise unused) struct member to have the correct name. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 36 ++++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-fh.h b/drivers/net/wireless/intel/iwlwifi/iwl-fh.h index e0400ba2ab74..6ba374efaacb 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-fh.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-fh.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2005-2014, 2018-2021, 2023 Intel Corporation + * Copyright (C) 2005-2014, 2018-2021, 2023-2024 Intel Corporation * Copyright (C) 2015-2017 Intel Deutschland GmbH */ #ifndef __iwl_fh_h__ @@ -570,18 +570,19 @@ static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans, /** * struct iwl_rb_status - reserve buffer status * host memory mapped FH registers - * @closed_rb_num [0:11] - Indicates the index of the RB which was closed - * @closed_fr_num [0:11] - Indicates the index of the RX Frame which was closed - * @finished_rb_num [0:11] - Indicates the index of the current RB + * @closed_rb_num: [0:11] Indicates the index of the RB which was closed + * @closed_fr_num: [0:11] Indicates the index of the RX Frame which was closed + * @finished_rb_num: [0:11] Indicates the index of the current RB * in which the last frame was written to - * @finished_fr_num [0:11] - Indicates the index of the RX Frame + * @finished_fr_num: [0:11] Indicates the index of the RX Frame * which was transferred + * @__spare: reserved */ struct iwl_rb_status { __le16 closed_rb_num; __le16 closed_fr_num; __le16 finished_rb_num; - __le16 finished_fr_nam; + __le16 finished_fr_num; __le32 __spare; } __packed; @@ -651,15 +652,15 @@ struct iwl_tfd_tb { * * This structure contains dma address and length of transmission address * - * @tb_len length of the tx buffer - * @addr 64 bits dma address + * @tb_len: length of the tx buffer + * @addr: 64 bits dma address */ struct iwl_tfh_tb { __le16 tb_len; __le64 addr; } __packed; -/** +/* * Each Tx queue uses a circular buffer of 256 TFDs stored in host DRAM. * Both driver and device share these circular buffers, each of which must be * contiguous 256 TFDs. @@ -698,10 +699,11 @@ struct iwl_tfd { /** * struct iwl_tfh_tfd - Transmit Frame Descriptor (TFD) - * @ num_tbs 0-4 number of active tbs - * 5 -15 reserved - * @ tbs[25] transmit frame buffer descriptors - * @ __pad padding + * @num_tbs: + * 0-4 number of active tbs + * 5-15 reserved + * @tbs: transmit frame buffer descriptors + * @__pad: padding */ struct iwl_tfh_tfd { __le16 num_tbs; @@ -718,10 +720,12 @@ struct iwl_tfh_tfd { * struct iwlagn_schedq_bc_tbl scheduler byte count table * base physical address provided by SCD_DRAM_BASE_ADDR * For devices up to 22000: - * @tfd_offset 0-12 - tx command byte count + * @tfd_offset: + * For devices up to 22000: + * 0-12 - tx command byte count * 12-16 - station index - * For 22000: - * @tfd_offset 0-12 - tx command byte count + * For 22000: + * 0-12 - tx command byte count * 12-13 - number of 64 byte chunks * 14-16 - reserved */ From patchwork Sun Feb 18 17:51: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: 774252 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 D8D9A6F08C for ; Sun, 18 Feb 2024 17:52:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278752; cv=none; b=aeFTTra3am9IoizEcYOLcBL6ke5Sh1M+0brXcwCeL8YaVXBYnVDgFyttBbRD+640CJLcni3qZH8RV00VvUoLhBzO5eoPYxJPz/dVkMz6WIe7Y5EQ86wpTdV4sr1IVNAchfs82re0YlwcYV+vhBnbIcxTxgMJnPXxvzIkC6ChX4c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278752; c=relaxed/simple; bh=OcffHn90xyu33ofSRyoFxQF1Z0ONB4MFgwkuQOUoLHM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FTuRvXiAXBaAJ71p6D6xRBzDqQEwXHUK9oOJFqnPlpdWWtFWy27UuGJPBJ4o4M/Y7rpHVOxZ3d6h+v7qd0zYfXGuE41Sg5Aa73j37NCN7/Tt/gHQdIs97jcr6JaUZvbHCXkz4GhQ5xuu7QP6feXJVKTm0IEWjXGlyb521L9JLzA= 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=QvpImxuK; arc=none smtp.client-ip=198.175.65.18 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="QvpImxuK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278746; x=1739814746; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OcffHn90xyu33ofSRyoFxQF1Z0ONB4MFgwkuQOUoLHM=; b=QvpImxuK7QejZBppA0n1q0vQaHIZaNQJYLxage+GCs+j+MNZ/drhXcdw Yvm08GvqQv4d+QhXp9hbFRpg9xBGbGozaffwJnYPtciTmrt9h6t0YQswB BCa6fnppwR/XPlJDLBNijAC8sJIkF36UbzrIPpY5P1XS/zmyeLrJK+PaZ UgX5LN/sZP876XmgGT+fh3tvOoNqPoXTc1AhK/DzhCcjY7Ld/7r8XA2kG wOXMl8gTnK8lWuPAkRwqqGIZFBmXZqYT3S9SG+CegtkkrXZOO1AtgCzf1 mPa/CowSD4LtaGCwETgBAKNesXVpGo9jvKEynhVjgeIiEzV7mO0DlEfUl g==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464988" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464988" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459453" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:22 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 09/11] wifi: iwlwifi: mvm: fix the TXF mapping for BZ devices Date: Sun, 18 Feb 2024 19:51:50 +0200 Message-Id: <20240218194912.da336ca2fa0a.I73e44d5fc474ebb6f275b9008950e59c012f33b2@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 Those devices' fifos are numbered differently. Because of that, we were looking at the size of the VO fifo size to determine the size of the A-MSDU which led to a lower throughput. Note that for those devices the only user of the AC -> fifo mapping is the size limitation of A-MSDU. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | 12 +++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 11 +++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 8 ++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h index 9c69d3674384..e6c0f928a6bb 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2005-2014, 2019-2021, 2023 Intel Corporation + * Copyright (C) 2005-2014, 2019-2021, 2023-2024 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -66,6 +66,16 @@ enum iwl_gen2_tx_fifo { IWL_GEN2_TRIG_TX_FIFO_VO, }; +enum iwl_bz_tx_fifo { + IWL_BZ_EDCA_TX_FIFO_BK, + IWL_BZ_EDCA_TX_FIFO_BE, + IWL_BZ_EDCA_TX_FIFO_VI, + IWL_BZ_EDCA_TX_FIFO_VO, + IWL_BZ_TRIG_TX_FIFO_BK, + IWL_BZ_TRIG_TX_FIFO_BE, + IWL_BZ_TRIG_TX_FIFO_VI, + IWL_BZ_TRIG_TX_FIFO_VO, +}; /** * enum iwl_tx_queue_cfg_actions - TXQ config options * @TX_QUEUE_CFG_ENABLE_QUEUE: enable a queue diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index cc592e288188..3002f0f8d3bc 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -31,6 +31,17 @@ const u8 iwl_mvm_ac_to_gen2_tx_fifo[] = { IWL_GEN2_TRIG_TX_FIFO_BK, }; +const u8 iwl_mvm_ac_to_bz_tx_fifo[] = { + IWL_BZ_EDCA_TX_FIFO_VO, + IWL_BZ_EDCA_TX_FIFO_VI, + IWL_BZ_EDCA_TX_FIFO_BE, + IWL_BZ_EDCA_TX_FIFO_BK, + IWL_BZ_TRIG_TX_FIFO_VO, + IWL_BZ_TRIG_TX_FIFO_VI, + IWL_BZ_TRIG_TX_FIFO_BE, + IWL_BZ_TRIG_TX_FIFO_BK, +}; + struct iwl_mvm_mac_iface_iterator_data { struct iwl_mvm *mvm; struct ieee80211_vif *vif; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index fcae5199ac90..8a45d69d0f81 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1589,12 +1589,16 @@ static inline int iwl_mvm_max_active_links(struct iwl_mvm *mvm, extern const u8 iwl_mvm_ac_to_tx_fifo[]; extern const u8 iwl_mvm_ac_to_gen2_tx_fifo[]; +extern const u8 iwl_mvm_ac_to_bz_tx_fifo[]; static inline u8 iwl_mvm_mac_ac_to_tx_fifo(struct iwl_mvm *mvm, enum ieee80211_ac_numbers ac) { - return iwl_mvm_has_new_tx_api(mvm) ? - iwl_mvm_ac_to_gen2_tx_fifo[ac] : iwl_mvm_ac_to_tx_fifo[ac]; + if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) + return iwl_mvm_ac_to_bz_tx_fifo[ac]; + if (iwl_mvm_has_new_tx_api(mvm)) + return iwl_mvm_ac_to_gen2_tx_fifo[ac]; + return iwl_mvm_ac_to_tx_fifo[ac]; } struct iwl_rate_info { From patchwork Sun Feb 18 17:51: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: 774251 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 3B5A36F07F for ; Sun, 18 Feb 2024 17:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278760; cv=none; b=tsj5DbVP7HeTreSSat2qO7zNvESqfYIrL3wXtgAw99icF6e5x7awTFwEgMMIf3LXH9V5OjcjM14U5uDayQNlm98UFT/g63SDGBzsG2jWNe9S/9oaaNlDms7nxVobaf9Vl+LoURAzYjp/Qt7tteVMJYUSxTsYsNKph+t3yh8i4KU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278760; c=relaxed/simple; bh=WZLy47OalfPpmhmdoWBPLEZ6ydjRfJfM93jaNaHm7D8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PrpTF2+3qPMwdATPsqGP2RVTo03jlsMqmG03HV+RyDo5P2OJfVoK/3/66uvPLtRNVcNB/yM34gKPgeU6/PutTQvMzF/1rQSV9FppGNHa+eQP48N+gQmRXkLgPd12lH89SM0V1S/WCHtCoeo+Wn+9gyNKyiKEdPZOeuPIB6YQsOk= 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=CnlpmXEs; arc=none smtp.client-ip=198.175.65.18 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="CnlpmXEs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278749; x=1739814749; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WZLy47OalfPpmhmdoWBPLEZ6ydjRfJfM93jaNaHm7D8=; b=CnlpmXEsPTlSE9+gR2crklrEm2HRxFuMzuwAcWFlC93wWyjybEqlN/gt LKk6WaNdoaoFHmhVCyEF15AYx8yyAxAr4kk6TokDB1I8p7nsPVXEQ93I7 SAmyp6nPEOsDJKVjeWxQcgvw49RTahyQMkbzUvh6SgvAeYsCx4F3xnDt7 J4DJwXxU38zBXAu9wGOqz3KBwSmUFlTXTvvaAvQfHlagd7Pj6nxg9uDt7 dmMgcCzjqtbDAUYU89DDmeeJBBxLeuUwvSDqzg4rSs4//xMhddDg9c7ZI MiI0dzV4WZ9pgKJ4V7TRTlaiFDyxGE/YW+d7blKToGqt3hbEtMJoOZwoo w==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464992" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464992" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459456" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:24 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 10/11] wifi: iwlwifi: handle per-phy statistics from fw Date: Sun, 18 Feb 2024 19:51:51 +0200 Message-Id: <20240218194912.e84f975b69ee.Ibbc7817135827e45adaaa47b796be165f9f1ca48@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 In the operational statistics notifications (both old and new API) the driver receives the statistics per phy. currently this statistics wasn't handled because they wasn't needed. Now the channel_load_by_us parameter in these statistics will be used for the link grading calculation (implemented in another patch), so store its value in phy_ctxt. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 8a45d69d0f81..13b803101d4b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -106,6 +106,7 @@ struct iwl_mvm_phy_ctxt { /* track for RLC config command */ u32 center_freq1; bool rlc_disabled; + u32 channel_load_by_us; }; struct iwl_mvm_time_event_data { diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index 72df41996464..b1add7942c5b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2012-2014, 2018-2023 Intel Corporation + * Copyright (C) 2012-2014, 2018-2024 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -752,6 +752,19 @@ iwl_mvm_update_tcm_from_stats(struct iwl_mvm *mvm, __le32 *air_time_le, spin_unlock(&mvm->tcm.lock); } +static void iwl_mvm_handle_per_phy_stats(struct iwl_mvm *mvm, + struct iwl_stats_ntfy_per_phy *per_phy) +{ + int i; + + for (i = 0; i < NUM_PHY_CTX; i++) { + if (!mvm->phy_ctxts[i].ref) + continue; + mvm->phy_ctxts[i].channel_load_by_us = + le32_to_cpu(per_phy[i].channel_load_by_us); + } +} + static void iwl_mvm_stats_ver_15(struct iwl_mvm *mvm, struct iwl_statistics_operational_ntfy *stats) @@ -766,6 +779,7 @@ iwl_mvm_stats_ver_15(struct iwl_mvm *mvm, IEEE80211_IFACE_ITER_NORMAL, iwl_mvm_stat_iterator_all_macs, &data); + iwl_mvm_handle_per_phy_stats(mvm, stats->per_phy); } static void @@ -942,6 +956,7 @@ void iwl_mvm_handle_rx_system_oper_stats(struct iwl_mvm *mvm, ieee80211_iterate_stations_atomic(mvm->hw, iwl_mvm_stats_energy_iter, average_energy); + iwl_mvm_handle_per_phy_stats(mvm, stats->per_phy); } void iwl_mvm_handle_rx_system_oper_part1_stats(struct iwl_mvm *mvm, From patchwork Sun Feb 18 17:51: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: 774050 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 1EB356F518 for ; Sun, 18 Feb 2024 17:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278761; cv=none; b=Vd4yQAmZeCl0/J3vZ1gGNmwpdf9w7Ym7JUks13+HIIssXAZPR8ON76mdoZJfcya6fMdFAN+lMll3RmhyMQ2FVgH+S+8d0RsJeDZYpTjr6QLaWkRL/O8LlDpkNnR53z7atrHD60aA+WYKcdDS92JRY1CLllz8WfNvIL3DfQJsYE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708278761; c=relaxed/simple; bh=KSEpyKvAdo5uhi+/DeSgeGGGk4hmuO9GhRr1pE6hQA8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cAMHI296e40SpE1dGHc0ocOLx7ZE7745Ls/7u0CNH9pxbd+6GHYnIvhmS+C5EahqQNbp94i1Xv28aeZjm5S5T0prqkd1zwcjCAzr0rlOngLJ6itLDkjjpGVh/XQhMSs/1RAJ3uVEgdLLu1kbLCPEiZkZ1MUTdMMWR3b2iB9A6MM= 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=hZaT1A1r; arc=none smtp.client-ip=198.175.65.18 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="hZaT1A1r" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708278752; x=1739814752; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KSEpyKvAdo5uhi+/DeSgeGGGk4hmuO9GhRr1pE6hQA8=; b=hZaT1A1rcNL5mypUoxvRXWQQ1f9hxKzjFWM+yFHvCb0PZVCWETNGXRVL c7U8q1SEt1mAQX5noi8kAxuo9qsdGCX8fs8/r1UxrgtelTQ0sCLsovP5J Jp06wf2tH1PkmcTCC7AeeDbfNjyiNVa+5VkRoSl161aIJfxCIcUXEY4ID 0OqFxHB27jkORklTksjdxqhJFyzKUp3Ff7Zhc6OUc84UVhPOBtIXi6i9l 6dQMPpTOftASstxzSGSeVMb62cwuk6UDmHNGDRFD/3eY6EkrfmhKrN3Ry 22Y0Je6cFySEwsVL+HfiPEnMJM0m4c4y33yEbXVaWAizIM/Rhpa+9vh9A A==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="2464994" X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="2464994" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,169,1705392000"; d="scan'208";a="27459461" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2024 09:52:26 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mukesh Sisodiya Subject: [PATCH 11/11] wifi: iwlwifi: load b0 version of ucode for HR1/HR2 Date: Sun, 18 Feb 2024 19:51:52 +0200 Message-Id: <20240218194912.0166f5d2d5d2.I34c1d46aefd70b34c1c75cea67792bc5ec8bc285@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240218175152.3133364-1-miriam.rachel.korenblit@intel.com> References: <20240218175152.3133364-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 load b0 version of ucode for both a0 and b0 step of HR RF. Signed-off-by: Mukesh Sisodiya Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 91e974de0ade..4696d73c8971 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2005-2014, 2018-2023 Intel Corporation + * Copyright (C) 2005-2014, 2018-2024 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -187,6 +187,7 @@ const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf) case IWL_CFG_RF_TYPE_HR1: case IWL_CFG_RF_TYPE_HR2: rf = "hr"; + rf_step = 'b'; break; case IWL_CFG_RF_TYPE_GF: rf = "gf";