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

Commit c7a5aef3 authored by Sunil Paidimarri's avatar Sunil Paidimarri Committed by Gerrit - the friendly Code Review server
Browse files

data-kernel: EMAC: Check NAPI before calling netif_rx_skb



Changes to check if NAPI is enabled and then call
netif_rx_skb, else follow the legacy way of calling
netif_rx_ni.

Acked-by: default avatarAbhishek Chauhan <abchauha@qti.qualcomm.com>
Signed-off-by: default avatarSunil Paidimarri <hisunil@codeaurora.org>
parent 4eeda91f
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -684,6 +684,10 @@ static void ntn_ipa_notify_cb(void *priv, enum ipa_dp_evt_type evt,

		/* Submit packet to network stack */
		/* If its a ping packet submit it via rx_ni else use rx */
		/* If NAPI is enabled call receive_skb */
		if(ipa_get_lan_rx_napi()){
			stat = netif_receive_skb(skb);
		} else {
			if (ip_hdr->protocol == IPPROTO_ICMP) {
				stat = netif_rx_ni(skb);
			} else if ((pdata->dev->stats.rx_packets %
@@ -692,7 +696,7 @@ static void ntn_ipa_notify_cb(void *priv, enum ipa_dp_evt_type evt,
			} else {
				stat = netif_rx(skb);
			}

		}
		if(stat == NET_RX_DROP) {
			pdata->dev->stats.rx_dropped++;
		} else {