From: Johannes Berg Date: Sun, 26 Sep 2010 07:12:07 +0000 (+0200) Subject: fix NL80211_ATTR_MAX_SCAN_IE_LEN attribute size X-Git-Tag: v0.9.22~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eaa9ee5774d4eb512dd1cff2d8a6efa51bddf27;p=thirdparty%2Fiw.git fix NL80211_ATTR_MAX_SCAN_IE_LEN attribute size The kernel provides this as a u16, not a u32, but unfortunately the problem only shows up on big endian machines. --- diff --git a/info.c b/info.c index ce85514..d842c26 100644 --- 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;