Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp34232pxj; Mon, 17 May 2021 20:10:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVEfFM3BrFAcdIoPj6ipc2XBgYxoUlqdu8qUgaChXIvCT6CEl4h4VCFG4n2STMPE/nWQRS X-Received: by 2002:a92:b705:: with SMTP id k5mr2393664ili.140.1621307453632; Mon, 17 May 2021 20:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621307453; cv=none; d=google.com; s=arc-20160816; b=JAzDUNVX0svJ6JRYW8HR1OBgIbx+spemngsPVAGPHqrWkSXC9ortltdEHMILbcFMRJ SY8M7tOfwgveeO5EAWjKD/7d6O60SYvOBUnpa4lfNHF+U9MMUtREI55AaRnfqxMqMeSC y9xgVLhp/9agD7ZTBdrU392ahY+BhX9+Pw3IVCNkQP8sMzTbEHQNPXA8iAdTN+EROpMC Ryr+s3tGhduXeomzCbG8jnD5KsujFd0+4ehEYWHgV0F8puFq3Nvf49WtbyhQ8xFp62sl 8Jg8OWohVGAw1Cf/tWKpGeR3nJgmGddJl8833hjL40Bm3zAiZyeRt1qLVm1t280k7ohy IoZQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BXJU8K9/ze+IvDLCll/bKWggeiFObv2PJGy/csLOSUY=; b=nwDEuvC8NhySC7qKW6Q/PrRqd8g+buEk4cHFojjkxQgQgGPh2gWnoAUY46j56ur98q jwBFewVu0Si4n+0CdgmOxaT7H7xijkUicTwtzty9f5Pfhq+ro4Kal81JocRYL7yNPibh ccEngHXWAei4JggbVVGJtJhhkoZleZQUv4riPot53MbhoNwpD70yiw8Ljn/T9Bk2nrlK 6wIXr6t5s5NfmbKM0YNWpgFRrdVj+La5mQpkutoW3dQWe0sCAhjIe00oudI7hyw09Xae /PR4Rum588Nj8o664J9o8cpvHFD7TWjN5mfvKz47kCHoQhC1oEO0Ya66uisxqVgBPfeG 5Niw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VUXy7Pph; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si20670763ioe.38.2021.05.17.20.10.24; Mon, 17 May 2021 20:10:53 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=VUXy7Pph; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236430AbhEQOjG (ORCPT + 99 others); Mon, 17 May 2021 10:39:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:45054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240401AbhEQOeM (ORCPT ); Mon, 17 May 2021 10:34:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA5B96135F; Mon, 17 May 2021 14:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261005; bh=CZjNHLIKs8JfAun4i6BOWbAF5qtPJxRCj3HOV1t0/B0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUXy7PphHfsc/ywCKBz+gSUem/j5XkpBAgXc/p6uzyRJLyeykcPk3C9JIqjySldnq YwchFdBIqZNOKv0MlepQHwDY33hJ57RmpBfeV0AoCEsHqf2SsBGXuOsuPUc6fHta8w qSfIlvIMWNWd1flG7KsDswwsD+sXpdOFwocYau2Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Johannes Berg , Sasha Levin Subject: [PATCH 5.11 054/329] mac80211: clear the beacons CRC after channel switch Date: Mon, 17 May 2021 15:59:25 +0200 Message-Id: <20210517140303.885899360@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.043055203@linuxfoundation.org> References: <20210517140302.043055203@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Emmanuel Grumbach [ Upstream commit d6843d1ee283137723b4a8c76244607ce6db1951 ] After channel switch, we should consider any beacon with a CSA IE as a new switch. If the CSA IE is a leftover from before the switch that the AP forgot to remove, we'll get a CSA-to-Self. This caused issues in iwlwifi where the firmware saw a beacon with a CSA-to-Self with mode = 1 on the new channel after a switch. The firmware considered this a new switch and closed its queues. Since the beacon didn't change between before and after the switch, we wouldn't handle it (the CRC is the same) and we wouldn't let the firmware open its queues again or disconnect if the CSA IE stays for too long. Clear the CRC valid state after we switch to make sure that we handle the beacon and handle the CSA IE as required. Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20210408143124.b9e68aa98304.I465afb55ca2c7d59f7bf610c6046a1fd732b4c28@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/mlme.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b7155b078b19..c9eb75603576 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1295,6 +1295,11 @@ static void ieee80211_chswitch_post_beacon(struct ieee80211_sub_if_data *sdata) sdata->vif.csa_active = false; ifmgd->csa_waiting_bcn = false; + /* + * If the CSA IE is still present on the beacon after the switch, + * we need to consider it as a new CSA (possibly to self). + */ + ifmgd->beacon_crc_valid = false; ret = drv_post_channel_switch(sdata); if (ret) { -- 2.30.2