mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
can: bcm: initialize ifindex for timeouts without previous frame reception
commit 81b401100c
upstream.
Set in the rx_ifindex to pass the correct interface index in the case of a
message timeout detection. Usually the rx_ifindex value is set at receive
time. But when no CAN frame has been received the RX_TIMEOUT notification
did not contain a valid value.
Reported-by: Andre Naujoks <nautsch2@googlemail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5e937c8ffe
commit
c9fa3f41a9
1 changed files with 3 additions and 0 deletions
|
@ -1084,6 +1084,9 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
|
|||
op->sk = sk;
|
||||
op->ifindex = ifindex;
|
||||
|
||||
/* ifindex for timeout events w/o previous frame reception */
|
||||
op->rx_ifindex = ifindex;
|
||||
|
||||
/* initialize uninitialized (kzalloc) structure */
|
||||
hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
op->timer.function = bcm_rx_timeout_handler;
|
||||
|
|
Loading…
Reference in a new issue