if (data.devices_param[device_id].device_vendor_id == VENDOR_ID_NV)
{
#if defined(LINUX)
- return 0;
+ if (data.hm_xnvctrl)
+ {
+ if (set_fan_control (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, NV_CTRL_GPU_COOLER_MANUAL_CONTROL_TRUE) != 0) return -1;
+
+ return 1;
+ }
#endif
#if defined(WIN)
return -1;
}
+int hm_set_fanspeed_with_device_id_xnvctrl (const uint device_id, const int fanspeed)
+{
+ if (data.hm_device[device_id].fan_set_supported == 1)
+ {
+ if (data.hm_xnvctrl)
+ {
+ if (set_fan_speed_target (data.hm_xnvctrl, data.hm_device[device_id].xnvctrl, fanspeed) != 0) return -1;
+
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
int hm_set_fanspeed_with_device_id_adl (const uint device_id, const int fanspeed, const int fanpolicy)
{
if (data.hm_device[device_id].fan_set_supported == 1)
u32 *digest = (u32 *) hash_buf->digest;
- input_buf +=14;
+ input_buf += 14;
digest[0] = hex_to_u32 ((const u8 *) &input_buf[ 0]);
digest[1] = hex_to_u32 ((const u8 *) &input_buf[ 8]);
digest[2] = hex_to_u32 ((const u8 *) &input_buf[16]);
digest[3] = hex_to_u32 ((const u8 *) &input_buf[24]);
- digest[4] = 0x00000000;
+ digest[4] = 0;
return (PARSER_OK);
}
pstoken->pc_offset = 0;
- for (int i = 0; i < (int) pstoken->salt_len - 64; i += 64)
+ for (int i = 0; i < (int) pstoken->salt_len - 63; i += 64)
{
uint w[16];