This should avoid confusion when CONFIG_CAN_CALC_BITTIMING is disabled or
"ifconfig canX up" failed due to missing bit-timing setup.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@937
030b6a49-0b11-0410-94ab-
b0dab22257f2
#else /* !CONFIG_CAN_CALC_BITTIMING */
static int can_calc_bittiming(struct net_device *dev)
{
+ dev_err(ND2D(dev), "bit-timing calculation not available\n");
return -EINVAL;
}
#endif /* CONFIG_CAN_CALC_BITTIMING */
int err;
/* Check if bit-timing parameters have been pre-defined */
- if (!priv->bittiming.tq && !priv->bittiming.bitrate)
+ if (!priv->bittiming.tq && !priv->bittiming.bitrate) {
+ dev_err(ND2D(dev), "bit-timing not yet defined\n");
return -EINVAL;
+ }
/* Check if the CAN device has bit-timing parameters */
if (priv->bittiming_const) {