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

Commit f590dcec authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Johannes Berg
Browse files

iwlwifi: fix the reclaimed packet tracking upon flush queue



There's a bug in the currently released firmware version,
the sequence control in the Tx response isn't updated in
all cases. Take it from the packet as a workaround.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 392d4cad
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -1151,13 +1151,6 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
			next_reclaimed = ssn;
		}

		if (tid != IWL_TID_NON_QOS) {
			priv->tid_data[sta_id][tid].next_reclaimed =
				next_reclaimed;
			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
						  next_reclaimed);
		}

		iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);

		iwlagn_check_ratid_empty(priv, sta_id, tid);
@@ -1208,11 +1201,28 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
			if (!is_agg)
				iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1);

			/*
			 * W/A for FW bug - the seq_ctl isn't updated when the
			 * queues are flushed. Fetch it from the packet itself
			 */
			if (!is_agg && status == TX_STATUS_FAIL_FIFO_FLUSHED) {
				next_reclaimed = le16_to_cpu(hdr->seq_ctrl);
				next_reclaimed =
					SEQ_TO_SN(next_reclaimed + 0x10);
			}

			is_offchannel_skb =
				(info->flags & IEEE80211_TX_CTL_TX_OFFCHAN);
			freed++;
		}

		if (tid != IWL_TID_NON_QOS) {
			priv->tid_data[sta_id][tid].next_reclaimed =
				next_reclaimed;
			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
					   next_reclaimed);
		}

		WARN_ON(!is_agg && freed != 1);

		/*