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

Commit d7f0a70b authored by Amir Levy's avatar Amir Levy Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa4: fix endianity when checking vlan protocol



Check for vlan skb type was performed with wrong endianity.
Perform comparison with correct endianity.

Change-Id: Ifd8c04511cf2644e3a4881d956a86c3a1d242364
Signed-off-by: default avatarAmir Levy <alevy@codeaurora.org>
parent ef790030
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -618,8 +618,10 @@ static netdev_tx_t ecm_ipa_start_xmit
	}

	if (ecm_ipa_ctx->is_vlan_mode)
		if (unlikely(skb->protocol != ETH_P_8021Q))
			ECM_IPA_DEBUG("ether_type != ETH_P_8021Q && vlan\n");
		if (unlikely(skb->protocol != htons(ETH_P_8021Q)))
			ECM_IPA_DEBUG(
				"ether_type != ETH_P_8021Q && vlan, prot = 0x%X\n"
				, skb->protocol);

	ret = ipa_tx_dp(ecm_ipa_ctx->ipa_to_usb_client, skb, NULL);
	if (ret) {
+4 −2
Original line number Diff line number Diff line
@@ -2008,8 +2008,10 @@ static struct sk_buff *rndis_encapsulate_skb(struct sk_buff *skb,
	}

	if (rndis_ipa_ctx->is_vlan_mode)
		if (unlikely(skb->protocol != ETH_P_8021Q))
			RNDIS_IPA_DEBUG("ether_type != ETH_P_8021Q && vlan\n");
		if (unlikely(skb->protocol != htons(ETH_P_8021Q)))
			RNDIS_IPA_DEBUG(
				"ether_type != ETH_P_8021Q && vlan, prot = 0x%X\n"
				, skb->protocol);

	/* make room at the head of the SKB to put the RNDIS header */
	rndis_hdr = (struct rndis_pkt_hdr *)skb_push(skb,