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

Commit 5dd9c68a authored by Emmanuel Grumbach's avatar Emmanuel Grumbach
Browse files

iwlwifi: drop support for early versions of 8000



These early versions are no longer supported.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent cb2513bb
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@
	IWL8000_FW_PRE "-" __stringify(api) ".ucode"

#define NVM_HW_SECTION_NUM_FAMILY_8000		10
#define DEFAULT_NVM_FILE_FAMILY_8000A		"iwl_nvm_8000.bin"
#define DEFAULT_NVM_FILE_FAMILY_8000		"iwl_nvm_8000B.bin"

/* Max SDIO RX aggregation size of the ADDBA request/response */
@@ -178,7 +177,6 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = {
	.nvm_ver = IWL8000_NVM_VERSION,
	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
	.default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
	.default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A,
	.max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
	.disable_dummy_notification = true,
	.max_ht_ampdu_exponent  = MAX_HT_AMPDU_EXPONENT_8260_SDIO,
@@ -193,7 +191,6 @@ const struct iwl_cfg iwl4165_2ac_sdio_cfg = {
	.nvm_ver = IWL8000_NVM_VERSION,
	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
	.default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000,
	.default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A,
	.max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO,
	.bt_shared_single_ant = true,
	.disable_dummy_notification = true,
+0 −1
Original line number Diff line number Diff line
@@ -304,7 +304,6 @@ struct iwl_cfg {
	const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
	bool no_power_up_nic_in_init;
	const char *default_nvm_file;
	const char *default_nvm_file_8000A;
	unsigned int max_rx_agg_size;
	bool disable_dummy_notification;
	unsigned int max_tx_agg_size;
+2 −8
Original line number Diff line number Diff line
@@ -241,16 +241,10 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
	 * previous name and uses the new format.
	 */
	if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) {
		char rev_step[2] = {
			'A' + CSR_HW_REV_STEP(drv->trans->hw_rev), 0
		};

		/* A-step doesn't have an indication */
		if (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_A_STEP)
			rev_step[0] = 0;
		char rev_step = 'A' + CSR_HW_REV_STEP(drv->trans->hw_rev);

		snprintf(drv->firmware_name, sizeof(drv->firmware_name),
			 "%s%s-%s.ucode", name_pre, rev_step, tag);
			 "%s%c-%s.ucode", name_pre, rev_step, tag);
	}

	IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n",
+3 −10
Original line number Diff line number Diff line
@@ -186,21 +186,14 @@ IWL_EXPORT_SYMBOL(iwl_clear_bits_prph);

void iwl_force_nmi(struct iwl_trans *trans)
{
	/*
	 * In HW previous to the 8000 HW family, and in the 8000 HW family
	 * itself when the revision step==0, the DEVICE_SET_NMI_REG is used
	 * to force an NMI. Otherwise, a different register -
	 * DEVICE_SET_NMI_8000B_REG - is used.
	 */
	if ((trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) ||
	    (CSR_HW_REV_STEP(trans->hw_rev) == SILICON_A_STEP)) {
	if (trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) {
		iwl_write_prph(trans, DEVICE_SET_NMI_REG,
			       DEVICE_SET_NMI_VAL_DRV);
		iwl_write_prph(trans, DEVICE_SET_NMI_REG,
			       DEVICE_SET_NMI_VAL_HW);
	} else {
		iwl_write_prph(trans, DEVICE_SET_NMI_8000B_REG,
			       DEVICE_SET_NMI_8000B_VAL);
		iwl_write_prph(trans, DEVICE_SET_NMI_8000_REG,
			       DEVICE_SET_NMI_8000_VAL);
		iwl_write_prph(trans, DEVICE_SET_NMI_REG,
			       DEVICE_SET_NMI_VAL_DRV);
	}
+16 −41
Original line number Diff line number Diff line
@@ -99,14 +99,9 @@ enum family_8000_nvm_offsets {
	/* NVM SW-Section offset (in words) definitions */
	NVM_SW_SECTION_FAMILY_8000 = 0x1C0,
	NVM_VERSION_FAMILY_8000 = 0,
	RADIO_CFG_FAMILY_8000 = 2,
	SKU_FAMILY_8000 = 4,
	N_HW_ADDRS_FAMILY_8000 = 5,

	/* NVM PHY-SKU-Section offset (in words) for B0 */
	RADIO_CFG_FAMILY_8000_B0 = 0,
	SKU_FAMILY_8000_B0 = 2,
	N_HW_ADDRS_FAMILY_8000_B0 = 3,
	RADIO_CFG_FAMILY_8000 = 0,
	SKU_FAMILY_8000 = 2,
	N_HW_ADDRS_FAMILY_8000 = 3,

	/* NVM REGULATORY -Section offset (in words) definitions */
	NVM_CHANNELS_FAMILY_8000 = 0,
@@ -446,22 +441,16 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
			    n_used, n_channels);
}

static int iwl_get_sku(const struct iwl_cfg *cfg,
		       const __le16 *nvm_sw, const __le16 *phy_sku,
		       bool is_family_8000_a_step)
static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
		       const __le16 *phy_sku)
{
	if (cfg->device_family != IWL_DEVICE_FAMILY_8000)
		return le16_to_cpup(nvm_sw + SKU);

	if (!is_family_8000_a_step)
		return le32_to_cpup((__le32 *)(phy_sku +
					       SKU_FAMILY_8000_B0));
	else
		return le32_to_cpup((__le32 *)(nvm_sw + SKU_FAMILY_8000));
	return le32_to_cpup((__le32 *)(phy_sku + SKU_FAMILY_8000));
}

static int iwl_get_nvm_version(const struct iwl_cfg *cfg,
			       const __le16 *nvm_sw)
static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
{
	if (cfg->device_family != IWL_DEVICE_FAMILY_8000)
		return le16_to_cpup(nvm_sw + NVM_VERSION);
@@ -470,35 +459,24 @@ static int iwl_get_nvm_version(const struct iwl_cfg *cfg,
					       NVM_VERSION_FAMILY_8000));
}

