Re: [PATCH 02/13] wifi: nl80211: send underlying multi-hardware channel capabilities to user space

Johannes Berg
2024-03-28T07:49:09Z

On Thu, 2024-03-28 at 12:59 +0530, Karthikeyan Periyasamy wrote:
>
> +/**
> + * nl80211_multi_hw_attrs - multi-hw attributes
> + *
> + * @NL80211_MULTI_HW_ATTR_INVALID: invalid
> + * @NL80211_MULTI_HW_ATTR_IDX: (u8) multi-HW index to refer the underlying HW
> + * for which the supported channel list is advertised. Internally refer
> + * the index of the wiphy's @hw_chans array.

Is there a good reason to expose this? Seems pretty internal to me, and
not sure what userspace would do with it?

> + for (i = 0; i < wiphy->num_hw; i++) {
> + hw_mac = nla_nest_start(msg, i + 1);

And you kind of even have it here already ...

> @@ -3001,6 +3042,12 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
> rdev->wiphy.hw_timestamp_max_peers))
> goto nla_put_failure;
>
> + state->split_start++;
> + break;
> + case 17:
> + if (nl80211_put_multi_hw_support(&rdev->wiphy, msg))
> + goto nla_put_failure;
>

This could be (or get) pretty big, are you sure it's not needed to push
the splitting down into it?

johannes