From patchwork Wed Mar 20 21:26:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598184 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 2D9F14F8B2 for ; Wed, 20 Mar 2024 21:26:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970015; cv=none; b=TaIBN1usf10n5H6u4f1gGj4gaVupyJLPbmYl66kxNJztCYTGbkMUscJetIkUGE/iXmpUSxkd7ERBTLMM1daA/qVWYH3MPPe5emDogUjlXfIQRdP3C6Ek56M6H1dKe5Dv2YvnnOKNbBuOsbK1uX7eshRDkepvSoZVSKukRj5WleQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970015; c=relaxed/simple; bh=cQ0tn1VSVEDeu3c9NixN8rumlAm3gOClS9Xb5cSGPc8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PpRj1lu9OTw02KlsUcjf4H14cgnuQvD7LuVpwczEUP5B/UHmDGTOJTRRAdSPRt4QukEn+6zx5Vh0lJF8TOAzGCqtarwz3yjPoNkyydjEaFJRylbOVB0rlmVejvguDD5W3pBu6rA67uT1BzcO4YGBTBwpaedOVfzs6uL4l+/FXWU= 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=Mmy2+lSD; arc=none smtp.client-ip=192.198.163.12 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="Mmy2+lSD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970013; x=1742506013; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cQ0tn1VSVEDeu3c9NixN8rumlAm3gOClS9Xb5cSGPc8=; b=Mmy2+lSDpECH7cU7Y6M6SM+wnv8stulOgGey4C2tq2ukmUVDUmX27jta 3syFeJJ2XuyVzxBpl/b7BorOVCwPgpgHeDiz94QXJM/pIOaH3xp4Q8RwV y9VfPAhxyp3MIvYgICilOYqd0SI5pq/PyhMPf4BQryFBRlf+SPzm8fSAF BIyr9gBRDj8MLjiOxEWVRSlWTksyoY1kE8j4lARqXy3jiGOXImyNW/zTf QKadOcp+a2H7jVh4CzgeWOZaOxHz02/rA3znoD93L8VUGv2slWd7Kuv90 6/OzZRwmvNrWRlJY3/+uOO3TNkQpLr9YxvW8uZbNlnCiFon2GrJogOZwH g==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698039" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698039" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184099" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:49 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Emmanuel Grumbach , Johannes Berg Subject: [PATCH 01/17] wifi: iwlwifi: mvm: include link ID when releasing frames Date: Wed, 20 Mar 2024 23:26:22 +0200 Message-Id: <20240320232419.bbbd5e9bfe80.Iec1bf5c884e371f7bc5ea2534ed9ea8d3f2c0bf6@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 When releasing frames from the reorder buffer, the link ID was not included in the RX status information. This subsequently led mac80211 to drop the frame. Change it so that the link information is set immediately when possible so that it doesn't not need to be filled in anymore when submitting the frame to mac80211. Fixes: b8a85a1d42d7 ("wifi: iwlwifi: mvm: rxmq: report link ID to mac80211") Signed-off-by: Benjamin Berg Tested-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 1484eaedf452..ce8d83c771a7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -236,21 +236,13 @@ static void iwl_mvm_add_rtap_sniffer_config(struct iwl_mvm *mvm, static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm, struct napi_struct *napi, struct sk_buff *skb, int queue, - struct ieee80211_sta *sta, - struct ieee80211_link_sta *link_sta) + struct ieee80211_sta *sta) { if (unlikely(iwl_mvm_check_pn(mvm, skb, queue, sta))) { kfree_skb(skb); return; } - if (sta && sta->valid_links && link_sta) { - struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb); - - rx_status->link_valid = 1; - rx_status->link_id = link_sta->link_id; - } - ieee80211_rx_napi(mvm->hw, sta, skb, napi); } @@ -588,7 +580,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm, while ((skb = __skb_dequeue(skb_list))) { iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, reorder_buf->queue, - sta, NULL /* FIXME */); + sta); reorder_buf->num_stored--; } } @@ -2213,6 +2205,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, if (IS_ERR(sta)) sta = NULL; link_sta = rcu_dereference(mvm->fw_id_to_link_sta[id]); + + if (sta && sta->valid_links && link_sta) { + rx_status->link_valid = 1; + rx_status->link_id = link_sta->link_id; + } } } else if (!is_multicast_ether_addr(hdr->addr2)) { /* @@ -2356,8 +2353,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, !(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME)) rx_status->flag |= RX_FLAG_AMSDU_MORE; - iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta, - link_sta); + iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta); } out: rcu_read_unlock(); From patchwork Wed Mar 20 21:26:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598185 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 465FD85951 for ; Wed, 20 Mar 2024 21:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970016; cv=none; b=uKG4nWih37Aq29XaYrt7UtxaLA7mxKko0kiJ12BEBS9uglUDPeJoLdT49yodK19W6UxXDFe7xqU6fu6evP+Ny4hUhjrrgDlJ9Cdlv0kY6Llt2sZBMCbGHJ491l9XRACyf7jHUfXHoQMrsuzQh3d0dMEdEOcyM+YkN7xc5zUPSTU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970016; c=relaxed/simple; bh=YloJ0yHJlIYA83FFwU+9/5UNVyNTxXfBF5MfL/9MX3M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dLLTYNuU7toGFFZbRr1gtaZlDqo0+kgEh2De8CetcE2kyoGAKPT5Jj4kUMI9j+UcJ+MjgCq7hc2vrFMD76G/agWTdHd/vTnQSnnH6HRP16AX+w1+BENaOZRVaeEk2BzLYYq3Vn2cqq+WrmPk7D1GsFRS51ZUEDuDy/XwEpz3EtU= 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=LezqsAJi; arc=none smtp.client-ip=192.198.163.12 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="LezqsAJi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970014; x=1742506014; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YloJ0yHJlIYA83FFwU+9/5UNVyNTxXfBF5MfL/9MX3M=; b=LezqsAJip+BTj4S714/4lICOwH5RY1+HtsmkrGlIwgi1m9tYZNP58FkK TtiYpK6D+/yzTeoBMe+/lf4c3xc3smhkdPmiyQ+iOxywarKGBpfjeFG89 dDW+9QK9DHUtNdi+4vqK6NH/LSF7cXuMqFz7B24/l/DP6WeQH1xJpLl4x KlXWjflFsBGI20pY4rvI7EcmrSMzpKaVWDom27buexnG0dlhNZpjKUbPI TPX6huKb6ZaFZAJc71s3h3DRRQ0HVFuDeeSyQ6QH9MkFCX0U6qjx+vfa7 qtoH+O5yawT1inXgP+7f1UbzV35nWrB1WkukEn+/qJ33/c1cwWgjdroTq Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698045" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698045" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184108" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:52 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg Subject: [PATCH 02/17] wifi: iwlwifi: mvm: guard against invalid STA ID on removal Date: Wed, 20 Mar 2024 23:26:23 +0200 Message-Id: <20240320232419.d523167bda9c.I1cffd86363805bf86a95d8bdfd4b438bb54baddc@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 Guard against invalid station IDs in iwl_mvm_mld_rm_sta_id as that would result in out-of-bounds array accesses. This prevents issues should the driver get into a bad state during error handling. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 6f9ba0c18fa3..4ba1599ed71c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -855,10 +855,15 @@ int iwl_mvm_mld_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id) { - int ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id); + int ret; lockdep_assert_held(&mvm->mutex); + if (WARN_ON(sta_id == IWL_MVM_INVALID_STA)) + return 0; + + ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id); + RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL); RCU_INIT_POINTER(mvm->fw_id_to_link_sta[sta_id], NULL); return ret; From patchwork Wed Mar 20 21:26:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598186 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 A963885C46 for ; Wed, 20 Mar 2024 21:26:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970017; cv=none; b=M+zuFOnZkx+W3WN0siygXex1RkwWH/BnhO4XvNnlozZvCuHUYRGJxe2iH51cL0qpurlxm+v5H7FFkvljFAqalNYmjExVo0EeyhJ/9QCOm4HiyH1fHiBdeawOgDNTmD0w1ohBvdqrsME2JYjbBpIrc3vY6XWEcNSt9Y16TqNB4jI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970017; c=relaxed/simple; bh=avv9ud8dXx0F1ls+X/6l7JwporMnyHH2oqTnQisLuPg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YkG84dxGx8tiuzXcPPnWSDNQXV8rDwOiz4Nieo4eYhoa1KuqNKOb9gg1QLrKxxW+RlxP7iMHdaYUqJqSooSgNBF2rV/H+AeOkTvUlmmKe9OVbogAGh6Sc/EzieEdPVBe+6k15PIQYzwrhreAJKf2iOX9mcoWaD0Krxp0LsAW6r4= 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=ee1NblPc; arc=none smtp.client-ip=192.198.163.12 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="ee1NblPc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970015; x=1742506015; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=avv9ud8dXx0F1ls+X/6l7JwporMnyHH2oqTnQisLuPg=; b=ee1NblPc3SRy0tsX+Afu4F/9fiITnP3N3B+lbmW/dqc6v0DCO9089o6q PJFxJ5F7LfEsTzzcmlPc8cxFvrVIlOXnCqgeCEm9UBPxXuBRBG1xJJ4w8 XiAM7CHYzj2BzmWciHROc+P9T6GbZU5KG6d9/Gn7bYPfnDU2QXTDtZyUI d4hclaSMxXGsQfRlXuuQNDaPirr0VDiveV2yF8wt+/kMCg1I7O8ds/3eq TxTvBdXoeRzqQHKtqPj0BbLoDStOSGTSFNqykWJDgUvSJUG9ZSfeXxcxt kfQ2fIa1kKL9asR1P9klMyGBNT8RvmVBXuiCNO2KJ6+LZHPUk2QZaN5h+ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698053" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698053" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184116" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:54 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Johannes Berg Subject: [PATCH 03/17] wifi: iwlwifi: mvm: assign link STA ID lookups during restart Date: Wed, 20 Mar 2024 23:26:24 +0200 Message-Id: <20240320232419.4a3273e5c6be.I7cb6cf096ab135f4b489f2806b116563624aa5ee@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 When restarting the HW, mac80211 first adds the STA back with only one link enabled. This means that iwl_mvm_alloc_sta_after_restart will not see the other links and will not do the assignment. As such, do the assignment when mac80211 is activating the link for the station. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 4ba1599ed71c..94a01c0f261a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -1122,10 +1122,21 @@ int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm, } if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { - if (WARN_ON(!mvm_sta->link[link_id])) { + struct iwl_mvm_link_sta *mvm_link_sta = + rcu_dereference_protected(mvm_sta->link[link_id], + lockdep_is_held(&mvm->mutex)); + u32 sta_id; + + if (WARN_ON(!mvm_link_sta)) { ret = -EINVAL; goto err; } + + sta_id = mvm_link_sta->sta_id; + + rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); + rcu_assign_pointer(mvm->fw_id_to_link_sta[sta_id], + link_sta); } else { if (WARN_ON(mvm_sta->link[link_id])) { ret = -EINVAL; From patchwork Wed Mar 20 21:26:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598187 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 55B3D85C7A for ; Wed, 20 Mar 2024 21:26:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970020; cv=none; b=FXmXDdVmRlzmGTSQxj4f7GXptL5jg2Riw0e1ufmtizrto9u4n7zdH36DKGNCp5XfBJsFga6RP7LMv5cg2DoOzW/NaoiX4wIvxQPhoXI6sEC139HvWwq4spYGIadQcqJW7j7YowzUrRSKrZXzTgYR0zHjtbzdQt+2w2W7xbrxoBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970020; c=relaxed/simple; bh=fcJ8CrsPRAVXFoZQOM98OWVdso0c02n6BbLCezAtY1c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=n/RJwbtdW7WWz+h92OVtMwJoqLXCLwNXlqmJaMt8FWR3fVzbhahl8/X3pGqw5GqSq1jWVIQSFCa3QYhu62pbyxJ23PgO4cTizYFz9cg/xVTMJ9RIPAX8wD0P9cP0xY8UDUdD+He5u3YaeXSYgFCQGPxpnSi2zMWqRVxc30UBSGE= 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=I1RXqf8n; arc=none smtp.client-ip=192.198.163.12 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="I1RXqf8n" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970018; x=1742506018; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fcJ8CrsPRAVXFoZQOM98OWVdso0c02n6BbLCezAtY1c=; b=I1RXqf8nULGK7U0cnGKrPOboKdCzUAkLmGE0k9S4A6rWWWtiSP4tnWJf MiS+HvR4i0G3UGbN7wUx+xPlVQit/cJL74oDbFwkeSxWbW17GqK6zZYsZ F0jRv1Oz9jRp/9KvBZ46dCB9VsID9OBWWJkimdq/b4m3Q3xBm3EC6Q8D+ UMt1LaQQH6JURzbiJvgj6VY5xqglLPAHVUeqRIPuDJUdJMiTaYq+Pm67X GybsXj6v4lEO689+szCgTMrzLHgdpcYh9mIXTGWRrojHq9HvYz/g+zc0x cVYvUi1WrAWyGoFIe/vFmWj8m8mWqrPBkNRjDIrVEEwLoEnEKgZYuz2vJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698057" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698057" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184120" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:56 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Johannes Berg Subject: [PATCH 04/17] wifi: iwlwifi: mvm: fix active link counting during recovery Date: Wed, 20 Mar 2024 23:26:25 +0200 Message-Id: <20240320232419.55f37339e7d1.I57006568a90ffb7a1232def1b2f3264dea711ba6@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 During recovery, the chanctx_conf in mac80211 is still non-NULL even though the channel context has not yet been assigned again. In that case, the real count is actually lower. Switch to instead count the phy_ctx assignment and ensure that the assignment is cleared at the start of recovery. Fixes: 12bacfc2c065 ("wifi: iwlwifi: handle eSR transitions") Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- .../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 084314bf6f36..d18304ac126c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -189,17 +189,13 @@ static void iwl_mvm_mld_mac_remove_interface(struct ieee80211_hw *hw, mutex_unlock(&mvm->mutex); } -static unsigned int iwl_mvm_mld_count_active_links(struct ieee80211_vif *vif) +static unsigned int iwl_mvm_mld_count_active_links(struct iwl_mvm_vif *mvmvif) { unsigned int n_active = 0; int i; for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) { - struct ieee80211_bss_conf *link_conf; - - link_conf = link_conf_dereference_protected(vif, i); - if (link_conf && - rcu_access_pointer(link_conf->chanctx_conf)) + if (mvmvif->link[i] && mvmvif->link[i]->phy_ctxt) n_active++; } @@ -245,18 +241,18 @@ __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm, { u16 *phy_ctxt_id = (u16 *)ctx->drv_priv; struct iwl_mvm_phy_ctxt *phy_ctxt = &mvm->phy_ctxts[*phy_ctxt_id]; - unsigned int n_active = iwl_mvm_mld_count_active_links(vif); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); + unsigned int n_active = iwl_mvm_mld_count_active_links(mvmvif); unsigned int link_id = link_conf->link_id; int ret; - /* if the assigned one was not counted yet, count it now */ - if (!rcu_access_pointer(link_conf->chanctx_conf)) - n_active++; - if (WARN_ON_ONCE(!mvmvif->link[link_id])) return -EINVAL; + /* if the assigned one was not counted yet, count it now */ + if (!mvmvif->link[link_id]->phy_ctxt) + n_active++; + /* mac parameters such as HE support can change at this stage * For sta, need first to configure correct state from drv_sta_state * and only after that update mac config. @@ -416,7 +412,7 @@ __iwl_mvm_mld_unassign_vif_chanctx(struct iwl_mvm *mvm, { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); - unsigned int n_active = iwl_mvm_mld_count_active_links(vif); + unsigned int n_active = iwl_mvm_mld_count_active_links(mvmvif); unsigned int link_id = link_conf->link_id; /* shouldn't happen, but verify link_id is valid before accessing */ From patchwork Wed Mar 20 21:26:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598188 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 2BA6985C46 for ; Wed, 20 Mar 2024 21:27:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970021; cv=none; b=eUIIj11/XQchn+c3zvj2WguqiIQeh++zH1BMScXiO3WN3UsDSc/zbATdFHFKmF5+KYouy95/Fl0SQPFz7r9DgxI91n9f6zNb52/XT9Nn1oNvJPnQIJ6XGlKIhQD7RIucDd57346obLzAXfP80uv++SFPx1vmLMwAm2ytY0RGtbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970021; c=relaxed/simple; bh=4FCbGYFitIKkLyOeNfJiWXvDliIC1hijxy0WtQlr6Ys=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mZ7+xGlOs25AOXbyTCUI0ug190HOFnMvNRh1x0u1VLA/o+R3sqkvtjw8N0EXRg1Tv0nxWq0vIgZ47yBsugyZ+ujhdWAU7rtf9u6xdXFGwx/0S3tUSdSx+td44hou09QPc5zfSgZgYTLtXpEq78V/7eeGumHY/EsknNNhsNLX1Ak= 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=daJ3RC11; arc=none smtp.client-ip=192.198.163.12 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="daJ3RC11" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970020; x=1742506020; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4FCbGYFitIKkLyOeNfJiWXvDliIC1hijxy0WtQlr6Ys=; b=daJ3RC11Rj6HIp6bXqgL484re/tlk8x1gPUgeQP014wilpg/EkoReyNr zdpMQw2i+V6if9pLYgdNjJYVlEaLHD+MsvafyXxsYi1H6cdaqk80RYUG7 i10cANxSLl+SPE/UsYyOREiPr+GIVpe2VOzTBYk7PlJjQdFM+x5CzfLxf 6hzi+M+ZM5EAekmVuIzM9Na87mH+80bvwHMDuxaSleLgb74Uhiujfwxu4 ZHlzPiMza9Yiuhn/7JGThUUA6yIsVJ8omSFUlYE8M8XwzqUs9sxYRjS7/ 573hPsg1bVybu+JcMWhH/NC/+qAIRHoxh+8SRi0OX04fBhtLrXH6mK05H Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698062" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698062" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184128" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:26:58 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Johannes Berg Subject: [PATCH 05/17] wifi: iwlwifi: mvm: mark EMLSR disabled in cleanup iterator Date: Wed, 20 Mar 2024 23:26:26 +0200 Message-Id: <20240320232419.71eb622d6ce3.Ic4d50695b9bb332190dc712473096083aa96074b@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 During HW restart only one link will be active initially and other links are only activated again later on. With only a single link EMLSR cannot be enabled and having it marked enabled confuses the internal state. Mark EMLSR as disabled in the cleanup iterator, it can be reenabled later one once this is possible. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 964871f31c73..448b43d73625 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1108,6 +1108,9 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac, mvmvif->ba_enabled = false; mvmvif->ap_sta = NULL; + mvmvif->esr_active = false; + vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE; + for_each_mvm_vif_valid_link(mvmvif, link_id) { mvmvif->link[link_id]->ap_sta_id = IWL_MVM_INVALID_STA; mvmvif->link[link_id]->fw_link_id = IWL_MVM_FW_LINK_ID_INVALID; From patchwork Wed Mar 20 21:26:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598190 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 D49FE8613B for ; Wed, 20 Mar 2024 21:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970026; cv=none; b=Hl8JtCzp9jTaVFSM++phyaO2ZTMoT5PAUwIxc7Rp23p6tVt59KEKPZ7HDn8qqVM2Jp3ZQATXCK39XFgP/aiu8YMigl/2ZvdSWQ610XBUn2we0+u4K91bgdi3OLEF5IJetnxVlR+OFFJ7v3bAxbbVOHU5Mx0mHMeNcp6lRoTUq70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970026; c=relaxed/simple; bh=eKPpc4fkC7pSa4FVrpRGRWPnVe/nMvd+mpKIHaC68Os=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=huuXkkTqzTGbdcp/kKnbUFmc2Nh61Fva0iG+1rLen/P3r4VtjBIWiig097Lwb9kwEi9EqugIQHSeCmqv9aL2NP66hErtju7/YUYENs/BrgZim6gAYLkPsq0zKcAi8On0EwwMPp+TSp6IPaqn7P+XPx7F9DuGlEAtpm+m73lwcnY= 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=OZ1FpEku; arc=none smtp.client-ip=192.198.163.12 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="OZ1FpEku" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970023; x=1742506023; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eKPpc4fkC7pSa4FVrpRGRWPnVe/nMvd+mpKIHaC68Os=; b=OZ1FpEkuCfmyVyrS4m/14nfwmtYRjvyf53MMJz+B5UzzASxAeWnJ8Dl7 TXaiGo8ywAPqqYs03zdNWrwzIchQJ7DUZEaOn8aOj1XIUa/PDT30zadxY BYCS68Z6q2hEltFclC5U+9NU5fFacrSOlCjmmzONu4RY1HYG5lVvLqzSH 6umctD549UsBRpFxw66GlAklCwDfyq2/WFJVLlnry+gr7agIfTa1/Y+V6 FyDpTGTf/PyQgSsOEbvyNO85wRlXUhK4kh1oYbWtLplHGpRuYVJrLfePO lvqemhmkk64rlUtCEkw+h4/rhfchcbjUyTBNhAyR4bJw4IplQpFamirf6 A==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698072" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698072" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184139" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:01 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 06/17] wifi: iwlwifi: remove devices that never came out Date: Wed, 20 Mar 2024 23:26:27 +0200 Message-Id: <20240320232419.b3715c0d4bdd.I1337ed9c3edbec4ea9ff7e8a8b02410d5e69bf74@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/iwl-config.h | 2 -- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 6 ----- .../wireless/intel/iwlwifi/iwl-nvm-parse.c | 2 -- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 4 +-- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 26 ------------------- 5 files changed, 1 insertion(+), 39 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index f1e7b15458c1..9baa6b2c37db 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -430,8 +430,6 @@ struct iwl_cfg { #define IWL_CFG_RF_TYPE_HR2 0x10A #define IWL_CFG_RF_TYPE_HR1 0x10C #define IWL_CFG_RF_TYPE_GF 0x10D -#define IWL_CFG_RF_TYPE_MR 0x110 -#define IWL_CFG_RF_TYPE_MS 0x111 #define IWL_CFG_RF_TYPE_FM 0x112 #define IWL_CFG_RF_TYPE_WH 0x113 diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 4696d73c8971..ec756e50091d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -192,12 +192,6 @@ const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf) case IWL_CFG_RF_TYPE_GF: rf = "gf"; break; - case IWL_CFG_RF_TYPE_MR: - rf = "mr"; - break; - case IWL_CFG_RF_TYPE_MS: - rf = "ms"; - break; case IWL_CFG_RF_TYPE_FM: rf = "fm"; break; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 9a8d2b69f154..03ff6ee546ce 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1025,8 +1025,6 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans, switch (CSR_HW_RFID_TYPE(trans->hw_rf_id)) { case IWL_CFG_RF_TYPE_GF: - case IWL_CFG_RF_TYPE_MR: - case IWL_CFG_RF_TYPE_MS: case IWL_CFG_RF_TYPE_FM: case IWL_CFG_RF_TYPE_WH: iftype_data->he_cap.he_cap_elem.phy_cap_info[9] |= diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h index a7d44df06eab..8df6ec12b74e 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h @@ -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 Intel Deutschland GmbH */ @@ -453,8 +453,6 @@ enum { #define REG_CRF_ID_TYPE_HR_NONE_CDB_1X1 0x501 #define REG_CRF_ID_TYPE_HR_NONE_CDB_CCP 0x532 #define REG_CRF_ID_TYPE_GF 0x410 -#define REG_CRF_ID_TYPE_GF_TC 0xF08 -#define REG_CRF_ID_TYPE_MR 0x810 #define REG_CRF_ID_TYPE_FM 0x910 #define REG_CRF_ID_TYPE_FMI 0x930 #define REG_CRF_ID_TYPE_FMR 0x900 diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 4cf811afdfa5..75e5177cf140 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -944,11 +944,6 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, iwl_cfg_ma, iwl_ax211_name), - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY, - IWL_CFG_RF_TYPE_MR, IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB, - iwl_cfg_ma, iwl_ax221_name), _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY, IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, @@ -1100,24 +1095,6 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { IWL_CFG_NO_160, IWL_CFG_CORES_BT, IWL_CFG_NO_CDB, iwlax210_2ax_cfg_so_jf_b0, iwl9462_name), -/* MsP */ -/* For now we use the same FW as MR, but this will change in the future. */ - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_MAC_TYPE_SO, IWL_CFG_ANY, - IWL_CFG_RF_TYPE_MS, IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, - iwl_cfg_so_a0_ms_a0, iwl_ax204_name), - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_MAC_TYPE_SOF, IWL_CFG_ANY, - IWL_CFG_RF_TYPE_MS, IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, - iwl_cfg_so_a0_ms_a0, iwl_ax204_name), - _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY, - IWL_CFG_RF_TYPE_MS, IWL_CFG_ANY, IWL_CFG_ANY, - IWL_CFG_160, IWL_CFG_ANY, IWL_CFG_NO_CDB, - iwl_cfg_ma, iwl_ax204_name), - /* Sc */ _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY, @@ -1224,9 +1201,6 @@ static int map_crf_id(struct iwl_trans *iwl_trans) case REG_CRF_ID_TYPE_GF: iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_GF << 12); break; - case REG_CRF_ID_TYPE_MR: - iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_MR << 12); - break; case REG_CRF_ID_TYPE_FM: case REG_CRF_ID_TYPE_FMI: case REG_CRF_ID_TYPE_FMR: From patchwork Wed Mar 20 21:26:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598189 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 AB25385947 for ; Wed, 20 Mar 2024 21:27:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970026; cv=none; b=PkmsekmMd8ej9sg4uQyzGuJMb0ZZ08dhRytz82+xAALppeC7nZ+lZrlzlXmLjc7E9QbP10EbZsWHS/kNSKMqOd1Tdy7f4ptqLwvo5cm1EpiImjnB+QMtY/2Koe1zG6lSRGEDTJeuLwKtKZ01A2o2XQgjJjWV5NurD5wdYxiX0Lo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970026; c=relaxed/simple; bh=eROf8H4GaFXLCwJyzJ1YUW04hZ0Q3vc7cKMdwBg73vw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RU51wlo5ExHMm/AgxPl9n/nW/cgAEaUtqfrGkgkh7i0p9BtQozlaZ4K0A6OUy3cxsCopD4jmBImu2sh7NPTCUCIjF46oK9je/4o0IazmdFekbKUM8Hokj+FuPzJFqSdDraMvZms8I8ICPwOnOKYzoT325MfKkVLERm1ffMvmeKQ= 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=LvbDclK+; arc=none smtp.client-ip=192.198.163.12 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="LvbDclK+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970024; x=1742506024; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eROf8H4GaFXLCwJyzJ1YUW04hZ0Q3vc7cKMdwBg73vw=; b=LvbDclK+fYBN0E7sLQQ2OvC3zCwLdioJl4qLAl+G5kfapBYMbTQSItq6 3gp74Ld3ZtH6x/lFZGskspakXJoyNairO8/74jfGvPhgM/vMZeKU3JHJY YfBLlkfmP8JRel0IuP01o6DaSvlrG0GklUvTVfz5dGk72eprLALitzsuv ZFcqoOySeprtnoMIdVfAl+kplCRShVoUXBvj72zzh82Y+zrrpqx8ef015 sgzOcK70H3ylx09nYPz0TJDtGHDaxhJPEDLzapl9NaVcTLfQt+mdNWkR+ CyeZAc40Y906d3g6IaSiEK6FLhFya0uQg+L6yNEmVhSzJKR2Bvr+gmsEZ A==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698078" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698078" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184152" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:03 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 07/17] wifi: iwlwifi: remove wrong CRF_IDs Date: Wed, 20 Mar 2024 23:26:28 +0200 Message-Id: <20240320232419.b7bea022622b.Ia6ffa981397dc11bd1acb7e190c275155857823d@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 CRF_IDs never existed and were a mistake. Those values are CNVI_IDs. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h index 8df6ec12b74e..05b4001c8224 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h @@ -454,8 +454,6 @@ enum { #define REG_CRF_ID_TYPE_HR_NONE_CDB_CCP 0x532 #define REG_CRF_ID_TYPE_GF 0x410 #define REG_CRF_ID_TYPE_FM 0x910 -#define REG_CRF_ID_TYPE_FMI 0x930 -#define REG_CRF_ID_TYPE_FMR 0x900 #define REG_CRF_ID_TYPE_WHP 0xA10 #define HPM_DEBUG 0xA03440 diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 75e5177cf140..7cba9f72dd11 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1202,8 +1202,6 @@ static int map_crf_id(struct iwl_trans *iwl_trans) iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_GF << 12); break; case REG_CRF_ID_TYPE_FM: - case REG_CRF_ID_TYPE_FMI: - case REG_CRF_ID_TYPE_FMR: iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_FM << 12); break; case REG_CRF_ID_TYPE_WHP: From patchwork Wed Mar 20 21:26:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598191 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 65E6785C44 for ; Wed, 20 Mar 2024 21:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970028; cv=none; b=DKHORfITiYX/agwGaiUqp0zOnXAXGiGn28McmNOTLYkPqmxFI6z+edBAVtJtn+NSiXr7vts9zeGtwDcqa7TCOABKmaMTwvD3Y1gbBQiQL5/tkSExk7BtsF2iWy6JDvUb+e0Zgw98yy9l2SCKora2aH32kCLnEgmehf03LxtYd1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970028; c=relaxed/simple; bh=uAzA9ss0XuzhcY8X9OAAAZQs0Ayd1auF0OXV+ZpiOPM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=U3PQQnBkootc+UD9CBAGGgRlcTj/wEijpV6ZIx2KCJA5xcepv/UDcFMo9msOjcUUBBfTM0ifW4HJpywqe65sg4P5nb9Wkw8Zxa7da9VnJmIbdgA/O9Tosj0B1GjPDEgXP/w3bMvrfJiX1OOZXFYkMwl+xrffxHcm1UxXg7DiVIQ= 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=d2a1+uvo; arc=none smtp.client-ip=192.198.163.12 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="d2a1+uvo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970026; x=1742506026; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uAzA9ss0XuzhcY8X9OAAAZQs0Ayd1auF0OXV+ZpiOPM=; b=d2a1+uvovGm8H0otNnzCwwaopt5vSE7f+uBjGWlkuLv4b2mKBs4/nHxP Mw7CKl57XHXKrVw1CsNGb3Rbyw8pZgQdMBMEe1l6fC+j8T8tH7o3UmuSG 2c0109awCevXs5UmZBDRP2uQKEaTHQu0RI5gw3i7wz8P5eGvWGaK6fFye Lf/aLQqyEMRiYHO5gcGK+rHThvbR1MHsvEIfwJGjaYzthBPVJgKuCUw8k em/6mNipVOwJ8l+Oi+M8lkFuL+TnA192y2hHhi3sgphaj0JOf8Kftinyn nz7sKiAgdtbwM8NGiaLkkuPQtryiNVJXZu7RPEqXv3kVN/xAiIM/FNssM Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698084" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698084" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184166" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:05 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Daniel Amosi Subject: [PATCH 08/17] wifi: iwlwifi: Print a specific device name. Date: Wed, 20 Mar 2024 23:26:29 +0200 Message-Id: <20240320232419.6fc9ad1396ca.I207626ce5e2ada170a7c01dccf5226110d09f135@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Daniel Amosi For FM and GL, the name printed on the logs was "TBD". Change that to print the accurate name. Signed-off-by: Daniel Amosi Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 ++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index 072b0a5827d1..bc98b87cf2a1 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c @@ -149,6 +149,8 @@ const struct iwl_cfg_trans_params iwl_bz_trans_cfg = { }; const char iwl_bz_name[] = "Intel(R) TBD Bz device"; +const char iwl_fm_name[] = "Intel(R) Wi-Fi 7 BE201 320MHz"; +const char iwl_gl_name[] = "Intel(R) Wi-Fi 7 BE200 320MHz"; const char iwl_mtp_name[] = "Intel(R) Wi-Fi 7 BE202 160MHz"; const struct iwl_cfg iwl_cfg_bz = { diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 9baa6b2c37db..a931277169a7 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -541,6 +541,8 @@ extern const char iwl_ax221_name[]; extern const char iwl_ax231_name[]; extern const char iwl_ax411_name[]; extern const char iwl_bz_name[]; +extern const char iwl_fm_name[]; +extern const char iwl_gl_name[]; extern const char iwl_mtp_name[]; extern const char iwl_sc_name[]; extern const char iwl_sc2_name[]; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 7cba9f72dd11..a687c394cf07 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -997,18 +997,19 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name), /* Bz */ +/* FIXME: need to change the naming according to the actual CRF */ _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, - iwl_cfg_bz, iwl_bz_name), + iwl_cfg_bz, iwl_fm_name), /* Ga (Gl) */ _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY, IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_320, IWL_CFG_ANY, IWL_CFG_NO_CDB, - iwl_cfg_gl, iwl_bz_name), + iwl_cfg_gl, iwl_gl_name), _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY, IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, IWL_CFG_ANY, From patchwork Wed Mar 20 21:26:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598192 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 DD92386241 for ; Wed, 20 Mar 2024 21:27:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970030; cv=none; b=upYCzyD8bi616o5iuDfYwWsK2ttN5k/bPKVfJcYSEXNW6e3vS8JQiHwy1pOxpdAQ7XkDfvR1FemhFNyUIf8KV5cuKz47E0PhP34Irn6WrjEWEF/YdcVkJY3l8kjg5zjAg8sFr8YwA9v4PKWdaattkvO3zhC4ovUieYnt8Mt3oug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970030; c=relaxed/simple; bh=g8FiyGY3evOGr5ieM0nJ3hgSbzAAhxNrCKtkQG7gUJE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YBPs7heAmwIA7ygJ+rAeZQfsUhfYcFfkmQwOngmGrZTR4dNUHc3IvblVRRI8jbS5ovch4Fgs6vDgM+Wnp5QKfXALDpJIIMwtVkyzIYkQ5D1COUKzWeYGrVdM0Jxl1iNdVRboO19vo1zBjx5xndHDLYbzFlivQNdsBlIt603LsQI= 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=HSGuqPRX; arc=none smtp.client-ip=192.198.163.12 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="HSGuqPRX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970029; x=1742506029; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g8FiyGY3evOGr5ieM0nJ3hgSbzAAhxNrCKtkQG7gUJE=; b=HSGuqPRXpu6/gfyEZP3Btkjmbs6qmhxpCg1Dz6I3b7zlJC1N5NiXixpG ia+fQFzdsIlxI1L2YY/ryJKCp4xb/v+vb3GP3vlrv7DNTlGJ4I/lzWwOQ Ycec5MqllexBS9SDEuq0+4GD1hQchk/8GfYFfgQb0hkVnIJ3YTHuKHkW+ FLy/X4ML6+rMp+3aAgezvvXqtx29GP2LMM63YQe6OG8UUZxmZQwLubtNY ta9qRZRf15X7FgJXnjAhKO5uVyEHRvCA11iNsVAKWHAlWsspA/qO3+JG8 pdhf4szFRjkjBj/soW91/JthjENmOpScoRH2ya6hON+b9nfIa2iaYiUEQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698087" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698087" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184169" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:07 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 09/17] wifi: iwlwifi: add support for BZ_W Date: Wed, 20 Mar 2024 23:26:30 +0200 Message-Id: <20240320232419.40c315d51b22.I6b2b2083f8d5b4ec4119aa5b51c21b8428d96060@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 BZ_W is another member of the BZ family. Just like BZ_U, we also need to override the STEP. While at it, add a few missing CNVi Chip ID values. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 3 +++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 16 +++++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index a931277169a7..732889f96ca2 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -422,6 +422,7 @@ struct iwl_cfg { #define IWL_CFG_MAC_TYPE_SC 0x48 #define IWL_CFG_MAC_TYPE_SC2 0x49 #define IWL_CFG_MAC_TYPE_SC2F 0x4A +#define IWL_CFG_MAC_TYPE_BZ_W 0x4B #define IWL_CFG_RF_TYPE_TH 0x105 #define IWL_CFG_RF_TYPE_TH1 0x108 diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h index 05b4001c8224..898e22e0d1ab 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h @@ -371,7 +371,10 @@ enum { #define CNVI_AUX_MISC_CHIP 0xA200B0 #define CNVI_AUX_MISC_CHIP_MAC_STEP(_val) (((_val) & 0xf000000) >> 24) #define CNVI_AUX_MISC_CHIP_PROD_TYPE(_val) ((_val) & 0xfff) +#define CNVI_AUX_MISC_CHIP_PROD_TYPE_GL 0x910 #define CNVI_AUX_MISC_CHIP_PROD_TYPE_BZ_U 0x930 +#define CNVI_AUX_MISC_CHIP_PROD_TYPE_BZ_I 0x900 +#define CNVI_AUX_MISC_CHIP_PROD_TYPE_BZ_W 0x901 #define CNVR_AUX_MISC_CHIP 0xA2B800 #define CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM 0xA29890 diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index a687c394cf07..cd2183ccbdbd 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1004,6 +1004,12 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, iwl_cfg_bz, iwl_fm_name), + _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, + IWL_CFG_MAC_TYPE_BZ_W, IWL_CFG_ANY, + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, + IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, + iwl_cfg_bz, iwl_fm_name), + /* Ga (Gl) */ _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_GL, IWL_CFG_ANY, @@ -1128,6 +1134,7 @@ static void get_crf_id(struct iwl_trans *iwl_trans) { u32 sd_reg_ver_addr; u32 val = 0; + u8 step; if (iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) sd_reg_ver_addr = SD_REG_VER_GEN2; @@ -1146,16 +1153,23 @@ static void get_crf_id(struct iwl_trans *iwl_trans) iwl_trans->hw_cnv_id = iwl_read_prph_no_grab(iwl_trans, CNVI_AUX_MISC_CHIP); + /* For BZ-W, take B step also when A step is indicated */ + if (CSR_HW_REV_TYPE(iwl_trans->hw_rev) == IWL_CFG_MAC_TYPE_BZ_W) + step = SILICON_B_STEP; + /* In BZ, the MAC step must be read from the CNVI aux register */ if (CSR_HW_REV_TYPE(iwl_trans->hw_rev) == IWL_CFG_MAC_TYPE_BZ) { - u8 step = CNVI_AUX_MISC_CHIP_MAC_STEP(iwl_trans->hw_cnv_id); + step = CNVI_AUX_MISC_CHIP_MAC_STEP(iwl_trans->hw_cnv_id); /* For BZ-U, take B step also when A step is indicated */ if ((CNVI_AUX_MISC_CHIP_PROD_TYPE(iwl_trans->hw_cnv_id) == CNVI_AUX_MISC_CHIP_PROD_TYPE_BZ_U) && step == SILICON_A_STEP) step = SILICON_B_STEP; + } + if (CSR_HW_REV_TYPE(iwl_trans->hw_rev) == IWL_CFG_MAC_TYPE_BZ || + CSR_HW_REV_TYPE(iwl_trans->hw_rev) == IWL_CFG_MAC_TYPE_BZ_W) { iwl_trans->hw_rev_step = step; iwl_trans->hw_rev |= step; } From patchwork Wed Mar 20 21:26:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598193 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 AC04E85C58 for ; Wed, 20 Mar 2024 21:27:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970032; cv=none; b=VojAeVayCuarT06zzBGNm5WtRu9VFQ5FQ3OO0KD7tF0GqfqwxDluEvk82/nWD4LbsIVSFjAhUKJsHzZIJftMVXzgOWGyO2DA+h8bidb4WJYhWQ8cep72rR414rp+eJEXPzlIgPzS/Z/1BVMkdT7eqgUf4t0Jgm89vYcYYbWL+sA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970032; c=relaxed/simple; bh=S2OVw3zqxD+vnLQJBOqFCVxGXIL/GIW50cjVMgk8AhE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=adlQDJ5y4SHwwzH/zGHIP0vyCyXVIgSLQLNKmA4AxWf2kSMgK/3dVxvn9Or5NdnyrjVtDE21TZnp2Mhn9EjpSb1kWbTEND1gRG155daUAx1SNxuXicNtAFsv23pFo0NlX0CY4M8YuHhsMUBL4sehNvpbEmSalntJ5d2jxxHp6PU= 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=WZD8mbgp; arc=none smtp.client-ip=192.198.163.12 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="WZD8mbgp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970030; x=1742506030; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=S2OVw3zqxD+vnLQJBOqFCVxGXIL/GIW50cjVMgk8AhE=; b=WZD8mbgpsv3kdgOL+TfnOsPjBV10z918XcVWwN/cZn+QuNpWB0PFiw+x xeWU1lt8yI+Mvz48PdLXwVuWsm6DoDmj4YUm9VvBEo9ajSnXlCXFAVZ2k HsJ7EoslHqD5uCt9WOqr1GBScTd80Wk+U9fdaoirZIYnHhFL3lpXaFA8Z TCR5E7QErZC19gKYGaUVXVZgbVHcjmhoaH8LMyr11ZwdN5loQSXoujeLE VJ0qObtmA81/NDHDiSgCIwgO1YzUJWb4YRQSDIUdBME5ZXsDUqcvl6mSp x1k4hDrzU8cPdG/ph3cPK4vcccSa7O3Q9DaIe3ovayEN2INz6GtV5tql7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698095" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698095" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184176" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:09 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 10/17] wifi: iwlwifi: mvm: Remove outdated comment Date: Wed, 20 Mar 2024 23:26:31 +0200 Message-Id: <20240320232419.d656c2385b06.Icccd0640eb9f1ad72ff74792086435dfc0bee6eb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 This comment was added when iwl_mvm_alloc_sta_after_restart configured the FW with an internal station, but then it was changed by 164a52d45e4a ("wifi: iwlwifi: mvm: send full STA during HW restart") to configure the full sta, So there is no reason to "wait for mac80211 to add the STA" as this is exacly where it happens. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 94a01c0f261a..902c64f210aa 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -616,9 +616,6 @@ static void iwl_mvm_mld_set_ap_sta_id(struct ieee80211_sta *sta, } } -/* FIXME: consider waiting for mac80211 to add the STA instead of allocating - * queues here - */ static int iwl_mvm_alloc_sta_after_restart(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta) From patchwork Wed Mar 20 21:26:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598194 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 08C558624B; Wed, 20 Mar 2024 21:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970034; cv=none; b=tulQqSPYwGTYgaxjMgDiRrXIKEOJuMXBczAZszrAe1CSI9IWvd7dIwG77+v107w7IF4bsrJDi+NKUXqW3SZicFVeODD9qZmOYXGposjsyOVo7uWHnGKWyJRfuV8d0eGrprc61mjVMc++3hV/c09gYa4hf26PaD+CtAqxiOP5jgQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970034; c=relaxed/simple; bh=CjhnpktcNcIRXLzJgkY11a71CMccKoOJwTXiIvUtcXw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bjJewWCbTsxv6p4Err/cJgNBnVNoTVbkpQWDKAubSqliGR5yx66r5RlDcOzunIJdVVGqgDzhSjMtqYAa7UljU3HuACH3XW01ro068lSAXG40qHjPduODWdvsFkHYPEDntq8S5Xucne99ZTGzvOS2GOepkCuS4Wg0mwDm/XNfQ+Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IUCu0E0K; arc=none smtp.client-ip=192.198.163.12 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="IUCu0E0K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970033; x=1742506033; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CjhnpktcNcIRXLzJgkY11a71CMccKoOJwTXiIvUtcXw=; b=IUCu0E0KcuYmVK/7nChaFttJoUpUvf5lOL4XrXe6YjUbjn/Hv67YYmDs skBzlCEOaag/exkYSbvTPTm2osXii5eBsMSChw7GMD9ZeN6ejRTmr7gov mmpUWQn3ZaFF2E4WIK21QW3El3WQFB/Nm9w1swHQ8bg9JIa94STB/FJDS M+mABwpgVniSSYkl+jctJpGwINUn4g1uvtbk/GGP3DCcBtsSBq4jFsRW+ v2KFHsnn0hQqoYbgkIfNfEhvpZxdD33j6zpoS/vLy6X+vk8lzh+n63KW3 0QX/oJNAEgCE3+oyiZHZTNyHU0RtHKZDeT9H9kwnfRV1EPVV7hgWr2nfo A==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698111" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698111" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184179" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:11 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , stable@vger.kernel.org Subject: [PATCH 11/17] wifi: iwlwifi: mvm: handle debugfs names more carefully Date: Wed, 20 Mar 2024 23:26:32 +0200 Message-Id: <20240320232419.4dc1eb3dd015.I32f308b0356ef5bcf8d188dd98ce9b210e3ab9fd@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg With debugfs=off, we can get here with the dbgfs_dir being an ERR_PTR(). Instead of checking for all this, which is often flagged as a mistake, simply handle the names here more carefully by printing them, then we don't need extra checks. Also, while checking, I noticed theoretically 'buf' is too small, so fix that size as well. Cc: stable@vger.kernel.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218422 Fixes: c36235acb34f ("wifi: iwlwifi: mvm: rework debugfs handling") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c index 5485e8bf613e..af56a55063a7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c @@ -806,7 +806,9 @@ void iwl_mvm_vif_dbgfs_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif) { struct dentry *dbgfs_dir = vif->debugfs_dir; struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); - char buf[100]; + char buf[3 * 3 + 11 + (NL80211_WIPHY_NAME_MAXLEN + 1) + + (7 + IFNAMSIZ + 1) + 6 + 1]; + char name[7 + IFNAMSIZ + 1]; /* this will happen in monitor mode */ if (!dbgfs_dir) @@ -819,10 +821,11 @@ void iwl_mvm_vif_dbgfs_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif) * find * netdev:wlan0 -> ../../../ieee80211/phy0/netdev:wlan0/iwlmvm/ */ - snprintf(buf, 100, "../../../%pd3/iwlmvm", dbgfs_dir); + snprintf(name, sizeof(name), "%pd", dbgfs_dir); + snprintf(buf, sizeof(buf), "../../../%pd3/iwlmvm", dbgfs_dir); - mvmvif->dbgfs_slink = debugfs_create_symlink(dbgfs_dir->d_name.name, - mvm->debugfs_dir, buf); + mvmvif->dbgfs_slink = + debugfs_create_symlink(name, mvm->debugfs_dir, buf); } void iwl_mvm_vif_dbgfs_rm_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif) From patchwork Wed Mar 20 21:26:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598195 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 AE71485C65 for ; Wed, 20 Mar 2024 21:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970036; cv=none; b=D5IiqkRAROjpwXruQb28JZb3hOaZ+AjSm1NBEXMtnW/RlbnL0OtrhxwtT7jv1sMNZuCsZBKBf0i/9whWLjDlGi8FkFBmpoPioWVqQXnL/YpRvoZcrHwcYn9XmyKWbItrmOaWaBWwrHRdgok26GbHXWX8BGEULzLUCXqsP2RNdek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970036; c=relaxed/simple; bh=YSBUIhPrA7wrXcRXy005UgiygbYmj01MsO26cVHOwMg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=f5GXQVv6SKRPvJmeTAYoMNct/rD72UOxu1BsnUENXq7VXS8Hn5i5ewVWWDeuOTqslk/iqo52jR9YTOUAl9updZ4Aa/R+xY1yVXqxtL8gIhjJhBKc4+oL9c1IMKW9it88i+M+0Rq3VtcX1crqlS8PSsdercpsJ3zkGZD7lid7LQw= 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=mHs9Xk5G; arc=none smtp.client-ip=192.198.163.12 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="mHs9Xk5G" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970034; x=1742506034; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YSBUIhPrA7wrXcRXy005UgiygbYmj01MsO26cVHOwMg=; b=mHs9Xk5GfHtn5EyqFZtxst89vk0qsybFA/1iQ2dyNTo57RL86BOUEeJk d7eYLmRwDBIK8RtruaS6vt91FehvRjd2V6NJtgIHnv4ZO90UtW2LVx4fJ p8iFxfyuGsrPgQuzYjaDBejExswcAwlzHPhyx1wSFljXTiqRIgLw75ckj VaNg6ZJC9j6+8AJhv2rGAk5Uz+TnaC13CTnFHFlnfHFaO3frw2JBWrx+S x0aXRyAkAowyZpuk7kYko9o5zi9QNEQ4D5hJzL5kmLbeYdVLvUDOmtgYj GHwS6s1dX8L+hv6D648YwPAzV8+lJrlStFFs5TTaldxMSM5Xw2pyPCDQ3 g==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698118" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698118" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184184" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:13 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer Subject: [PATCH 12/17] wifi: iwlwifi: mvm: Declare HE/EHT capabilities support for P2P interfaces Date: Wed, 20 Mar 2024 23:26:33 +0200 Message-Id: <20240320232419.37fdea8e55a3.If074bdc6c6cd55b76c3421417a987d21ab6bb041@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 Declare HE/EHT capabilities support also for P2P client and P2P GO interface types. Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 03ff6ee546ce..149903f52567 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -599,7 +599,8 @@ static const u8 iwl_vendor_caps[] = { static const struct ieee80211_sband_iftype_data iwl_he_eht_capa[] = { { - .types_mask = BIT(NL80211_IFTYPE_STATION), + .types_mask = BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_P2P_CLIENT), .he_cap = { .has_he = true, .he_cap_elem = { @@ -755,7 +756,8 @@ static const struct ieee80211_sband_iftype_data iwl_he_eht_capa[] = { }, }, { - .types_mask = BIT(NL80211_IFTYPE_AP), + .types_mask = BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_P2P_GO), .he_cap = { .has_he = true, .he_cap_elem = { @@ -908,7 +910,8 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans, u8 tx_chains, u8 rx_chains, const struct iwl_fw *fw) { - bool is_ap = iftype_data->types_mask & BIT(NL80211_IFTYPE_AP); + bool is_ap = iftype_data->types_mask & (BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_P2P_GO)); bool no_320; no_320 = (!trans->trans_cfg->integrated && From patchwork Wed Mar 20 21:26:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598197 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 C6CB885C65 for ; Wed, 20 Mar 2024 21:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970041; cv=none; b=bNRXSX/Zo96t7yx79AczhufK+VFx2I/aBkIHw0dHfkHcm6LGe/RuFDqgEftuyMI52z+pQq52Q9Rkuw+s5Mw/42ZLcTcFdnzGffdru+hiXRDAg/gst9Cp7MUv6rz9v6V2dsGslUHQ9lK3mt4aLn7b8Ffim10gQVRylfNBtZ/HOME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970041; c=relaxed/simple; bh=kF8RqkWGKpsSZiC5vI1jIDNMrjiBNxUyTQ/OG7YIuYo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cX3VLkiakC2tU13GBGmFmnp4S4NIFNxShGTsJzXurP2OsgnRGz5tdlFxTjyfPtBEFQfBL0nz1rIzWSoUEhUxXmFI/COkRmY1rhh/fy0k9Sc5N9Bfs4Xphu5SjXPv5Bm9MY6oFgRgI28ZeXkkoSNZxlb8MFMgZWzYc/gjy0KfIvc= 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=Ood4kt6B; arc=none smtp.client-ip=192.198.163.12 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="Ood4kt6B" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970038; x=1742506038; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kF8RqkWGKpsSZiC5vI1jIDNMrjiBNxUyTQ/OG7YIuYo=; b=Ood4kt6BsZ1v0JX96dPdQ6ZuP2dA67aYrQk6jchPdw8KF6ADhWIxOn1T 2wbTVzefnRWIFY1Y/gIjUQoPapfkHKLdSzFtfPIS7x9cFxP67kZdLqvf4 k3rrKRRP+0E3kDi3aOhQOnTRNua9q9hKo+uxIbHQtsnmnKIEgaEUbEbJ5 W4a3lnsxF5nUrDMbxSSLuLkpeRFKBkPnG1sea+dpBiqrmXvW0gAM1besE XR7tb+Y/1tumAz/5jIC1f6cIKx4mDiz29paMaHFaJ3BWclFu2sIJKupOy 58ciVI0PeTb5TfJxU2FpMFZn6VdbUpAjSig61YipYQwUtP+CJk5elIg8N w==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698127" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698127" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184191" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:15 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Anjaneyulu , Mukesh Sisodiya Subject: [PATCH 13/17] wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD cmd v9 Date: Wed, 20 Mar 2024 23:26:34 +0200 Message-Id: <20240320232419.5c31ccd73119.I0363992efc3607368648d34a7918b2534150a3ca@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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: Anjaneyulu There is a requirement from OEMs to support new bits in DSM function 7, which will indicate enablement of 5.9 GHz in Canada. Add support for this by reading those bits from BIOS and sending it to the FW. mask unii4 allow bitmap based on LARI_CONFIG_CHANGE_CMD version Signed-off-by: Anjaneyulu Reviewed-by: Mukesh Sisodiya Signed-off-by: Miri Korenblit --- .../wireless/intel/iwlwifi/fw/api/nvm-reg.h | 5 ++++- .../wireless/intel/iwlwifi/fw/regulatory.h | 19 ++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 ++++++++- 3 files changed, 30 insertions(+), 3 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 58034dfa7e70..988b5421a629 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h @@ -609,7 +609,7 @@ struct iwl_lari_config_change_cmd_v6 { /** * struct iwl_lari_config_change_cmd_v7 - change LARI configuration - * This structure is used also for lari cmd version 8. + * This structure is used also for lari cmd version 8 and 9. * @config_bitmap: Bitmap of the config commands. Each bit will trigger a * different predefined FW config operation. * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. @@ -619,6 +619,8 @@ struct iwl_lari_config_change_cmd_v6 { * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits * per country, one to indicate whether to override and the other to * indicate allow/disallow unii4 channels. + * For LARI cmd version 4 to 8 - bits 0:3 are supported. + * For LARI cmd version 9 - bits 0:5 are supported. * @chan_state_active_bitmap: Bitmap to enable different bands per country * or region. * Each bit represents a country or region, and a band to activate @@ -642,6 +644,7 @@ struct iwl_lari_config_change_cmd_v7 { } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_7 */ /* LARI_CHANGE_CONF_CMD_S_VER_8 */ +/* LARI_CHANGE_CONF_CMD_S_VER_9 */ /* Activate UNII-1 (5.2GHz) for World Wide */ #define ACTIVATE_5G2_IN_WW_MASK BIT(4) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h index 28e774766847..a0cb8881e629 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation */ #ifndef __fw_regulatory_h__ @@ -132,6 +132,23 @@ enum iwl_dsm_values_indonesia { DSM_VALUE_INDONESIA_MAX }; +enum iwl_dsm_unii4_bitmap { + DSM_VALUE_UNII4_US_OVERRIDE_MSK = BIT(0), + DSM_VALUE_UNII4_US_EN_MSK = BIT(1), + DSM_VALUE_UNII4_ETSI_OVERRIDE_MSK = BIT(2), + DSM_VALUE_UNII4_ETSI_EN_MSK = BIT(3), + DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK = BIT(4), + DSM_VALUE_UNII4_CANADA_EN_MSK = BIT(5), +}; + +#define DSM_UNII4_ALLOW_BITMAP_CMD_V8 (DSM_VALUE_UNII4_US_OVERRIDE_MSK | \ + DSM_VALUE_UNII4_US_EN_MSK | \ + DSM_VALUE_UNII4_ETSI_OVERRIDE_MSK | \ + DSM_VALUE_UNII4_ETSI_EN_MSK) +#define DSM_UNII4_ALLOW_BITMAP (DSM_UNII4_ALLOW_BITMAP_CMD_V8 | \ + DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK | \ + DSM_VALUE_UNII4_CANADA_EN_MSK) + enum iwl_dsm_values_rfi { DSM_VALUE_RFI_DLVR_DISABLE = BIT(0), DSM_VALUE_RFI_DDR_DISABLE = BIT(1), diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index df3b29b998cf..1f8d4723512f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -1239,8 +1239,14 @@ static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm) cmd.oem_11ax_allow_bitmap = cpu_to_le32(value); ret = iwl_bios_get_dsm(&mvm->fwrt, DSM_FUNC_ENABLE_UNII4_CHAN, &value); - if (!ret) + if (!ret) { + if (cmd_ver < 9) + value &= DSM_UNII4_ALLOW_BITMAP_CMD_V8; + else + value &= DSM_UNII4_ALLOW_BITMAP; + cmd.oem_unii4_allow_bitmap = cpu_to_le32(value); + } ret = iwl_bios_get_dsm(&mvm->fwrt, DSM_FUNC_ACTIVATE_CHANNEL, &value); if (!ret) { @@ -1273,6 +1279,7 @@ static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm) size_t cmd_size; switch (cmd_ver) { + case 9: case 8: case 7: cmd_size = sizeof(struct iwl_lari_config_change_cmd_v7); From patchwork Wed Mar 20 21:26:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598196 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 9869C85C6A for ; Wed, 20 Mar 2024 21:27:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970041; cv=none; b=G9Fbj8qlLySLQaYuH7RZ037cGNQcMLiMMvmfXvyuQYK7RgiApxx4odsW/q/EZ10hpqCGJTELzgEBOMaP4dQg+sKXet/PvVqXgNCAM9HIPq+QYnAVb2qVHeJjoZh+R12+zpsUCDqH9Tzpx94INmDx+4zFZxYnbVrTbKjz/YP4VwY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970041; c=relaxed/simple; bh=jMmq3FBBSZV1RcYJ0p91pG+T8fW8kNGy/1K+l9C1iH4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NGawKe2gnlFaT9iwhYu1VU61hW2av5z4Sw9zuiItGzgUPcsZ20JphWumruAeaVz967AJbWU+S8O1WJX95hi7iiZIuoVdbWEgpwlenWS+Rtros9cQLY9sohzBF8Pyv5u+kPZfQitb2T45A0tP/m5W3fjMSXK042/CRsO/GNnB08g= 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=mpg7dDvT; arc=none smtp.client-ip=192.198.163.12 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="mpg7dDvT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970039; x=1742506039; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jMmq3FBBSZV1RcYJ0p91pG+T8fW8kNGy/1K+l9C1iH4=; b=mpg7dDvTHs3tALDKs4VsKUX5SE0Z6TO3A/FCkpzAT2Dp7F3pxYo4yWhT akMgZqJ08e+yrFVeWtLmkhflH+AVnL6CK4jQIEA4n/K8TApuI9Jrs4XLL +HkuUFG8FIcR0ujK2w+fKAnkaH7dG1gFlyMcjmFQLifjGk7tmtCgjup5K KKmJQtiyW9QonGoO97CWu97UuCWeAaLoNDJl69tR9gAOy1qJLh5KxqkM9 aijZ1HGuazS9+D2gprTutbzIRnihrfCXfp51JCDdDOQojZjS5BeGPc6x9 s8R6A8UD1pk/mzR90Wx63/65bD0DR5oVKKEXsVlLo3GqjLqqTs/bGZRKx A==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698140" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698140" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184198" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:18 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 14/17] wifi: iwlwifi: mvm: set wider BW OFDMA ignore correctly Date: Wed, 20 Mar 2024 23:26:35 +0200 Message-Id: <20240320232419.0d5fb0e971e4.I3b67c5e0ddcbe6e58143ec0bc4e40dd6dba4f863@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 Clearly, I put this flag into the wrong place: devices using the code in mac80211.c only do not support EHT, so this isn't even relevant. Fix this by moving the code to the right function. Fixes: 32a5690e9acb ("wifi: iwlwifi: mvm: support wider-bandwidth OFDMA") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 --- drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 448b43d73625..40e70ffecd14 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1698,9 +1698,6 @@ 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; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index d18304ac126c..5a4973431c8b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -92,6 +92,9 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw, mvm->csme_vif = vif; } + if (vif->p2p || iwl_fw_lookup_cmd_ver(mvm->fw, PHY_CONTEXT_CMD, 1) < 5) + vif->driver_flags |= IEEE80211_VIF_IGNORE_OFDMA_WIDER_BW; + goto out_unlock; out_free_bf: From patchwork Wed Mar 20 21:26:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598198 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 D230986260 for ; Wed, 20 Mar 2024 21:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970043; cv=none; b=gNGIjYcI0uPc8AdHZAzODFIXiCfB2YCbHUoDpqgCamexZQWLSRfTWpkynzoH5L5JBuK4O0CDE0HPdVXpS7LTOje+EqkopeEqdlLt0re6AMMFgw7Cf8cYEOPB1CWJZWYzx96CrTBAkevSJMLU5QY0R6bwkWHOe1MbazMi15M0ZEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970043; c=relaxed/simple; bh=K0T0YiaEnqSJxu7Su0549h0R7JIe5tnCkwaJAHPRjy4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=epswI4vaEOwf+wCIw1ykIKtejENTygTIq3hnE+gGe9lkq5CXDkjiWFpdp0eiRMSbrpqmFbkH+UJOGzZo3xYIijDYd7p4n1rLOf42uuDD0/ZHskq7P47DaiUwJabmXs8US0Z1hg122qFP+elqBqslNdZoOGX37QKhkXwuDjOTTcA= 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=QeyAgeBR; arc=none smtp.client-ip=192.198.163.12 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="QeyAgeBR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970042; x=1742506042; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K0T0YiaEnqSJxu7Su0549h0R7JIe5tnCkwaJAHPRjy4=; b=QeyAgeBRLElg5jjzFBXSGPjmj4EN2lPgYZNPwJTYQescX9xEwxB8PPro m7d7bl0WZGw/mx9bCGjUZ5bJrhFE5H7aNyhfbYVX+GIr0957+jg9M5f8b YQhpf36nZ61jM1E6dNCp3KnE59WluXefqWtAlf241eSXjZlJqpnjqD75f 5N1+eupSQC7lQ32JMLPL0rA0utpYqtu0gbSI5/NsmPRAanLufdquSBG79 Yfrx/UN4nARVMEyPcCJiZ+vcvrbC25CGzEexVwESAA5bSeoSS9cvSiY1g mJrFgD65PvBqRJ2fpPC+UCcE/Tpi+HKAbnE60c/2Ir8v6f/FfmmWgidry A==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698146" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698146" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184204" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:20 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 15/17] wifi: iwlwifi: mvm: select STA mask only for active links Date: Wed, 20 Mar 2024 23:26:36 +0200 Message-Id: <20240320232419.c6818d1c6033.I6357f05c55ef111002ddc169287eb356ca0c1b21@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 During reconfig, we might send keys, but those should be only sent to already active link stations. Iterate only active ones to fix that issue. Fixes: aea99650f731 ("wifi: iwlwifi: mvm: set STA mask for keys in MLO") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 902c64f210aa..5785b70a4aff 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -9,7 +9,9 @@ u32 iwl_mvm_sta_fw_id_mask(struct iwl_mvm *mvm, struct ieee80211_sta *sta, int filter_link_id) { + struct ieee80211_link_sta *link_sta; struct iwl_mvm_sta *mvmsta; + struct ieee80211_vif *vif; unsigned int link_id; u32 result = 0; @@ -17,26 +19,27 @@ u32 iwl_mvm_sta_fw_id_mask(struct iwl_mvm *mvm, struct ieee80211_sta *sta, return 0; mvmsta = iwl_mvm_sta_from_mac80211(sta); + vif = mvmsta->vif; /* it's easy when the STA is not an MLD */ if (!sta->valid_links) return BIT(mvmsta->deflink.sta_id); /* but if it is an MLD, get the mask of all the FW STAs it has ... */ - for (link_id = 0; link_id < ARRAY_SIZE(mvmsta->link); link_id++) { - struct iwl_mvm_link_sta *link_sta; + for_each_sta_active_link(vif, sta, link_sta, link_id) { + struct iwl_mvm_link_sta *mvm_link_sta; /* unless we have a specific link in mind */ if (filter_link_id >= 0 && link_id != filter_link_id) continue; - link_sta = + mvm_link_sta = rcu_dereference_check(mvmsta->link[link_id], lockdep_is_held(&mvm->mutex)); if (!link_sta) continue; - result |= BIT(link_sta->sta_id); + result |= BIT(mvm_link_sta->sta_id); } return result; From patchwork Wed Mar 20 21:26:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598199 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 AF4C785C6A for ; Wed, 20 Mar 2024 21:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970045; cv=none; b=qmCMP692pFUggvBW44UT/NE5MV53ICQHi8nF5mBW8ithI+uyNb2zLabmzYTikElCzIKj0BLbM1cUBRMIG6OM4LUYWK8OOrynW5ik/o4+AaPDQyCRVkDJZR1hDGvZphvcODvlg7NrijIJWaHbQF+vJtM3ovKLabHSDnjFEsQSZ1Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970045; c=relaxed/simple; bh=sb/MrSc7f5j4XJm/TkdNyCKfNQxLIBe0XYBQZI4Sksk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Rzenf0JfhwsyHrIXffwAW75Vc2WIchdbLHmvGV8R86rybxJVkgOIG3Lt03neU3Gvd3byGk9Lj2inFDQ1qTp8pC+svzw4J7YwJArrQ62sG67DqL7dyn5bAUIMt4i/maT9CdQgOKf0tEwwPVX2u5sLk0YlNdJ/B9RPtmnU91v6x+0= 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=oBcwark6; arc=none smtp.client-ip=192.198.163.12 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="oBcwark6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970043; x=1742506043; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sb/MrSc7f5j4XJm/TkdNyCKfNQxLIBe0XYBQZI4Sksk=; b=oBcwark63Ddp0tunC6NYaVhyV/HuYTn5UltKTv5vwaFjscrWDhibmgLJ raavyzgvWYxNRyNOdMIISyGiBsC1xypGD9kduOnPbWU773YA98J/DxfyQ 9iseNxTjFnvVxE44RU4GGZVz+Q7+cfTn1ezU2emsklPsO5NSZri4D46Ri AAbp/H84EPrBrYAvv6sC8jKH0BHaIlk0xa7v1Yx/AqQqcthPiO/fz8AWV wmKGMQRx8/7969WEdzT3C5IrkIAfqnnKOCHwDuGUC6sM2nTgf3QNrSyeL +XgxMttV1xWPa2FNgIkyN91njUgcbMZ0T7gG4hK9hpSfDOHfMNPsBGh9A Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698153" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698153" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184209" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:22 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 16/17] wifi: iwlwifi: mvm: don't change BA sessions during restart Date: Wed, 20 Mar 2024 23:26:37 +0200 Message-Id: <20240320232419.70ba08540db0.Ic604d384e660c755308a49a79d3f7e78bc27597c@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 During restart, we haven't added BA sessions, so we also cannot change them to switch between links when that happens in restart. Short-circuit the appropriate function. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 5785b70a4aff..a1c00099cadb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -989,6 +989,10 @@ static int iwl_mvm_mld_update_sta_baids(struct iwl_mvm *mvm, u32 cmd_id = WIDE_ID(DATA_PATH_GROUP, RX_BAID_ALLOCATION_CONFIG_CMD); int baid; + /* mac80211 will remove sessions later, but we ignore all that */ + if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) + return 0; + BUILD_BUG_ON(sizeof(struct iwl_rx_baid_cfg_resp) != sizeof(baid)); for (baid = 0; baid < ARRAY_SIZE(mvm->baid_map); baid++) { From patchwork Wed Mar 20 21:26:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13598200 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 BB08B8626C for ; Wed, 20 Mar 2024 21:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970047; cv=none; b=pLr3UTesANeH5GEw5GnE4ACdIIUcvD83Ej7cWfz1jO70KNn12UoK+bLLdBtQwjVOEOYxh5RHOVlgRd7/Nl1pLrIIlVJimHjTJbb/u3BE+gtEOyd2C/XJIabAHxM9yN2YTP6gSr+T2KzvBepmGXWNndmRkUhcyvjSmE0bsbNoC6U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970047; c=relaxed/simple; bh=QoCVBNozPPy4vGd1aXHib+J3WiImkToNH0ThTgL27Tg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=arnqeR24m/4Gi6/d7HFjnzKNgPV4gj5unulcIsqzZtaK6TWc1i7RDLds+h2UIeaXA4b8T7Y6hGHn0wO8iOSAHT5i2y+tPyRad3j9hZ1kszM/qHeYuB6pHoFnTsuBaxtOlyBMo7RyJWI8fppqGc2pp2CoirOojsmfvbPcJu7CEFM= 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=dWANN4v9; arc=none smtp.client-ip=192.198.163.12 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="dWANN4v9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710970045; x=1742506045; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QoCVBNozPPy4vGd1aXHib+J3WiImkToNH0ThTgL27Tg=; b=dWANN4v9juMLXK479rNl1mxiF1xyauoj4EbYVoyoLgOGbrudo438qZ/C +5+a/Uu44dCN0ZL0JmTymGBsV4VUlmyk9W/cTjMM4LWobEhdpQm9Jw5/3 dSDbBjee8fGqt0jBNKEWc6EtME0XiSFapbhqIhDf7GmhEkShPLyGL+NB9 Xuoiqv+PYlyAmICr2vISE6sTveU8zrDj9p8KBcDlHhTFPyhObkZH1JzXF DXg6+YDbgQUoxHHUCpQAiTRU+QdmWFew7xJEt6YjaJ++D+fJrrkactLQq uRK9QIb6cFPcdIMxM9ZE7MUVT8NPvU0IvuTezIGUGRkSyyIk3d5yXzLuf Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="9698158" X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="9698158" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,141,1708416000"; d="scan'208";a="14184214" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 14:27:24 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 17/17] wifi: iwlwifi: reconfigure TLC during HW restart Date: Wed, 20 Mar 2024 23:26:38 +0200 Message-Id: <20240320232419.a00adcfe381a.Ic798beccbb7b7d852dc976d539205353588853b0@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com> References: <20240320212638.1446082-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 Since the HW restart flow with multi-link is very similar to the initial association, we do need to reconfigure TLC there. Remove the check that prevented that. Fixes: d2d0468f60cd ("wifi: iwlwifi: mvm: configure TLC on link activation") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 5a4973431c8b..32ccc3b883b2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -295,13 +295,8 @@ __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm, * this needs the phy context assigned (and in FW?), and we cannot * do it later because it needs to be initialized as soon as we're * able to TX on the link, i.e. when active. - * - * Firmware restart isn't quite correct yet for MLO, but we don't - * need to do it in that case anyway since it will happen from the - * normal station state callback. */ - if (mvmvif->ap_sta && - !test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { + if (mvmvif->ap_sta) { struct ieee80211_link_sta *link_sta; rcu_read_lock();