Skip to content

Commit 27edb1a

Browse files
egrumbachjmberg-intel
authored andcommitted
iwlwifi: silently ignore fw flaws in Tx path
We know that we have issues with the fw in the reclaim path. This is why iwl_reclaim doesn't complain too loud when it happens since it is recoverable. Somehow, the caller of iwl_reclaim however WARNed when it happens. This doesn't make any sense. When I digged into the history of that code, I discovered that this bug occurs only when we receive a BA notification. So move the W/A in the BA notification handling code where it was before. This patch addresses: http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2387 Cc: stable@vger.kernel.org Reported-by: Florian Reitmeir <florian@reitmeir.org> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 8907a6f commit 27edb1a

1 file changed

Lines changed: 18 additions & 31 deletions

File tree

  • drivers/net/wireless/iwlwifi/dvm

‎drivers/net/wireless/iwlwifi/dvm/tx.c‎

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,29 +1097,6 @@ static void iwl_check_abort_status(struct iwl_priv *priv,
10971097
}
10981098
}
10991099

1100-
static int iwl_reclaim(struct iwl_priv *priv, int sta_id, int tid,
1101-
int txq_id, int ssn, struct sk_buff_head *skbs)
1102-
{
1103-
if (unlikely(txq_id >= IWLAGN_FIRST_AMPDU_QUEUE &&
1104-
tid != IWL_TID_NON_QOS &&
1105-
txq_id != priv->tid_data[sta_id][tid].agg.txq_id)) {
1106-
/*
1107-
* FIXME: this is a uCode bug which need to be addressed,
1108-
* log the information and return for now.
1109-
* Since it is can possibly happen very often and in order
1110-
* not to fill the syslog, don't use IWL_ERR or IWL_WARN
1111-
*/
1112-
IWL_DEBUG_TX_QUEUES(priv,
1113-
"Bad queue mapping txq_id=%d, agg_txq[sta:%d,tid:%d]=%d\n",
1114-
txq_id, sta_id, tid,
1115-
priv->tid_data[sta_id][tid].agg.txq_id);
1116-
return 1;
1117-
}
1118-
1119-
iwl_trans_reclaim(priv->trans, txq_id, ssn, skbs);
1120-
return 0;
1121-
}
1122-
11231100
int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
11241101
struct iwl_device_cmd *cmd)
11251102
{
@@ -1181,9 +1158,8 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
11811158
next_reclaimed);
11821159
}
11831160

1184-
/*we can free until ssn % q.n_bd not inclusive */
1185-
WARN_ON_ONCE(iwl_reclaim(priv, sta_id, tid,
1186-
txq_id, ssn, &skbs));
1161+
iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);
1162+
11871163
iwlagn_check_ratid_empty(priv, sta_id, tid);
11881164
freed = 0;
11891165

@@ -1308,16 +1284,27 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
13081284
return 0;
13091285
}
13101286

1287+
if (unlikely(scd_flow != agg->txq_id)) {
1288+
/*
1289+
* FIXME: this is a uCode bug which need to be addressed,
1290+
* log the information and return for now.
1291+
* Since it is can possibly happen very often and in order
1292+
* not to fill the syslog, don't use IWL_ERR or IWL_WARN
1293+
*/
1294+
IWL_DEBUG_TX_QUEUES(priv,
1295+
"Bad queue mapping txq_id=%d, agg_txq[sta:%d,tid:%d]=%d\n",
1296+
scd_flow, sta_id, tid, agg->txq_id);
1297+
spin_unlock(&priv->sta_lock);
1298+
return 0;
1299+
}
1300+
13111301
__skb_queue_head_init(&reclaimed_skbs);
13121302

13131303
/* Release all TFDs before the SSN, i.e. all TFDs in front of
13141304
* block-ack window (we assume that they've been successfully
13151305
* transmitted ... if not, it's too late anyway). */
1316-
if (iwl_reclaim(priv, sta_id, tid, scd_flow,
1317-
ba_resp_scd_ssn, &reclaimed_skbs)) {
1318-
spin_unlock(&priv->sta_lock);
1319-
return 0;
1320-
}
1306+
iwl_trans_reclaim(priv->trans, scd_flow, ba_resp_scd_ssn,
1307+
&reclaimed_skbs);
13211308

13221309
IWL_DEBUG_TX_REPLY(priv, "REPLY_COMPRESSED_BA [%d] Received from %pM, "
13231310
"sta_id = %d\n",

0 commit comments

Comments
 (0)