diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-12-31 02:26:10 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 09:31:15 -0500 |
commit | f590dcec944552f9a4a61155810f3abd17d6465d (patch) | |
tree | f405db5d099fd0b03a1f9f21008eee2118f76c91 /drivers/net | |
parent | 392d4cad7907f6cb4ffc85e135a01abfddc89027 (diff) |
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: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/tx.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index da21328ca8ed..a790599fe2c2 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
@@ -1151,13 +1151,6 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb, | |||
1151 | next_reclaimed = ssn; | 1151 | next_reclaimed = ssn; |
1152 | } | 1152 | } |
1153 | 1153 | ||
1154 | if (tid != IWL_TID_NON_QOS) { | ||
1155 | priv->tid_data[sta_id][tid].next_reclaimed = | ||
1156 | next_reclaimed; | ||
1157 | IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n", | ||
1158 | next_reclaimed); | ||
1159 | } | ||
1160 | |||
1161 | iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs); | 1154 | iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs); |
1162 | 1155 | ||
1163 | iwlagn_check_ratid_empty(priv, sta_id, tid); | 1156 | 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, | |||
1208 | if (!is_agg) | 1201 | if (!is_agg) |
1209 | iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1); | 1202 | iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1); |
1210 | 1203 | ||
1204 | /* | ||
1205 | * W/A for FW bug - the seq_ctl isn't updated when the | ||
1206 | * queues are flushed. Fetch it from the packet itself | ||
1207 | */ | ||
1208 | if (!is_agg && status == TX_STATUS_FAIL_FIFO_FLUSHED) { | ||
1209 | next_reclaimed = le16_to_cpu(hdr->seq_ctrl); | ||
1210 | next_reclaimed = | ||
1211 | SEQ_TO_SN(next_reclaimed + 0x10); | ||
1212 | } | ||
1213 | |||
1211 | is_offchannel_skb = | 1214 | is_offchannel_skb = |
1212 | (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN); | 1215 | (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN); |
1213 | freed++; | 1216 | freed++; |
1214 | } | 1217 | } |
1215 | 1218 | ||
1219 | if (tid != IWL_TID_NON_QOS) { | ||
1220 | priv->tid_data[sta_id][tid].next_reclaimed = | ||
1221 | next_reclaimed; | ||
1222 | IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n", | ||
1223 | next_reclaimed); | ||
1224 | } | ||
1225 | |||
1216 | WARN_ON(!is_agg && freed != 1); | 1226 | WARN_ON(!is_agg && freed != 1); |
1217 | 1227 | ||
1218 | /* | 1228 | /* |