spin_lock_irqsave(&sl->linfr_lock, flags);
/* Is the length of data set in frame cache? */
- if (sce->frame_fl & LIN_LOC_SLAVE_CACHE) {
+ if (sce->frame_fl & LIN_CACHE_RESPONSE) {
sl->rx_expect += sce->dlc;
sl->rx_len_unknown = false;
} else {
unsigned long flags;
struct sllin_conf_entry *sce;
- if (!(cf->can_id & LIN_ID_CONF))
+ if (!(cf->can_id & LIN_CTRL_FRAME))
return -1;
sce = &sl->linfr_cache[cf->can_id & LIN_ID_MASK];
if ((data != NULL) && len) {
sl->tx_lim += len;
memcpy(sl->tx_buff + SLLIN_BUFF_DATA, data, len);
- sl->tx_buff[sl->tx_lim++] = sllin_checksum(sl->tx_buff,
+ sl->tx_buff[sl->tx_lim] = sllin_checksum(sl->tx_buff,
sl->tx_lim, mode & SLLIN_STPMSG_CHCKSUM_ENH);
+ sl->tx_lim++;
}
if (len != 0)
sl->rx_lim = SLLIN_BUFF_DATA + len + 1;
spin_lock_irqsave(&sl->linfr_lock, flags);
/* Is there Slave response in linfr_cache to be sent? */
- if ((sce->frame_fl & LIN_LOC_SLAVE_CACHE)
+ if ((sce->frame_fl & LIN_CACHE_RESPONSE)
&& (sce->dlc > 0)) {
pr_debug("sllin: Sending LIN response from linfr_cache\n");