Commit 0f4ad7f48128f62cdd50aa9a42ab67f700198f4e

Con Kolivas 2014-02-20T11:07:06

Store the hfa hash_clock rate and display it in the statline.

diff --git a/driver-hashfast.c b/driver-hashfast.c
index 8d97e79..b805036 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -453,6 +453,7 @@ tryagain:
 		       hashfast->drv->name, hashfast->device_id);
 		return false;
 	}
+	info->base_clock = db->hash_clockrate;
 
 	return true;
 }
@@ -1497,8 +1498,8 @@ static void hfa_statline_before(char *buf, size_t bufsiz, struct cgpu_info *hash
 		}
 	}
 
-	tailsprintf(buf, bufsiz, "%3.0fC %3d%% %3.2fV", hashfast->temp, info->fanspeed,
-		    max_volt);
+	tailsprintf(buf, bufsiz, "%3dMHz %3.0fC %3d%% %3.2fV", info->base_clock,
+		    hashfast->temp, info->fanspeed, max_volt);
 }
 
 static void hfa_init(struct cgpu_info __maybe_unused *hashfast)
diff --git a/driver-hashfast.h b/driver-hashfast.h
index 152ce3b..4adeb0f 100644
--- a/driver-hashfast.h
+++ b/driver-hashfast.h
@@ -105,6 +105,7 @@ struct hashfast_info {
 	struct hf_long_usb_stats1 stats1;
 	struct hf_die_data *die_data;
 	int hash_clock_rate;                        // Hash clock rate to use, in Mhz
+	int base_clock;                             // Clock rate we actually got
 	struct hf_usb_init_base usb_init_base;      // USB Base information from USB_INIT
 	struct hf_config_data config_data;          // Configuration data used from USB_INIT
 	int core_bitmap_size;                       // in bytes