Netgear Aircard 341U in QMI mode, switching to 802.3

Bjørn Mork bjorn at mork.no
Tue Jun 9 00:42:16 PDT 2015


David McCullough <david.mccullough at accelecon.com> writes:

> +	if (skb_headroom(skb) < ETH_HLEN) {
> +		skb2 = skb_copy_expand(skb, ETH_HLEN, 0, GFP_ATOMIC);
> +		if (!skb2) {
> +			dev->net->stats.rx_errors++;
> +			return 0;
> +		}
> +		skb = skb2;
> +	}

Do you ever hit this?  Yes, I know we are not supposed to depend on the
built-in headroom, but NET_SKB_PAD is at least 32 bytes regardless of
platform AFAICS so this if test should never be true?

But I suppose you had your reasons to add this.  In any case, I think we
should rather allocate the necessary headroom in the fist place if we
are going support raw-ip.  The rx_fixup header addition was really meant
to be an exceptional case, and not the modus operandi.  That's why I
found it acceptable to depend on the built-in headroom.

> +	dev->net->mtu = 1460;

I noticed this recent discussion with interest:
https://forum.sierrawireless.com/viewtopic.php?f=117&t=8771&sid=e4a234dd9b4f3864b46973127a705273#p35800

If we get the correct MTU from QMI, then we (that is userspace. as
that's where we do QMI) should probably configure the netdev
accordingly.

> +	/* Sprint 341u modem in pass through and non-pass-through modes */
> +	{QMI_RAWIP_FIXED_INTF(0x1199,0x9057,8)},/* ippassthrough */
> +	{QMI_RAWIP_FIXED_INTF(0x1199,0x9055,8)},/* non-passthrough */


Right.  So that's the answer to the question about 9057 vs 9055, I
guess.  Ah, I see you're already on that.


Bjørn


More information about the libqmi-devel mailing list