RE: [PATCH rtw-next] wifi: rtw88: honour the transmit power mac80211 asks for
From: Ping-Ke Shih
Date: Tue Sep 22 2026 - 02:48:34 EST
Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:
> When I wrote v1 I did not know that rtw88 already exposes
> set_sar_specs. I have since verified it on the RTL8822BU: it caps the
> per-path index from the given dBm and covers our exposure case, so we
> will use it. That leaves the patch as a consistency question rather
> than a need of ours: should rtw88 honour the level mac80211 hands over,
> as ath9k and most other drivers do, instead of accepting it and letting
> mac80211 report it as applied? If you want that, a v2 with your review
> points addressed is ready and I will send it. If you prefer SAR to be
> the only way to lower the power on these chips, I will drop it.
I don't lean to either, but ...
> > > + if (changed & IEEE80211_CONF_CHANGE_CHANNEL)
> > > + rtw_set_channel(rtwdev);
> > > + else if (changed & IEEE80211_CONF_CHANGE_POWER)
> >
> > Should it be 'if' instead of 'else if'?
>
> rtw_set_channel() ends with rtw_phy_set_tx_power_level(), so when the
> channel changed the tables are already programmed with the level kept
> in rtw_hal, and a second pass would program the same values again. The
> explicit call is only needed when the level changed on its own, so I
> kept the else. If you prefer the plain if for readability I will change
> it.
Here should add a comment to be clear. It might become not clean...
Then I'd prefer SAR.
Ping-Ke