In the CAN_STATE_ERROR_ACTIVE case, cf->data[1] is set to CAN_ERR_CRTL_ACTIVE, but cf->can_id is not set with CAN_ERR_CRTL in that path. Set CAN_ERR_CRTL so consumers know the controller-status information in cf->data[1] is valid.
Unified · Split
| @@ -869,7 +869,7 @@ static void ctucan_err_interrupt(struct net_device *ndev, u32 isr) · 868 unmodified lines | ||
| 869 | 869 | break; |
| 870 | 870 | case CAN_STATE_ERROR_ACTIVE: |
| 871 | 871 | if (skb) { |
| 872 | − cf->can_id |= CAN_ERR_CNT; | |
| 872 | + cf->can_id |= CAN_ERR_CRTL | CAN_ERR_CNT; | |
| 873 | 873 | cf->data[1] = CAN_ERR_CRTL_ACTIVE; |
| 874 | 874 | cf->data[6] = bec.txerr; |
| 875 | 875 | cf->data[7] = bec.rxerr; |