From: Sven Eckelmann <se@simonwunderlich.de>
To: Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Ryder Lee <ryder.lee@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Benjamin Koerner <bk@simonwunderlich.de>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, sw@simonwunderlich.de,
Harshal Gohel <hg@simonwunderlich.de>,
Benjamin Koerner <bk@simonwunderlich.de>
Subject: Re: [PATCH RFC mt76-next] wifi: mt76: mt7996: support spectrum scan / IQ capture
Date: Fri, 04 Dec 2026 13:35:43 +0100 [thread overview]
Message-ID: <7816043.MhkbZ0Pkbq@ripper> (raw)
In-Reply-To: <20261204-spectrum-scan-v1-1-db13123ecce5@simonwunderlich.de>
[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]
On Friday, 4 December 2026 11:55:27 CET Benjamin Koerner wrote:
> +static u16 mt7996_spectrum_gain_db(u8 gain)
> +{
> + const u16 gain_db[] = { 1, 55, 47, 39 };
> +
> + if (gain < ARRAY_SIZE(gain_db))
> + return gain_db[gain];
> +
> + return 1;
> +}
This hardware supports more gains. We already discussed that we might to add
them too. But here a specific idea from Simon:
The gains are most likely hardware specific. And it is a little bit awkward to
remember which name belongs to which gain. It might therefore be a good idea
to have a read-only file "gains_available" (like the scaling governor) which
shows which gains can be selected. And then the user can then write these
values to gain file. Either the actual dB value from this list or the alias.
But the aliases high/medium/low can of course also be dropped when this would
not be appropriate. If it is not one from the list then the write will be
rejected with an -EINVAL.
And maybe we disallow "auto" because then the samples are returned with a
random gain (which we don't know and don't get reported).
The list could then for example look like this:
55 (high)
47 (medium)
39 (low)
31
23
15
5
Regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-12-04 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 10:55 [PATCH RFC mt76-next] wifi: mt76: mt7996: support spectrum scan / IQ capture Benjamin Koerner
2026-12-04 12:35 ` Sven Eckelmann [this message]
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=7816043.MhkbZ0Pkbq@ripper \
--to=se@simonwunderlich.de \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bk@simonwunderlich.de \
--cc=hg@simonwunderlich.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
--cc=sw@simonwunderlich.de \
/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