From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com ([91.189.89.112]:43030 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbcCNQjN (ORCPT ); Mon, 14 Mar 2016 12:39:13 -0400 Date: Mon, 14 Mar 2016 16:39:10 +0000 From: Luis Henriques To: Jiri Slaby Cc: stable@vger.kernel.org, Liad Kaufman , Emmanuel Grumbach Subject: Re: [patch added to 3.12-stable] iwlwifi: mvm: inc pending frames counter also when txing non-sta Message-ID: <20160314163910.GB12017@charon.olymp> References: <1457961419-30172-1-git-send-email-jslaby@suse.cz> <1457961419-30172-7-git-send-email-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1457961419-30172-7-git-send-email-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Mar 14, 2016 at 02:16:48PM +0100, Jiri Slaby wrote: > From: Liad Kaufman > > This patch has been added to the 3.12 stable tree. If you have any > objections, please let us know. > Please note that this patch was tagged for stable 3.18+. Cheers, -- Lu�s > =============== > > commit fb896c44f88a75843a072cd6961b1615732f7811 upstream. > > 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. > > Signed-off-by: Liad Kaufman > Signed-off-by: Emmanuel Grumbach > Signed-off-by: Jiri Slaby > --- > drivers/net/wireless/iwlwifi/mvm/tx.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c > index c95b4aac1317..cfa221b25ae0 100644 > --- a/drivers/net/wireless/iwlwifi/mvm/tx.c > +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c > @@ -341,6 +341,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; > } > > -- > 2.7.3 > > -- > To unsubscribe from this list: send the line "unsubscribe stable" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html