summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy.hu <andy.hu@starfivetech.com>2023-12-06 13:39:22 +0300
committerandy.hu <andy.hu@starfivetech.com>2023-12-06 13:39:22 +0300
commita0b54a31e1133d73298bebac2b0c15dacfc82751 (patch)
treeaa67bfff445fb18994e3362fe864c2061161905a
parent97e3e70aeef590248dd7f471d76812bf61c4cc10 (diff)
parent4d0981f017e5cfdddf3a3b0234b75cf274ae449e (diff)
downloadlinux-a0b54a31e1133d73298bebac2b0c15dacfc82751.tar.xz
Merge branch 'CR_8648_CAN_5.15_william.qiu' into 'jh7110-5.15.y-devel'
CR_8648_515 : ipms: can: add interface to free the buffer See merge request sdk/linux!987
-rw-r--r--drivers/net/can/ipms_canfd.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/can/ipms_canfd.c b/drivers/net/can/ipms_canfd.c
index 0a5e906d0a3c..d5b72aa50139 100644
--- a/drivers/net/can/ipms_canfd.c
+++ b/drivers/net/can/ipms_canfd.c
@@ -655,22 +655,9 @@ static netdev_tx_t canfd_driver_start_xmit(struct sk_buff *skb, struct net_devic
break;
}
- if (!(ndev->flags & IFF_ECHO) ||
- (skb->protocol != htons(ETH_P_CAN) &&
- skb->protocol != htons(ETH_P_CANFD))) {
- kfree_skb(skb);
- return 0;
- }
-
- skb = can_create_echo_skb(skb);
- if (!skb)
- return -ENOMEM;
-
- /* make settings for echo to reduce code in irq context */
- skb->ip_summed = CHECKSUM_UNNECESSARY;
- skb->dev = ndev;
-
- skb_tx_timestamp(skb);
+ /*Due to cache blocking, we need call dev_kfree_skb() here to free the socket
+ buffer and return NETDEV_TX_OK */
+ dev_kfree_skb(skb);
return NETDEV_TX_OK;
}