lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1264173055-14787-4-git-send-email-jslaby@suse.cz>
Date:	Fri, 22 Jan 2010 16:10:55 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	crope@....fi
Cc:	linux-kernel@...r.kernel.org, jirislaby@...il.com,
	Mauro Carvalho Chehab <mchehab@...hat.com>,
	linux-media@...r.kernel.org
Subject: [PATCH 4/4] media: dvb/af9015, add hashes support

So as a final patch, add support for hash and one hash entry
for MSI digi vox mini II:
iManufacturer 1 Afatech
iProduct      2 DVB-T 2
iSerial       3 010101010600001

It is now handled with proper IR and key map tables.

Signed-off-by: Jiri Slaby <jslaby@...e.cz>
Cc: Antti Palosaari <crope@....fi>
Cc: Mauro Carvalho Chehab <mchehab@...hat.com>
Cc: linux-media@...r.kernel.org

Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
 drivers/media/dvb/dvb-usb/af9015.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 796f9d5..650c913 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -788,6 +788,13 @@ static const struct af9015_setup af9015_setup_usbids[] = {
 	{ }
 };
 
+static const struct af9015_setup af9015_setup_hashes[] = {
+	{ 0xb8feb708,
+		af9015_rc_keys_msi, ARRAY_SIZE(af9015_rc_keys_msi),
+		af9015_ir_table_msi, ARRAY_SIZE(af9015_ir_table_msi) },
+	{ }
+};
+
 static void af9015_set_remote_config(struct usb_device *udev,
 		struct dvb_usb_device_properties *props)
 {
@@ -800,7 +807,10 @@ static void af9015_set_remote_config(struct usb_device *udev,
 	} else {
 		u16 vendor = le16_to_cpu(udev->descriptor.idVendor);
 
-		if (vendor == USB_VID_AFATECH) {
+		table = af9015_setup_match(af9015_config.eeprom_sum,
+				af9015_setup_hashes);
+
+		if (!table && vendor == USB_VID_AFATECH) {
 			/* Check USB manufacturer and product strings and try
 			   to determine correct remote in case of chip vendor
 			   reference IDs are used.
@@ -831,7 +841,7 @@ static void af9015_set_remote_config(struct usb_device *udev,
 					ARRAY_SIZE(af9015_ir_table_trekstor)
 				};
 			}
-		} else
+		} else if (!table)
 			table = af9015_setup_match(vendor, af9015_setup_usbids);
 	}
 
-- 
1.6.5.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