media: cec: copy sequence field for the reply

commit 13cbaa4c2b upstream.

When the reply for a non-blocking transmit arrives, the sequence
field for that reply was never filled in, so userspace would have no
way of associating the reply to the original transmit.

Copy the sequence field to ensure that this is now possible.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 0dbacebede ([media] cec: move the CEC framework out of staging and to media)
Cc: <stable@vger.kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Hans Verkuil 2021-11-02 12:24:26 +00:00 коммит произвёл Greg Kroah-Hartman
Родитель 238c04518f
Коммит 02130f5e7c
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -1199,6 +1199,7 @@ void cec_received_msg_ts(struct cec_adapter *adap,
if (abort)
dst->rx_status |= CEC_RX_STATUS_FEATURE_ABORT;
msg->flags = dst->flags;
msg->sequence = dst->sequence;
/* Remove it from the wait_queue */
list_del_init(&data->list);