On 2020-01-26 23:02, Johannes Berg wrote:
On Sun, 2020-01-26 at 16:51 +0530, Veerendranath Jakkam wrote:
+
+ nested = nla_nest_start(msg, NL80211_ATTR_IFTYPE_AKM_SUITES);
+ if (!nested)
+ return -ENOBUFS;
+
+ for (i = 0; i < rdev->wiphy.num_iftype_akm_suites; i++) {
+ nested_akms = nla_nest_start(msg, i + 1);
+ if (!nested_akms)
+ return -ENOBUFS;
+
+ iftype_akms = &rdev->wiphy.iftype_akm_suites[i];
+
+ if (nl80211_put_iftypes(msg, NL80211_ATTR_SUPPORTED_IFTYPES,
+ iftype_akms->iftypes_mask))
+ return -ENOBUFS;
+
+ if (nla_put(msg, NL80211_ATTR_AKM_SUITES,
Using the top-level attributes inside the nesting makes things
unnecessarily difficult to understand and take far more memory to
parse,
IMHO it'd be better to define a new set of inner attributes
NL80211_IFTYPE_AKM_ATTR_IFTYPES, ..._SUITES or so.
johannes
Thanks, I will correct this in v4 as per suggestion
veeru