Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp950398lqo; Wed, 8 May 2024 23:23:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyFuBrrFMcBq1BUc8FfEDy/Ucph/OEuKHitAvvmHQecjO/jjUrANS3Z+GH+1n6lDaQyZT0mJTk9DXoMbH5h2h68fKYcqRaKL4yakXsrw== X-Google-Smtp-Source: AGHT+IGJDNqracKVMmM7IlDpx4+Ui/NOHfyDMk8IzY68TNqJ19PCS2D6cf1/oPJFquxCGc0EPz2z X-Received: by 2002:a17:906:7c4f:b0:a59:c3a7:59d3 with SMTP id a640c23a62f3a-a5a1165d1d6mr153201666b.13.1715235819231; Wed, 08 May 2024 23:23:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715235819; cv=pass; d=google.com; s=arc-20160816; b=KlDaQT5zwI6p718co8ShAGLHClPw0oqAU4Yh+lNWfpMQpufKbPuy8NwOK3Omv2Ck4v dbM9bjZ3aab711ZAi4CZuhKytOPV4aAS4/7h5mOGBuCEuwHG0dZMsLkU3wkolRsZ+uuU SzzbfC//TCyp/WWY9SslaG0AeJQdOjNBFCBApwabDvFMk+AH7QkDCAurms/prmo23gF8 0iKvW91u07pXiRmR+7whKLpBLEsCJjWABVhA/iMPLU+56w7KKzAsLMjS25zaACWEbNfG aNkA4ndpl/StJRuxu2OUwtn8L6bzicOfb3hUisenOgvt+taqcRsignVzpZNt91WKCmhk J4ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:in-reply-to:subject:cc:to:from; bh=ANxn3U/EdIVpch3eBRlKTJCI0hi/YlmHri6OpfY3akQ=; fh=YWWJcbgWFwnK6W6uT/7QTg0o1rUI2+bS2Qlbf9RQGjA=; b=CUKSW7u8HlCwNEBak8cVGVBhVIShH4tzhYfejiLtXjSkNWUcWjIhktTukmU5QfIkIz w/PcfgvYgj8l8NVLiTv2+IH1rfiJmVu56jez4Yeo2ZD0Rq8sJZ54XZO3OnVYvp9XeeMS 2UZ5qpve62tV124ldj02vjrXmYchtDphRlXtTGu/0liYkmw53GkZGVwSt9N0p3a7hVia HzoL4iP/bMPoikq5zagt+yExJ4oV3YxblL3jF9VvolAOTcO0SVl0tICdxfmrqUiyNUE4 MyDY3l/YPIAaiBKWep3bwT1d7DasPWfIUaJ6sagJS6iv3pfIoSsija8zgUsoiOA72eXJ TKVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-7375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7375-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba3a4fsi46301866b.532.2024.05.08.23.23.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 23:23:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-7375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7375-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E7AB01F22B05 for ; Thu, 9 May 2024 06:23:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE9BD1494C7; Thu, 9 May 2024 06:23:34 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63C9A323D for ; Thu, 9 May 2024 06:23:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715235814; cv=none; b=k/00RjLZqeqStAukpZE8sCEZsALb7qZMcsRE0wTFJtKBMs53Q3/u+c25HUFnQL3nOtg8ZViGrP1KkHREMB4zj/PMddS2YGQW5gp1K6IY+GMc0U+V4yPbXrOqgAIB1qTHl41kNmXlCO0l/3o7VeAicRPoR6GIg5+2/hx0HLkI5PQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715235814; c=relaxed/simple; bh=Uu9VEdNpLTRZfoCao7ZIwXUb5Gg9OZsdDZNOGQpWF60=; h=From:To:CC:Subject:In-Reply-To:References:MIME-Version: Content-Type:Message-ID:Date; b=nNYZOLu7Ig2GHojFAeSjhU0ohC/UdnQYG/qcR3rpW4V5xw0/VEdFa2QDgtTuq7CW18r8wVS7MPh2sydw8O5kRgfjnBmbvyDNLFiDj1V8QzKAP/HpTe3/2rqBdZgpNhHSK2l5Q6C86AiplVH9YdXWcK/jBY9qz3JAJpI2y5SKgKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4496NP4201291493, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 4496NP4201291493 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 May 2024 14:23:25 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 9 May 2024 14:23:25 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 9 May 2024 14:23:25 +0800 From: Ping-Ke Shih To: Bitterblue Smith , "linux-wireless@vger.kernel.org" CC: Ping-Ke Shih , Sascha Hauer Subject: Re: [PATCH] wifi: rtw88: usb: Fix disconnection after beacon loss In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Message-ID: <5fc4ad6b-5af8-469b-9665-d41ddb6d465f@RTEXMBS04.realtek.com.tw> Date: Thu, 9 May 2024 14:23:25 +0800 X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) Bitterblue Smith wrote: > When there is beacon loss, for example due to unrelated Bluetooth > devices transmitting music nearby, the wifi connection dies soon > after the first beacon loss message: > > Apr 28 20:47:14 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: > CTRL-EVENT-BEACON-LOSS > Apr 28 20:47:15 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: > CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1 > > Apr 28 20:47:24 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: > CTRL-EVENT-BEACON-LOSS > Apr 28 20:47:25 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: > CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1 > > Apr 28 20:47:34 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: > CTRL-EVENT-BEACON-LOSS > Apr 28 20:47:35 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: > CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1 > > When the beacon loss happens, mac80211 makes rtw88 transmit a QOS > NULL frame and asks to confirm the ACK status. Even though rtw88 > confirms to mac80211 that the QOS NULL was transmitted successfully, > the connection still dies. This is because rtw88 is handing the QOS > NULL back to mac80211 with skb->data pointing to the headroom (the > TX descriptor) instead of ieee80211_hdr. > > Fix the disconnection by moving skb->data to the correct position > before ieee80211_tx_status_irqsafe(). > > The problem was observed with RTL8811AU (TP-Link Archer T2U Nano) > and the potential future rtw88_8821au driver. Also tested with > RTL8811CU (Tenda U9). > > Cc: stable@vger.kernel.org > Signed-off-by: Bitterblue Smith 1 patch(es) applied to rtw-next branch of rtw.git, thanks. 28818b4d871b wifi: rtw88: usb: Fix disconnection after beacon loss --- https://github.com/pkshih/rtw.git