Search Linux Wireless

Re: [PATCH] nl80211: fix attrtype and value for NL80211_ATTR_SUPPORTED_COMMANDS

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

 



On Wed, 2009-08-05 at 23:41 +0800, Johannes Berg wrote: 
> On Wed, 2009-08-05 at 17:28 +0800, Zhu Yi wrote:
> > The patch fixes the misuse between attrtype and value for the
> > CMD list nested in NL80211_ATTR_SUPPORTED_COMMANDS attribute.
> 
> No? It was this way intentionally.
> 
> > --- a/net/wireless/nl80211.c
> > +++ b/net/wireless/nl80211.c
> > @@ -520,7 +520,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
> >  	 do {							\
> >  		if (dev->ops->op) {				\
> >  			i++;					\
> > -			NLA_PUT_U32(msg, i, NL80211_CMD_ ## n);	\
> > +			NLA_PUT_U32(msg, NL80211_CMD_ ## n, i);	\
> 
> This is an array, the index doesn't matter, and the value is the
> supported command. You parse it with nla_for_each_nested()

I'm trying to find if a command (i.e. NL80211_CMD_CONNECT) is supported
or not. I think I can use nla_find_nested() if the command is an
attribute. But I can also do the find myself if it is an array like now.
So, never mind.

Thanks,
-yi

--
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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux