Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7565780rwd; Tue, 20 Jun 2023 03:08:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tpjSWguJLATTmUp2SaBBI8L4NYVdJuiwWFUt78hSML1kgNX0tvp1q8kSbTbp0XDgPpdqn X-Received: by 2002:a17:902:da8a:b0:1af:d750:10cb with SMTP id j10-20020a170902da8a00b001afd75010cbmr15597381plx.63.1687255732759; Tue, 20 Jun 2023 03:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687255732; cv=none; d=google.com; s=arc-20160816; b=iCK93Xy7udFBWx5EvtjkMkWao5BKmF/gL5SNokUO8TcpHKmjIfk4mKUZx0TMpMOnOM ejQ4yq0DdpGFevCMBMRtKVb370fVd1bIztZWa5iZ827GsDLaIA92e9jJMxpIOj2QuTDC zFzQqy4Okx5Z1xXMye0Xu677iKh/GH/aklWzI6dWjbO+kyTYZNqsx4isMoLdxpAmM7ND tDBH+mZlRjqOomxnfzZYZjhvMEzxMnnmQXvo9N1e4Byo85QB2MjEI6gTzcoNIP7EoMIy KIHwOFDU026GdVgflSyP7GXKv7JNEsH5B2MvPuZJNR3yD+MdFQiuRsnwZL6mgiGcbcNw WOuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=imG+PtHa8kgl04UTK1QLWGCIo8lTUGq9PuJZ18ofAs8=; b=fuPziLo5jkRxdJg2Yk049hLltWk8VMQmPIBpwth2IOGiKXPJUsLUFj51qpWcGvfXq4 cop69Yjxy6J6+qDUbec8QWK1/BBUprffv5sjbLYxKgfMy2JhvVxFEaON+j9A7Lqh1IcL 0zpC/Bb8hziIg47tIlNJvZWmwy07qGScHifs+I3B2bHp1kv7u+dLDdVIZIDOGj7+r6bZ 9RV50iqwT0h4wb4f5mBORJDiZtPvaAuceHU0JjF5vpx8e0QfpCNQJ7uhXMgzf9scgJc5 AqrejWNonmlp4EAaG59YiClibt6+EvYwzNuNpuyLAAoLh42V01lmvGqgwLFvvRtKmywC qBQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GKnejD+7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a170902e5c200b0019ccffb3fd3si1602701plf.509.2023.06.20.03.08.42; Tue, 20 Jun 2023 03:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GKnejD+7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231773AbjFTKE6 (ORCPT + 59 others); Tue, 20 Jun 2023 06:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231918AbjFTKEf (ORCPT ); Tue, 20 Jun 2023 06:04:35 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 228B410FE for ; Tue, 20 Jun 2023 03:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687255474; x=1718791474; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PF2XlS9VLjgnVjIqT3HPYQyeN9AiYx7ZWBUnR2/+U9I=; b=GKnejD+7dZA0qlydcBh/6IAPPsBE2O77ZeRjtLpXBWq603BbEle0AdP8 1aunU8h6vpUdfEWeuaRxD5T6SBqY9Rqmu4dM+nffs7zUxFOaQvb0+IeSw dbjaIJMbRYS2wFaMBKZG4YaGhnCTNTYUIJmx18Wh7+TTjuK+G7uYHsS3l bcifUOTU6FosQhj0LCSL0WX/Erz905o441KdTP1TFxYWkpHoK42KXVUY6 hKO4/HiHd+Vj0I3lxpSOK5vjIAoSjjbJCg/phIhQgni/Yl8IytVvUtJ6R Fvt7IUXElIR6Egfzv+5ieS5j3m5xZHd6HNhrpjt9Unn1LYnGR9YZEPNsG w==; X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="359819531" X-IronPort-AV: E=Sophos;i="6.00,256,1681196400"; d="scan'208";a="359819531" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 03:04:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="838142897" X-IronPort-AV: E=Sophos;i="6.00,256,1681196400"; d="scan'208";a="838142897" Received: from rafist-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.208.68]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2023 03:04:23 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach , Gregory Greenman Subject: [PATCH 03/19] wifi: iwlwifi: mvm: check the right csa_active Date: Tue, 20 Jun 2023 13:03:49 +0300 Message-Id: <20230620125813.63f835a4f578.I0bb2a231e4da506b7c751dc23a428558f9ecfa75@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230620100405.45117-1-gregory.greenman@intel.com> References: <20230620100405.45117-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Emmanuel Grumbach When the firmware says that the channel switch is happening, we check that we know about that switch by checking the csa_active bit. Until now, we checked the bss_conf from the vif instead of taking the bss_conf of the link. Fix that. Signed-off-by: Emmanuel Grumbach Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index b8143ae8b403..7369a45f7f2b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -1763,6 +1763,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm, u32 id; u8 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP, CHANNEL_SWITCH_START_NOTIF, 0); + bool csa_active; rcu_read_lock(); @@ -1778,6 +1779,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm, goto out_unlock; id = mac_id; + csa_active = vif->bss_conf.csa_active; } else { struct iwl_channel_switch_start_notif *notif = (void *)pkt->data; u32 link_id = le32_to_cpu(notif->link_id); @@ -1789,6 +1791,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm, id = link_id; vif = bss_conf->vif; + csa_active = bss_conf->csa_active; } mvmvif = iwl_mvm_vif_from_mac80211(vif); @@ -1828,7 +1831,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm, */ if (iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP, CHANNEL_SWITCH_ERROR_NOTIF, - 0) && !vif->bss_conf.csa_active) { + 0) && !csa_active) { IWL_DEBUG_INFO(mvm, "Channel Switch was canceled\n"); iwl_mvm_cancel_channel_switch(mvm, vif, id); break; -- 2.38.1