aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-07-23 12:37:47 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-07-23 12:37:47 +0200
commit5a99dc69d0bf79bedadd5c9675033a8815fceb0e (patch)
tree1f2caea6e15f0c6d084b66541daf3580ec731831 /utils/cec-compliance
parente4df0e3cd3a84570714defe279d13eae894cb1fa (diff)
cec-compliance: if MAX_RETRIES and OK were set, clear OK
There was a bug in the CEC framework where tx_status could have both OK and MAX_RETRIES flags set (this happened if a message was canceled). The cec-compliance utility did warn about this, but still passed tx_status on as-is. So clear the incorrect OK flag instead to avoid problems with this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/cec-compliance')
-rw-r--r--utils/cec-compliance/cec-compliance.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index 2c44a571..66b102dc 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -703,8 +703,10 @@ int cec_named_ioctl(struct node *node, const char *name,
}
if (!retval && request == CEC_TRANSMIT &&
- (msg->tx_status & CEC_TX_STATUS_OK) && ((msg->tx_status & CEC_TX_STATUS_MAX_RETRIES)))
+ (msg->tx_status & CEC_TX_STATUS_OK) && ((msg->tx_status & CEC_TX_STATUS_MAX_RETRIES))) {
warn("Both OK and MAX_RETRIES were set in tx_status!\n");
+ msg->tx_status &= ~CEC_TX_STATUS_OK;
+ }
if (!retval && request == CEC_TRANSMIT && show_info) {
printf("\t\t%s: Sequence: %u Tx Timestamp: %s Length: %u",

Privacy Policy