Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4055822ybg; Fri, 25 Oct 2019 12:40:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy7yVIuDz4Ut0B22jcT4DUu+710TitQCWovxNvsI1spYoPQp80DsUX7ljVOf/mfNdnnhJk X-Received: by 2002:a17:906:86d5:: with SMTP id j21mr5113094ejy.219.1572032429745; Fri, 25 Oct 2019 12:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572032429; cv=none; d=google.com; s=arc-20160816; b=zIde+WtTQGSccVKm+05etEGQ/yQMk1nfD7TqJALvgCVAewpMNOWgd1Gw8x6fgHhfUx /Wip/vXc1M9916KjS+FfYKLyVDXGRQh/O/pYS66oEDkfXsgz4ya+6O0u1BLbaWZqqqkv MDtP/0dtkJLaC31zuRy4gNpDBLJzrZzmbuMEn1zohSd19L5+9g3dIB5tqIUhxTR2avWV 5K5Q/sV6AMwsFZ+ERliiHFFsbGZyVYX+Gvzk9gpMfoqA7j546V/Ehi3Oz7sRC7VnsvPO R8l6gyy7824aoRRxrtvhvtuipUV/3Zuix7kArbHuXJCTylqrYuLVkATpEGKuX/8kSXln 8V/g== 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:date:references:in-reply-to:subject:cc:to:from :dkim-signature:dkim-filter; bh=sun4VvlMaGTBiByATlzJrvKsGY/hA5o6lYFps8BBRXI=; b=i+jb/0LvfP1mYN5zXT7/hAl5et6m52QOAXJveiI5oUfPRhoocpAcpoSn4yZN3DMbiU DXmaRBrzppnMN53Gu8FyOX04qq0MVjOgY0n9pZj9pHwxSdlpQ9+UHA25/Db0elugYjZm iKUMeng29uRFpsk3hNhgyz8PJA0fD8Uz+tsG27/E+qpSZzqMVzdNDvqFMx697BGl9GQb 4XtB5txKURzaWKe6DKXzeP7qPZZ+qj6rlBoOO4FgZ4guA/GVxJv/516xpioVcydMLUoF ARB0cZ+j5pfd2Q+iwxzIUz1c4XW/Jot9w/bEi/T1ioz+b4Av57CCq1GcYD4iRa4LzFyQ SY4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=NssrYNXC; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 b12si2061714edk.16.2019.10.25.12.40.05; Fri, 25 Oct 2019 12:40:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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=NssrYNXC; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 S2409340AbfJYKVc (ORCPT + 99 others); Fri, 25 Oct 2019 06:21:32 -0400 Received: from ni.piap.pl ([195.187.100.5]:43526 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407901AbfJYKVb (ORCPT ); Fri, 25 Oct 2019 06:21:31 -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 537F4442535; Fri, 25 Oct 2019 12:21:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 537F4442535 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1571998885; bh=sun4VvlMaGTBiByATlzJrvKsGY/hA5o6lYFps8BBRXI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NssrYNXCHiu67ElUYtL9U50/QUf+6vGBygdUyz3P2NrIb03HAkm6+P/SC464PshKg 1KvSpQhoIiV7BLaDqCknMp55EYcXIXTwvL4edonArFzxDbEssEmXDD+26un2QN1xrw FhOPSahjr0IP0POX+PS4NSj6hKpSQAnBfVCzYZlQ= 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 v2] 802.11n IBSS: wlan0 stops receiving packets due to aggregation after sender reboot In-Reply-To: References: Date: Fri, 25 Oct 2019 12:21:25 +0200 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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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..67733bd61297 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c @@ -354,10 +354,13 @@ 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