| .. | .. | 
|---|
| 371 | 371 |  	.brp_inc = 1, | 
|---|
| 372 | 372 |  }; | 
|---|
| 373 | 373 |   | 
|---|
| 374 |  | -static const struct can_bittiming_const kvaser_usb_hydra_flexc_bittiming_c = {  | 
|---|
 | 374 | +const struct can_bittiming_const kvaser_usb_flexc_bittiming_const = {  | 
|---|
| 375 | 375 |  	.name = "kvaser_usb_flex", | 
|---|
| 376 | 376 |  	.tseg1_min = 4, | 
|---|
| 377 | 377 |  	.tseg1_max = 16, | 
|---|
| .. | .. | 
|---|
| 890 | 890 |  	    new_state < CAN_STATE_BUS_OFF) | 
|---|
| 891 | 891 |  		priv->can.can_stats.restarts++; | 
|---|
| 892 | 892 |   | 
|---|
| 893 |  | -	cf->data[6] = bec->txerr;  | 
|---|
| 894 |  | -	cf->data[7] = bec->rxerr;  | 
|---|
 | 893 | +	if (new_state != CAN_STATE_BUS_OFF) {  | 
|---|
 | 894 | +		cf->data[6] = bec->txerr;  | 
|---|
 | 895 | +		cf->data[7] = bec->rxerr;  | 
|---|
 | 896 | +	}  | 
|---|
| 895 | 897 |   | 
|---|
| 896 | 898 |  	stats = &netdev->stats; | 
|---|
| 897 | 899 |  	stats->rx_packets++; | 
|---|
| .. | .. | 
|---|
| 1045 | 1047 |  	shhwtstamps->hwtstamp = hwtstamp; | 
|---|
| 1046 | 1048 |   | 
|---|
| 1047 | 1049 |  	cf->can_id |= CAN_ERR_BUSERROR; | 
|---|
| 1048 |  | -	cf->data[6] = bec.txerr;  | 
|---|
| 1049 |  | -	cf->data[7] = bec.rxerr;  | 
|---|
 | 1050 | +	if (new_state != CAN_STATE_BUS_OFF) {  | 
|---|
 | 1051 | +		cf->data[6] = bec.txerr;  | 
|---|
 | 1052 | +		cf->data[7] = bec.rxerr;  | 
|---|
 | 1053 | +	}  | 
|---|
| 1050 | 1054 |   | 
|---|
| 1051 | 1055 |  	stats->rx_packets++; | 
|---|
| 1052 | 1056 |  	stats->rx_bytes += cf->can_dlc; | 
|---|
| .. | .. | 
|---|
| 1841 | 1845 |  { | 
|---|
| 1842 | 1846 |  	int err; | 
|---|
| 1843 | 1847 |   | 
|---|
| 1844 |  | -	init_completion(&priv->start_comp);  | 
|---|
 | 1848 | +	reinit_completion(&priv->start_comp);  | 
|---|
| 1845 | 1849 |   | 
|---|
| 1846 | 1850 |  	err = kvaser_usb_hydra_send_simple_cmd(priv->dev, CMD_START_CHIP_REQ, | 
|---|
| 1847 | 1851 |  					       priv->channel); | 
|---|
| .. | .. | 
|---|
| 1859 | 1863 |  { | 
|---|
| 1860 | 1864 |  	int err; | 
|---|
| 1861 | 1865 |   | 
|---|
| 1862 |  | -	init_completion(&priv->stop_comp);  | 
|---|
 | 1866 | +	reinit_completion(&priv->stop_comp);  | 
|---|
| 1863 | 1867 |   | 
|---|
| 1864 | 1868 |  	/* Make sure we do not report invalid BUS_OFF from CMD_CHIP_STATE_EVENT | 
|---|
| 1865 | 1869 |  	 * see comment in kvaser_usb_hydra_update_state() | 
|---|
| .. | .. | 
|---|
| 1882 | 1886 |  { | 
|---|
| 1883 | 1887 |  	int err; | 
|---|
| 1884 | 1888 |   | 
|---|
| 1885 |  | -	init_completion(&priv->flush_comp);  | 
|---|
 | 1889 | +	reinit_completion(&priv->flush_comp);  | 
|---|
| 1886 | 1890 |   | 
|---|
| 1887 | 1891 |  	err = kvaser_usb_hydra_send_simple_cmd(priv->dev, CMD_FLUSH_QUEUE, | 
|---|
| 1888 | 1892 |  					       priv->channel); | 
|---|
| .. | .. | 
|---|
| 2024 | 2028 |  		.freq = 24000000, | 
|---|
| 2025 | 2029 |  	}, | 
|---|
| 2026 | 2030 |  	.timestamp_freq = 1, | 
|---|
| 2027 |  | -	.bittiming_const = &kvaser_usb_hydra_flexc_bittiming_c,  | 
|---|
 | 2031 | +	.bittiming_const = &kvaser_usb_flexc_bittiming_const,  | 
|---|
| 2028 | 2032 |  }; | 
|---|