From patchwork Tue Dec 19 19:58:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 756365 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) (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 8B5DC3A269 for ; Tue, 19 Dec 2023 19:59:44 +0000 (UTC) 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="D+sFep/D" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703015984; x=1734551984; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cG2KThKpx7ORRAAFsSIojFKsUEmo0o1OaQhA4bjJMlw=; b=D+sFep/D5d776uzzJpwWbI/LlREsE/VSz089hsq01WztXfU2zE9Lufkq WJ7B5waoa1jzCSJ0R10DHymFw2NGcnOeqW70O+4bPdxhKuJ5T7JaUglav 786LOIKZazFQyrff2DLUsMhZfMIYqa8w9/UXz3V4ZQWHSkYbUulnaQa7J DiOiiKy1v174fK2mdfAqh20P3+i/0d+xELdZ+Xt67vKHKfTfgDVsMi2js /T5dwnpntiBHpxx99fS2LZHMmXgzIK/PfHzwyfN1IwKQM+xiMGH0cmhnZ W6yJvR586ZtisYx0qXhDOXJjqvHO6+PgIfG/IlNLNuQnmxCO8VHf3f2Gt g==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="380694959" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="380694959" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:59:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="779589117" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="779589117" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:59:41 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Gregory Greenman Subject: [PATCH 08/14] wifi: iwlwifi: assign phy_ctxt before eSR activation Date: Tue, 19 Dec 2023 21:58:56 +0200 Message-Id: <20231219215605.3d94507f5d9a.I537fcd73aedf94c7348c03157e486f24301fef14@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231219195902.3336105-1-miriam.rachel.korenblit@intel.com> References: <20231219195902.3336105-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 eSR is activated when a chanctx is assigned to more than one link. During eSR activation we should disable RLC for both phys, and configure the FW with a special phy command for both phys. Currently we assign the phy_ctxt to the link only after eSR activation, so RLC is not disabled for the new phy_ctxt, and a cmd is not sent to FW. Fix this by first assigning the new phy_ctxt to the link and then doing the eSR activation. Fixes: 12bacfc2c065 ("wifi: iwlwifi: handle eSR transitions") Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 8e263acbc763..61170173f917 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -271,17 +271,17 @@ __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm, } } + mvmvif->link[link_id]->phy_ctxt = phy_ctxt; + if (iwl_mvm_is_esr_supported(mvm->fwrt.trans) && n_active > 1) { mvmvif->link[link_id]->listen_lmac = true; ret = iwl_mvm_esr_mode_active(mvm, vif); if (ret) { IWL_ERR(mvm, "failed to activate ESR mode (%d)\n", ret); - return ret; + goto out; } } - mvmvif->link[link_id]->phy_ctxt = phy_ctxt; - if (switching_chanctx) { /* reactivate if we turned this off during channel switch */ if (vif->type == NL80211_IFTYPE_AP)