Linux wireless drivers development
 help / color / mirror / Atom feed
From: Brian Cavagnolo <brian@cozybit.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Brian Cavagnolo <brian@cozybit.com>
Subject: [PATCH] iw: fix NL80211_STA_INFO_PLINK_STATE printing in station dump
Date: Thu, 27 Aug 2009 11:15:20 -0700	[thread overview]
Message-ID: <1251396920-3954-1-git-send-email-brian@cozybit.com> (raw)
In-Reply-To: <iw1>

NL80211_STA_INFO_PLINK_STATE is a u8, not a u16.  This bug was causing
unexpected output on big endian machines.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
---
 station.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/station.c b/station.c
index 0fff92d..a4865f9 100644
--- a/station.c
+++ b/station.c
@@ -127,7 +127,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
 		printf("\n\tmesh plid:\t%d",
 			nla_get_u16(sinfo[NL80211_STA_INFO_PLID]));
 	if (sinfo[NL80211_STA_INFO_PLINK_STATE]) {
-		switch (nla_get_u16(sinfo[NL80211_STA_INFO_PLINK_STATE])) {
+		switch (nla_get_u8(sinfo[NL80211_STA_INFO_PLINK_STATE])) {
 		case LISTEN:
 			strcpy(state_name, "LISTEN");
 			break;
-- 
1.6.0.4


       reply	other threads:[~2009-08-27 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <iw1>
2009-08-27 18:15 ` Brian Cavagnolo [this message]
2009-08-27 18:22   ` [PATCH] iw: fix NL80211_STA_INFO_PLINK_STATE printing in station dump 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=1251396920-3954-1-git-send-email-brian@cozybit.com \
    --to=brian@cozybit.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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