Linux wireless drivers development
 help / color / mirror / Atom feed
From: Vasanthakumar Thiagarajan <quic_vthiagar@quicinc.com>
To: Johannes Berg <johannes@sipsolutions.net>
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 19:01:34 +0530	[thread overview]
Message-ID: <eefaa8d8-f84a-6f1f-1e06-adebdd949d0d@quicinc.com> (raw)
In-Reply-To: <bd8d9fe60b4ff7a420ab597b1db64b5b42616d77.camel@sipsolutions.net>



On 10/21/2022 5:55 PM, Johannes Berg wrote:
> 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?)

Good point. Yes, this can be used even without MLO (i.e. not quite tied 
to MLO feature). Ill update the doc accordingly. Thanks.

> 
>> +		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?
> 

let me check, thanks.

>> +		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?
>

Yes, reusing existing attribute will be simpler. let me check that.

Thanks for the review!


Vasanth

  reply	other threads:[~2022-10-21 13:31 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
2022-10-21 13:31     ` Vasanthakumar Thiagarajan [this message]
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=eefaa8d8-f84a-6f1f-1e06-adebdd949d0d@quicinc.com \
    --to=quic_vthiagar@quicinc.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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