Search Linux Wireless

Re: [PATCH v8 3/5] mac80211_hwsim: add PMSR request support via virtio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux