[PATCH v2 5/8] cfg80211: save power spectral density(psd) of regulatory rule

Wen Gong wgong at codeaurora.org
Thu Aug 26 03:58:21 PDT 2021


On 2021-08-26 18:56, Johannes Berg wrote:
> On Thu, 2021-08-26 at 18:43 +0800, Wen Gong wrote:
>> On 2021-08-26 16:25, Johannes Berg wrote:
>> > I was going to apply this and patch 4 squashed, saying:
>> >
>> >
>> >     cfg80211: regulatory: handle 6 GHz power spectral density (PSD)
>> >
>> >     6 GHz regulatory domains introduce power spectral density (PSD).
>> >     Allow wiphy-specific regulatory rules to specify these values.
>> >
>> > but ...
>> > >
>> > > +		if (chan->flags & IEEE80211_CHAN_PSD)
>> > > +			chan->psd = min_t(s8, rrule1->psd, rrule1->psd);
>> > > +
>> >
>> > This is obviously wrong?
>> Yes it should change like this:
>> 
>> 	if ((rrule1->flags & NL80211_RRF_PSD) && (rrule1->flags &
>> NL80211_RRF_PSD))
>> 		chan->psd = min_t(s8, rrule1->psd, rrule1->psd);
> 
> One of those still should be rrule2 :)
> 
yes
     if ((rrule1->flags & NL80211_RRF_PSD) && (rrule2->flags & 
NL80211_RRF_PSD))
         chan->psd = min_t(s8, rrule1->psd, rrule2->psd);
     else
         chan->flags &= ~NL80211_RRF_PSD;
> johannes



More information about the ath11k mailing list