diff options
| author | Mark Brown <broonie@kernel.org> | 2020-12-28 17:20:00 +0300 | 
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2020-12-28 17:20:00 +0300 | 
| commit | 2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc (patch) | |
| tree | 88e987c447daf2c29e2d4c15e58d1029b0cc78c2 /drivers/net/can/grcan.c | |
| parent | 3b66e4a8e58a85af3212c7117d7a29c9ef6679a2 (diff) | |
| parent | 5c8fe583cce542aa0b84adc939ce85293de36e5e (diff) | |
| download | linux-2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc.tar.xz | |
Merge tag 'v5.11-rc1' into regulator-5.11
Linux 5.11-rc1
Diffstat (limited to 'drivers/net/can/grcan.c')
| -rw-r--r-- | drivers/net/can/grcan.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c index 39802f107eb1..f5d94a692576 100644 --- a/drivers/net/can/grcan.c +++ b/drivers/net/can/grcan.c @@ -1201,12 +1201,12 @@ static int grcan_receive(struct net_device *dev, int budget)  			cf->can_id = ((slot[0] & GRCAN_MSG_BID)  				      >> GRCAN_MSG_BID_BIT);  		} -		cf->can_dlc = get_can_dlc((slot[1] & GRCAN_MSG_DLC) +		cf->len = can_cc_dlc2len((slot[1] & GRCAN_MSG_DLC)  					  >> GRCAN_MSG_DLC_BIT);  		if (rtr) {  			cf->can_id |= CAN_RTR_FLAG;  		} else { -			for (i = 0; i < cf->can_dlc; i++) { +			for (i = 0; i < cf->len; i++) {  				j = GRCAN_MSG_DATA_SLOT_INDEX(i);  				shift = GRCAN_MSG_DATA_SHIFT(i);  				cf->data[i] = (u8)(slot[j] >> shift); @@ -1215,7 +1215,7 @@ static int grcan_receive(struct net_device *dev, int budget)  		/* Update statistics and read pointer */  		stats->rx_packets++; -		stats->rx_bytes += cf->can_dlc; +		stats->rx_bytes += cf->len;  		netif_receive_skb(skb);  		rd = grcan_ring_add(rd, GRCAN_MSG_SIZE, dma->rx.size); @@ -1399,7 +1399,7 @@ static netdev_tx_t grcan_start_xmit(struct sk_buff *skb,  	eff = cf->can_id & CAN_EFF_FLAG;  	rtr = cf->can_id & CAN_RTR_FLAG;  	id = cf->can_id & (eff ? CAN_EFF_MASK : CAN_SFF_MASK); -	dlc = cf->can_dlc; +	dlc = cf->len;  	if (eff)  		tmp = (id << GRCAN_MSG_EID_BIT) & GRCAN_MSG_EID;  	else @@ -1447,7 +1447,7 @@ static netdev_tx_t grcan_start_xmit(struct sk_buff *skb,  	 * can_put_echo_skb would be an error unless other measures are  	 * taken.  	 */ -	priv->txdlc[slotindex] = cf->can_dlc; /* Store dlc for statistics */ +	priv->txdlc[slotindex] = cf->len; /* Store dlc for statistics */  	can_put_echo_skb(skb, dev, slotindex);  	/* Make sure everything is written before allowing hardware to  | 
