aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@citymesh.com>2023-07-07 16:48:26 +0200
committerJohannes Berg <johannes.berg@intel.com>2023-08-24 09:16:56 +0200
commitea706b389fd896318bd7310b058fedf11d1b6758 (patch)
tree2057f7112b6292696b51e0523c4bca244d3b3ea8
parentcb491fa6b4b5bb1e7c11788a39bcf5a7a74afafa (diff)
iw: fix attribute size mismatch
NL80211_ATTR_MAX_AP_ASSOC_STA gets packed as u32 in the kernel. Change the receiving side to match this, or it will be wrong on big-endian. Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com> Link: https://lore.kernel.org/r/20230707144826.3043151-1-koen.vandeputte@citymesh.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/info.c b/info.c
index 364f9b3..4c5f463 100644
--- a/info.c
+++ b/info.c
@@ -879,7 +879,7 @@ broken_combination:
if (tb_msg[NL80211_ATTR_MAX_AP_ASSOC_STA])
printf("\tMaximum associated stations in AP mode: %u\n",
- nla_get_u16(tb_msg[NL80211_ATTR_MAX_AP_ASSOC_STA]));
+ nla_get_u32(tb_msg[NL80211_ATTR_MAX_AP_ASSOC_STA]));
return NL_SKIP;
}