On April 25, 2023 8:14:33 PM Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
Hi Arend, On Tue, 2023-04-25 at 12:01 +0200, Arend van Spriel wrote:My brain is tripping over a field in struct ieee80211_iface_combination, ie. the num_different_channels. Looking at the name I tend to think that num_different_channel = 0 means the interfaces must all operate on the same channel. However, in most places it is configured as 1 or more. The documentation in cfg80211.h [1] is not unambiguous about it in my opinion. By now it probably depends on how user-space uses it.Well it's not valid for it to be 0 in the first place: static int wiphy_verify_combinations(struct wiphy *wiphy) { ... for (i = 0; i < wiphy->n_iface_combinations; i++) { ... for (i = 0; i < wiphy->n_iface_combinations; i++) { ... /* Need at least one channel */ if (WARN_ON(!c->num_different_channels)) return -EINVAL; So really what was meant that _1_ means you only have a single channel, and so on. Are you tripping over the "different"? The way I read it, is
Yup. That WARN_ON is a big help ;-)
that with all the interfaces you have, you can have N different channels, i.e. looking at it "globally". It seems maybe you're more interpreting it as "additionally" to the first interface?
Thanks for taking time to clarify this to me. Regards, Arend
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature