steelseries: fix regression in v2 led
Fixes
@@ -709,6 +709,7 @@ steelseries_write_led_cycle(struct ratbag_led *led,
{
struct ratbag_device *device = led->profile->device;
uint8_t buf[STEELSERIES_REPORT_SIZE] = {0};
+ int device_version = ratbag_device_data_steelseries_get_device_version(device->data);
int ret;
struct steelseries_led_cycle cycle;
@@ -782,8 +783,12 @@ steelseries_write_led_cycle(struct ratbag_led *led,
construct_cycle_buffer(&cycle, cycle_spec, buf, sizeof(buf));
msleep(10);
+ if (device_version == 3)
ret = ratbag_hidraw_raw_request(device, cycle_spec->cmd_val, buf,
sizeof(buf), cycle_spec->hid_report_type, HID_REQ_SET_REPORT);
+ else
+ ret = ratbag_hidraw_output_report(device, buf, sizeof(buf));
+
if (ret < 0)
return ret;
