[PATCH v2 02/10] wifi: cfg80211: add support for advertising multiple radios belonging to a wiphy
Johannes Berg
johannes at sipsolutions.net
Mon Jul 1 05:04:42 PDT 2024
Oops, forgot one thing already:
> +static int nl80211_put_radio(struct wiphy *wiphy, struct sk_buff *msg, int idx)
> +{
...
> + const struct wiphy_radio_freq_range *range = &r->freq_range[i];
> + int ret;
> +
> + freq = nla_nest_start(msg, NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE);
need to check freq
> + ret = nla_put_u32(msg, NL80211_WIPHY_RADIO_FREQ_ATTR_START,
> + range->start_freq) ||
> + nla_put_u32(msg, NL80211_WIPHY_RADIO_FREQ_ATTR_END,
> + range->end_freq);
> + nla_nest_end(msg, freq);
> +
> + if (ret)
> + goto nla_put_failure;
and this 'ret' business is pointless? You can just 'goto
nla_put_failure' even in the middle of the nested, it will be unwound
properly on a higher level.
johannes
More information about the ath12k
mailing list