Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 4/4] wifi: nl80211: send iface combination to user space in multi-hardware wiphy
Date: Fri, 21 Oct 2022 14:25:38 +0200	[thread overview]
Message-ID: <bd8d9fe60b4ff7a420ab597b1db64b5b42616d77.camel@sipsolutions.net> (raw)
In-Reply-To: <20220920100518.19705-5-quic_vthiagar@quicinc.com>

On Tue, 2022-09-20 at 15:35 +0530, Vasanthakumar Thiagarajan wrote:
> A new nested nl attribute is added to the same existing NL command to
> advertise the iface combination capability for each underlying hardware
> when driver groups more than one physical hardware under one wiphy to
> enable MLO among them.

That's a good point - are we assuming this implies you can do MLO across
the groups? Maybe somebody would want to use this advertisement without
allowing MLO? (Not sure that's useful vs. multiple wiphys though, but
maybe to simplify driver if there are some devices w/o MLO?)

> +		for (l = 0; l < c->iface_hw_list->n_limits; l++) {
> +			struct nlattr *limit;
> +
> +			limit = nla_nest_start(msg, l + 1);
> +			if (!limit)
> +				return -ENOBUFS;
> +
> +			if (nla_put_u16(msg, NL80211_IFACE_LIMIT_MAX,
> +					c->iface_hw_list[i].limits[l].max))
> +				return -ENOBUFS;
> +
> +			if (nla_put_u16(msg, NL80211_IFACE_LIMIT_TYPES,
> +					c->iface_hw_list[i].limits[l].types))
> +				return -ENOBUFS;
> +
> +			nla_nest_end(msg, limit);
> +		}
> +		nla_nest_end(msg, limits);


Feels like this part is kind of pre-existing code, or should be, could
it be refactored?

> +		if (nla_put_u32(msg,
> +				NL80211_IFACE_COMB_PER_HW_COMB_NUM_CHANNELS,
> +				c->iface_hw_list[i].num_different_channels))
> +			return -ENOBUFS;
> +
> +		if (nla_put_u16(msg,
> +				NL80211_IFACE_COMB_PER_HW_COMB_MAXIMUM,
> +				c->iface_hw_list[i].max_interfaces))
> +			return -ENOBUFS;
> +
> +		nla_nest_end(msg, hw_combi);

And even this feels like it must already exist in some way? Wouldn't it
even be easier to parse for userspace if it wasn't a separate set of
attributes?

johannes

  reply	other threads:[~2022-10-21 12:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 10:05 [RFC 0/4] wifi: cfg80211/mac80211: capability advertisement infra for multi-hw abstraction under one wiphy Vasanthakumar Thiagarajan
2022-09-20 10:05 ` [RFC 1/4] wifi: cfg80211: Add provision to advertise multiple radio in " Vasanthakumar Thiagarajan
2022-10-21 12:04   ` Johannes Berg
2022-10-21 12:45     ` Vasanthakumar Thiagarajan
2022-09-20 10:05 ` [RFC 2/4] wifi: nl80211: send underlying multi-hardware channel capabilities to user space Vasanthakumar Thiagarajan
2022-10-21 12:13   ` Johannes Berg
2022-10-21 12:57     ` Vasanthakumar Thiagarajan
2022-09-20 10:05 ` [RFC 3/4] wifi: cfg80211/mac80211: extend iface comb advertisement for multi-hardware dev Vasanthakumar Thiagarajan
2022-10-21 12:22   ` Johannes Berg
2022-10-21 13:21     ` Vasanthakumar Thiagarajan
2022-09-20 10:05 ` [RFC 4/4] wifi: nl80211: send iface combination to user space in multi-hardware wiphy Vasanthakumar Thiagarajan
2022-10-21 12:25   ` Johannes Berg [this message]
2022-10-21 13:31     ` Vasanthakumar Thiagarajan
2022-10-21 11:57 ` [RFC 0/4] wifi: cfg80211/mac80211: capability advertisement infra for multi-hw abstraction under one wiphy Johannes Berg
2022-10-21 12:11   ` Vasanthakumar Thiagarajan

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=bd8d9fe60b4ff7a420ab597b1db64b5b42616d77.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_vthiagar@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