iw: fix NL80211_STA_INFO_PLINK_STATE printing in station dump
PATCH 1/1 iw: fix NL80211_STA_INFO_PLINK_STATE printing in station dump
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 <[email protected]>
--- station.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
station.c +1 -1
@@ -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 ;
Signature · 1 line
1.6.0.4
Johannes Berg
AppliedQuoted 2 lines · Brian Cavagnolo
NL80211_STA_INFO_PLINK_STATEis a u8, not a u16. This bug was causing unexpected output on big endian machines.
Applied, thanks.
johannes