From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.migadu.com (out-36.mta1.migadu.com [95.215.58.36]) (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 DC39E3E0C4F for ; Thu, 20 Aug 2026 09:04:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787216681; cv=none; b=BkfjPMwULFRjoaMHwyq7/ZPodtuu6j4lUO3XbgbISyrXIYYIksf9zfgf4aoGq6sKOisXu5mhxQtAf/KOixQreRygezoWYU0rYYEtvZqXC1Ol4hEPFZVLFL4HbwyPq3fjbgiBJPjY7eI/T0mJDPwQKCbFNXtTDM71exmt6ZRzAiM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787216681; c=relaxed/simple; bh=39FZnX2I3RKcZCmBtrC0dQOdKvZp2sD98UtE0DYCf/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ALOzAh9cZOL/VQrM/ZlvERJye+w1K+3PWjVNxqWbY6jSz7CH2VvHs1HfYYiyzxF90B1M/92N9cswvn4UTzfh1zHjqYmxJm/N9d0/yTemKtxkkdbLWDxRyY/hvBxvmk3jmLWLbeqFJ+HHc7mDqDdYzydkRj7P1sFnElWVkQ40iMs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=swpopj8n; arc=none smtp.client-ip=95.215.58.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="swpopj8n" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=39FZnX2I3RKcZCmBtrC0dQOdKvZp2sD98UtE0DYCf/M=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787216677; v=1; x=1787821477; b=swpopj8nEeRBzIMqdEHVyTeX6l5zIMLQCcDnGHuhkQYx/ws7/uwFppMqg1xbi2niMSI6lpHR zPnfenr30dQNG5tEairVPxXP9biy/kTJKmryn/+W4pPTj9HDClZN3AzfbdQwVugEcDTDKC22Ua8 ajlXFmWYkqo0lLUG2Wt7gSms= X-Envelope-To: linux-kernel@vger.kernel.org Received: from kali (2a06:63c5:9b00:3900:e1b3:d7a6:6110:4f65) by smtp.migadu.com with ESMTPS id 36d08882a2c83786; Thu, 20 Aug 2026 09:04:37 +0000 X-Mizu-Trace-ID: 36d08882a2c83786 X-Migadu-Flow: FLOW_OUT From: luka.gejak@linux.dev To: Ping-Ke Shih , linux-wireless@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Michael Straube , Bitterblue Smith , Peter Robinson , Hans de Goede , Luka Gejak Subject: [PATCH v7 2/6] wifi: rtw88: rx: mark zero length packets on RTL8723BS Date: Thu, 20 Aug 2026 09:04:08 +0000 Message-ID: <20260820090412.19574-3-luka.gejak@linux.dev> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260820090412.19574-1-luka.gejak@linux.dev> References: <20260820090412.19574-1-luka.gejak@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luka Gejak Like the RTL8703B, the RTL8723BS reports receive descriptors with a zero packet length, which the vendor driver drops outright. rtw88 already flags these as having no PSDU for the RTL8703B, so extend the same handling rather than passing an empty frame up. This is gated on the SDIO interface rather than the chip id, because it has only been observed there; the USB variant is not known to do it. Co-developed-by: Michael Straube Signed-off-by: Michael Straube Signed-off-by: Luka Gejak Acked-by: Ping-Ke Shih --- Notes: Changes in v7: none. Changes in v6: none. Changes in v5: the zero length test now evaluates pkt_stat->pkt_len first, so the unlikely case short circuits before the chip test. drivers/net/wireless/realtek/rtw88/rx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/rx.c b/drivers/net/wireless/realtek/rtw88/rx.c index 01fd299abb7f..fde21c840ac0 100644 --- a/drivers/net/wireless/realtek/rtw88/rx.c +++ b/drivers/net/wireless/realtek/rtw88/rx.c @@ -253,10 +253,12 @@ static void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev, rtw_rx_addr_match(rtwdev, pkt_stat, hdr); - /* Rtl8723cs driver checks for size < 14 or size > 8192 and - * simply drops the packet. + /* + * Rtl8723cs and rtl8723bs drivers check for size < 14 or size > 8192 + * and simply drop the packet. */ - if (rtwdev->chip->id == RTW_CHIP_TYPE_8703B && pkt_stat->pkt_len == 0) { + if (pkt_stat->pkt_len == 0 && + (rtwdev->chip->id == RTW_CHIP_TYPE_8703B || rtw_is_8723bs(rtwdev))) { rx_status->flag |= RX_FLAG_NO_PSDU; rtw_dbg(rtwdev, RTW_DBG_RX, "zero length packet"); } -- 2.53.0