Article View: linux.kernel.netdev
Article #23691[PATCH net-next v4 14/16] wifi: mac80211: replace CONFIG_INET with CONFIG_IPV4 guards
From: Fernando Fernandez Mancera
Date: Fri, 27 Nov 2026 17:17
Date: Fri, 27 Nov 2026 17:17
64 lines
10640 bytes
10640 bytes
Historically, the mac80211 subsystem used CONFIG_INET to guard
IPv4-specific address notifiers, assuming that if IP networking was
enabled, IPv4 was guaranteed to be present. As part of the effort to
make CONFIG_IPV4 optional, this assumption is no longer valid.
Update the conditional compilation guards around the IPv4 address change
notifier and its associated registration routines to explicitly check
for IS_ENABLED(CONFIG_IPV4). This ensures the mac80211 subsystem
compiles successfully without undefined references when building an
IPv6-only kernel.
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
---
net/mac80211/main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index e03c2dbf4fb8..5e10ea3c7601 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -559,7 +559,7 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(ieee80211_restart_hw);
-#ifdef CONFIG_INET
+#if IS_ENABLED(CONFIG_IPV4)
static int ieee80211_ifa_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
@@ -1660,7 +1660,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
wiphy_unlock(hw->wiphy);
rtnl_unlock();
-#ifdef CONFIG_INET
+#if IS_ENABLED(CONFIG_IPV4)
local->ifa_notifier.notifier_call = ieee80211_ifa_changed;
result = register_inetaddr_notifier(&local->ifa_notifier);
if (result)
@@ -1678,11 +1678,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
#if IS_ENABLED(CONFIG_IPV6)
fail_ifa6:
-#ifdef CONFIG_INET
+#if IS_ENABLED(CONFIG_IPV4)
unregister_inetaddr_notifier(&local->ifa_notifier);
#endif
#endif
-#if defined(CONFIG_INET) || defined(CONFIG_IPV6)
+#if IS_ENABLED(CONFIG_IPV4)
fail_ifa:
#endif
rtnl_lock();
@@ -1710,7 +1710,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
tasklet_kill(&local->tx_pending_tasklet);
tasklet_kill(&local->tasklet);
-#ifdef CONFIG_INET
+#if IS_ENABLED(CONFIG_IPV4)
unregister_inetaddr_notifier(&local->ifa_notifier);
#endif
#if IS_ENABLED(CONFIG_IPV6)
--
2.56.1
Technical Details
Message-ID:
<20261127171824.27362-15-fmancera@suse.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372896-linux-kernel-netdev=dewy.ruReferences:
<20261127171824.27362-1-fmancera@suse.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372896-linux-kernel-netdev=dewy.ru From: fmancera@suse.de (Fernando Fernandez Mancera) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v4 14/16] wifi: mac80211: replace CONFIG_INET with CONFIG_IPV4 guards Date: Fri, 27 Nov 2026 18:17:59 +0100 Organization: Usenet Network Message-ID: <20261127171824.27362-15-fmancera@suse.de> References: <20261127171824.27362-1-fmancera@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="782403"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:3zYIbefNbOyqsQvQy2cwVmEjSNQ= sha256:+uTb7XZ3KtdzkQfDuweYwOwoucMdYiLC/33ML86PYZY= sha1:uN8959asbXub4r0XqUUL/WnCwI0= sha256:KiDU3IVPY2bCa95S8xzDTbysW7SbaIisZXgYPEykYpA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id C756C125F65; Fri, 27 Nov 2026 20:20:52 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z2IkuYjr8_ym; Fri, 27 Nov 2026 20:20:50 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-372896-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=suse.de X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 10751125F5E; Fri, 27 Nov 2026 20:20:47 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 5F5EE26303; Fri, 27 Nov 2026 17:20:42 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795800037; b=3d8V/1SGf1kR95KwktPQLXiG5Ox4PqlOjLy3sI0aiWAMf1oA8k5rZT7NaKXGRAWbIHAq 8lwPWGmkhVZiOnPcyGtjaHPSz0jsdRpQ6PQZhkEE9MiFnVAr8zRDc1DjltFYvbusdlyOu zMk1ULku8B01cuzoXgE7XeFo7Idw2RgLdnVfJu/erNDDYwvUUvbYoCxYNJ8mOrHqDuQph W4ADlt9coQmtOWlh6p7St/9Jz1/PNTCQlggrSRMtxxPVceKcJCzIo9RrckWFmnQYdFtrZ 3HWw4NUkJd6oeo/kHNfnWYBDcoN9CWzXYZC3vMG9STSBpc1jZxrCJROYhk8ygJEBBpQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795800037; h=X-Original-To:Received:DMARC-Filter:Received:Received:Received:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Pre-Result:X-Rspamd-Server: X-Spamd-Result:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Rspamd-Queue-Id:X-Rspamd-Pre-Result:X-Rspamd-Action; bh=4OguRMGdAm4Ve4RxSaUFRoN3pO2yCoU1/zlHX5Av2aM=; b=zXSADzKPbvkMimbaaTIrpKazpfXUpr0fY4meS48HyUttRCewdtge99+VgaEMAlVOubnW D1f0i4sw/0wmdhZk9JKriqOMkjakfPqPMaDjk9PVLDRMOv2TdWDNAQ2J57wXdcXgaKvy0 L/FfYbr0vN+Il++OHE2HcMCzQ9sSlslNFbzbagMu+R5eRVXC7tsC1q8w749/TxKEfU65O tMPZIjjsk17fsBS/04K9HTapGfMsbIVxRpLBsTyjIp9m0SG+7xuXu3NX7Z7SZQUmOg6+I 0GwVKbbWlb/cUqQGQindBOHk4qhdFrsuZRq3rr2jG5HCwaMW8uNra8hoBmeEUI2FjlQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AFB35606A689; Fri, 27 Nov 2026 17:20:37 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.135.223.131 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795800037; b=sjXCGVBzdcYXMbsH5So2hjDQpMYgTwB/Dth6VWrW30IJuPv7gOEyY23IHyZJiB9ma4Vc rEROGfkkd4TRaRvkqQFLIDyzIQLrJ5fjGxehzzQ3Fu8q0uzGNqPWuVfYJbZ6oQ9zu8GDW M33rKj/KLWAPXn0QELHFslqiNPEhqpDulEcujAHb2CZLgZbn+rPz7lRrqRK4QHoQ5fu93 8UFI9XTh62ugFjj+0QepZKVVucKgoGR3bkKNWfhwwX9N9SwoiXVoxGUWjCrfV1S9OFFpz 2r2tiwvvNfQX8zUBxpi0kLwsnzAxwq/aZXmeZimTbj8T/BoYE9YMcGTIel87n/2Os5Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795800037; h=DMARC-Filter:Received:Received:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Pre-Result:X-Rspamd-Server: X-Spamd-Result:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Rspamd-Queue-Id:X-Rspamd-Pre-Result:X-Rspamd-Action; bh=4OguRMGdAm4Ve4RxSaUFRoN3pO2yCoU1/zlHX5Av2aM=; b=T5eyEYTs6mCJQlPnlqrNsJtKJNOQwLAkscdCSA/81y9zyOOMBA14jpYeTQ1bhJxmknrx KeKFSCNAHqyHf8c+7ryVq99GUVqH2Re/sP27eWi8Q+1y/9ZRCicJ4xyGUAQSJG2oGAtA0 VNw3z77gfq5UUVz1ORmYx4bpZWIdpQYW/PF706sVtjUIkra+8anOlbTjgqMkXvxGNXhqS 3POj23IWJPtwoXWL/U7nEqx2JiF50YBR6GzBcOH1Lgjk0mniNNkoEsJoGjr5GtjRc9Htk ayb8M8fK7U9lJbE8Jia4X6dlXc8zwT+A3l5OA2P+LyXZ4DhrLXFT0SIw5EVvWxmv06g== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.remote-ip=195.135.223.131 X-Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A1AB606A327; Fri, 27 Nov 2026 17:20:36 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9A1AB606A327 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de X-Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DD8B21F7F2; Fri, 27 Nov 2026 17:20:34 +0000 (UTC) X-Authentication-Results: smtp-out2.suse.de; none X-Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3E60013432; Fri, 27 Nov 2026 17:20:34 +0000 (UTC) X-Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id /Yb1MH67CWuMAwAAD6G6ig:T15 (envelope-from <fmancera@suse.de>); Fri, 27 Nov 2026 17:20:34 +0000 X-Cc: davem@davemloft.net, kuba@kernel.org, edumazet@kernel.org, pabeni@redhat.com, horms@kernel.org, Fernando Fernandez Mancera <fmancera@suse.de>, Johannes Berg <johannes@sipsolutions.net>, linux-wireless@vger.kernel.org X-Mailer: git-send-email 2.51.0 X-In-Reply-To: <20261127171824.27362-1-fmancera@suse.de> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: DD8B21F7F2 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action