summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2016-08-24 05:36:53 -0300
committerRay Zhang <rayz@codeaurora.org>2017-05-25 11:22:11 +0800
commit4901a435830238a3e1f9b5cede4eaa322ab9bcd5 (patch)
treed9653a1f7c93dd4105de2be7945388962125708d
parent98e53e04490e4d41e794c70d4bb278fd182a30c3 (diff)
[media] cec: don't Feature Abort broadcast msgs when unregistered
If the adapter is configured as 'Unregistered', then cec_receive_notify incorrectly thinks that broadcast messages are directed messages. The destination for broadcast messages is 0xf, and the logical address assigned to Unregistered devices is also 0xf and the logic didn't handle that correctly. Change-Id: Idaedf31ec471b5d4bbc982b714e1c08e4935ec6c Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Git-commit: a179b69359feb26ddb148bb6a2c0c53a8d1dc5be Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Signed-off-by: Ray Zhang <rayz@codeaurora.org>
-rw-r--r--drivers/staging/media/cec/cec-adap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/media/cec/cec-adap.c b/drivers/staging/media/cec/cec-adap.c
index 9681889a08c8..611e07b78bfe 100644
--- a/drivers/staging/media/cec/cec-adap.c
+++ b/drivers/staging/media/cec/cec-adap.c
@@ -1405,7 +1405,6 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
u8 init_laddr = cec_msg_initiator(msg);
u8 devtype = cec_log_addr2dev(adap, dest_laddr);
int la_idx = cec_log_addr2idx(adap, dest_laddr);
- bool is_directed = la_idx >= 0;
bool from_unregistered = init_laddr == 0xf;
struct cec_msg tx_cec_msg = { };
@@ -1567,7 +1566,7 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
* Unprocessed messages are aborted if userspace isn't doing
* any processing either.
*/
- if (is_directed && !is_reply && !adap->follower_cnt &&
+ if (!is_broadcast && !is_reply && !adap->follower_cnt &&
!adap->cec_follower && msg->msg[1] != CEC_MSG_FEATURE_ABORT)
return cec_feature_abort(adap, msg);
break;