Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5463205pxu; Tue, 22 Dec 2020 18:53:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyg6F23s7AyObx0WLdZ6yvoeUuTJbCOr4J/deWpev0ETYxrBZV+p87wOlhGMyZVuO0DKBIM X-Received: by 2002:a17:906:32d6:: with SMTP id k22mr22644659ejk.457.1608691987987; Tue, 22 Dec 2020 18:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608691987; cv=none; d=google.com; s=arc-20160816; b=WSTcim/VexyRXND9l2639jhUzrBVyBhVflsq9XpwFMxKTZC7oiy4tDMqgV2L1KI1K2 FARQ9DV3C5DwgbobFBMNN8zeEU1iJaLMBe7XscQV7ALGUCGVcwmf/rsfHOVX7CB6RuAY 9xa6Rk53UbCGwpW6pYrGZ8NsIcVAHHF66c4Yhp6u9eUA8FpQlkX/vKoDWrJ/wQYzQgz2 gDmRQZtyVGxs9WKLDJFRm8qdF0+Z7/By5fqaw8eamS67Udx5o2BvDeGOIKAB4Oub+GwQ 25+YCeC0YU8Qr7FqGV3WP0WqiU6DwP4bK9skMCkNpmf28NL7IuGsfjWc0sifos93C8HU XflA== 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=aTO7o7sGBfqEH44HmC9QJih/qnyd5R4jDOJIafc4B6A=; b=KZjVSNRCokuis5uvZhq0WsQb8no8LpWyMvtg6WCpjcS10ATMC4/TB/EJdhyyaRFbZ6 JDR3JAQAuk2DRu0k+e9+Zj4aijjhS4cSya+j/7USZR+0OIdX8UGhMPnkoOj5BGJvDdFt dnuxwNBVXuw6oES7bNjyDD9T1g1j1BPgVgBXune+6TPYMNXTSLLNJIDEY+HTlQm8oraL ma/4va0jDOE6hFgCj7+V32nIS6Xba/uwvhruUrlIAar5h7Jt9YID7vkKA6Kel8jNwxuK GHMrQoD5AS6hNGHYCjCe8H/9HdyxX3AnlI93iiW8cI2f7D091RZ1nxUCZz0mFBG+divR wcmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cLnXRjfN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw3si9412852ejb.186.2020.12.22.18.52.45; Tue, 22 Dec 2020 18:53:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=cLnXRjfN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729363AbgLWCVb (ORCPT + 99 others); Tue, 22 Dec 2020 21:21:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:49658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729251AbgLWCVO (ORCPT ); Tue, 22 Dec 2020 21:21:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 37393225AA; Wed, 23 Dec 2020 02:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690054; bh=B6gMvVcQGWw+yIct8QLLq777HCeZBqK6uUk2SPyejB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cLnXRjfN8GmC9w0n2b4XtmcNiRnfOSgesQpq/UPRPAMTaicyd2wwRxxFnbrHuQqI4 Fnr3+enAbxKuVjQlEjpOnjwryLFNlKFNzvN/xEsPgNGnNT8qP9XSpa01eUuvHva+dP 0urvIgEosJ8ji/EfGtJXla62A97Y1Vqw5zvyadkEx5htoPmV6uVrnEO56Ez6PeX3DB BsNjip2SOuryIHYuvR9AxywXNTQhOUKoVL7O+WlgJMkPhmwEP2xX0jjS0dqnjID4Oc poZHWvAAAdpLi8TSoDwvf8lVMoxTtJGW4K9LJpox8O2vQtzTi+PzIm/S5Jp/GprabG /MWBKhHoCOWWA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Emmanuel Grumbach , Luca Coelho , Johannes Berg , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 124/130] mac80211: don't filter out beacons once we start CSA Date: Tue, 22 Dec 2020 21:18:07 -0500 Message-Id: <20201223021813.2791612-124-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223021813.2791612-1-sashal@kernel.org> References: <20201223021813.2791612-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Emmanuel Grumbach [ Upstream commit 189a164d0fc6c59a22c4486d641d0a0a0d33387a ] I hit a bug in which we started a CSA with an action frame, but the AP changed its mind and didn't change the beacon. The CSA wasn't cancelled and we lost the connection. The beacons were ignored because they never changed: they never contained any CSA IE. Because they never changed, the CRC of the beacon didn't change either which made us ignore the beacons instead of processing them. Now what happens is: 1) beacon has CRC X and it is valid. No CSA IE in the beacon 2) as long as beacon's CRC X, don't process their IEs 3) rx action frame with CSA 4) invalidate the beacon's CRC 5) rx beacon, CRC is still X, but now it is invalid 6) process the beacon, detect there is no CSA IE 7) abort CSA Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.83470b8407e6.I739b907598001362744692744be15335436b8351@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/mlme.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index ba1e5cac32adb..ed12519e3a634 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1415,6 +1415,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, sdata->csa_chandef = csa_ie.chandef; sdata->csa_block_tx = csa_ie.mode; ifmgd->csa_ignored_same_chan = false; + ifmgd->beacon_crc_valid = false; if (sdata->csa_block_tx) ieee80211_stop_vif_queues(local, sdata, -- 2.27.0