Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22b4738a authored by Jack Pham's avatar Jack Pham
Browse files

usb: gadget: u_ether: Add ETH_P_MAP skb protocol type



In the case of RMNET IP mode and a packet is neither IPv4
nor IPv6, check if it supports ETH_P_MAP protocol type.
This allows upper layers to use the MAP protocol to handle
MUXing and de-MUXing of the skb accordingly.

Change-Id: Icaf70f52b15e642aefa6a4c6e5494dae435aa7f3
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 02983880
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -501,6 +501,9 @@ static __be16 ether_ip_type_trans(struct sk_buff *skb,
		protocol = htons(ETH_P_IPV6);
		break;
	default:
		if ((skb->data[0] & 0x40) == 0x00)
			protocol = htons(ETH_P_MAP);
		else
			pr_debug_ratelimited("[%s] L3 protocol decode error: 0x%02x",
					dev->name, skb->data[0] & 0xf0);
	}