[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <582bea54cc5833137a2f8b7a375484b1656ed761.camel@sipsolutions.net>
Date: Mon, 06 Mar 2023 21:45:16 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Simon Horman <simon.horman@...igine.com>,
Jaewan Kim <jaewan@...gle.com>
Cc: gregkh@...uxfoundation.org, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, kernel-team@...roid.com, adelva@...gle.com
Subject: Re: [PATCH v8 3/5] mac80211_hwsim: add PMSR request support via
virtio
On Mon, 2023-03-06 at 18:12 +0100, Simon Horman wrote:
>
> >
> > +static int mac80211_hwsim_send_pmsr_ftm_request_peer(struct sk_buff *msg,
> > + struct cfg80211_pmsr_ftm_request_peer *request)
> > +{
> > + struct nlattr *ftm;
> > +
> > + if (!request->requested)
> > + return -EINVAL;
> > +
> > + ftm = nla_nest_start(msg, NL80211_PMSR_TYPE_FTM);
> > + if (!ftm)
> > + return -ENOBUFS;
> > +
> > + if (nla_put_u32(msg, NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE, request->preamble))
>
> nit: I suspect that you need to invoke nla_nest_cancel() in
> error paths to unwind nla_nest_start() calls.
The entire message is discarded if that happens, I think? Doesn't seem
all that necessary in that case.
johannes
Powered by blists - more mailing lists