From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.97 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796289308; b=YE4ZmZttVuwm4StJU0tyR5CDeHvKeh5YDYpupPybag5Vk4BmyY00u94UXUA+XcPxoKqd PTZA35hulAJkLGWeKryWxZh+gcIYi/i/qvYc1jYYCsO4dbVKL35quvBVYIcCLvobpq6MQ mEWVuBfktTgt5PmJZOWz3CoH7dy7l6L4wWw1n0fhGNnaBaVdCwij0w8Jhg5XxcRycbJwK YmPyoRffHGs+F2Bt6lJ8nuacuByf6OVLUuPR3cnjls5QcYss0wRWFKcE7WNEAH+KhYaK0 5dAqWasx1+mIn68tLgqfJm0wUNMPDFXw7e5Vh2RzYwtyiYMdrrSYJk+vEO5lOmPQduw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796289308; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:X-Relaying-Domain: X-CFilter-Loop:Received:DKIM-Signature:X-Forwarded-Encrypted: X-Received:X-Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-DetectorID-Processed; bh=PGEh0VQVrzymzhGvaPKevF2qNB5FIBo0Nd3S6bykFxE=; b=oinY8Zivq5CGWtI6NF+sFCk8Grxz03D/lRfRetdMVz2EacIN5p9C9DUY7joVSRK8sMQf CL2vQbEfHYNnS/HmvYx9wPBE6njODKt1t0f9Rzm7Wcxha4DjIWp8FD5ussgFQ0qVM4rYN af+r0hSC31piEX99CspTMCz+S+XAoDnBw6SVpyKl3X4LF2MXi7tHVWnXEDkTyGsOnmpx7 nrcU85y205iRisLmCExYlcae1TG++sugzQdL5OFjnss0wMBBepu9wf5e0cDm3Iebf+K6H Ek3YfiIjQTHeTLKHRRUgTrQkgQkUe+cdK5Gr3F7ra66rmnKbvIdkXjtkEtfYoxMYpUQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=LUyvKzvX; arc=none smtp.remote-ip=209.85.216.97 Received: from mail-pj1-f97.google.com (mail-pj1-f97.google.com [209.85.216.97]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BDFE606A68B for ; Thu, 3 Dec 2026 09:15:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6BDFE606A68B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=LUyvKzvX Received: by mail-pj1-f97.google.com with SMTP id 98e67ed59e1d1-3b59bcb3301so423343a91.0 for ; Thu, 03 Dec 2026 01:15:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796289304; x=1796894104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=PGEh0VQVrzymzhGvaPKevF2qNB5FIBo0Nd3S6bykFxE=; b=XrXxf8ow0UP/qmc8Fg5IC1f81RFX1ljO6IZU1UmirGhUhuNX6L6QKPPm7gyZSZQnKc ckPBikkzeBKuatsoZXGwWvK8tDhqPQZdqe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FL6c5IiuCyE+oUO1unYTO6civ1wmBCUPTmsvT4OlAxKZRBGM1HHh1tRfk/OWZBj0H8ObH IAh4PIEi5DtJ+BUfwIBADQrAcTeIBT0uix0+rvaPScdg== X-Received: by 2002:a17:90b:548c:b0:3a8:337d:228a with SMTP id 98e67ed59e1d1-3b5cb5f361dmr954945a91.6.1796289304224; Thu, 03 Dec 2026 01:15:04 -0800 (PST) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-123.dlp.protect.broadcom.com. [144.49.247.123]) by smtp-relay.gmail.com with ESMTPS id 98e67ed59e1d1-3b5c7aa4d11sm1431933a91.4.2026.12.03.01.15.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2026 01:15:04 -0800 (PST) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-55bb7f70b06so15993701cf.0 for ; Thu, 03 Dec 2026 01:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1796289303; x=1796894103; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=PGEh0VQVrzymzhGvaPKevF2qNB5FIBo0Nd3S6bykFxE=; b=LUyvKzvXptty15oTpKVjbe52EpVELadFH40Z4sPWhDHNUDixfD1iMmJ3HXWiaZ4BkP GOqGeN03vDl4B5G6I5H/R62UvwMxY7yJH8NwDAYRBaRH9UkiaH2IPxVT3y6rCtUcxgqL mcLi4l/mUVV0ICgXt1bm0qKHkBjNG2FF/vAyU= X-Forwarded-Encrypted: i=1; AL+hErHxNAOPXnDeGgdL29x8H921cFLik72Kk0LaQoFXAtGhyExCsBm5bc9yNaBcLCd+ibcPpK4AA5ZJE4MNSLU=@vger.kernel.org X-Received: by 2002:a05:622a:3d0:b0:536:6013:be8e with SMTP id d75a77b69052e-55e280318damr23200151cf.1.1796289303041; Thu, 03 Dec 2026 01:15:03 -0800 (PST) X-Received: by 2002:a05:622a:3d0:b0:536:6013:be8e with SMTP id d75a77b69052e-55e280318damr23199911cf.1.1796289302610; Thu, 03 Dec 2026 01:15:02 -0800 (PST) Received: from bld-bun-02.bun.broadcom.net ([192.19.176.227]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-55d784517casm356148441cf.3.2026.12.03.01.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 01:15:02 -0800 (PST) From: Arend van Spriel To: Ragul Balaji Cc: linux-wireless@vger.kernel.org, Arend van Spriel , Johannes Berg , brcm80211@lists.linux.dev, Ho Jie Feng , brcm80211-dev-list.pdl@broadcom.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH wireless-next v2 05/11] wifi: brcmsmac: round short-GI L-SIG lengths up to whole symbols Date: Thu, 3 Dec 2026 10:14:40 +0100 Message-ID: <20261203091446.3360602-6-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261127061147.506129-6-ragulbaby@gmail.com> References: <20261127061147.506129-6-ragulbaby@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-DetectorID-Processed: b00c1d49-9d2e-4205-b15f-d015386d3d5e On Fri, 27 Nov 2026 14:11:35 +0800, Ragul Balaji wrote: > The L-SIG length of a mixed-mode frame covers its HT part in 4 us > legacy symbols. For a short guard interval, the HT PHY's TXTIME counts > the data symbols at the guard-independent bits per symbol, then rounds > their 3.6 us each up to 4 us units. > > brcms_c_calc_lsig_len() instead divides the bits by the short-GI rate, > which rounds the symbols down before scaling them and uses the rounded- > up rates of the MCS table, so it can count one symbol less than the > frame takes. Count the symbols at the long-GI rate and scale them. > > Signed-off-by: Ragul Balaji > Signed-off-by: Ho Jie Feng > --- > drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) [...] > @@ -7114,9 +7114,8 @@ brcms_c_calc_lsig_len(struct brcms_c_info *wlc, u32 ratespec, > * the payload duration calculation matches that > * of regular ofdm > */ > - /* 1000Ndbps = kbps * 4 */ > - kNdps = mcs_2_rate(mcs, rspec_is40mhz(ratespec), > - rspec_issgi(ratespec)) * 4; > + /* 1000Ndbps = kbps * 4, at the long-GI rate */ > + kNdps = mcs_2_rate(mcs, rspec_is40mhz(ratespec), false) * 4; > > if (rspec_stc(ratespec) == 0) > nsyms = > @@ -7129,6 +7128,9 @@ brcms_c_calc_lsig_len(struct brcms_c_info *wlc, u32 ratespec, > CEIL((APHY_SERVICE_NBITS + 8 * mac_len + > APHY_TAIL_NBITS) * 1000, 2 * kNdps); > > + /* short-GI symbols (3.6 us) in 4 us units, rounded up */ > + if (rspec_issgi(ratespec)) > + nsyms = CEIL(nsyms * 9, 10); > /* (+3) account for HT-SIG(2) and HT-STF(1) */ > nsyms += (tot_streams + 3); > /* Please make the commit message more clear with a numeric example, such as MCS7, 20 MHz, short GI and a 1500-byte MPDU: 47 HT symbols require 43 L-SIG units, while the old calculation can produce 42. As this changes the L-SIG length placed in every HT short-GI mixed-mode TX header and A-MPDU, it should not be part of the shared-code refactor. Please send it as a standalone fix targeting wireless, with an appropriate Fixes tag. This change better be tested on brcmsmac hardware. Do you have any devices to verify this. I can have a look what I have lying around here and give it a spin. Capturing a sniff would be ideal, but my setup lacks it. Regards, Arend