From b3834f48c8eecafcab90b8f9b0133583f016aef9 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Mon, 14 Dec 2015 16:49:02 +0100 Subject: [PATCH] hidpp10: do not reject profiles with invalid CRC The mouse accept them, so they are not invalid. Only the profile directory seems to be checking for the CRC. Signed-off-by: Benjamin Tissoires --- src/hidpp10.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/hidpp10.c b/src/hidpp10.c index 84bbc3d6..7086aabb 100644 --- a/src/hidpp10.c +++ b/src/hidpp10.c @@ -1054,6 +1054,16 @@ hidpp10_get_profile(struct hidpp10_device *dev, int8_t number, struct hidpp10_pr page = directory[number].page; res = hidpp10_read_page(dev, page, page_data); + if (res == -EILSEQ) { + /* + * if the CRC is wrong, the mouse still handles the + * profile. Warn the user. + */ + hidpp_log_info(&dev->base, + "Profile %d has a wrong CRC, assuming valid.\n", + number); + res = 0; + } if (res) return res;