1
0
forked from drath/libratbag

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 <benjamin.tissoires@redhat.com>
This commit is contained in:
Benjamin Tissoires
2015-12-14 16:49:02 +01:00
parent 59cd7b1091
commit b3834f48c8

View File

@@ -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;