diff options
author | Marek Vasut <marex@denx.de> | 2020-05-29 01:21:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-29 02:30:04 +0300 |
commit | 18a3df73093287ed5ccf650e5d700b6afc3e0663 (patch) | |
tree | 79a4def68fbf60146158e8c87abd507c866a9a23 /drivers/net/ethernet/micrel | |
parent | 22726020050beacc7a164eaaafef0048d302cf41 (diff) | |
download | linux-18a3df73093287ed5ccf650e5d700b6afc3e0663.tar.xz |
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: Marek 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: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index 053d6d085539..087d2a39cdce 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c @@ -466,6 +466,15 @@ static void ks8851_dbg_dumpkkt(struct ks8851_net *ks, u8 *rxpkt) } /** + * 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; |