mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jie Feng <hjf3108@gmail.com>
To: Luka Gejak <luka.gejak@linux.dev>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	linux-wireless@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>
Subject: Re: [PATCH rtw-next v3 2/5] wifi: rtw88: 88xxa: receive VHT SU beamformed transmissions
Date: Fri, 13 Nov 2026 16:20:57 +0800	[thread overview]
Message-ID: <CABOQOSVz0M4G2mzwtb000Ss86PjoTUwKvfoRQziLwY9DAqdNbg@mail.gmail.com> (raw)
In-Reply-To: <19FBDC54-7E87-4A8C-BDD3-E16351EE3CEC@linux.dev>

On Fri, 13 Nov 2026 at 16:09, Luka Gejak <luka.gejak@linux.dev> wrote:
>
> Hi Jie Feng,
>
> Two more small comments that I missed in my first reply.
>
> On November 12, 2026 6:32:41 PM GMT+01:00, Ho Jie Feng <hjf3108@gmail.com>
> wrote:
>
> > diff --git a/drivers/net/wireless/realtek/rtw88/rtw8814a.c b/drivers/net/wireless/realtek/rtw88/rtw8814a.c
> > index e35c57c9d1..c2a18f6be8 100644
> > --- a/drivers/net/wireless/realtek/rtw88/rtw8814a.c
> > +++ b/drivers/net/wireless/realtek/rtw88/rtw8814a.c
>
> [ ... ]
>
> > +     rtw_bf_enable_bfee_su(rtwdev, vif, bfee);
> > +
> > +     rtw_write32_mask(rtwdev, REG_SND_PTCL_CTRL, MASKBYTE1 | MASKBYTE2,
> > +                      0x0202);
>
> The other values in this function have defines, but 0x0202 is bare. The
> vendor code doesn't name it either, so maybe just a short comment on
> what these two bytes do, if you know it.
Yeah, indeed the vendor code is full of magic numbers, I don't really
know what they mean beyond guessing.

> [ ... ]
>
> > diff --git a/drivers/net/wireless/realtek/rtw88/rtw88xxa.c b/drivers/net/wireless/realtek/rtw88/rtw88xxa.c
> > index 5ffa29d181..128a18ee33 100644
> > --- a/drivers/net/wireless/realtek/rtw88/rtw88xxa.c
> > +++ b/drivers/net/wireless/realtek/rtw88/rtw88xxa.c
>
> [ ... ]
>
> > +     if (rtwdev->efuse.hw_cap.nss == 2) {
> > +             rtw_write32(rtwdev, REG_CSI_CONTENT_VALUE, 0);
> > +             csi_param = 0x01090109;
> > +     } else {
> > +             rtw_write32(rtwdev, REG_CSI_CONTENT_VALUE, 0x01081008);
> > +             csi_param = 0x01080108;
> > +     }
>
> [ ... ]
>
> > +     for (i = 0; i < ARRAY_SIZE(csi_rpt_regs); i++)
> > +             rtw_write32(rtwdev, csi_rpt_regs[i], csi_param);
>
> These numbers are hard to follow. As far as I can see csi_param is the
> same 16 bit value twice, BFMER0 in the low half and BFMER1 in the high
> half, with the layout rtw_bf_enable_bfee_su() builds from named fields:
>
>         csi_param = (u16)((coefficientsize << 10) |
>                           (codebookinfo << 8) |
>                           (grouping << 6) |
>                           (nr_index << 3) |
>                           nc_index);
>
> So here codebookinfo and nr_index are 1, and nc_index is nss minus 1.
> Maybe build it the same way, or add a comment. For REG_CSI_CONTENT_VALUE
> the vendor code has "nc = 2" and "nc = 1" comments next to the two
> values, which would already help.
I opted to avoid trying to add more meaning to the vendor code, because
I couldn't be sure if they were correct. Rather than risk incorrect
documentation,
I just put the magic numbers in, since they are used as is without modification.

I can dig the vendor code for some confirmation that the csi param format
is the same for the later chips as 88xxa.

> Best regards,
> Luka Gejak

  reply	other threads:[~2026-11-13  8:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 17:32 [PATCH rtw-next v3 0/5] wifi: rtw88: extend 88xxA support Ho Jie Feng
2026-11-12 17:32 ` [PATCH rtw-next v3 1/5] wifi: rtw88: 8812a, 8814a: enable STBC for HT transmissions Ho Jie Feng
2026-11-13  8:08   ` Luka Gejak
2026-11-12 17:32 ` [PATCH rtw-next v3 2/5] wifi: rtw88: 88xxa: receive VHT SU beamformed transmissions Ho Jie Feng
2026-11-13  7:46   ` Luka Gejak
2026-11-13  8:01     ` Jie Feng
2026-11-13  8:07       ` Luka Gejak
2026-11-13  8:12         ` Jie Feng
2026-11-13  8:09   ` Luka Gejak
2026-11-13  8:20     ` Jie Feng [this message]
2026-11-12 17:32 ` [PATCH rtw-next v3 3/5] wifi: rtw88: prepare frequency-offset correction for more chips Ho Jie Feng
2026-11-12 17:32 ` [PATCH rtw-next v3 4/5] wifi: rtw88: 88xxa: correct carrier-frequency offset Ho Jie Feng
2026-11-13  7:52   ` Luka Gejak
2026-11-12 17:32 ` [PATCH rtw-next v3 5/5] wifi: rtw88: 8812a, 8821a: respect peer A-MPDU size limits Ho Jie Feng
2026-11-13  8:10   ` Luka Gejak
2026-11-13  8:16     ` Jie Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABOQOSVz0M4G2mzwtb000Ss86PjoTUwKvfoRQziLwY9DAqdNbg@mail.gmail.com \
    --to=hjf3108@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®