aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2016-02-14 08:32:58 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2016-02-16 04:19:43 -0500
commitfb896c44f88a75843a072cd6961b1615732f7811 (patch)
tree468cae852cf1efe2326d929d2490bd0b136f9ae7
parent20aa99bbddae74bded68338f9ba200ccae02858b (diff)
iwlwifi: mvm: inc pending frames counter also when txing non-sta
Until this patch, when TXing non-sta the pending_frames counter wasn't increased, but it WAS decreased in iwl_mvm_rx_tx_cmd_single(), what makes it negative in certain conditions. This in turn caused much trouble when we need to remove the station since we won't be waiting forever until pending_frames gets 0. In certain cases, we were exhausting the station table even in BSS mode, because we had a lot of stale stations. Increase the counter also in iwl_mvm_tx_skb_non_sta() after a successful TX to avoid this outcome. CC: <stable@vger.kernel.org> [3.18+] Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tx.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 0914ec2fd574..a040edc55057 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -423,6 +423,15 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
423 return -1; 423 return -1;
424 } 424 }
425 425
426 /*
427 * Increase the pending frames counter, so that later when a reply comes
428 * in and the counter is decreased - we don't start getting negative
429 * values.
430 * Note that we don't need to make sure it isn't agg'd, since we're
431 * TXing non-sta
432 */
433 atomic_inc(&mvm->pending_frames[sta_id]);
434
426 return 0; 435 return 0;
427} 436}
428 437