From patchwork Thu Aug 27 18:15:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Cavagnolo X-Patchwork-Id: 44309 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7RIFYYk024683 for ; Thu, 27 Aug 2009 18:15:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbZH0SPa (ORCPT ); Thu, 27 Aug 2009 14:15:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752207AbZH0SPa (ORCPT ); Thu, 27 Aug 2009 14:15:30 -0400 Received: from qw-out-2122.google.com ([74.125.92.26]:26348 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbZH0SP3 (ORCPT ); Thu, 27 Aug 2009 14:15:29 -0400 Received: by qw-out-2122.google.com with SMTP id 8so311032qwh.37 for ; Thu, 27 Aug 2009 11:15:31 -0700 (PDT) Received: by 10.224.36.140 with SMTP id t12mr49155qad.339.1251396931178; Thu, 27 Aug 2009 11:15:31 -0700 (PDT) Received: from localhost.localdomain (adsl-71-156-104-53.dsl.pltn13.sbcglobal.net [71.156.104.53]) by mx.google.com with ESMTPS id 5sm872799qwg.0.2009.08.27.11.15.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 27 Aug 2009 11:15:29 -0700 (PDT) From: Brian Cavagnolo To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Brian Cavagnolo Subject: [PATCH] iw: fix NL80211_STA_INFO_PLINK_STATE printing in station dump Date: Thu, 27 Aug 2009 11:15:20 -0700 Message-Id: <1251396920-3954-1-git-send-email-brian@cozybit.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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;