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

Commit e9fb92e1 authored by Haim Dreyfuss's avatar Haim Dreyfuss Committed by Luca Coelho
Browse files

iwlwifi: fix fw_pre_next_step to apply also for C step



C step NICs should use the latest FW (currently B step).
Correct the condition to make C step NICs advanced its default FW name
to the latest one.
Also rename _next_ to b_or_c to avoid confusion.

Fixes: 5da083d1 ("iwlwifi: add support for 9000 HW B-step NICs")
Signed-off-by: default avatarHaim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 87f55616
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -154,7 +154,7 @@ static const struct iwl_tt_params iwl9000_tt_params = {
const struct iwl_cfg iwl9160_2ac_cfg = {
const struct iwl_cfg iwl9160_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9160",
	.name = "Intel(R) Dual Band Wireless AC 9160",
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre_next_step = IWL9260B_FW_PRE,
	.fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
	IWL_DEVICE_9000,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_ver = IWL9000_NVM_VERSION,
@@ -165,7 +165,7 @@ const struct iwl_cfg iwl9160_2ac_cfg = {
const struct iwl_cfg iwl9260_2ac_cfg = {
const struct iwl_cfg iwl9260_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9260",
	.name = "Intel(R) Dual Band Wireless AC 9260",
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre_next_step = IWL9260B_FW_PRE,
	.fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
	IWL_DEVICE_9000,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_ver = IWL9000_NVM_VERSION,
@@ -176,7 +176,7 @@ const struct iwl_cfg iwl9260_2ac_cfg = {
const struct iwl_cfg iwl9270_2ac_cfg = {
const struct iwl_cfg iwl9270_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9270",
	.name = "Intel(R) Dual Band Wireless AC 9270",
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre_next_step = IWL9260B_FW_PRE,
	.fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
	IWL_DEVICE_9000,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_ver = IWL9000_NVM_VERSION,
@@ -186,8 +186,8 @@ const struct iwl_cfg iwl9270_2ac_cfg = {


const struct iwl_cfg iwl9460_2ac_cfg = {
const struct iwl_cfg iwl9460_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9460",
	.name = "Intel(R) Dual Band Wireless AC 9460",
	.fw_name_pre = IWL9000_FW_PRE,
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
	.fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
	IWL_DEVICE_9000,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_ver = IWL9000_NVM_VERSION,
@@ -198,8 +198,8 @@ const struct iwl_cfg iwl9460_2ac_cfg = {


const struct iwl_cfg iwl9560_2ac_cfg = {
const struct iwl_cfg iwl9560_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 9560",
	.name = "Intel(R) Dual Band Wireless AC 9560",
	.fw_name_pre = IWL9000_FW_PRE,
	.fw_name_pre = IWL9260A_FW_PRE,
	.fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
	.fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
	IWL_DEVICE_9000,
	IWL_DEVICE_9000,
	.ht_params = &iwl9000_ht_params,
	.ht_params = &iwl9000_ht_params,
	.nvm_ver = IWL9000_NVM_VERSION,
	.nvm_ver = IWL9000_NVM_VERSION,
+4 −4
Original line number Original line Diff line number Diff line
@@ -276,10 +276,10 @@ struct iwl_pwr_tx_backoff {
 * @fw_name_pre: Firmware filename prefix. The api version and extension
 * @fw_name_pre: Firmware filename prefix. The api version and extension
 *	(.ucode) will be added to filename before loading from disk. The
 *	(.ucode) will be added to filename before loading from disk. The
 *	filename is constructed as fw_name_pre<api>.ucode.
 *	filename is constructed as fw_name_pre<api>.ucode.
 * @fw_name_pre_next_step: same as @fw_name_pre, only for next step
 * @fw_name_pre_b_or_c_step: same as @fw_name_pre, only for b or c steps
 *	(if supported)
 *	(if supported)
 * @fw_name_pre_rf_next_step: same as @fw_name_pre_next_step, only for rf next
 * @fw_name_pre_rf_next_step: same as @fw_name_pre_b_or_c_step, only for rf
 *	step. Supported only in integrated solutions.
 *	next step. Supported only in integrated solutions.
 * @ucode_api_max: Highest version of uCode API supported by driver.
 * @ucode_api_max: Highest version of uCode API supported by driver.
 * @ucode_api_min: Lowest version of uCode API supported by driver.
 * @ucode_api_min: Lowest version of uCode API supported by driver.
 * @max_inst_size: The maximal length of the fw inst section
 * @max_inst_size: The maximal length of the fw inst section
@@ -330,7 +330,7 @@ struct iwl_cfg {
	/* params specific to an individual device within a device family */
	/* params specific to an individual device within a device family */
	const char *name;
	const char *name;
	const char *fw_name_pre;
	const char *fw_name_pre;
	const char *fw_name_pre_next_step;
	const char *fw_name_pre_b_or_c_step;
	const char *fw_name_pre_rf_next_step;
	const char *fw_name_pre_rf_next_step;
	/* params not likely to change within a device family */
	/* params not likely to change within a device family */
	const struct iwl_base_params *base_params;
	const struct iwl_base_params *base_params;
+3 −2
Original line number Original line Diff line number Diff line
@@ -216,8 +216,9 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
	const char *fw_pre_name;
	const char *fw_pre_name;


	if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
	if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
	    CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP)
	    (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP ||
		fw_pre_name = cfg->fw_name_pre_next_step;
	     CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_C_STEP))
		fw_pre_name = cfg->fw_name_pre_b_or_c_step;
	else if (drv->trans->cfg->integrated &&
	else if (drv->trans->cfg->integrated &&
		 CSR_HW_RFID_STEP(drv->trans->hw_rf_id) == SILICON_B_STEP &&
		 CSR_HW_RFID_STEP(drv->trans->hw_rf_id) == SILICON_B_STEP &&
		 cfg->fw_name_pre_rf_next_step)
		 cfg->fw_name_pre_rf_next_step)