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 6/8] wifi: mac80211: extend ifcomb check functions for multi-radio
Date: Fri, 7 Jun 2024 12:22:25 +0200 [thread overview]
Message-ID: <1f32cb6c-6be8-4e3d-8e8f-2d3c728875a9@nbd.name> (raw)
In-Reply-To: <a337de2e-fe3e-18ed-b55b-9ea2cd21baed@quicinc.com>
On 07.06.24 12:07, Karthikeyan Periyasamy wrote:
>
>
> On 6/6/2024 11:37 PM, Felix Fietkau wrote:
>> Add support for counting global and per-radio max/current number of
>> channels, as well as checking radio-specific interface combinations.
>>
>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>> ---
>> net/mac80211/cfg.c | 7 +-
>> net/mac80211/chan.c | 17 +++--
>> net/mac80211/ibss.c | 2 +-
>> net/mac80211/ieee80211_i.h | 6 +-
>> net/mac80211/iface.c | 2 +-
>> net/mac80211/util.c | 131 +++++++++++++++++++++++++++-----------
>> 6 files changed, 116 insertions(+), 49 deletions(-)
>>
>> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
>> index 62119e957cd8..950b7b72f0b8 100644
>> --- a/net/mac80211/cfg.c
>> +++ b/net/mac80211/cfg.c
>> @@ -263,7 +263,7 @@ static int ieee80211_start_p2p_device(struct wiphy *wiphy,
>>
>> lockdep_assert_wiphy(sdata->local->hw.wiphy);
>>
>> - ret = ieee80211_check_combinations(sdata, NULL, 0, 0);
>> + ret = ieee80211_check_combinations(sdata, NULL, 0, 0, -1);
>> if (ret < 0)
>> return ret;
>>
>> @@ -285,7 +285,7 @@ static int ieee80211_start_nan(struct wiphy *wiphy,
>>
>> lockdep_assert_wiphy(sdata->local->hw.wiphy);
>>
>> - ret = ieee80211_check_combinations(sdata, NULL, 0, 0);
>> + ret = ieee80211_check_combinations(sdata, NULL, 0, 0, -1);
>> if (ret < 0)
>> return ret;
>>
>> @@ -4001,7 +4001,7 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
>> goto out;
>>
>> /* if reservation is invalid then this will fail */
>> - err = ieee80211_check_combinations(sdata, NULL, chanctx->mode, 0);
>> + err = ieee80211_check_combinations(sdata, NULL, chanctx->mode, 0, -1);
>
> Once we reach the global limit, all the -1 passing caller get fail
> becuase the iface check param (existing and new) is validated against
> the global limit. since global limt as a sort of union of all per-radio
> limits.
>
> Ex:
> Global iface = 6 (Radio iface 2GHz:4, 5GHz:4, 6GHz:6)
>
>
> So far 6 iface created (Radio iface 2GHz:2, 5GHz:3, 6GHz:1)
>
> In this case, new iface creation get fail because caller uses
> ieee80211_check_combinations() with -1 as radio idx, so it checked
> against global limit
Use the sum of the number of interfaces from each radio instead of the
maximum.
- Felix
next prev parent reply other threads:[~2024-06-07 10:22 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
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 [this message]
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=1f32cb6c-6be8-4e3d-8e8f-2d3c728875a9@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