Commit cec935ce authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: cec: CEC 2.0-only bcast messages were ignored

Some messages are allowed to be a broadcast message in CEC 2.0
only, and should be ignored by CEC 1.4 devices.

Unfortunately, the check was wrong, causing such messages to be
marked as invalid under CEC 2.0.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: <stable@vger.kernel.org>      # for v4.10 and up
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e42617b8
...@@ -1085,11 +1085,11 @@ void cec_received_msg_ts(struct cec_adapter *adap, ...@@ -1085,11 +1085,11 @@ void cec_received_msg_ts(struct cec_adapter *adap,
valid_la = false; valid_la = false;
else if (!cec_msg_is_broadcast(msg) && !(dir_fl & DIRECTED)) else if (!cec_msg_is_broadcast(msg) && !(dir_fl & DIRECTED))
valid_la = false; valid_la = false;
else if (cec_msg_is_broadcast(msg) && !(dir_fl & BCAST1_4)) else if (cec_msg_is_broadcast(msg) && !(dir_fl & BCAST))
valid_la = false; valid_la = false;
else if (cec_msg_is_broadcast(msg) && else if (cec_msg_is_broadcast(msg) &&
adap->log_addrs.cec_version >= CEC_OP_CEC_VERSION_2_0 && adap->log_addrs.cec_version < CEC_OP_CEC_VERSION_2_0 &&
!(dir_fl & BCAST2_0)) !(dir_fl & BCAST1_4))
valid_la = false; valid_la = false;
} }
if (valid_la && min_len) { if (valid_la && min_len) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment