The wireless proc iterator can identify a cfg80211 device through ieee80211_ptr when cfg80211 is modular. Its built-in-only guard nevertheless omits interfaces without ordinary wireless statistics. Use IS_ENABLED so such an interface can still be listed with zero statistics. No call to the cfg80211 module is needed here. The issue was found by our static-analysis tool and manually reviewed. Fixes: 3d23e349d807 ("wext: refactor") Signed-off-by: Pengpeng Hou --- The original patch was prepared with Gemini. Codex assisted with this review and revision (Assisted-by: gpt 5). Built wext-proc.o on x86-64 with GCC 11.4 and W=1 (CONFIG_CFG80211=m, CONFIG_WIRELESS_EXT=y). No runtime or hardware test was performed. net/wireless/wext-proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/wext-proc.c b/net/wireless/wext-proc.c index be6b2b695bf9e723f0070178b4fd46c041bc5d1e..33aff575ed6b1251512a513bf4f4735005b00ac6 100644 --- a/net/wireless/wext-proc.c +++ b/net/wireless/wext-proc.c @@ -38,7 +38,7 @@ static void wireless_seq_printf_stats(struct seq_file *seq, if (dev->wireless_handlers) stats = &nullstats; #endif -#ifdef CONFIG_CFG80211 +#if IS_ENABLED(CONFIG_CFG80211) if (dev->ieee80211_ptr) stats = &nullstats; #endif base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106