Search Linux Wireless

Re: [PATCH v4 4/6] cfg80211: save power spectral density(psd) of regulatory rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2021-09-24 at 06:00 -0400, Wen Gong wrote:
> The power spectral density(psd) of regulatory rule should be take
> effect to the channels. This patch is to save the values to the
> channel which has psd value.
> 
> Signed-off-by: Wen Gong <wgong@xxxxxxxxxxxxxx>
> ---
>  net/wireless/reg.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index df87c7f3a049..8f765befb9bc 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -1590,6 +1590,8 @@ static u32 map_regdom_flags(u32 rd_flags)
>  		channel_flags |= IEEE80211_CHAN_NO_160MHZ;
>  	if (rd_flags & NL80211_RRF_NO_HE)
>  		channel_flags |= IEEE80211_CHAN_NO_HE;
> +	if (rd_flags & NL80211_RRF_PSD)
> +		channel_flags |= IEEE80211_CHAN_PSD;

I went to go squash this with patch 3 and took a closer look, and then I
realized you're doing this weird.

Please when you resend also squash this - it's a bit weird to read in
two patches.

However, I think this is missing a lot of things - we already talked
about the regulatory database, and while that'd be nice, I guess I
conceded that you don't really have to do it now.

However, for visibility reasons, I *really* think you need to add
nl80211 attributes for all of this data - when the regdomain is dumped
in nl80211_put_regdom() you would have the flag now (it dumps the value
of reg_rule->flags in NL80211_ATTR_REG_RULE_FLAGS), but you didn't add
the value of reg_rule->psd which you've added.

Similarly, you're not adding the PSD flag nor the PSD value for the
*channel* in nl80211_msg_put_channel(), both of which I think you should
have for visibility into what's going on in the kernel/driver.

I've applied all the other patches, so please just resend 3 and 4,
squashed into a single patch, with the fixes.

johannes




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux