diff options
author | Liad Kaufman <liad.kaufman@intel.com> | 2016-02-14 15:32:58 +0200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-03-20 22:14:03 -0400 |
commit | 8d6519ee0630070cdde63df5f75e2b5d4c83ea9e (patch) | |
tree | 21d55ddbc83266e9cf8e5d1d591a044df1e8cf1b | |
parent | 9fea93e6f0ffb4b9f9f852e66720852a3a8cf06d (diff) | |
download | lwn-8d6519ee0630070cdde63df5f75e2b5d4c83ea9e.tar.gz lwn-8d6519ee0630070cdde63df5f75e2b5d4c83ea9e.zip |
iwlwifi: mvm: inc pending frames counter also when txing non-sta
[ Upstream commit fb896c44f88a75843a072cd6961b1615732f7811 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/tx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c index 5928c9db49ce..98639fe2448b 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c @@ -359,6 +359,15 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) return -1; } + /* + * Increase the pending frames counter, so that later when a reply comes + * in and the counter is decreased - we don't start getting negative + * values. + * Note that we don't need to make sure it isn't agg'd, since we're + * TXing non-sta + */ + atomic_inc(&mvm->pending_frames[sta_id]); + return 0; } |