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: 11203761 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C05EF1575 for ; Tue, 22 Oct 2019 04:59:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E2152184C for ; Tue, 22 Oct 2019 04:59:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=piap.pl header.i=@piap.pl header.b="lzJJG3ou" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387643AbfJVE7B (ORCPT ); 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 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..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;