On Tuesday 10 November 2009 15:50:43 pat-lkml@xxxxxxxxx wrote: > On Tue, 10 Nov 2009 12:51:43 +0100, Holger Schurig > <holgerschurig@xxxxxxxxxxxxxx> wrote: > > > @@ -3182,20 +3182,11 @@ > > int err; > > > > if (!ifidx) { > > - err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, > > - nl80211_fam.attrbuf, nl80211_fam.maxattr, > > - nl80211_policy); > > - if (err) > > - return err; > > - > > - if (!nl80211_fam.attrbuf[NL80211_ATTR_IFINDEX]) > > - return -EINVAL; > > - > > - ifidx = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_IFINDEX]); > > - if (!ifidx) > > - return -EINVAL; > > + ifidx = nl80211_get_ifidx(cb); > > do you need an: > > if(ifidx < 0) > return ifidx; > > here, as you assign it to cb->args[0], which differs from the original > behavior. Do you mean if (!ifidx) { ifidx = nl80211_get_ifidx(cb); if (ifidx < 0) return ifidx; cb->args[0] = ifidx; } if (ifidx < 0) return ifidx; instead? I'm not familiar with this function, but maybe we can get away like this: int ifidx = cb->args[0]; if (!ifidx) ifidx = nl80211_get_ifidx(cb); if (ifidx < 0) return ifidx; cb->args[0] = ifidx; -- http://www.holgerschurig.de -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html