From: Kalle Valo <kvalo@codeaurora.org>
To: <yhchuang@realtek.com>
Cc: <linux-wireless@vger.kernel.org>, <briannorris@chromium.org>,
<pkshih@realtek.com>
Subject: Re: [PATCH 1/8] rtw88: sar: add SAR of TX power limit
Date: Thu, 16 Apr 2020 07:39:51 +0000 (UTC) [thread overview]
Message-ID: <20200416073951.775FEC433CB@smtp.codeaurora.org> (raw)
In-Reply-To: <20200207092844.29175-2-yhchuang@realtek.com>
<yhchuang@realtek.com> wrote:
> From: Ping-Ke Shih <pkshih@realtek.com>
>
> Originally, there are three factors of TX power:
> 1) TX base power, calibrated manually and programmed in efuse.
> 2) By-rate power, an offset to increase power depends on TX rate.
> 3) TX limit power, an offset to contraint the max power.
>
> So, driver can get the TX power index by using:
> TX_POWER_IDX = tx_base_power + min(by-rate, limit)
>
> To take SAR into consideration, we can treat it as another limit of
> the TX power. Then driver can get the TX power by using:
> TX_POWER_IDX = tx_base_power + min(by-rate, limit, sar)
>
> Note that the values stored in driver are not presented in dBm, so
> driver needs to also convert the power limit indexes of SAR with
> tx_scale_factor, then get the difference to the TX base power.
> rtw_phy_set_tx_power_sar() will convert the values of SAR power in unit of
> 0.125d Bm (sar_q3) and store them in tx_pwr_sar_{2,5}g[regd][path][rs][ch].
>
> Since certain SAR tables have single one table that isn't regulatory domain
> specific, parser can apply to all 'regd' or only one domain RTW_REGD_WW
> that SAR TX power limit can be applied no matter which regulatory domain
> is selected. Because driver get 'sar' argument by
> rtw_phy_get_tx_power_limit() with rule
> sar = is_existing(tx_pwr_sar_{2,5}g[regd]) ? tx_pwr_sar_{2,5}g[regd] :
> tx_pwr_sar_{2,5}g[RTW_REGD_WW];
>
> There are various sources of SAR table, but it is expected to adopt only
> one source. So, save current source of rtw_sar_sources to prevent more
> than one source are adopted.
>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
I'll drop these from my queue now. Please resend once there's a
concensus what interface to use.
7 patches set to Changes Requested.
11370071 [1/8] rtw88: sar: add SAR of TX power limit
11370073 [3/8] rtw88: vndcmd: sar: Apply SAR power limit via vendor command
11370075 [4/8] rtw88: sar: Load static SAR table from ACPI WRDS method
11370083 [5/8] rtw88: sar: Load dynamic SAR table from ACPI methods
11370079 [6/8] rtw88: sar: apply dynamic SAR table to tx power limit
11370081 [7/8] rtw88: sar: add sar_work to poll if dynamic SAR table is changed
11370085 [8/8] rtw88: sar: dump sar information via debugfs
--
https://patchwork.kernel.org/patch/11370071/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2020-04-16 7:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 9:28 [PATCH 0/8] rtw88: Add SAR implementation yhchuang
2020-02-07 9:28 ` [PATCH 1/8] rtw88: sar: add SAR of TX power limit yhchuang
2020-04-16 7:39 ` Kalle Valo [this message]
2020-02-07 9:28 ` [PATCH 2/8] nl80211: vendor-cmd: realtek: Add vendor command to set SAR " yhchuang
2020-02-07 9:28 ` [PATCH 3/8] rtw88: vndcmd: sar: Apply SAR power limit via vendor command yhchuang
2020-02-07 9:28 ` [PATCH 4/8] rtw88: sar: Load static SAR table from ACPI WRDS method yhchuang
2020-02-07 9:28 ` [PATCH 5/8] rtw88: sar: Load dynamic SAR table from ACPI methods yhchuang
2020-02-07 9:28 ` [PATCH 6/8] rtw88: sar: apply dynamic SAR table to tx power limit yhchuang
2020-02-07 9:28 ` [PATCH 7/8] rtw88: sar: add sar_work to poll if dynamic SAR table is changed yhchuang
2020-02-07 9:28 ` [PATCH 8/8] rtw88: sar: dump sar information via debugfs yhchuang
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=20200416073951.775FEC433CB@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=briannorris@chromium.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=yhchuang@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.