Blame SOURCES/0000-use-DUP-firmware-files.patch

deb259
Index: src/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
deb259
===================================================================
deb259
--- src.orig/drivers/net/wireless/intel/iwlwifi/iwl-drv.c	2019-09-08 16:01:11.062359133 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/iwl-drv.c	2019-09-08 16:01:21.332226910 +0200
deb259
@@ -115,6 +115,7 @@
deb259
 	struct device *dev;
deb259
 
deb259
 	int fw_index;                   /* firmware we're trying to load */
deb259
+	bool fw_dup;                    /* tru to load firmware from DUP */
deb259
 	char firmware_name[64];         /* name of firmware file to load */
deb259
 
deb259
 	struct completion request_firmware_complete;
deb259
@@ -227,9 +228,15 @@
deb259
 
deb259
 	if (first) {
deb259
 		drv->fw_index = cfg->ucode_api_max;
deb259
+		drv->fw_dup = true;
deb259
 		sprintf(tag, "%d", drv->fw_index);
deb259
 	} else {
deb259
-		drv->fw_index--;
deb259
+		if (drv->fw_dup) {
deb259
+			drv->fw_dup = false;
deb259
+		} else {
deb259
+			drv->fw_dup = true;
deb259
+			drv->fw_index--;
deb259
+		}
deb259
 		sprintf(tag, "%d", drv->fw_index);
deb259
 	}
deb259
 
deb259
@@ -251,7 +258,8 @@
deb259
 		return -ENOENT;
deb259
 	}
deb259
 
deb259
-	snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s.ucode",
deb259
+	snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s%s.ucode",
deb259
+		 drv->fw_dup ? "iwlwifi_dup8.0/" : "",
deb259
 		 cfg->fw_name_pre, tag);
deb259
 
deb259
 	IWL_DEBUG_FW_INFO(drv, "attempting to load firmware '%s'\n",