On Thu, Nov 5, 2020 at 3:27 AM Carl Huang <cjhuang@xxxxxxxxxxxxxx> wrote: > On 2020-11-05 07:11, Brian Norris wrote: > > On Tue, Sep 22, 2020 at 01:49:35PM +0800, Carl Huang wrote: > >> + if (ar->tx_power_2g_limit == 0 || ar->tx_power_5g_limit == 0) > > > > ath10k_mac_txpower_recalc() doesn't care about this -- why should you? > > This also seems especially weird, because one of the 2 could be valid > > nonzero values, and yet you're silently rejecting it. Regardless, the > > following seems wrong: > > > Per current design, it's required for userspace to always set meaningful > power limitations. Well, that wasn't specified anywhere (in the docs nor in the nl80211 implementation); if one wanted to enforce that, it should probably go in the nl80211 layer, not the driver implementation. Otherwise, we're very prone to varying driver implementations (not a good thing). > Now in V2, 0 will be treated as "don't have SAR on this range". OK... I guess that's reasonable, although that should be explicitly called out in nl80211.h. Brian