Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5155540ybg; Mon, 21 Oct 2019 22:08:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfypDGliJa29FNl/ALIlCFhChFuUb+BZ0zpzaF1tGIyY3NjmI1zxeRkquo3Ffloe3jeVaC X-Received: by 2002:a05:6402:13c5:: with SMTP id a5mr10284109edx.106.1571720932502; Mon, 21 Oct 2019 22:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571720932; cv=none; d=google.com; s=arc-20160816; b=Vq7P+nefQjG6LaX/WY9pVRL7NMHcwGGG00KDcBHJJBmDe+HdTUAfiqNSG0WFsdI2Vp 0LUO+3zDE6CfCwijRPs5k0Le89SOq9dnIzZYA8mfXsFXdS7u6wBIDXnTSZkfgsnPmajV 6nDAcOxiS2tBDhkiyV+5OxpSHAd1KqkV4MPdDWuMBJhghlUaaWF8xJ65+q+jIfsxtO5V ltpGufKYYTdGZ5z7WSnU9TqgOY15Tk75BiSZE/GE06ooFbV693JKYGYgY1wWzTcgwrgK OcnpmLU/X3ZMlUSAAocJYkcYzNuefp0NtRrMt48lwlrirMTXrvY4VbEx+lXdPI1TxpQ1 tbmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:references:lines:date:in-reply-to:subject:cc:to:from :dkim-signature:dkim-filter; bh=5sGEWkaUNVS3ZDgcwrCiHd9vXY1HkWoD0Tk6Dh28hfM=; b=x3kX4Jxcr5iT9aREOYhg4FwTF4VAkRkJ5j9rC5j9DdskAikg9UcqEzpljD0KOh6Byu dDPlyB9edI5+irL3jCf+AgercmhdUATSiw+3ZVDFfqikva9uOr4b6pwwELmswticvcY5 pmGI1nNMVGeK/zsT7KRCS3APmOkqSUNfVCDhX1Vy7bqiICN9oqkry9FOuDnlqpPAqIU0 MATKQnGIODMNDOmq0AqlZZGD09CbArq3rcqRWLjGsfsl3CMj/bEwpFSf9+oWFFX/qtI3 4MCX7RR36B+GXfpDNb3mGbmlo7ckutqjXiUjNYZCTLBL216JMMo+JHPtmc5SUTH0z/Cz +oKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=lzJJG3ou; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i17si9768736ejc.233.2019.10.21.22.08.29; Mon, 21 Oct 2019 22:08:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=lzJJG3ou; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387590AbfJVE7B (ORCPT + 99 others); Tue, 22 Oct 2019 00:59:01 -0400 Received: from ni.piap.pl ([195.187.100.5]:41074 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387462AbfJVE7A (ORCPT ); Tue, 22 Oct 2019 00:59:00 -0400 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 A1BD9443141; Tue, 22 Oct 2019 06:58:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl A1BD9443141 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1571720338; bh=5sGEWkaUNVS3ZDgcwrCiHd9vXY1HkWoD0Tk6Dh28hfM=; h=From:To:Cc:Subject:In-Reply-To:Date:References:From; b=lzJJG3out/A+BWjk9oZFkkvPT8gnUGpbqmq09MWSXDYx1sSDSOuZkuFadAvksnWTe dmiGyNb4wbvhhRDFQoJL2KMUrM/lWvY3bGdkUlpzrCsUvnFWwtjB7pO7v+rAHboqC8 Rl8spBVi3z6o3Fqv3hL2lzwJfKGpNhMJpBIRVwYM= 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 In-Reply-To: Date: Mon, 21 Oct 2019 14:18:53 +0200 Lines: 32 References: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Signed-off-by: Krzysztof Halasa 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 =3D rcu_dereference(sta->ampdu_mlme.tid_rx[tid]); - if (tid_rx && tid_rx->timeout =3D=3D timeout) + if (tid_rx && tid_rx->timeout =3D=3D timeout) { + tid_rx->ssn =3D start_seq_num; + tid_rx->head_seq_num =3D start_seq_num; status =3D WLAN_STATUS_SUCCESS; - else + } else status =3D WLAN_STATUS_REQUEST_DECLINED; rcu_read_unlock(); goto end; --=20 Krzysztof Ha=C5=82asa =C5=81UKASIEWICZ Research Network Industrial Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland