From patchwork Wed Jul 29 23:15:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 247259 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1907968ilg; Wed, 29 Jul 2020 16:15:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTWV0Fr2ELpPTJyXYQQhNhHXVS36smt7Lyk+if6iN1+c/kBY8r0InEyGrECH6/swbfd2hX X-Received: by 2002:a17:906:434c:: with SMTP id z12mr618563ejm.33.1596064500591; Wed, 29 Jul 2020 16:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596064500; cv=none; d=google.com; s=arc-20160816; b=ZIMUQRCj77RliM9I4anECC2dYj5y0VqLaOV1NNh8BZc2XTus+xhgjPhvx/mbw0L3dV fAO7XeqiB5LZauP1T5rhgbbuOfIBDMV2dzPdKaeb0XsPPGmj8xE1RrZbuUxV2PGKRhPW voBjsxHMDzHqnQdYg3ZTc5nvusgv7iC5ZUb6MhLO0wpXhfemqcH3TnTR00lap4bTrYa7 /J5x8M4Dt0Ur53Na44uoui9HfnO4tnsIw7GOqCQrZUDxreMNnRZjNOpV0Uq7xdjmG7Qg DUjhyt4BbCk2LLJzF5VeHTFPOKb0tpGbyZDX+AgSMGHLuSdvHtXMf7Yx/dPdHziJG/fz mZdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sntpPHY2+VZ5d6bcCmwMMBCh31oWFRBbmJ2q4E5saAE=; b=Ai3X6lsUxK6JofP9xhnNWPEg0aRALGUV52yU0nokStUDLSsd0thrT33Jeh8N5WoQ6n JprHSHrxOYsBOKDlqmpSpWk6OFERvjPfsk3+dUE/Fwo5XdqykU8U/gVLtgwDMAsO6Lsf n0kIlk+w6WV6LS+QUxDsm2/1WLBS33K4LRgpM70QtiVjhPEs0otu6l1MZKs1m0IVr4Fy aBZjMi0TkXUIr0ICkg0Y6rqXZyFtGSymJIb4iFdiilvWm0smbrEo9duDIl+7UD2V6HGG cAk2A0p2NjHHXAi5KVYWdxlosXz6NVAhq4JXHElZytZmYiyXUwNKkVpMbM+pa2EhUpSV o61Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mWIlv/GN"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k17si1033860eds.353.2020.07.29.16.15.00; Wed, 29 Jul 2020 16:15:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mWIlv/GN"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728071AbgG2XO6 (ORCPT + 2 others); Wed, 29 Jul 2020 19:14:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbgG2XOz (ORCPT ); Wed, 29 Jul 2020 19:14:55 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2915BC061794 for ; Wed, 29 Jul 2020 16:14:55 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id x5so4129193wmi.2 for ; Wed, 29 Jul 2020 16:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sntpPHY2+VZ5d6bcCmwMMBCh31oWFRBbmJ2q4E5saAE=; b=mWIlv/GNoNJMTUafs0TSSGkdSB9ozl+knMbZGGiLcTqU421FhRN/Qy0EpPyInKYg8I nxjFmZJAF4Eu31gZksIa5ZcWFFjH2D4x/m1+X7+/y+WbrR/S9+6mWFdQS6ju+GulwiLl QfWm/Pxc0Ve31oQEPG40iOzZpKYbpmlXujnK2gk2yCP72BcUZWWVAq2qTbPvqOoUfo6s EUVjYX1v6wHzVIxqr5oyNi9gEmQ3ud2KUZqA+M2m0o62kK1EvD9uivYBF1IX+VhSLZHb uUffOJrLM/E13fCtswq+H5z3rW7n7h1uXoa8GynSo64yEIZR7j5SrCvpiKdLAvGWJr6l PsRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sntpPHY2+VZ5d6bcCmwMMBCh31oWFRBbmJ2q4E5saAE=; b=bYnUrKuDrOptdEYA4VTdUHI6jVrJIiyzlKrfBYx7PQ/lBu0YEYcXcgJEZOPJx//NXm 8mN+O230JdsFrd/ia/PN70ca+4CX3Dhdm4sRMGmQ8utigMtB7wHR92ePfg0jrSyxdaNY fjZYU6YCGIe92oERCKpdVB7HfBtnE3tCMJCVNU3V9tU5yPWx9pDhrai/fNxaaja/pbCq pz71bamKM0n4RNxQipoC/anSB0LgMmRFPMWDS8E/GatpLteS2Xa6uNbqs05PjBFSIdcC /GzQ6/OQbVu/yEq/i0MRMXtzlo5ZiaUEPRhhaU/SmKNjfNNgnhrQMqr6wcO3WqpM1d8b bniA== X-Gm-Message-State: AOAM531xcyoVSMJ1CTkVCzJbUUzVsHWSi7AyX8mo5fBTIb9duXUlWlph xakgCQ+JTX8+f362hdRtDxkfSnLN7yU= X-Received: by 2002:a1c:f016:: with SMTP id a22mr10133558wmb.47.1596064493813; Wed, 29 Jul 2020 16:14:53 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id h11sm7738301wrb.68.2020.07.29.16.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2020 16:14:53 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, loic.poulain@linaro.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org Subject: [PATCH] wcn36xx: Ensure software scans scan on operational channel Date: Thu, 30 Jul 2020 00:15:38 +0100 Message-Id: <20200729231538.3965043-1-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org We need to ensure that the operational channel is scanned, because if the AP deauthenticates us for whatever reason, subsequent scans will not work. This fixes an issue I'm seeing on wcn3680 where my AP de-authenticates my device but on a subsequent scan of available channels the channel we were initially connected to fails to show up. In this case I either need to shift the AP to another channel or reboot the device. Ensuring the operational channel is scanned means we can never get into that situation. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) -- 2.27.0 diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index fb8978a3c11e..51fed732328e 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -416,17 +416,10 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed) wcn36xx_dbg(WCN36XX_DBG_MAC, "wcn36xx_config channel switch=%d\n", ch); - if (wcn->sw_scan_opchannel == ch) { - /* If channel is the initial operating channel, we may - * want to receive/transmit regular data packets, then - * simply stop the scan session and exit PS mode. - */ - wcn36xx_smd_finish_scan(wcn, HAL_SYS_MODE_SCAN, - wcn->sw_scan_vif, ch); - } else if (wcn->sw_scan) { - /* A scan is ongoing, do not change the operating - * channel, but start a scan session on the channel. - */ + if (wcn->sw_scan) { + if (wcn->sw_scan_opchannel != ch) + wcn36xx_change_opchannel(wcn, ch); + wcn36xx_smd_init_scan(wcn, HAL_SYS_MODE_SCAN, wcn->sw_scan_vif); wcn36xx_smd_start_scan(wcn, ch);