Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2a74581 authored by David Härdeman's avatar David Härdeman Committed by Mauro Carvalho Chehab
Browse files

[media] rc-core: fix toggle handling in the rc6 decoder



The toggle bit shouldn't be cleared before the toggle value is calculated.

This should probably go into 3.17.x as well.

Fixes: 120703f9 ([media] rc-core: document the protocol type)

Cc: stable@vger.kernel.org # For v3.17
Tested-by: default avatarStephan Raue <mailinglists@openelec.tv>
Signed-off-by: default avatarDavid Härdeman <david@hardeman.nu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 009a5410
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -259,8 +259,8 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
			case 32:
			case 32:
				if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
				if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
					protocol = RC_TYPE_RC6_MCE;
					protocol = RC_TYPE_RC6_MCE;
					scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
					toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
					toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
					scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
				} else {
				} else {
					protocol = RC_BIT_RC6_6A_32;
					protocol = RC_BIT_RC6_6A_32;
					toggle = 0;
					toggle = 0;