iw: fix IW_FULL guards in size reduction patch

Two of the IW_FULL guards in 200-reduce_size.patch were inverted
or incomplete:

 * the "unknown event" handler unconditionally replaced the
   verbose print with the short form, so IW_FULL builds lost
   the command name decoding;
 * the early return before the vendor IE parser used
   #ifdef IW_FULL, which suppressed parsing in the full build
   instead of the size-reduced one.

Wrap both with the correct #ifndef IW_FULL / #else so the full
and reduced builds produce the intended output.

Link: https://github.com/openwrt/openwrt/pull/23009
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens
2026-04-21 00:43:50 +02:00
parent 0ca11b32eb
commit 957b921721
@@ -24,15 +24,18 @@
case NL80211_CMD_JOIN_IBSS:
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
printf("IBSS %s joined\n", macbuf);
@@ -1297,9 +1300,9 @@ static int print_event(struct nl_msg *ms
@@ -1297,9 +1300,14 @@ static int print_event(struct nl_msg *ms
case NL80211_CMD_ASSOC_COMEBACK: /* 147 */
parse_assoc_comeback(tb, gnlh->cmd);
break;
+#endif
default:
- printf("unknown event %d (%s)\n",
- gnlh->cmd, command_name(gnlh->cmd));
+#ifndef IW_FULL
+ printf("unknown event %d\n", gnlh->cmd);
+#else
printf("unknown event %d (%s)\n",
gnlh->cmd, command_name(gnlh->cmd));
+#endif
break;
}
@@ -212,7 +215,7 @@
return;
}
+#ifdef IW_FULL
+#ifndef IW_FULL
+ return;
+#endif
+