Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3609387pxb; Mon, 24 Jan 2022 13:27:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsk/G2rnrcTcZDS35xYZpOjQJ6uskylggN8UxkC4w+5P0FrAMJJOvB98WzC56VmMyn33yj X-Received: by 2002:a17:902:a60f:b0:14b:63db:9bc1 with SMTP id u15-20020a170902a60f00b0014b63db9bc1mr3063520plq.60.1643059518109; Mon, 24 Jan 2022 13:25:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059518; cv=none; d=google.com; s=arc-20160816; b=I8/DOTv/A9kv26HpAVB6wYATE6jOUPoH9lvgXq24WqMR2d9zJQpO5E2rBHw2Kn+P9M wsK0Wuo9FhRWjbYDiHAQsanq7P2aRQ37+zgdaINJZpRrf5LZGidL1Mt5uTJ0HiWFfBpv R4nbuM2df82GXvHrmp3elFdk+CDV0kLNlHZOoYMPxc4usee6Loh9rXIYPzK5PNyEwjPD icBVb1as/ApcWXEernEGQXn4ohRDmlfxKIE/BrqJ7dhX+w6xHdPZ8BhZqA/4UcpMb0am t8MsTPY9Gyouzp8SNCoBsfVvAP8nR5PqQViTAXxIfBvLUu5m9K8B4rWM59vMv4pqvjP0 19CA== 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=jK/hCnQNLA7JqbMe2sFjn25EZvlba4Yx0HmMMHr17PA=; b=wVlOPegYm/Tk3HFcyXthwbKvoto+BBZKGnb+pXi5mojtl29f2XLESkPeHt14R/l7Wj mSChxqK80A4MU4KIl7OmgJwYXjwYipXAUO5aSSmKxzY0fR7FeqDsqCuZfNrvAXubPXis olsoW4BYwKinSnArGbehjU5f/c1tGrZEiUYMNpl9opMtZD2Ll7O39tWRKKvBaQwtCwCw CvZ6t4MF9Ffv3Cnr+C10Ts64eMHiYyuP3QMoLejV1a3qgxxoFk+oq0E035IA/amnnx0E Zt/6aL4iKmASRnFakxNGQg5GqXyASVnABfBwBYPOIeb6EBDEKXjb906HMY/PMdytX8X6 YgtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QnGnXvNo; 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 pg13si469388pjb.9.2022.01.24.13.25.03; Mon, 24 Jan 2022 13:25:18 -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=@linuxfoundation.org header.s=korg header.b=QnGnXvNo; 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 S1444371AbiAXVAs (ORCPT + 99 others); Mon, 24 Jan 2022 16:00:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385443AbiAXUdZ (ORCPT ); Mon, 24 Jan 2022 15:33:25 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBD2BC07E294; Mon, 24 Jan 2022 11:45:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6861261482; Mon, 24 Jan 2022 19:45:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29597C340E5; Mon, 24 Jan 2022 19:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643053509; bh=WCqmV5V7bA9Ezs5dDtJnZCm+j+H3lnDU0oaDy3hIKIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QnGnXvNoylRzfJge4HSOq5tlA7cfwyuBCZ4VqET7tJgWkLgDXxWPQQR8lHoI6kAzz Q8DGzxvORENUE6X+sbRgzB9hMNehrsTcEQXwHcd77X5SiBwl5pSOeTZgzdj2wm1KxX G0bHa8Gon9oHj2L/GbaIKRnWyRHUchylSxYBowMs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Venkateswara Naralasetty , Sven Eckelmann , Karthikeyan Kathirvel , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 088/563] ath11k: reset RSN/WPA present state for open BSS Date: Mon, 24 Jan 2022 19:37:33 +0100 Message-Id: <20220124184027.439684369@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@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: Karthikeyan Kathirvel [ Upstream commit 64bc3aa02ae78b1fcb1b850e0eb1f0622002bfaa ] The ath11k driver is caching the information about RSN/WPA IE in the configured beacon template. The cached information is used during associations to figure out whether 4-way PKT/2-way GTK peer flags need to be set or not. But the code never cleared the state when no such IE was found. This can for example happen when moving from an WPA/RSN to an open setup. The (seemingly connected) peer was then not able to communicate over the link because the firmware assumed a different (encryption enabled) state for the peer. Tested-on: IPQ6018 hw1.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Fixes: 01e34233c645 ("ath11k: fix wmi peer flags in peer assoc command") Cc: Venkateswara Naralasetty Reported-by: Sven Eckelmann Signed-off-by: Karthikeyan Kathirvel [sven@narfation.org: split into separate patches, clean up commit message] Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20211115100441.33771-2-sven@narfation.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/mac.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 304e158f09751..b4f8494e3c707 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -792,11 +792,15 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) if (cfg80211_find_ie(WLAN_EID_RSN, ies, (skb_tail_pointer(bcn) - ies))) arvif->rsnie_present = true; + else + arvif->rsnie_present = false; if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT, WLAN_OUI_TYPE_MICROSOFT_WPA, ies, (skb_tail_pointer(bcn) - ies))) arvif->wpaie_present = true; + else + arvif->wpaie_present = false; ret = ath11k_wmi_bcn_tmpl(ar, arvif->vdev_id, &offs, bcn); -- 2.34.1