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

Commit 145c3d9b authored by Hemant Kumar's avatar Hemant Kumar Committed by Gerrit - the friendly Code Review server
Browse files

usb: u_ether: Prevent dropping multicast packet in rmnet ip mode



In rmnet ip mode ftp login response is getting dropped quietly by
ndo_start_xmit call back. Fix this by checking rmnet ip mode in
ndo_start_xmit call back, also increment drop counter to be able
to track the packet drop.

Change-Id: I11ba23673bbd162bea302f8bb1a930c58e84b182
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
Signed-off-by: default avatarSivasri Kumar Vanka <sivasri@codeaurora.org>
parent 10644ec3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -790,7 +790,8 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
	}

	/* apply outgoing CDC or RNDIS filters */
	if (skb && !is_promisc(cdc_filter)) {
	if (!test_bit(RMNET_MODE_LLP_IP, &dev->flags) &&
			!is_promisc(cdc_filter)) {
		u8		*dest = skb->data;

		if (is_multicast_ether_addr(dest)) {
@@ -804,6 +805,7 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
			else
				type = USB_CDC_PACKET_TYPE_ALL_MULTICAST;
			if (!(cdc_filter & type)) {
				dev->net->stats.tx_dropped++;
				dev_kfree_skb_any(skb);
				return NETDEV_TX_OK;
			}