From patchwork Sun Jan 17 14:52:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 12025397 X-Patchwork-Delegate: luca@coelho.fi Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B71DC433E0 for ; Sun, 17 Jan 2021 14:53:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5339021D81 for ; Sun, 17 Jan 2021 14:53:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729074AbhAQOx2 (ORCPT ); Sun, 17 Jan 2021 09:53:28 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:40730 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728650AbhAQOxZ (ORCPT ); Sun, 17 Jan 2021 09:53:25 -0500 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l19Px-003sgA-To; Sun, 17 Jan 2021 16:52:38 +0200 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org Date: Sun, 17 Jan 2021 16:52:27 +0200 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210117145234.1435324-1-luca@coelho.fi> References: <20210117145234.1435324-1-luca@coelho.fi> MIME-Version: 1.0 Subject: [PATCH 2/9] iwlwifi: mvm: csa: do not abort CSA before disconnect Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Shaul Triebitz While disconnecting from the AP due to bad channel switch params (e.g. too long Tx block), do not send the firmware 'CSA abort' before disconnecting. That causes canceling the immediate quiet and can cause transmitting data before the disconnection happens. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 947741302e6a..4e14a97bd168 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1367,15 +1367,13 @@ static void iwl_mvm_abort_channel_switch(struct ieee80211_hw *hw, static void iwl_mvm_channel_switch_disconnect_wk(struct work_struct *wk) { - struct iwl_mvm *mvm; struct iwl_mvm_vif *mvmvif; struct ieee80211_vif *vif; mvmvif = container_of(wk, struct iwl_mvm_vif, csa_work.work); vif = container_of((void *)mvmvif, struct ieee80211_vif, drv_priv); - mvm = mvmvif->mvm; - iwl_mvm_abort_channel_switch(mvm->hw, vif); + /* Trigger disconnect (should clear the CSA state) */ ieee80211_chswitch_done(vif, false); }