Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20f4d39a authored by Johannes Berg's avatar Johannes Berg Committed by Emmanuel Grumbach
Browse files

iwlwifi: print index in api/capa flags parsing message



If the API or capabilities index is bigger than the driver expects,
an error message is printed. Make that message print the index and
distinguish between API and capabilities.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent d01c5366
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -451,7 +451,9 @@ static int iwl_set_ucode_api_flags(struct iwl_drv *drv, const u8 *data,
	int i;

	if (api_index >= DIV_ROUND_UP(NUM_IWL_UCODE_TLV_API, 32)) {
		IWL_ERR(drv, "api_index larger than supported by driver\n");
		IWL_ERR(drv,
			"api flags index %d larger than supported by driver\n",
			api_index);
		/* don't return an error so we can load FW that has more bits */
		return 0;
	}
@@ -473,7 +475,9 @@ static int iwl_set_ucode_capabilities(struct iwl_drv *drv, const u8 *data,
	int i;

	if (api_index >= DIV_ROUND_UP(NUM_IWL_UCODE_TLV_CAPA, 32)) {
		IWL_ERR(drv, "api_index larger than supported by driver\n");
		IWL_ERR(drv,
			"capa flags index %d larger than supported by driver\n",
			api_index);
		/* don't return an error so we can load FW that has more bits */
		return 0;
	}