On 3/28/2024 1:19 PM, Johannes Berg wrote:
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?
Hostapd use this hw index for the channel switch cmd.
The hw index used as a sanity check to identify whether the user
requested channel fall under the different hw or not.
In split-phy hardware, 5GHz band supported by two physical hardware's.
First supports 5GHz Low band and second supports 5GHz High band.
In this case, user space cannot use band vise check here to identify
given channel or freq supported in the given hardware.
+ 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 ...
Then user and kernel have to make an assumption that implicit index used
in the life cycle.
@@ -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?
ok, can do the advertise for split.
--
Karthikeyan Periyasamy
--
கார்த்திகேயன் பெரியசாமி