From: Willem de Bruijn <willemb@google.com>
To: netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
elder@kernel.org, Willem de Bruijn <willemb@google.com>,
Alex Elder <elder@riscstar.com>
Subject: [PATCH net-next v2 1/5] net: ipa: remove ethernet-specific artifacts from modem netdev setup
Date: Sun, 29 Nov 2026 11:30:36 -0500 [thread overview]
Message-ID: <20261129163327.893403-2-willemb@google.com> (raw)
In-Reply-To: <20261129163327.893403-1-willemb@google.com>
Commit 75944b040bbc ("net: ipa: open-code ether_setup()") open-coded
ether_setup(), including fields that do not apply to this headerless
ARPHRD_RAWIP device:
- min_header_len = ETH_HLEN, while hard_header_len is 0
- an Ethernet broadcast address, while addr_len is 0
- clearing IFF_BROADCAST | IFF_MULTICAST, which are never set
Remove these and replace the etherdevice.h include with if_ether.h for
ETH_P_MAP and ETH_MIN_MTU.
With min_header_len left at 0, the device behaves like other headerless
devices (such as tun and rmnet) in af_packet's vlan_get_tci(), where
min_header_len == hard_header_len instead of returning early on the
mismatch. Normal IPA traffic uses ETH_P_MAP rather than a VLAN
ethertype, so it is unaffected.
Cc: Alex Elder <elder@kernel.org>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Alex Elder <elder@riscstar.com>
---
drivers/net/ipa/ipa_modem.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c
index d84c1dbd3b1a..d7892fcb0ef4 100644
--- a/drivers/net/ipa/ipa_modem.c
+++ b/drivers/net/ipa/ipa_modem.c
@@ -5,8 +5,8 @@
*/
#include <linux/errno.h>
-#include <linux/etherdevice.h>
#include <linux/if_arp.h>
+#include <linux/if_ether.h>
#include <linux/if_rmnet.h>
#include <linux/netdevice.h>
#include <linux/pm_runtime.h>
@@ -223,15 +223,12 @@ static void ipa_modem_netdev_setup(struct net_device *netdev)
netdev->header_ops = NULL;
netdev->type = ARPHRD_RAWIP;
netdev->hard_header_len = 0;
- netdev->min_header_len = ETH_HLEN;
netdev->min_mtu = ETH_MIN_MTU;
netdev->max_mtu = IPA_MTU;
netdev->mtu = netdev->max_mtu;
netdev->addr_len = 0;
netdev->tx_queue_len = DEFAULT_TX_QUEUE_LEN;
- netdev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
netdev->priv_flags |= IFF_TX_SKB_SHARING;
- eth_broadcast_addr(netdev->broadcast);
/* The endpoint is configured for QMAP */
netdev->needed_headroom = sizeof(struct rmnet_map_header);
--
2.56.1.839.g22a8290db9-goog
next prev parent reply other threads:[~2026-11-29 16:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 16:30 [PATCH net-next v2 0/5] net: remove dev_validate_header() and net_device::min_header_len Willem de Bruijn
2026-11-29 16:30 ` Willem de Bruijn [this message]
2026-11-29 16:30 ` [PATCH net-next v2 2/5] net: remove header_ops->validate and dev_validate_header() Willem de Bruijn
2026-11-29 16:30 ` [PATCH net-next v2 3/5] packet: reset network header on all headerless devices Willem de Bruijn
2026-11-29 16:30 ` [PATCH net-next v2 4/5] packet: use Ethernet header length in vlan_get_tci() Willem de Bruijn
2026-11-29 16:30 ` [PATCH net-next v2 5/5] net: remove unused net_device::min_header_len Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261129163327.893403-2-willemb@google.com \
--to=willemb@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=elder@kernel.org \
--cc=elder@riscstar.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox