From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
linux-wpan@vger.kernel.org
Cc: David Girault <david.girault@qorvo.com>,
Romuald Despres <romuald.despres@qorvo.com>,
Frederic Blain <frederic.blain@qorvo.com>,
Nicolas Schodet <nico@ni.fr.eu.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Romuald Despres <Romuald.Despres@qorvo.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH wpan-tools 1/7] iwpan: Fix the channels printing
Date: Fri, 1 Jul 2022 16:34:28 +0200 [thread overview]
Message-ID: <20220701143434.1267864-2-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20220701143434.1267864-1-miquel.raynal@bootlin.com>
From: Romuald Despres <Romuald.Despres@qorvo.com>
The presence of a channel capability is checked against the tb_msg
netlink attributes array which is the root one, while here we are
looking for channel capabilities, themselves being nested and parsed
into tb_caps. Use tb_caps instead of tb_msg here otherwise we are
accessing a random index in the upper attributes list.
Signed-off-by: Romuald Despres <Romuald.Despres@qorvo.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
src/info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/info.c b/src/info.c
index f85690c..8ed5e4f 100644
--- a/src/info.c
+++ b/src/info.c
@@ -342,7 +342,7 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
printf("\b \n");
}
- if (tb_msg[NL802154_CAP_ATTR_CHANNELS]) {
+ if (tb_caps[NL802154_CAP_ATTR_CHANNELS]) {
int counter = 0;
int rem_pages;
struct nlattr *nl_pages;
--
2.34.1
next prev parent reply other threads:[~2022-07-01 14:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 14:34 [PATCH wpan-tools 0/7] iwpan: Support scanning/beaconing Miquel Raynal
2022-07-01 14:34 ` Miquel Raynal [this message]
2022-07-01 14:34 ` [PATCH wpan-tools 2/7] iwpan: Export iwpan_debug Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 3/7] iwpan: Fix a comment Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 4/7] iwpan: Remove duplicated SECTION Miquel Raynal
2022-08-01 23:30 ` Alexander Aring
2022-07-01 14:34 ` [PATCH wpan-tools 5/7] iwpan: Synchronize nl802154 header with the Linux kernel Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 6/7] iwpan: Add full scan support Miquel Raynal
2022-07-01 14:34 ` [PATCH wpan-tools 7/7] iwpan: Add events support Miquel Raynal
2022-07-04 1:18 ` [PATCH wpan-tools 0/7] iwpan: Support scanning/beaconing Alexander Aring
2022-08-02 0:05 ` Alexander Aring
2022-08-19 17:06 ` Miquel Raynal
2022-08-24 1:36 ` Alexander Aring
2022-08-25 12:55 ` Miquel Raynal
2022-08-26 1:22 ` Alexander Aring
2022-08-26 10:50 ` Miquel Raynal
2022-08-28 13:55 ` Alexander Aring
2022-08-29 8:37 ` Miquel Raynal
2022-08-29 12:57 ` Alexander Aring
2022-08-31 3:17 ` Alexander Aring
2022-08-31 15:17 ` Miquel Raynal
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=20220701143434.1267864-2-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=alex.aring@gmail.com \
--cc=david.girault@qorvo.com \
--cc=frederic.blain@qorvo.com \
--cc=linux-wpan@vger.kernel.org \
--cc=nico@ni.fr.eu.org \
--cc=romuald.despres@qorvo.com \
--cc=stefan@datenfreihafen.org \
--cc=thomas.petazzoni@bootlin.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).