[PATCH 2/2] iwinfo: cli: fix hwmode formatting

David Bauer mail at david-bauer.net
Tue Apr 20 17:04:54 BST 2021


The placeholder for the 802.11ax hwmode was missing.

Signed-off-by: David Bauer <mail at david-bauer.net>
---
 iwinfo_cli.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index ee5a0e2..82b409c 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -274,12 +274,12 @@ static char * format_encryption(struct iwinfo_crypto_entry *c)
 
 static char * format_hwmodes(int modes)
 {
-	static char buf[15];
+	static char buf[17];
 
 	if (modes <= 0)
 		snprintf(buf, sizeof(buf), "unknown");
 	else
-		snprintf(buf, sizeof(buf), "802.11%s%s%s%s%s%s",
+		snprintf(buf, sizeof(buf), "802.11%s%s%s%s%s%s%s",
 			(modes & IWINFO_80211_A) ? "a" : "",
 			(modes & IWINFO_80211_B) ? "b" : "",
 			(modes & IWINFO_80211_G) ? "g" : "",
-- 
2.31.1




More information about the openwrt-devel mailing list