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: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
Johannes Berg 2018-12-10 09:36:58 +01:00 committed by Luca Coelho
parent dbf592f3d1
commit b998fbbd53
3 changed files with 16 additions and 1 deletions

View File

@ -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,
};
/*

View File

@ -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;

View File

@ -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);