From: Felix Fietkau <nbd@nbd.name>
To: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>,
linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, quic_adisi@quicinc.com,
ath12k@lists.infradead.org
Subject: Re: [RFC v3 4/8] wifi: mac80211: add support for DFS with multiple radios
Date: Fri, 7 Jun 2024 11:00:01 +0200 [thread overview]
Message-ID: <dd7a8ed4-3e6c-478e-ad7c-976679f59b1d@nbd.name> (raw)
In-Reply-To: <d2d93a48-e8f9-eb4c-7914-5886f60fad65@quicinc.com>
On 07.06.24 10:54, Karthikeyan Periyasamy wrote:
>
>
> On 6/7/2024 1:46 PM, Felix Fietkau wrote:
>> On 07.06.24 08:45, Karthikeyan Periyasamy wrote:
>>>
>>>
>>> On 6/7/2024 10:33 AM, Felix Fietkau wrote:
>>>> On 07.06.24 06:54, Karthikeyan Periyasamy wrote:
>>>>>
>>>>>
>>>>> On 6/7/2024 10:05 AM, Felix Fietkau wrote:
>>>>>> On 07.06.24 06:25, Karthikeyan Periyasamy wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 6/6/2024 11:37 PM, Felix Fietkau wrote:
>>>>>>>> DFS can be supported with multi-channel combinations, as long as
>>>>>>>> each DFS
>>>>>>>> capable radio only supports one channel.
>>>>>>>>
>>>>>>>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>>>>>>>> ---
>>>>>>>> net/mac80211/main.c | 32 ++++++++++++++++++++++++--------
>>>>>>>> 1 file changed, 24 insertions(+), 8 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
>>>>>>>> index 40fbf397ce74..e9c4cf611e94 100644
>>>>>>>> --- a/net/mac80211/main.c
>>>>>>>> +++ b/net/mac80211/main.c
>>>>>>>
>>>>>>> ...
>>>>>>>
>>>>>>>> int ieee80211_register_hw(struct ieee80211_hw *hw)
>>>>>>>> {
>>>>>>>> struct ieee80211_local *local = hw_to_local(hw);
>>>>>>>> @@ -1173,17 +1188,18 @@ int ieee80211_register_hw(struct
>>>>>>>> ieee80211_hw *hw)
>>>>>>>> if (comb->num_different_channels > 1)
>>>>>>>> return -EINVAL;
>>>>>>>> }
>>>>>>>> - } else {
>>>>>>>> - /* DFS is not supported with multi-channel combinations
>>>>>>>> yet */
>>>>>>>> - for (i = 0; i < local->hw.wiphy->n_iface_combinations;
>>>>>>>> i++) {
>>>>>>>> - const struct ieee80211_iface_combination *comb;
>>>>>>>> -
>>>>>>>> - comb = &local->hw.wiphy->iface_combinations[i];
>>>>>>>> + } else if (hw->wiphy->n_radio) {
>>>>>>>> + for (i = 0; i < hw->wiphy->n_radio; i++) {
>>>>>>>> + const struct wiphy_radio *radio = &hw->wiphy->radio[i];
>>>>>>>> - if (comb->radar_detect_widths &&
>>>>>>>> - comb->num_different_channels > 1)
>>>>>>>> + if
>>>>>>>> (!ieee80211_ifcomb_check_radar(radio->iface_combinations,
>>>>>>>> + radio->n_iface_combinations))
>>>>>>>> return -EINVAL;
>>>>>>>> }
>>>>>>>> + } else {
>>>>>>>> + if
>>>>>>>> (!ieee80211_ifcomb_check_radar(hw->wiphy->iface_combinations,
>>>>>>>> + hw->wiphy->n_iface_combinations))
>>>>>>>> + return -EINVAL;
>>>>>>>> }
>>>>>>>> /* Only HW csum features are currently compatible with
>>>>>>>> mac80211 */
>>>>>>>
>>>>>>> Are we omitting the "wiphy->iface_combinations" if the radio specific
>>>>>>> iface combination advertised ?
>>>>>>>
>>>>>>> If so, it looks like unused "wiphy->iface_combinations" for radio
>>>>>>> specific combination advertised.
>>>>>>
>>>>>> This patch series assumes that you have both
>>>>>> wiphy->iface_combinations and radio->iface_combinations set.
>>>>>> wiphy->iface_combinations applies to the full wiphy, whereas
>>>>>> radio->iface_combinations only applies to vifs assigned to the radio.
>>>>>
>>>>>
>>>>> If radio->iface_combinations is set then always vifs assigned to the
>>>>> radio. so wiphy->iface_combinations get avoid for all the use cases.
>>>>>
>>>>> Ultimately either of one combination only get used by this proposal.
>>>>>
>>>>> or I am missing something here ?
>>>>
>>>> The functions that perform interface combination checks are called
>>>> both with -1 as radio_idx (meaning per-wiphy), as well as with the
>>>> assigned radio id. That way, both kinds of combinations/limits are
>>>> checked and enforced.
>>>>
>>> In the radio specific iface advertisement, global iface combination
>>> represent the union or intersection of all radio iface combination ?
>>
>> The global interface combination should be a union of all radio
>> interface combinations.
>> You can also use them to apply extra limits, e.g. if you have a limit on
>> the per-wiphy number of interfaces (regardless of the assigned radio),
>> you use the global interface combination to apply it.
>>
> If the global combination follow union representation, the non-ML client
> takes wrong/invalid perception against the global advertisement.
>
> Ex:
>
> Global iface = 14 ( Radio iface: 2G = 4, 5G = 4, 6G = 6 ).
>
> 2G non-client read the global configuration and understand it can able
> to create 14 interfaces. But in reality it allowed to create max 4
> interface only.
>
> we have to follow intersection or minimal set, no ?
Maybe I misunderstood your question earlier. I meant that the driver can
set the global limit as a sort of union of all per-radio limits.
For each individual radio, the intersection of the global limit (taking
into account other radios as well) and the per-radio limit (considering
only per-radio vifs) applies.
- Felix
next prev parent reply other threads:[~2024-06-07 9:00 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 18:07 [RFC v3 0/8] cfg80211/mac80211: support defining multiple radios per wiphy Felix Fietkau
2024-06-06 18:07 ` [RFC v3 1/8] wifi: nl80211: split helper function from nl80211_put_iface_combinations Felix Fietkau
2024-06-06 18:07 ` [RFC v3 2/8] wifi: cfg80211: add support for advertising multiple radios belonging to a wiphy Felix Fietkau
2024-06-07 9:24 ` Johannes Berg
2024-06-07 10:00 ` Felix Fietkau
2024-06-06 18:07 ` [RFC v3 3/8] wifi: cfg80211: extend interface combination check for multi-radio Felix Fietkau
2024-06-07 9:32 ` Johannes Berg
2024-06-07 12:36 ` Felix Fietkau
2024-06-06 18:07 ` [RFC v3 4/8] wifi: mac80211: add support for DFS with multiple radios Felix Fietkau
2024-06-07 4:25 ` Karthikeyan Periyasamy
2024-06-07 4:35 ` Felix Fietkau
2024-06-07 4:54 ` Karthikeyan Periyasamy
2024-06-07 5:03 ` Felix Fietkau
2024-06-07 6:45 ` Karthikeyan Periyasamy
2024-06-07 8:16 ` Felix Fietkau
2024-06-07 8:54 ` Karthikeyan Periyasamy
2024-06-07 9:00 ` Felix Fietkau [this message]
2024-06-12 14:23 ` Karthikeyan Periyasamy
2024-06-12 14:29 ` Felix Fietkau
2024-06-06 18:07 ` [RFC v3 5/8] wifi: mac80211: add radio index to ieee80211_chanctx_conf Felix Fietkau
2024-06-06 18:07 ` [RFC v3 6/8] wifi: mac80211: extend ifcomb check functions for multi-radio Felix Fietkau
2024-06-07 4:45 ` Karthikeyan Periyasamy
2024-06-07 4:49 ` Felix Fietkau
2024-06-07 9:22 ` Karthikeyan Periyasamy
2024-06-07 10:07 ` Karthikeyan Periyasamy
2024-06-07 10:22 ` Felix Fietkau
2024-06-07 10:53 ` Karthikeyan Periyasamy
2024-06-07 11:04 ` Felix Fietkau
2024-06-12 12:05 ` Johannes Berg
2024-06-12 12:21 ` Felix Fietkau
2024-06-06 18:07 ` [RFC v3 7/8] wifi: mac80211: move code in ieee80211_link_reserve_chanctx to a helper Felix Fietkau
2024-06-06 18:07 ` [RFC v3 8/8] wifi: mac80211: add wiphy radio assignment and validation Felix Fietkau
2024-06-07 9:44 ` Johannes Berg
2024-06-07 9:53 ` Felix Fietkau
2024-06-07 10:12 ` Johannes Berg
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=dd7a8ed4-3e6c-478e-ad7c-976679f59b1d@nbd.name \
--to=nbd@nbd.name \
--cc=ath12k@lists.infradead.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_adisi@quicinc.com \
--cc=quic_periyasa@quicinc.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox