Skip to content

Commit 942b3c6

Browse files
Merge patch series "can: drivers: drop skb in xmit if device is in listen only mode"
Marc Kleine-Budde <mkl@pengutronix.de> says: I notived that 3 drivers (bxcan, esd and rockchip) use the function can_dropped_invalid_skb(), that doesn't check if the device is in listen only mode. This series converts these driver to use the new can_dev_dropped_skb() function. Link: https://patch.msgid.link/20251017-fix-skb-drop-check-v1-0-556665793fa4@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2 parents ffff5c8 + 3a3bc9b commit 942b3c6

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/net/can/bxcan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static netdev_tx_t bxcan_start_xmit(struct sk_buff *skb,
842842
u32 id;
843843
int i, j;
844844

845-
if (can_dropped_invalid_skb(ndev, skb))
845+
if (can_dev_dropped_skb(ndev, skb))
846846
return NETDEV_TX_OK;
847847

848848
if (bxcan_tx_busy(priv))

drivers/net/can/esd/esdacc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ netdev_tx_t acc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
254254
u32 acc_id;
255255
u32 acc_dlc;
256256

257-
if (can_dropped_invalid_skb(netdev, skb))
257+
if (can_dev_dropped_skb(netdev, skb))
258258
return NETDEV_TX_OK;
259259

260260
/* Access core->tx_fifo_tail only once because it may be changed

drivers/net/can/rockchip/rockchip_canfd-tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ netdev_tx_t rkcanfd_start_xmit(struct sk_buff *skb, struct net_device *ndev)
7272
int err;
7373
u8 i;
7474

75-
if (can_dropped_invalid_skb(ndev, skb))
75+
if (can_dev_dropped_skb(ndev, skb))
7676
return NETDEV_TX_OK;
7777

7878
if (!netif_subqueue_maybe_stop(priv->ndev, 0,

0 commit comments

Comments
 (0)