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

Commit b998fbbd authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho
Browse files

iwlwifi: implement BISR HW workaround for 22260 devices



There's a small hardware bug in 22260 devices which thus require a
few more delays during initialization. Implement this workaround.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent dbf592f3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ const struct iwl_cfg iwl22260_2ax_cfg = {
	 * HT size; mac80211 would otherwise pick the HE max (256) by default.
	 */
	.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
	.bisr_workaround = 1,
};

const struct iwl_cfg killer1650x_2ax_cfg = {
@@ -232,6 +233,7 @@ const struct iwl_cfg killer1650x_2ax_cfg = {
	 * HT size; mac80211 would otherwise pick the HE max (256) by default.
	 */
	.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
	.bisr_workaround = 1,
};

const struct iwl_cfg killer1650w_2ax_cfg = {
@@ -244,6 +246,7 @@ const struct iwl_cfg killer1650w_2ax_cfg = {
	 * HT size; mac80211 would otherwise pick the HE max (256) by default.
	 */
	.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
	.bisr_workaround = 1,
};

/*
+3 −1
Original line number Diff line number Diff line
@@ -379,6 +379,7 @@ struct iwl_csr_params {
 * @nvm_type: see &enum iwl_nvm_type
 * @d3_debug_data_base_addr: base address where D3 debug data is stored
 * @d3_debug_data_length: length of the D3 debug data
 * @bisr_workaround: BISR hardware workaround (for 22260 series devices)
 *
 * We enable the driver to be backward compatible wrt. hardware features.
 * API differences in uCode shouldn't be handled here but through TLVs
@@ -428,7 +429,8 @@ struct iwl_cfg {
	    use_tfh:1,
	    gen2:1,
	    cdb:1,
	    dbgc_supported:1;
	    dbgc_supported:1,
	    bisr_workaround:1;
	u8 valid_tx_ant;
	u8 valid_rx_ant;
	u8 non_shared_ant;
+10 −0
Original line number Diff line number Diff line
@@ -493,6 +493,11 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
{
	int err;

	if (trans->cfg->bisr_workaround) {
		/* ensure the TOP FSM isn't still in previous reset */
		mdelay(2);
	}

	/*
	 * Set "initialization complete" bit to move adapter from
	 * D0U* --> D0A* (powered-up active) state.
@@ -515,6 +520,11 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
	if (err < 0)
		IWL_DEBUG_INFO(trans, "Failed to wake NIC\n");

	if (trans->cfg->bisr_workaround) {
		/* ensure BISR shift has finished */
		udelay(200);
	}

	return err < 0 ? err : 0;
}
IWL_EXPORT_SYMBOL(iwl_finish_nic_init);