From de29db4632a64cc7c20eb626a1b17e41e50adb26 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 17 Aug 2014 23:12:01 +0200 Subject: WIP firmware reverse engineering Not touched since 7 April 2014. --- hw/usb/hid-logitech-hidpp20.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'hw/usb/hid-logitech-hidpp20.c') diff --git a/hw/usb/hid-logitech-hidpp20.c b/hw/usb/hid-logitech-hidpp20.c index 51e9596151..e3d451a1ef 100644 --- a/hw/usb/hid-logitech-hidpp20.c +++ b/hw/usb/hid-logitech-hidpp20.c @@ -271,8 +271,13 @@ static HIDPP20_FEATURE(feat_featureinfo) static HIDPP20_FEATURE(feat_dfucontrol) { - return -HIDPP20_ERR_CODE_UNSUPPORTED; /* TODO: figure out */ switch (fn) { + case 0: + if (!memcmp(params, "DFU", 3)) { + hd->dfu.active = true; + return 0; + } + return -HIDPP20_ERR_CODE_INVALIDARGUMENT; default: return -HIDPP20_ERR_CODE_INVALID_FUNCTION_ID; } -- cgit v1.2.1