All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Wen Gong <quic_wgong@quicinc.com>, Wen Gong <wgong@codeaurora.org>
Cc: Venkateswara Naralasetty <vnaralas@qti.qualcomm.com>,
	Venkateswara Naralasetty <vnaralas@codeaurora.org>,
	ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
	wgong=codeaurora.org@codeaurora.org, quic_adisi@quicinc.com,
	quic_vnaralas@quicinc.com
Subject: Re: [PATCH v5] cfg80211: save power spectral density(psd) of regulatory rule
Date: Wed, 04 May 2022 14:00:09 +0200	[thread overview]
Message-ID: <a0a40e7f40dd173cc4a3688bd77c90cc8c479ab7.camel@sipsolutions.net> (raw)
In-Reply-To: <aee8fc50-3ffb-f985-f0ad-9752bb51890d@quicinc.com>

Hi,

Sorry. I've been shying away from this, it's completely confusing me,
and the code isn't really helping that much, so far.

> PSD is another type power value as well as the power_rule in 
> ieee80211_reg_rule
> and max_reg_power/max_power in ieee80211_channel. For 6G, it need the
> both the 2 values (psd and tx-power) for power control.

Sure, that makes sense. You have PSD limits as well as TX power limits.

> To support LPI/SP/VLP mode + concurrency, it is not only to process the
> TX power and psd, it need to process all fields in ieee80211_reg_rule.
> for example, for the same country US, it has some ieee80211_reg_rule for
> 6G:
> LPI mode for AP mode is:
> (5945 - 7125 @ 160) (0, 30) (FLAGS 512) (psd 5 dB/MHz)
> 
> LPI mode for client mode is:
> (5945 - 7125 @ 160) (0, 24) (FLAGS 512) (psd -1 dB/MHz)
> 
> SP mode is:
> (5945 - 6425 @ 160) (0, 30) (FLAGS 0) (psd 17 dB/MHz)
> (6525 - 6875 @ 160) (0, 30) (FLAGS 0) (psd 17 dB/MHz)
> 
> you can see the frequency range/flags/tx power/psd are not same between
> the 3 mode.

Right. But here I already don't understand - does that mean your
hardware can only be in one mode today overall? 

It seems you'd need to have separate regulatory rules per mode, and
possibly per interface type, no?

Or do you try to adjust the regulatory rules when the mode is switched?
But we try to have regulatory rules capture the overall status, not a
temporary status, and then apply the rules that make sense at any given
time.

> So the psd value is a same kind field as well as the frequency
> range/flags/tx power in ieee80211_reg_rule and ieee80211_channel.
> If it has only one interface in the same ieee80211_hw, the interface
> must choose one the the above modes at any time, and the reg rules
> will be updated when the interface changed its mode, then the info
> of channels of ieee80211_supported_band for 6G also update, it has
> no problem.

Ah OK, so you answer that question - you're actually changing the
regulatory rules, which is totally unexpected to me, since I'd expect
those to only change when the regulatory changes, not when you mode
switch ...

> When it has 2 interface up simultaneously in the same ieee80211_hw,
> then it will have problem. because the 2 interface share the same
> ieee80211_reg_rule and the same channels and same ieee80211_supported_band
> for 6G, if interface #1 is LPI-AP, and interface #2 is SP mode, then
> even the channels count is not same for the 2 interface, channels count
> of SP mode is smaller than LPI-AP, also the info of channel is not same.
> 
> So adding/not adding psd value into ieee80211_reg_rule/ieee80211_channel
> will not effect the problem of muti-interface concurrency issue of 6G.

