Message ID | 20230315132904.31779-1-quic_adisi@quicinc.com (mailing list archive) |
---|---|
Headers | show |
Series | wifi: cfg80211/mac80211: extend 6 GHz support for all power modes | expand |
On 3/15/2023 18:58, Aditya Kumar Singh wrote: > 6 GHz introduces various power modes of operation. Currently, based > on the power mode, channel's Power Spectral Density (PSD) value, > Regulatory power value, as well as channel disabled flag can change. > For single interface, current implementation works just fine. But for > multi-interfaces, for example AP-STA concurrency, two different channel > context needs to be maintained. This is because, STA power mode also > depends on the AP's power mode it is going to associate with. Hence, > PSD value, regulatory power value and channel disabled flag might vary. > In this case, same channel context cannot be used for both AP and STA. > > Therefore, to support multiple channel space for each power mode, the > 6 GHz channels needs a separate storage space in data structure > ieee80211_supported_band. Because of this, the existing APIs to get the > channel/frequency from frequency/channel will not work for 6 GHz band. > > Add support to store all possible 6 GHz channel pools according to the > power mode as well as add API support for getting channel/frequency info > from the new struct ieee80211_6ghz_channel. > > [..] > Hi Johannes, Could you review this series and provide your comments please? Aditya
Hi Johannes, Could you give comments for these v3 patches? On 3/15/2023 9:28 PM, Aditya Kumar Singh wrote: ...
Hi Johannes, Kindly Reminder. Could you give comments for these v3 patches? On 6/9/2023 1:41 PM, Wen Gong wrote: > Hi Johannes, > > Could you give comments for these v3 patches? > > On 3/15/2023 9:28 PM, Aditya Kumar Singh wrote: > ...
Wen Gong <quic_wgong@quicinc.com> writes: > Hi Johannes, > > Kindly Reminder. Could you give comments for these v3 patches? > > On 6/9/2023 1:41 PM, Wen Gong wrote: >> Hi Johannes, >> >> Could you give comments for these v3 patches? Please stop spamming the lists like this, it's simply rude. And check our summer schedule: https://lore.kernel.org/all/87y1kncuh4.fsf@kernel.org/
Hi, So ... yeah. I shied away from even reviewing this because it's such a messy topic and we've had so many threads about this. Sorry about that. On Wed, 2023-03-15 at 18:58 +0530, Aditya Kumar Singh wrote: > 6 GHz introduces various power modes of operation. Currently, based > on the power mode, channel's Power Spectral Density (PSD) value, > Regulatory power value, as well as channel disabled flag can change. > For single interface, current implementation works just fine. But for > multi-interfaces, for example AP-STA concurrency, two different channel > context needs to be maintained. This is because, STA power mode also > depends on the AP's power mode it is going to associate with. Hence, > PSD value, regulatory power value and channel disabled flag might vary. > In this case, same channel context cannot be used for both AP and STA. > > Therefore, to support multiple channel space for each power mode, the > 6 GHz channels needs a separate storage space in data structure > ieee80211_supported_band. Because of this, the existing APIs to get the > channel/frequency from frequency/channel will not work for 6 GHz band. > > Add support to store all possible 6 GHz channel pools according to the > power mode as well as add API support for getting channel/frequency info > from the new struct ieee80211_6ghz_channel. > > > Why different channel pools and not array of varying member in the same channel?: I really don't understand. Why do you even need to set *from userspace* the power mode for a client? That ... doesn't make that much sense? I mean, you're explaining here the mechanics, which is all fine, but what's the "theory of operation"? Yes, I get that 6 GHz spectrum use introduced power modes, but why do we even need to handle it this way? None of this or the patches actually introduce any rationale? Also, I'll note that the patch subjects with "cfg80211" or "mac80211" are _really_ unclear. Sometimes you have "cfg80211" patches that mostly change mac80211, etc. It'd make reviewing easier if you actually did limit cfg80211 patches to touching cfg80211 only (with the exception of necessary API updates, of course), and mac80211 patches to implementing the new cfg80211 APIs. The first patch is probably neither, you can mark it as ieee80211. And then trivial things like - don't introduce a bug only to fix it in the next patch! I mean, really? I _still_ don't like "(A)" operation with different channel pointers - you talk about introducing bugs with (B) but at least those would be bugs in the new parts; (A) is almost certainly introducing bugs in existing code that compares pointers and you never even know about it. Also, related to that, is kind of a fundamental question - should we really think that two *channels* are different because you use different (TX) power control/scheme on them? That seems a bit strange, and you've not gotten into that at all, from a semantic POV, only from a code POV. I actually currently don't think that makes sense, but convince me otherwise? For a chandef, _maybe_? But also see the discussion around puncturing, I'm not sure that's actually the right solution either. johannes
On 8/29/23 23:20, Johannes Berg wrote: > Hi, > > So ... yeah. I shied away from even reviewing this because it's such a > messy topic and we've had so many threads about this. Sorry about that. > > > On Wed, 2023-03-15 at 18:58 +0530, Aditya Kumar Singh wrote: >> 6 GHz introduces various power modes of operation. Currently, based >> on the power mode, channel's Power Spectral Density (PSD) value, >> Regulatory power value, as well as channel disabled flag can change. >> For single interface, current implementation works just fine. But for >> multi-interfaces, for example AP-STA concurrency, two different channel >> context needs to be maintained. This is because, STA power mode also >> depends on the AP's power mode it is going to associate with. Hence, >> PSD value, regulatory power value and channel disabled flag might vary. >> In this case, same channel context cannot be used for both AP and STA. >> >> Therefore, to support multiple channel space for each power mode, the >> 6 GHz channels needs a separate storage space in data structure >> ieee80211_supported_band. Because of this, the existing APIs to get the >> channel/frequency from frequency/channel will not work for 6 GHz band. >> >> Add support to store all possible 6 GHz channel pools according to the >> power mode as well as add API support for getting channel/frequency info >> from the new struct ieee80211_6ghz_channel. >> >> >> Why different channel pools and not array of varying member in the same channel?: > > > I really don't understand. > > Why do you even need to set *from userspace* the power mode for a > client? That ... doesn't make that much sense? Because there are two possibilities? Default client and also connect to Low Power Indoor AP as well as sub-ordinate client. So to let the kernel know which mode originally the client is in, the command was introduced. I do understand the concern here about possible misuse for the command from the user space, I would re-visit this area and try to cover the loop holes if any. But don't you think it should be the case? Basically same like how we tell via user space the SSID, keys/suite info. freq list and all for a client, in a similar way tell the power mode. > > I mean, you're explaining here the mechanics, which is all fine, but > what's the "theory of operation"? Yes, I get that 6 GHz spectrum use > introduced power modes, but why do we even need to handle it this way? > None of this or the patches actually introduce any rationale? > > Also, I'll note that the patch subjects with "cfg80211" or "mac80211" > are _really_ unclear. Sometimes you have "cfg80211" patches that mostly > change mac80211, etc. It'd make reviewing easier if you actually did > limit cfg80211 patches to touching cfg80211 only (with the exception of > necessary API updates, of course), and mac80211 patches to implementing > the new cfg80211 APIs. The first patch is probably neither, you can mark > it as ieee80211. Sure. I had the same thought but unfortunate in few patches, named the title wrongly. My bad, sorry for that. I will correct it in next version. > > And then trivial things like - don't introduce a bug only to fix it in > the next patch! I mean, really? > > I _still_ don't like "(A)" operation with different channel pointers - > you talk about introducing bugs with (B) but at least those would be > bugs in the new parts; (A) is almost certainly introducing bugs in > existing code that compares pointers and you never even know about it. Got it. > Also, related to that, is kind of a fundamental question - should we > really think that two *channels* are different because you use different > (TX) power control/scheme on them? That seems a bit strange, and you've > not gotten into that at all, from a semantic POV, only from a code POV. > I actually currently don't think that makes sense, but convince me > otherwise? Sure, let me work on this and get back. > > For a chandef, _maybe_? But also see the discussion around puncturing, > I'm not sure that's actually the right solution either. Okay will check that out too.
On 8/29/23 23:20, Johannes Berg wrote: > Hi, > > So ... yeah. I shied away from even reviewing this because it's such a > messy topic and we've had so many threads about this. Sorry about that. > > > On Wed, 2023-03-15 at 18:58 +0530, Aditya Kumar Singh wrote: >> 6 GHz introduces various power modes of operation. Currently, based >> on the power mode, channel's Power Spectral Density (PSD) value, >> Regulatory power value, as well as channel disabled flag can change. >> For single interface, current implementation works just fine. But for >> multi-interfaces, for example AP-STA concurrency, two different channel >> context needs to be maintained. This is because, STA power mode also >> depends on the AP's power mode it is going to associate with. Hence, >> PSD value, regulatory power value and channel disabled flag might vary. >> In this case, same channel context cannot be used for both AP and STA. >> >> Therefore, to support multiple channel space for each power mode, the >> 6 GHz channels needs a separate storage space in data structure >> ieee80211_supported_band. Because of this, the existing APIs to get the >> channel/frequency from frequency/channel will not work for 6 GHz band. >> >> Add support to store all possible 6 GHz channel pools according to the >> power mode as well as add API support for getting channel/frequency info >> from the new struct ieee80211_6ghz_channel. >> >> >> Why different channel pools and not array of varying member in the same channel?: > > > I really don't understand. > > Why do you even need to set *from userspace* the power mode for a > client? That ... doesn't make that much sense? Cause client also has two power modes? Default client can also connect and sub-ordinate client too connect to all the AP types. So user space would tell what is the power mode. > > I mean, you're explaining here the mechanics, which is all fine, but > what's the "theory of operation"? Yes, I get that 6 GHz spectrum use > introduced power modes, but why do we even need to handle it this way? > None of this or the patches actually introduce any rationale? > > Also, I'll note that the patch subjects with "cfg80211" or "mac80211" > are _really_ unclear. Sometimes you have "cfg80211" patches that mostly > change mac80211, etc. It'd make reviewing easier if you actually did > limit cfg80211 patches to touching cfg80211 only (with the exception of > necessary API updates, of course), and mac80211 patches to implementing > the new cfg80211 APIs. The first patch is probably neither, you can mark > it as ieee80211. Yeah, I too have the same thought but unfortunately by mistake named it wrong. Sorry! Will rectify it in next version. > > And then trivial things like - don't introduce a bug only to fix it in > the next patch! I mean, really? > > I _still_ don't like "(A)" operation with different channel pointers - > you talk about introducing bugs with (B) but at least those would be > bugs in the new parts; (A) is almost certainly introducing bugs in > existing code that compares pointers and you never even know about it. Got it. > > Also, related to that, is kind of a fundamental question - should we > really think that two *channels* are different because you use different > (TX) power control/scheme on them? That seems a bit strange, and you've > not gotten into that at all, from a semantic POV, only from a code POV. > I actually currently don't think that makes sense, but convince me > otherwise? Hmm... Sure, let me think again and get back. > For a chandef, _maybe_? But also see the discussion around puncturing, > I'm not sure that's actually the right solution either. > Okay. > johannes
On Wed, 2023-08-30 at 10:43 +0530, Aditya Kumar Singh wrote: > > > > Why do you even need to set *from userspace* the power mode for a > > client? That ... doesn't make that much sense? Oh so you addressed that here, sorry. > Because there are two possibilities? Default client and also connect to > Low Power Indoor AP as well as sub-ordinate client. So to let the kernel > know which mode originally the client is in, the command was introduced. > > I do understand the concern here about possible misuse for the command > from the user space, I would re-visit this area and try to cover the > loop holes if any. But don't you think it should be the case? Basically > same like how we tell via user space the SSID, keys/suite info. freq > list and all for a client, in a similar way tell the power mode. I just don't understand how userspace would possibly know what to do. You can't really expect the _user_ to select this. So how does wpa_supplicant know what to do? How does it know better than the driver? Where does it get the information from? johannes
On 8/30/23 13:14, Johannes Berg wrote: > On Wed, 2023-08-30 at 10:43 +0530, Aditya Kumar Singh wrote: >>> >>> Why do you even need to set *from userspace* the power mode for a >>> client? That ... doesn't make that much sense? > > Oh so you addressed that here, sorry. > >> Because there are two possibilities? Default client and also connect to >> Low Power Indoor AP as well as sub-ordinate client. So to let the kernel >> know which mode originally the client is in, the command was introduced. >> >> I do understand the concern here about possible misuse for the command >> from the user space, I would re-visit this area and try to cover the >> loop holes if any. But don't you think it should be the case? Basically >> same like how we tell via user space the SSID, keys/suite info. freq >> list and all for a client, in a similar way tell the power mode. > > I just don't understand how userspace would possibly know what to do. > You can't really expect the _user_ to select this. So how does > wpa_supplicant know what to do? How does it know better than the driver? > Where does it get the information from? > The power mode selection for client purely depends on how much tx power the user wants for the client. In short, subordinate mode type client can operate on more tx-power when compared to Default mode type client. For example, let's assume they are going to connect to LPI AP. PSD for Default client should be -1 dBm/MHz or less and for sub-ordinate client should be 5 dBM/MHz or less​ (US regulatory). Technically, the power mode of client affects the PSD which has indirect relation with the Tx-power. So if user wants more PSD, in supplicant, it can be configured with Subordinate or else default type. Reg your other question: > Anyway you're tied to what the AP is doing, no? Yeah since for AP the command was introduced, leveraged the same for client to. But now since we have option to leverage from update beacon infra, something similar for client need to explore. > johannes
On 8/30/2023 1:50 AM, Johannes Berg wrote:
[...]
> johannes
This patch "[PATCH v3 2/9] wifi: cfg80211: save Power Spectral Density
(PSD) of the regulatory rule" does not have relation with concurrency.
Because it only add a field "s8 psd" into struct ieee80211_reg_rule
and ieee80211_channel. The psd value is same with other field such as
max_reg_power.
max_reg_power is also different value for AP and station mode in db.txt
here:
for example:
"country TW: DFS-FCC" and "country US: DFS-FCC"
# 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients
https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/tree/db.txt#n1785
So could you merge the "[PATCH v3 2/9] wifi: cfg80211: save Power Spectral
Density (PSD) of the regulatory rule" firstly?
On Wed, 2023-09-13 at 18:35 +0800, Wen Gong wrote: > > This patch "[PATCH v3 2/9] wifi: cfg80211: save Power Spectral Density > (PSD) of the regulatory rule" does not have relation with concurrency. > Because it only add a field "s8 psd" into struct ieee80211_reg_rule > and ieee80211_channel. The psd value is same with other field such as > max_reg_power. > > max_reg_power is also different value for AP and station mode in db.txt > here: > for example: > "country TW: DFS-FCC" and "country US: DFS-FCC" > # 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients > https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/tree/db.txt#n1785 > > So could you merge the "[PATCH v3 2/9] wifi: cfg80211: save Power Spectral > Density (PSD) of the regulatory rule" firstly? Well, arguing with the regdb is kind of a bad thing because it reminds me that nobody ever cares about it anymore ... maybe we should just give up on it? I mean, clearly, if you actually cared your patch here would come with additions to the regdb format (which aren't even that hard now) which then the wireless-regdb could actually use rather than the comment, right? So really all you've achieved right now is again reminding me how little you really care about upstream? johannes
On 9/13/2023 7:55 AM, Johannes Berg wrote: > So really all you've achieved right now is again reminding me how little > you really care about upstream? I have to step in here. As someone who worked many years on the out-of-tree Android drivers I understand where you're coming from. But attitudes change, and my transition to the upstream team is a reflection of that. I believe everyone from Qualcomm currently contributing to nl/cfg/mac80211 are doing so in support of upstream ath11k/12k drivers. There are a multitude of patches that you'll get to see once the precursor work is out of the way. I'd prefer to stick to technical discussions :) Wen, Can you update your patch to better describe WHY your change is needed? /jeff