mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
linux-can-next-for-6.3-20230208
-----BEGIN PGP SIGNATURE----- iQFHBAABCgAxFiEEDs2BvajyNKlf9TJQvlAcSiqKBOgFAmPkDE8THG1rbEBwZW5n dXRyb25peC5kZQAKCRC+UBxKKooE6F1OB/45wDgT/6HUH0khnFx2EQGEK30zbW6r nghJvlzcMv+r7hHar6OIerJsdRmJJK70gJYV/3raVTiUlfv7GFT/6he75AA3xLgK 5QP6v4AmsEOmKbnM5GH/QIKWWveW4YRgbiIExvKOkzM+Mc1Ef//sOJowzr6hGkY/ 5OeldQIKpMhZdesW9RhHn/4G1ofatw1dA803XxFYRHQeTF6aBETtazbkWb9t8Jao T4IsTIPeblnNu2VJ7y/MA0yCzbY+l33UTKljIZsedw/7KhzVrflOf+T9W2wgPy7Z 6RA85wmSB5eXGf851wcQ20eklosg+40wfBSLlOfThuQHcSSnjzgRTt0N =RJUx -----END PGP SIGNATURE----- Merge tag 'linux-can-next-for-6.3-20230208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== can-next 2023-02-08 The 1st patch is by Oliver Hartkopp and cleans up the CAN_RAW's raw_setsockopt() for CAN_RAW_FD_FRAMES. The 2nd patch is by me and fixes the compilation if CONFIG_CAN_CALC_BITTIMING is disabled. (Problem introduced in last pull request to next-next.) * tag 'linux-can-next-for-6.3-20230208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: bittiming: can_calc_bittiming(): add missing parameter to no-op function can: raw: use temp variable instead of rolling back config ==================== Link: https://lore.kernel.org/r/20230208210014.3169347-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
5131a053f2
@ -124,7 +124,7 @@ void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const,
|
||||
#else /* !CONFIG_CAN_CALC_BITTIMING */
|
||||
static inline int
|
||||
can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt,
|
||||
const struct can_bittiming_const *btc)
|
||||
const struct can_bittiming_const *btc, struct netlink_ext_ack *extack)
|
||||
{
|
||||
netdev_err(dev, "bit-timing calculation not available\n");
|
||||
return -EINVAL;
|
||||
|
@ -523,6 +523,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
||||
struct can_filter sfilter; /* single filter */
|
||||
struct net_device *dev = NULL;
|
||||
can_err_mask_t err_mask = 0;
|
||||
int fd_frames;
|
||||
int count = 0;
|
||||
int err = 0;
|
||||
|
||||
@ -664,17 +665,17 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
||||
break;
|
||||
|
||||
case CAN_RAW_FD_FRAMES:
|
||||
if (optlen != sizeof(ro->fd_frames))
|
||||
if (optlen != sizeof(fd_frames))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_from_sockptr(&ro->fd_frames, optval, optlen))
|
||||
if (copy_from_sockptr(&fd_frames, optval, optlen))
|
||||
return -EFAULT;
|
||||
|
||||
/* Enabling CAN XL includes CAN FD */
|
||||
if (ro->xl_frames && !ro->fd_frames) {
|
||||
ro->fd_frames = ro->xl_frames;
|
||||
if (ro->xl_frames && !fd_frames)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ro->fd_frames = fd_frames;
|
||||
break;
|
||||
|
||||
case CAN_RAW_XL_FRAMES:
|
||||
|
Loading…
Reference in New Issue
Block a user