Oh but I disagree - adding it will mean that this is how we interpret
the reg_rule, that it only carries the current status according to "the"
current mode (which isn't even well-defined), rather than the entirety
of the regulatory information.

> When muti-interface concurrency run, all the fields of ieee80211_reg_rule/
> ieee80211_channel should be split.

Right.

> I think the easy way is to save the channels of ieee80211_supported_band
> of 6G in each interface instead of ieee80211_hw, then interface #1/#2
> have/use their own channels, they use their own frequency range/flags/
> tx power/psd... 
> 

I'm not sure that will work, because we often compare chan pointers with
==, and if you're doing something like remain-on-channel that's still
relevant. So having the same channel struct on the same hardware with
the same frequency is bound to be problematic.

> This is a high level change, and adding psd into
> ieee80211_reg_rule/ieee80211_channel is a low level change. So I think
> they have no dependency with each other.

I think I disagree, per the above disagreement.

johannes

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net>
To: Wen Gong <quic_wgong@quicinc.com>, Wen Gong <wgong@codeaurora.org>
Cc: Venkateswara Naralasetty <vnaralas@qti.qualcomm.com>,
	Venkateswara Naralasetty <vnaralas@codeaurora.org>,
	ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
	 wgong=codeaurora.org@codeaurora.org, quic_adisi@quicinc.com,
	 quic_vnaralas@quicinc.com
Subject: Re: [PATCH v5] cfg80211: save power spectral density(psd) of regulatory rule
Date: Wed, 04 May 2022 14:00:09 +0200	[thread overview]
Message-ID: <a0a40e7f40dd173cc4a3688bd77c90cc8c479ab7.camel@sipsolutions.net> (raw)
In-Reply-To: <aee8fc50-3ffb-f985-f0ad-9752bb51890d@quicinc.com>

Hi,

Sorry. I've been shying away from this, it's completely confusing me,
and the code isn't really helping that much, so far.

> PSD is another type power value as well as the power_rule in 
> ieee80211_reg_rule
> and max_reg_power/max_power in ieee80211_channel. For 6G, it need the
> both the 2 values (psd and tx-power) for power control.

Sure, that makes sense. You have PSD limits as well as TX power limits.

> To support LPI/SP/VLP mode + concurrency, it is not only to process the
> TX power and psd, it need to process all fields in ieee80211_reg_rule.
> for example, for the same country US, it has some ieee80211_reg_rule for
> 6G:
> LPI mode for AP mode is:
> (5945 - 7125 @ 160) (0, 30) (FLAGS 512) (psd 5 dB/MHz)
> 
> LPI mode for client mode is:
> (5945 - 7125 @ 160) (0, 24) (FLAGS 512) (psd -1 dB/MHz)
> 
> SP mode is:
> (5945 - 6425 @ 160) (0, 30) (FLAGS 0) (psd 17 dB/MHz)
> (6525 - 6875 @ 160) (0, 30) (FLAGS 0) (psd 17 dB/MHz)
> 
> you can see the frequency range/flags/tx power/psd are not same between
> the 3 mode.

Right. But here I already don't understand - does that mean your
hardware can only be in one mode today overall? 

It seems you'd need to have separate regulatory rules per mode, and
possibly per interface type, no?

Or do you try to adjust the regulatory rules when the mode is switched?
But we try to have regulatory rules capture the overall status, not a
temporary status, and then apply the rules that make sense at any given
time.

> So the psd value is a same kind field as well as the frequency
> range/flags/tx power in ieee80211_reg_rule and ieee80211_channel.
> If it has only one interface in the same ieee80211_hw, the interface
> must choose one the the above modes at any time, and the reg rules
> will be updated when the interface changed its mode, then the info
> of channels of ieee80211_supported_band for 6G also update, it has
> no problem.

Ah OK, so you answer that question - you're actually changing the
regulatory rules, which is totally unexpected to me, since I'd expect
those to only change when the regulatory changes, not when you mode
switch ...

> When it has 2 interface up simultaneously in the same ieee80211_hw,
> then it will have problem. because the 2 interface share the same
> ieee80211_reg_rule and the same channels and same ieee80211_supported_band
> for 6G, if interface #1 is LPI-AP, and interface #2 is SP mode, then
> even the channels count is not same for the 2 interface, channels count
> of SP mode is smaller than LPI-AP, also the info of channel is not same.
> 
> So adding/not adding psd value into ieee80211_reg_rule/ieee80211_channel
> will not effect the problem of muti-interface concurrency issue of 6G.

Oh but I disagree - adding it will mean that this is how we interpret
the reg_rule, that it only carries the current status according to "the"
current mode (which isn't even well-defined), rather than the entirety
of the regulatory information.

> When muti-interface concurrency run, all the fields of ieee80211_reg_rule/
> ieee80211_channel should be split.

Right.

> I think the easy way is to save the channels of ieee80211_supported_band
> of 6G in each interface instead of ieee80211_hw, then interface #1/#2
> have/use their own channels, they use their own frequency range/flags/
> tx power/psd... 
> 

I'm not sure that will work, because we often compare chan pointers with
==, and if you're doing something like remain-on-channel that's still
relevant. So having the same channel struct on the same hardware with
the same frequency is bound to be problematic.

> This is a high level change, and adding psd into
> ieee80211_reg_rule/ieee80211_channel is a low level change. So I think
> they have no dependency with each other.

I think I disagree, per the above disagreement.

johannes

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  reply	other threads:[~2022-05-04 12:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  8:52 [PATCH v5] cfg80211: save power spectral density(psd) of regulatory rule Wen Gong
2021-09-28  8:52 ` Wen Gong
2021-09-28 13:12 ` vnaralas
2021-09-28 13:12   ` vnaralas
2021-09-29  3:37   ` Wen Gong
2021-09-29  3:37     ` Wen Gong
2021-09-29 16:46     ` Venkateswara Naralasetty
2021-09-29 16:46       ` Venkateswara Naralasetty
2021-09-30  2:53       ` Wen Gong
2021-09-30  2:53         ` Wen Gong
2021-09-30 12:50         ` Johannes Berg
2021-09-30 12:50           ` Johannes Berg
2021-10-11  4:06           ` Wen Gong
2021-10-11  4:06             ` Wen Gong
2021-10-11  6:43             ` Venkateswara Naralasetty
2021-10-11  6:43               ` Venkateswara Naralasetty
2021-10-11  7:48               ` Wen Gong
2021-10-11  7:48                 ` Wen Gong
2021-10-13  3:33                 ` Wen Gong
2021-10-13  3:33                   ` Wen Gong
2021-10-25 20:09                 ` Johannes Berg
2021-10-25 20:09                   ` Johannes Berg
2021-10-26 11:26                   ` Wen Gong
2021-10-26 11:26                     ` Wen Gong
2021-11-09  9:57                     ` Wen Gong
2021-11-09  9:57                       ` Wen Gong
2021-12-06  8:48                       ` Wen Gong
2021-12-06  8:48                         ` Wen Gong
2022-03-03  2:13                         ` Wen Gong
2022-03-03  2:13                           ` Wen Gong
2022-04-15  2:27                           ` Wen Gong
2022-04-15  2:27                             ` Wen Gong
2022-05-04 12:00                             ` Johannes Berg [this message]
2022-05-04 12:00                               ` Johannes Berg
2022-05-06 10:50                               ` Wen Gong
2022-05-06 10:50                                 ` Wen Gong

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=a0a40e7f40dd173cc4a3688bd77c90cc8c479ab7.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_adisi@quicinc.com \
    --cc=quic_vnaralas@quicinc.com \
    --cc=quic_wgong@quicinc.com \
    --cc=vnaralas@codeaurora.org \
    --cc=vnaralas@qti.qualcomm.com \
    --cc=wgong=codeaurora.org@codeaurora.org \
    --cc=wgong@codeaurora.org \
    /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.