sl->lin_state = SLSTATE_ID_RECEIVED;
/* Is the length of data set in frame cache? */
- if (sce->frame_fl & LIN_CACHE_RESPONSE) {
+ if (sce->dlc > 0) {
sl->rx_expect += sce->dlc + 1; /* + checksum */
sl->rx_len_unknown = false;
set_bit(SLF_MSGEVENT, &sl->flags);
tx_bytes = lin_dlc;
mode = SLLIN_STPMSG_RESPONLY;
- if (sl->rx_buff[SLLIN_BUFF_ID] & LIN_CHECKSUM_EXTENDED)
+ if (sce->frame_fl & LIN_CHECKSUM_EXTENDED)
mode |= SLLIN_STPMSG_CHCKSUM_ENH;
if (sllin_setup_msg(sl, mode, lin_id & LIN_ID_MASK,