diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 4d318431270b..ac689ed2eba8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |||
@@ -1297,8 +1297,6 @@ static int iwlagn_txq_check_empty(struct iwl_trans *trans, | |||
1297 | iwl_stop_tx_ba_trans_ready(priv(trans), | 1297 | iwl_stop_tx_ba_trans_ready(priv(trans), |
1298 | NUM_IWL_RXON_CTX, | 1298 | NUM_IWL_RXON_CTX, |
1299 | sta_id, tid); | 1299 | sta_id, tid); |
1300 | iwl_wake_queue(trans, &trans_pcie->txq[txq_id], | ||
1301 | "DELBA flow complete"); | ||
1302 | } | 1300 | } |
1303 | break; | 1301 | break; |
1304 | case IWL_EMPTYING_HW_QUEUE_ADDBA: | 1302 | case IWL_EMPTYING_HW_QUEUE_ADDBA: |
@@ -1326,28 +1324,20 @@ static void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid, | |||
1326 | { | 1324 | { |
1327 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 1325 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
1328 | struct iwl_tx_queue *txq = &trans_pcie->txq[txq_id]; | 1326 | struct iwl_tx_queue *txq = &trans_pcie->txq[txq_id]; |
1329 | enum iwl_agg_state agg_state; | ||
1330 | /* n_bd is usually 256 => n_bd - 1 = 0xff */ | 1327 | /* n_bd is usually 256 => n_bd - 1 = 0xff */ |
1331 | int tfd_num = ssn & (txq->q.n_bd - 1); | 1328 | int tfd_num = ssn & (txq->q.n_bd - 1); |
1332 | int freed = 0; | 1329 | int freed = 0; |
1333 | bool cond; | ||
1334 | 1330 | ||
1335 | txq->time_stamp = jiffies; | 1331 | txq->time_stamp = jiffies; |
1336 | 1332 | ||
1337 | if (txq->sched_retry) { | ||
1338 | agg_state = | ||
1339 | trans->shrd->tid_data[txq->sta_id][txq->tid].agg.state; | ||
1340 | cond = (agg_state != IWL_EMPTYING_HW_QUEUE_DELBA); | ||
1341 | } else { | ||
1342 | cond = (status != TX_STATUS_FAIL_PASSIVE_NO_RX); | ||
1343 | } | ||
1344 | |||
1345 | if (txq->q.read_ptr != tfd_num) { | 1333 | if (txq->q.read_ptr != tfd_num) { |
1346 | IWL_DEBUG_TX_REPLY(trans, "[Q %d | AC %d] %d -> %d (%d)\n", | 1334 | IWL_DEBUG_TX_REPLY(trans, "[Q %d | AC %d] %d -> %d (%d)\n", |
1347 | txq_id, iwl_get_queue_ac(txq), txq->q.read_ptr, | 1335 | txq_id, iwl_get_queue_ac(txq), txq->q.read_ptr, |
1348 | tfd_num, ssn); | 1336 | tfd_num, ssn); |
1349 | freed = iwl_tx_queue_reclaim(trans, txq_id, tfd_num, skbs); | 1337 | freed = iwl_tx_queue_reclaim(trans, txq_id, tfd_num, skbs); |
1350 | if (iwl_queue_space(&txq->q) > txq->q.low_mark && cond) | 1338 | if (iwl_queue_space(&txq->q) > txq->q.low_mark && |
1339 | (!txq->sched_retry || | ||
1340 | status != TX_STATUS_FAIL_PASSIVE_NO_RX)) | ||
1351 | iwl_wake_queue(trans, txq, "Packets reclaimed"); | 1341 | iwl_wake_queue(trans, txq, "Packets reclaimed"); |
1352 | } | 1342 | } |
1353 | 1343 | ||