]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
fix NL80211_ATTR_MAX_SCAN_IE_LEN attribute size
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 26 Sep 2010 07:12:07 +0000 (09:12 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Sun, 26 Sep 2010 07:12:07 +0000 (09:12 +0200)
The kernel provides this as a u16, not a u32,
but unfortunately the problem only shows up
on big endian machines.

info.c

diff --git a/info.c b/info.c
index ce85514a0fd8421ee056e8329935770d48022521..d842c26a47103029cac99b530ca6de18e886a5ac 100644 (file)
--- a/info.c
+++ b/info.c
@@ -142,7 +142,7 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
                       nla_get_u8(tb_msg[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]));
        if (tb_msg[NL80211_ATTR_MAX_SCAN_IE_LEN])
                printf("\tmax scan IEs length: %d bytes\n",
-                      nla_get_u32(tb_msg[NL80211_ATTR_MAX_SCAN_IE_LEN]));
+                      nla_get_u16(tb_msg[NL80211_ATTR_MAX_SCAN_IE_LEN]));
 
        if (tb_msg[NL80211_ATTR_WIPHY_FRAG_THRESHOLD]) {
                unsigned int frag;