]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[media] cec: set timestamp for selfie transmits
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 15 Jul 2016 14:13:49 +0000 (11:13 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 15 Jul 2016 16:20:48 +0000 (13:20 -0300)
Attempts to send CEC messages to yourself are detected in the framework and
returned with a NACK error. However, the tx_ts was never filled in that case.
So just set it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/cec/cec-adap.c

index 07147a1d2b6b73e9096181d408ad65de77e039cf..4d86a6c9258fee4583d2ce5ca0f426b1007d1228 100644 (file)
@@ -603,6 +603,7 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
                         * easy to handle it here so the behavior will be
                         * consistent.
                         */
+                       msg->tx_ts = ktime_get_ns();
                        msg->tx_status = CEC_TX_STATUS_NACK |
                                         CEC_TX_STATUS_MAX_RETRIES;
                        msg->tx_nack_cnt = 1;