From patchwork Wed Dec 20 13:29:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13499005 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (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 44D3A3987A for ; Tue, 19 Dec 2023 19:28:57 +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="QMrbnJxX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703014137; x=1734550137; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hI7LjjysimauNPp7SG57cRxuLO+YIRZhG1B4eNI6360=; b=QMrbnJxXKSr6OccIfVCbDV9nwrKdpaKOAMnlU2vd2WWHeoUNR3L39Xhv RO98JUsHu0a8xS68Uincgw+Rn1RAdE9Hxchvr1/lE9PXvdWpxvrff1m9b Mtu1quEvYn94DSYfYv53oI09Bovp6GEf+KXx+jECiP8KlS9j0mhBk+84G /6mhhaUgu5oDrkqGWeA9lrhRgsjwHl5v2lKY+nHrZ7WRYPzPVsvDte0xC 6fwRXQJjfMm9SQ0prwVmWfcnJzG2QzfJnLjh2Jv14zIhbSpsJFU0b+NZC flfH0tRWHRolVM6pLwaI+7kw6wjJG1tc2ecQxGKm9Hl5hx7SQoUxR4+Z8 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="460054302" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="460054302" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:28:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="899478180" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="899478180" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:28:55 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Luciano Coelho Subject: [PATCH 01/14] iwlwifi: mvm: set siso/mimo chains to 1 in FW SMPS request Date: Wed, 20 Dec 2023 15:29:18 +0200 Message-Id: <20231220152651.7f031f1a127f.Idc816e0f604b07d22a9d5352bc23c445512fad14@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220132931.3314293-1-miriam.rachel.korenblit@intel.com> References: <20231220132931.3314293-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 firmware changed their mind, don't set the chains to zero, instead set them to 1 as we normally would for connections to APs that don't use MIMO. Fixes: 2a7ce54ccc23 ("iwlwifi: mvm: honour firmware SMPS requests") Signed-off-by: Johannes Berg Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c index 4e1fccff3987..334d1f59f6e4 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c @@ -99,17 +99,6 @@ static void iwl_mvm_phy_ctxt_set_rxchain(struct iwl_mvm *mvm, active_cnt = 2; } - /* - * If the firmware requested it, then we know that it supports - * getting zero for the values to indicate "use one, but pick - * which one yourself", which means it can dynamically pick one - * that e.g. has better RSSI. - */ - if (mvm->fw_static_smps_request && active_cnt == 1 && idle_cnt == 1) { - idle_cnt = 0; - active_cnt = 0; - } - *rxchain_info = cpu_to_le32(iwl_mvm_get_valid_rx_ant(mvm) << PHY_RX_CHAIN_VALID_POS); *rxchain_info |= cpu_to_le32(idle_cnt << PHY_RX_CHAIN_CNT_POS); From patchwork Wed Dec 20 13:29:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13499006 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (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 E49B037D3B for ; Tue, 19 Dec 2023 19:29:04 +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="Fjfnlnf3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703014144; x=1734550144; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cmNcMPwLJ9Tv2Ejg2JgR3rVq92AD56HyI4B1TvrJ0NA=; b=Fjfnlnf3XrWSd0K53CWX6+Sqxk1yCMbtmVN1q0tgVfnm2Kgo4mZOvwCc SbImxNjy7cjObUqay0BYo9m/B6F3xh7uwvdxalRddZdHhqOm4N49okTMg CfXCuzl+aPaXPdGtXZeSpJgGwk2NojFPzMKI37Tvh8VpWsLgmFkeOOL3T oC2RlQ2tyDM5PSPXXYYjIJqrAuG9z8JPntDjysy8BCThSrgsdGoVEhXwX Hld2JJZGh7gLR9SepebKSI5mJ3rP3IDaHbhdS8fc99Qy6hXc7/rvYg/hi 5YUIV9aiB2uzF/ogELR6lTqJ0xTL70LLcvayzxW/oS1OQel8sOwvdiBmP A==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="460054319" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="460054319" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="899478202" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="899478202" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:02 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Andrei Otcheretianski , Gregory Greenman Subject: [PATCH 02/14] wifi: iwlwifi: mvm: Allow DFS concurrent operation Date: Wed, 20 Dec 2023 15:29:19 +0200 Message-Id: <20231220152651.dc39b33bf507.I04dfda24d73091fb75701279d10ac400314de488@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220132931.3314293-1-miriam.rachel.korenblit@intel.com> References: <20231220132931.3314293-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: Andrei Otcheretianski AX210 devices allow concurrent P2P operation on DFS channels. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 10 ++++++---- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 480f8edbfd35..1bccbbe9a5ea 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1609,10 +1609,12 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, /* Set the GO concurrent flag only in case that NO_IR is set. * Otherwise it is meaningless */ - if ((nvm_flags & NVM_CHANNEL_GO_CONCURRENT) && - (flags & NL80211_RRF_NO_IR)) - flags |= NL80211_RRF_GO_CONCURRENT; - + if ((nvm_flags & NVM_CHANNEL_GO_CONCURRENT)) { + if (flags & NL80211_RRF_NO_IR) + flags |= NL80211_RRF_GO_CONCURRENT; + if (flags & NL80211_RRF_DFS) + flags |= NL80211_RRF_DFS_CONCURRENT; + } /* * reg_capa is per regulatory domain so apply it for every channel */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index a64600f0ed9f..06de4dc2a915 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -517,6 +517,10 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) hw->wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG | REGULATORY_DISABLE_BEACON_HINTS; + if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) + wiphy_ext_feature_set(hw->wiphy, + NL80211_EXT_FEATURE_DFS_CONCURRENT); + hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH; hw->wiphy->flags |= WIPHY_FLAG_SPLIT_SCAN_6GHZ; From patchwork Wed Dec 20 13:29:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13499007 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (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 B168F39863 for ; Tue, 19 Dec 2023 19:29:09 +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="ZMNy31MJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703014149; x=1734550149; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rJ9nvCvCt7K3nnU32QnO41c+vE1B9XBM9esHMzGIqJA=; b=ZMNy31MJJmPgV6+yR4ZzsURSwGsrrf6Dylrnp1k7uVyhb0UDe9Q6dF5T oeNI1yrc4/1ZMxf9GUrQgGKGP21Jbc+odsKHeND4EzrEYTZWj+Mb+SBdx uyOQL3nI6N9y77cnHidG7JRfkz92TL98vXDyvlO4nBb5G+kz1vhmBIdtm yk5CWQHHVp3d1t+widqiazjjEjiEHrRvjW2LnfaUnmZ+7UfxujNnSzmoq CazNLgGDkYB+LxxAOu8k8qnrRnoXTAjJepLjnVhtKyrqomM5YQqcUddNj pkHdg6pNA/4ZCFHqHvhNM40OxMnDQkoUdA9oHc+8OjAducGBiLh/yjhYh w==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="460054330" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="460054330" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="899478215" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="899478215" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:07 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Andrei Otcheretianski , Gregory Greenman Subject: [PATCH 03/14] wifi: iwlwifi: Don't mark DFS channels as NO-IR Date: Wed, 20 Dec 2023 15:29:20 +0200 Message-Id: <20231220152651.94cd9b96a532.Ifb0e8d8a6a6384493758f26b811d58432536101a@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220132931.3314293-1-miriam.rachel.korenblit@intel.com> References: <20231220132931.3314293-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: Andrei Otcheretianski The NVM_CHANNEL_ACTIVE bit means that active scanning/beaconing is allowed, however it's not an exact opposite of IEEE80211_CHAN_NO_IR. For example, NVM_CHANNEL_ACTIVE bit is not set on DFS channels, while cfg80211 doesn't really expect NO-IR on DFS channels. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 1bccbbe9a5ea..402896988686 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1612,8 +1612,13 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, if ((nvm_flags & NVM_CHANNEL_GO_CONCURRENT)) { if (flags & NL80211_RRF_NO_IR) flags |= NL80211_RRF_GO_CONCURRENT; - if (flags & NL80211_RRF_DFS) + if (flags & NL80211_RRF_DFS) { flags |= NL80211_RRF_DFS_CONCURRENT; + /* Our device doesn't set active bit for DFS channels + * however, once marked as DFS no-ir is not needed. + */ + flags &= ~NL80211_RRF_NO_IR; + } } /* * reg_capa is per regulatory domain so apply it for every channel From patchwork Wed Dec 20 13:29:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13499008 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (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 EB24939ADE for ; Tue, 19 Dec 2023 19:29:14 +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="elYqaMHJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703014154; x=1734550154; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IMZpO0Fm4jJ25sjYRDB2ovqMAPpcckyo28/Rr71FIBo=; b=elYqaMHJMiJbfYLhbFj4xx7/ju3ufmbPc/WwByMnu6aEWZLuEmvlSba6 3WM+a7ODAyvREQ4ZDFW24UsKnVHrcYXjnBopgzdCyVMaINpG8kaBQ3FvK 3wERK2+bYAFsFl8A38U6x46ftk3bgvlo4+B4RQDXzz8RIEGm/EWmoz0Ik az/ciMACfiW+VU0dKNBbOtgvS2AKfNCYbVWyTAmNm7Do/Xd2XwdJ5rl1t Ku4kyUtOrTVz9FIskN76o/07sjYAuw/AYg48SguNH7CaL7WTyuKFNJ7GV uj5COscLTumoqSErN+6yTwV7c034PNIu5b0H2xnlyoSEYDrmCLOZD5eDS A==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="460054341" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="460054341" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="899478232" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="899478232" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:11 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 04/14] wifi: iwlwifi: mvm: send TX path flush in rfkill Date: Wed, 20 Dec 2023 15:29:21 +0200 Message-Id: <20231220152651.c528a6fa6cec.Ibe5e9560359ccc0fba60c35e01de285c376748a2@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220132931.3314293-1-miriam.rachel.korenblit@intel.com> References: <20231220132931.3314293-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 we want to drop packets, that's surely a good thing to do when we want to enter rfkill. Send this command despite rfkill so we can successfully clean up everything, we need to handle it separately since it has CMD_WANT_SKB, so it's not going to automatically return success when in rfkill. Fixes: d4e3a341b87b ("iwlwifi: mvm: add support for new flush queue response") Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index ae5cd13cd6dd..db986bfc4dc3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -2256,7 +2256,7 @@ int iwl_mvm_flush_sta_tids(struct iwl_mvm *mvm, u32 sta_id, u16 tids) WARN_ON(!iwl_mvm_has_new_tx_api(mvm)); if (iwl_fw_lookup_notif_ver(mvm->fw, LONG_GROUP, TXPATH_FLUSH, 0) > 0) - cmd.flags |= CMD_WANT_SKB; + cmd.flags |= CMD_WANT_SKB | CMD_SEND_IN_RFKILL; IWL_DEBUG_TX_QUEUES(mvm, "flush for sta id %d tid mask 0x%x\n", sta_id, tids); From patchwork Wed Dec 20 13:29:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13499009 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (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 059AE39AC1 for ; Tue, 19 Dec 2023 19:29:16 +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="PK1LxT7z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703014156; x=1734550156; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ezcOkpBExqJCuyt2yqB1mPY18Yxi/dTyAbByExCocrc=; b=PK1LxT7ze5RKJ5tv8g+o7I1CakChR3ucDbSlYHLyxTmA6wj1193EAeYi m6djxPn1W6fROlwwQ72tWDAIn3jVf5fLv50b/wcYdafEYB9UQrgtTMUjy qfkMThWf6WFEahSuLER7oGBimVFU3J9I+MVIL9JgUNDqJatrsrC8fvh0d bPLb9yyaE+kNdSjYAEmEzz5ww0foyakSPZlqw2ubJ6OGOlklB1vuSSZ5a eUkxsFfa4KAc0uxpw6LPRswghXLLuY/ZpcFG8VoC1AxCD2MgUsFqTkBy4 eJjqfKraFTsn7uxIRYb+bHr0n1C2Jk7AjkgQW12YRHQfZGf6S49w1etYN w==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="460054354" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="460054354" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="899478246" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="899478246" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:13 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 05/14] wifi: iwlwifi: mvm: d3: avoid intermediate/early mutex unlock Date: Wed, 20 Dec 2023 15:29:22 +0200 Message-Id: <20231220152651.1f2f5289ecc6.I7e3b8e806b6d50e88ba0c26767da8261806eb9c7@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220132931.3314293-1-miriam.rachel.korenblit@intel.com> References: <20231220132931.3314293-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 Now with the mac80211 locking model changed, we no longer can cause any bad dependencies here between mvm->mutex and other mutexes in mac80211, so we no longer need to drop the mutex early or even temporarily. Clean this up. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 92c45571bd69..4582afb149d7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -1130,14 +1130,7 @@ iwl_mvm_wowlan_config(struct iwl_mvm *mvm, return ret; } - /* - * This needs to be unlocked due to lock ordering - * constraints. Since we're in the suspend path - * that isn't really a problem though. - */ - mutex_unlock(&mvm->mutex); ret = iwl_mvm_wowlan_config_key_params(mvm, vif); - mutex_lock(&mvm->mutex); if (ret) return ret; @@ -2497,7 +2490,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm, struct iwl_wowlan_status_data *status) { int i; - bool keep; + bool keep = false; struct iwl_mvm_sta *mvm_ap_sta; if (!status) @@ -2525,18 +2518,12 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm, mvm_ap_sta->tid_data[i].seq_number >> 4); } - /* now we have all the data we need, unlock to avoid mac80211 issues */ - mutex_unlock(&mvm->mutex); - iwl_mvm_report_wakeup_reasons(mvm, vif, status); keep = iwl_mvm_setup_connection_keep(mvm, vif, status); - - return keep; - out_unlock: mutex_unlock(&mvm->mutex); - return false; + return keep; } #define ND_QUERY_BUF_LEN (sizeof(struct iwl_scan_offload_profile_match) * \ From patchwork Wed Dec 20 13:29:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13499010 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (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 69FFB39AE6 for ; Tue, 19 Dec 2023 19:29:18 +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="W+3Zy9O3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703014158; x=1734550158; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=baMBgVm83ShQXDitTeGEVkbYVm7UC+cjXvo7N5jWa2U=; b=W+3Zy9O3xgJD0I8jO1yQEHUeD3JW0ZF0sFEpCyQ2ZGXAQULIsvYDNCBW NZuCAbDeMAl98SI1/oifrTjHWtS2Hiq3HAx9gCNCxiZzK7cQCvS/8/aD0 hUL+hlsTBX+vnWA8FpRw+nQb2iULWv3I9Kl7CUb2JRvo/1BPLV5FpCTn8 HSL67D3k8sdf89bDw3uL8MlhiCJAyk0Zb85j9cmIPoOuzD7eFpVJDfOfH aCN8ww782ripFIrJ7i58b2UZp5BTbdJ5wGoK1VNjdRaGd63ox3uXCOC4a EOva/KdQnDxTnxALPejEaPXSnhIEdu4VzRoBI8H/dPjhje154NlaDvb/o Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="460054363" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="460054363" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="899478251" X-IronPort-AV: E=Sophos;i="6.04,289,1695711600"; d="scan'208";a="899478251" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 11:29:16 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 06/14] wifi: iwlwifi: mvm: Do not warn if valid link pair was not found Date: Wed, 20 Dec 2023 15:29:23 +0200 Message-Id: <20231220152651.142e57a05230.I7cfe78c94c3d15c4c744bccadd8f187e43594932@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220132931.3314293-1-miriam.rachel.korenblit@intel.com> References: <20231220132931.3314293-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 It is possible that though multiple links are enabled we cannot enabled EMLSR enable more than a single link, e.g., all valid links are on the same band etc. Thus, do not warn in case no valid link pair is found. Fixes: b9be67fb4207 ("wifi: iwlwifi: mvm: Add basic link selection logic") Signed-off-by: Ilan Peer Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index ff6cb064051b..8e263acbc763 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -716,7 +716,7 @@ void iwl_mvm_mld_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif, } } - if (WARN_ON(!new_active_links)) + if (!new_active_links) return; if (vif->active_links != new_active_links)