Commit 18a3df73 authored by Marek Vasut's avatar Marek Vasut Committed by David S. Miller

net: ks8851: Factor out SKB receive function

Factor out this netif_rx_ni(), so it could be overridden by the parallel
bus variant of the KS8851 driver.
Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Petr Stetiar <ynezz@true.cz>
Cc: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 22726020
......@@ -465,6 +465,15 @@ static void ks8851_dbg_dumpkkt(struct ks8851_net *ks, u8 *rxpkt)
rxpkt[12], rxpkt[13], rxpkt[14], rxpkt[15]);
}
/**
* ks8851_rx_skb - receive skbuff
* @skb: The skbuff
*/
static void ks8851_rx_skb(struct sk_buff *skb)
{
netif_rx_ni(skb);
}
/**
* ks8851_rx_pkts - receive packets from the host
* @ks: The device information.
......@@ -533,7 +542,7 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
ks8851_dbg_dumpkkt(ks, rxpkt);
skb->protocol = eth_type_trans(skb, ks->netdev);
netif_rx_ni(skb);
ks8851_rx_skb(skb);
ks->netdev->stats.rx_packets++;
ks->netdev->stats.rx_bytes += rxlen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment