From patchwork Mon Oct 21 12:18:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Ha=C5=82asa?= X-Patchwork-Id: 1180539 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=piap.pl Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=piap.pl header.i=@piap.pl header.b="CLbMeDVx"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46xbKN3VYXz9sP6 for ; Mon, 21 Oct 2019 23:19:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728368AbfJUMS5 (ORCPT ); Mon, 21 Oct 2019 08:18:57 -0400 Received: from ni.piap.pl ([195.187.100.5]:48156 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbfJUMS5 (ORCPT ); Mon, 21 Oct 2019 08:18:57 -0400 X-Greylist: delayed 440 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Oct 2019 08:18:55 EDT Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ni.piap.pl (Postfix) with ESMTPSA id A1B08443491; Mon, 21 Oct 2019 14:18:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl A1B08443491 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1571660334; bh=Tp8OSf1h/wDKpwi0+HzYPecCfDy55FK9qmwYC4Eai90=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CLbMeDVxHJ9JNtZuGbwZP5WljuUhEqWhdQiChl7+y7D2bbVOAbXSXERRWrruUaAnQ joD5Cz0rULQLcizQTb3L6boWn+924hxz9bhnhKdU9wPCgcP+y+QVf/5dMGPUm2jWxi HdZzdmfKXtgE0xHWFOaAwH/nSKLtw9vhkz3X9M/0= From: khalasa@piap.pl (Krzysztof =?utf-8?Q?Ha=C5=82asa?=) To: Johannes Berg Cc: "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] 802.11n IBSS: wlan0 stops receiving packets due to aggregation after sender reboot References: Date: Mon, 21 Oct 2019 14:18:53 +0200 In-Reply-To: ("Krzysztof \=\?utf-8\?Q\?Ha\=C5\=82as\?\= \=\?utf-8\?Q\?a\=22's\?\= message of "Mon, 21 Oct 2019 14:11:30 +0200") Message-ID: MIME-Version: 1.0 X-KLMS-Rule-ID: 4 X-KLMS-Message-Action: skipped X-KLMS-AntiSpam-Status: not scanned, whitelist X-KLMS-AntiPhishing: not scanned, whitelist X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, not scanned, whitelist Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix a bug where the mac80211 RX aggregation code sets a new aggregation "session" at the remote station's request, but the head_seq_num (the sequence number the receiver expects to receive) isn't reset. Spotted on a pair of AR9580 in IBSS mode. diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 4d1c335e06e5..775a51cc51c9 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c @@ -354,9 +354,11 @@ void ___ieee80211_start_rx_ba_session(struct sta_info *sta, */ rcu_read_lock(); tid_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]); - if (tid_rx && tid_rx->timeout == timeout) + if (tid_rx && tid_rx->timeout == timeout) { + tid_rx->ssn = start_seq_num; + tid_rx->head_seq_num = start_seq_num; status = WLAN_STATUS_SUCCESS; - else + } else status = WLAN_STATUS_REQUEST_DECLINED; rcu_read_unlock(); goto end;