From: Zhu Yi <yi.zhu@intel.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linville@tuxdriver.com" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] nl80211: fix attrtype and value for NL80211_ATTR_SUPPORTED_COMMANDS
Date: Thu, 06 Aug 2009 09:46:46 +0800 [thread overview]
Message-ID: <1249523206.4069.146.camel@debian> (raw)
In-Reply-To: <1249486901.6902.6.camel@johannes.local>
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
next prev parent reply other threads:[~2009-08-06 1:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 9:28 [PATCH] nl80211: fix attrtype and value for NL80211_ATTR_SUPPORTED_COMMANDS Zhu Yi
2009-08-05 15:41 ` Johannes Berg
2009-08-06 1:46 ` Zhu Yi [this message]
2009-08-06 7:28 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249523206.4069.146.camel@debian \
--to=yi.zhu@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).