Commit dfa849ab62f886d448002453c9434f928038ae24

Kano 2013-10-18T10:42:43

bflsc use getinfo chip parallelization if it is present

diff --git a/driver-bflsc.c b/driver-bflsc.c
index 3d34f83..c9011ba 100644
--- a/driver-bflsc.c
+++ b/driver-bflsc.c
@@ -818,6 +818,19 @@ reinit:
 			break;
 	}
 
+	// Set parallelization based on the getinfo() response if it is present
+	if (sc_info->sc_devs[0].chips && strlen(sc_info->sc_devs[0].chips)) {
+		if (strstr(sc_info->sc_devs[0].chips, BFLSC_DI_CHIPS_PARALLEL)) {
+			sc_info->que_noncecount = QUE_NONCECOUNT_V2;
+			sc_info->que_fld_min = QUE_FLD_MIN_V2;
+			sc_info->que_fld_max = QUE_FLD_MAX_V2;
+		} else {
+			sc_info->que_noncecount = QUE_NONCECOUNT_V1;
+			sc_info->que_fld_min = QUE_FLD_MIN_V1;
+			sc_info->que_fld_max = QUE_FLD_MAX_V1;
+		}
+	}
+
 	sc_info->scan_sleep_time = BAS_SCAN_TIME;
 	sc_info->results_sleep_time = BFLSC_RES_TIME;
 	sc_info->default_ms_work = BAS_WORK_TIME;
diff --git a/driver-bflsc.h b/driver-bflsc.h
index baa3687..b547ded 100644
--- a/driver-bflsc.h
+++ b/driver-bflsc.h
@@ -59,6 +59,7 @@ enum driver_version {
 #define BFLSC_DI_DEVICESINCHAIN "DEVICES IN CHAIN"
 #define BFLSC_DI_CHAINPRESENCE "CHAIN PRESENCE MASK"
 #define BFLSC_DI_CHIPS "CHIP PARALLELIZATION"
+#define BFLSC_DI_CHIPS_PARALLEL "YES"
 
 #define FULLNONCE 0x100000000ULL