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

[media] cec: ignore messages when log_addr_mask == 0

Most CEC adapters will still receive broadcast messages, even if no logical
addresses are claimed. But those messages should only be passed on for
monitoring purposes, but not for processing by either kernel or userspace
if userspace didn't call CEC_ADAP_S_LOG_ADDRS first.

So if adap->log_addrs.log_addr_mask is 0, then just return before passing
the received message on to the processing code.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 260ff114
...@@ -851,6 +851,9 @@ void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg) ...@@ -851,6 +851,9 @@ void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg)
if (!valid_la || msg->len <= 1) if (!valid_la || msg->len <= 1)
return; return;
if (adap->log_addrs.log_addr_mask == 0)
return;
/* /*
* Process the message on the protocol level. If is_reply is true, * Process the message on the protocol level. If is_reply is true,
* then cec_receive_notify() won't pass on the reply to the listener(s) * then cec_receive_notify() won't pass on the reply to the listener(s)
......
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