diff --git a/4.18/wacom_wac.c b/4.18/wacom_wac.c index 44f20105..2b30c562 100644 --- a/4.18/wacom_wac.c +++ b/4.18/wacom_wac.c @@ -2413,6 +2413,9 @@ static void wacom_wac_pen_usage_mapping(struct hid_device *hdev, wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS3, 0); features->quirks &= ~WACOM_QUIRK_PEN_BUTTON3; break; + case WACOM_HID_WD_SEQUENCENUMBER: + wacom_wac->hid_data.sequence_number = -1; + break; } } @@ -2537,7 +2540,8 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field wacom_wac->hid_data.barrelswitch3 = value; return; case WACOM_HID_WD_SEQUENCENUMBER: - if (wacom_wac->hid_data.sequence_number != value) { + if (wacom_wac->hid_data.sequence_number != value && + wacom_wac->hid_data.sequence_number >= 0) { int sequence_size = field->logical_maximum - field->logical_minimum + 1; int drop_count = (value - wacom_wac->hid_data.sequence_number) % sequence_size; hid_warn(hdev, "Dropped %d packets", drop_count); diff --git a/4.18/wacom_wac.h b/4.18/wacom_wac.h index 9adb36fc..62689ffc 100644 --- a/4.18/wacom_wac.h +++ b/4.18/wacom_wac.h @@ -353,7 +353,7 @@ struct hid_data { int bat_connected; int ps_connected; bool pad_input_event_flag; - unsigned short sequence_number; + int sequence_number; #ifdef WACOM_INPUT_SET_TIMESTAMP ktime_t time_delayed; #endif