|
@@ -549,6 +549,13 @@ static void do_state(struct net_device *dev,
|
|
|
|
|
|
/* process state changes depending on the new state */
|
|
|
switch (new_state) {
|
|
|
+ case CAN_STATE_ERROR_WARNING:
|
|
|
+ netdev_dbg(dev, "Error Warning\n");
|
|
|
+ cf->can_id |= CAN_ERR_CRTL;
|
|
|
+ cf->data[1] = (bec.txerr > bec.rxerr) ?
|
|
|
+ CAN_ERR_CRTL_TX_WARNING :
|
|
|
+ CAN_ERR_CRTL_RX_WARNING;
|
|
|
+ break;
|
|
|
case CAN_STATE_ERROR_ACTIVE:
|
|
|
netdev_dbg(dev, "Error Active\n");
|
|
|
cf->can_id |= CAN_ERR_PROT;
|