static int iwl_get_radio_cfg(const struct iwl_cfg *cfg,
			     const __le16 *nvm_sw, const __le16 *phy_sku,
			     bool is_family_8000_a_step)
static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
			     const __le16 *phy_sku)
{
	if (cfg->device_family != IWL_DEVICE_FAMILY_8000)
		return le16_to_cpup(nvm_sw + RADIO_CFG);

	if (!is_family_8000_a_step)
		return le32_to_cpup((__le32 *)(phy_sku +
					       RADIO_CFG_FAMILY_8000_B0));
	else
	return le32_to_cpup((__le32 *)(nvm_sw + RADIO_CFG_FAMILY_8000));

}

static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg,
			      const __le16 *nvm_sw, bool is_family_8000_a_step)
static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
{
	int n_hw_addr;

	if (cfg->device_family != IWL_DEVICE_FAMILY_8000)
		return le16_to_cpup(nvm_sw + N_HW_ADDRS);

	if (!is_family_8000_a_step)
		n_hw_addr = le32_to_cpup((__le32 *)(nvm_sw +
						    N_HW_ADDRS_FAMILY_8000_B0));
	else
		n_hw_addr = le32_to_cpup((__le32 *)(nvm_sw +
						    N_HW_ADDRS_FAMILY_8000));
	n_hw_addr = le32_to_cpup((__le32 *)(nvm_sw + N_HW_ADDRS_FAMILY_8000));

	return n_hw_addr & N_HW_ADDR_MASK;
}
@@ -594,8 +572,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg,
		   const __le16 *nvm_hw, const __le16 *nvm_sw,
		   const __le16 *nvm_calib, const __le16 *regulatory,
		   const __le16 *mac_override, const __le16 *phy_sku,
		   u8 tx_chains, u8 rx_chains,
		   bool lar_fw_supported, bool is_family_8000_a_step,
		   u8 tx_chains, u8 rx_chains, bool lar_fw_supported,
		   u32 mac_addr0, u32 mac_addr1)
{
	struct iwl_nvm_data *data;
@@ -618,15 +595,14 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg,

	data->nvm_version = iwl_get_nvm_version(cfg, nvm_sw);

	radio_cfg =
		iwl_get_radio_cfg(cfg, nvm_sw, phy_sku, is_family_8000_a_step);
	radio_cfg = iwl_get_radio_cfg(cfg, nvm_sw, phy_sku);
	iwl_set_radio_cfg(cfg, data, radio_cfg);
	if (data->valid_tx_ant)
		tx_chains &= data->valid_tx_ant;
	if (data->valid_rx_ant)
		rx_chains &= data->valid_rx_ant;

	sku = iwl_get_sku(cfg, nvm_sw, phy_sku, is_family_8000_a_step);
	sku = iwl_get_sku(cfg, nvm_sw, phy_sku);
	data->sku_cap_band_24GHz_enable = sku & NVM_SKU_CAP_BAND_24GHZ;
	data->sku_cap_band_52GHz_enable = sku & NVM_SKU_CAP_BAND_52GHZ;
	data->sku_cap_11n_enable = sku & NVM_SKU_CAP_11N_ENABLE;
@@ -635,8 +611,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg,
	data->sku_cap_11ac_enable = data->sku_cap_11n_enable &&
				    (sku & NVM_SKU_CAP_11AC_ENABLE);

	data->n_hw_addrs =
		iwl_get_n_hw_addrs(cfg, nvm_sw, is_family_8000_a_step);
	data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw);

	if (cfg->device_family != IWL_DEVICE_FAMILY_8000) {
		/* Checking for required sections */
Loading