Skip to content

Commit a179b69

Browse files
Hans Verkuilmchehab
authored andcommitted
[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. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 19d6837 commit a179b69

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/staging/media/cec/cec-adap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,6 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
14091409
u8 init_laddr = cec_msg_initiator(msg);
14101410
u8 devtype = cec_log_addr2dev(adap, dest_laddr);
14111411
int la_idx = cec_log_addr2idx(adap, dest_laddr);
1412-
bool is_directed = la_idx >= 0;
14131412
bool from_unregistered = init_laddr == 0xf;
14141413
struct cec_msg tx_cec_msg = { };
14151414

@@ -1571,7 +1570,7 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
15711570
* Unprocessed messages are aborted if userspace isn't doing
15721571
* any processing either.
15731572
*/
1574-
if (is_directed && !is_reply && !adap->follower_cnt &&
1573+
if (!is_broadcast && !is_reply && !adap->follower_cnt &&
15751574
!adap->cec_follower && msg->msg[1] != CEC_MSG_FEATURE_ABORT)
15761575
return cec_feature_abort(adap, msg);
15771576
break;

0 commit comments

Comments
 (0)