1717/* esdACC DLC register layout */
1818#define ACC_DLC_DLC_MASK GENMASK(3, 0)
1919#define ACC_DLC_RTR_FLAG BIT(4)
20+ #define ACC_DLC_SSTX_FLAG BIT(24) /* Single Shot TX */
21+
22+ /* esdACC DLC in struct acc_bmmsg_rxtxdone::acc_dlc.len only! */
2023#define ACC_DLC_TXD_FLAG BIT(5)
2124
2225/* ecc value of esdACC equals SJA1000's ECC register */
@@ -59,7 +62,7 @@ static void acc_resetmode_leave(struct acc_core *core)
5962 acc_resetmode_entered (core );
6063}
6164
62- static void acc_txq_put (struct acc_core * core , u32 acc_id , u8 acc_dlc ,
65+ static void acc_txq_put (struct acc_core * core , u32 acc_id , u32 acc_dlc ,
6366 const void * data )
6467{
6568 acc_write32_noswap (core , ACC_CORE_OF_TXFIFO_DATA_1 ,
@@ -249,7 +252,7 @@ netdev_tx_t acc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
249252 u8 tx_fifo_head = core -> tx_fifo_head ;
250253 int fifo_usage ;
251254 u32 acc_id ;
252- u8 acc_dlc ;
255+ u32 acc_dlc ;
253256
254257 if (can_dropped_invalid_skb (netdev , skb ))
255258 return NETDEV_TX_OK ;
@@ -274,6 +277,8 @@ netdev_tx_t acc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
274277 acc_dlc = can_get_cc_dlc (cf , priv -> can .ctrlmode );
275278 if (cf -> can_id & CAN_RTR_FLAG )
276279 acc_dlc |= ACC_DLC_RTR_FLAG ;
280+ if (priv -> can .ctrlmode & CAN_CTRLMODE_ONE_SHOT )
281+ acc_dlc |= ACC_DLC_SSTX_FLAG ;
277282
278283 if (cf -> can_id & CAN_EFF_FLAG ) {
279284 acc_id = cf -> can_id & CAN_EFF_MASK ;
0 commit comments