diff options
author | Horatiu Vultur <[email protected]> | 2022-03-07 10:46:32 +0100 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2022-03-08 10:44:33 +0100 |
commit | 328c621b95cdee01c50ec6d025b871b7c591f424 (patch) | |
tree | 40ba8245c04ab4eec81c73327567d87c207f758f | |
parent | 1416ea0ddc1463fb8c9cf12b48f3df82a327e356 (diff) |
net: lan966x: allow offloading timestamp operations to the PHY
In case the MAC is using 'netif_rx()' to deliver the skb up the network
stack, it needs to check whether 'skb_defer_rx_timestmap()' is necessary
or not. In case is needed then don't call 'netif_rx()'
Signed-off-by: Horatiu Vultur <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
-rw-r--r-- | drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index ad310c95bf5c..750f2cc2f695 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c @@ -600,7 +600,9 @@ static irqreturn_t lan966x_xtr_irq_handler(int irq, void *args) skb->offload_fwd_mark = 0; } - netif_rx(skb); + if (!skb_defer_rx_timestamp(skb)) + netif_rx(skb); + dev->stats.rx_bytes += len; dev->stats.rx_packets++; |