Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4081451ybg; Tue, 29 Oct 2019 01:43:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxObba7XzLk/mAw+UKxMav/Oro1KVwXAI9WbsbyBZWASnwA4thcdk18JxXsmtA6KnYQzhfC X-Received: by 2002:a50:9353:: with SMTP id n19mr24539227eda.258.1572338622868; Tue, 29 Oct 2019 01:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572338622; cv=none; d=google.com; s=arc-20160816; b=rTHu2etT5yr38U9cpoAyuaPly6Stl3fH/vteTDPzoyZGIPs6TDg+s3MseofK+erdO+ DhRi2psaz/ZrRfHgPA4JJtDdvmXnkEiGk8+b91bfGUsLUnFM7O9xeT5zdfWxA1g6qjMQ aPMrxFGlAOyPN1ag2Hfcko9K8A9Z1/PP6zin6bLgWkQzBtarjzw13QW0/Sps1/2asWyS JIPwzHO0WvP1sT4lXoQ87pmYJ2lPJ9sJ+pGnMAfA9O+nNyQnZUT3yW8Ns5kKoKCbtCIp iN0qM7PaUZD7y64VkIolJ6o2bDSMXTqdVBTE6Oji2sGb6P1ByDBlbcPQmHqh+g82/VHs v40w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=DUE+XOir+sEq8Jjt6ZqFoZP8jxttvHmbtNjKbTObY9Y=; b=0zqebSI//8ZkS2DSwtTdBwGCxz5ejveMT8EjIvOyVxEx/zkSS37/W7da+c97L0r9JX xujZeSBWSyZ6oLxxJuJXfhSEG/9vLLmzQHQyb/nAjllaeuGyPEYZfQHqE7bpwlVuz7dv IUP00TxZnlEntvII+vnU9fykwzPNghieJPYsQZkTFBbOkmTq/L567JczjkxJNQImJPHL KJsMYTXk99wgEI7G8SD+zq82XV1iahDLoxxaj4AMkUXtsrKZIHAbvvURTKTBqcfq9K01 remnDYYEtKjqog+p/C/GnAl0bG1MerDH2dIpu1wIqKPDMi/6Psy3SuKVzaUwwy5FSKVg cvCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ncentric-com.20150623.gappssmtp.com header.s=20150623 header.b=pPHnC2jz; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ncentric.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19si4647972edd.51.2019.10.29.01.43.18; Tue, 29 Oct 2019 01:43:42 -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=@ncentric-com.20150623.gappssmtp.com header.s=20150623 header.b=pPHnC2jz; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ncentric.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729732AbfJ2Ill (ORCPT + 99 others); Tue, 29 Oct 2019 04:41:41 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38381 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbfJ2Ilk (ORCPT ); Tue, 29 Oct 2019 04:41:40 -0400 Received: by mail-wm1-f65.google.com with SMTP id 22so1435821wms.3 for ; Tue, 29 Oct 2019 01:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=DUE+XOir+sEq8Jjt6ZqFoZP8jxttvHmbtNjKbTObY9Y=; b=pPHnC2jzOsNQtFwKWKM84eQfcMIczrZRRakDJasaSgNDYqEpq5bkSkEmSQokHT5Ic7 TRSTsQEjnG5bXDRhJwN6zbp6rsw+ArB8T4EtOiOcOm+FLZcBXvf/mOhOEDupb0/h79/2 poyjiibNRB2bUGgklHNODDYzLXaLXEHJlmgyQgv7uWTBAE9SPXY9QfUbhN8hAWurOdOA 2IQgVfDF1Ep1VFPJ/UuLp4xFEBXmOI7/OemGOj7GR8w2XjcHS1V9Q30wADyPsF9qP9hz HO1g0lEOtJPqfjsd5amgxY+Ff1OAs2aF2+t0sb2auBJJ7qKfq4gT+RdxkUC4rQOgEz65 2EYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=DUE+XOir+sEq8Jjt6ZqFoZP8jxttvHmbtNjKbTObY9Y=; b=LZWbhLnKwjdrx5dnLIkA0wFuV9CSF72rm1d3m0VbaS4AQ8dZoLRXsPqmna1quGLC3i +TDUn41Zp7cH/GqAqCdWrV0x0220RIuK7mb1LrtZswGzIw8Sj2ekFen0Gi00/SNQcfp/ eb+qxtne2KebWnUwD/8Ws1qqPvBKmKQJEpT8f+G0pA8OHC2uJTWrMDWlH1ykqqMhnzsg /k3gsQOGqyZ1Qd1rZ0mEACtVH10a1TiyCnit1EhEL/Q2VSAsAeXooQ0Cq7NMFyEfrncy O9VqF9jqiH+QnPvw/MIWg//d1M3+Az46HycoPtxJNHRVfdg5rO8rFMa7PjBUtPqazDy0 jqQA== X-Gm-Message-State: APjAAAX+B5lTi6JQJBBpkKCs0jMI6TqFkx3CX5jJyz3Zn2TDeMfwPl1e P7sc4heu4rCS0IFPWgoyCX9VNSBGHGU= X-Received: by 2002:a1c:a4c5:: with SMTP id n188mr2887218wme.30.1572338496714; Tue, 29 Oct 2019 01:41:36 -0700 (PDT) Received: from [192.168.3.176] (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.gmail.com with ESMTPSA id u21sm2275041wmu.27.2019.10.29.01.41.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2019 01:41:36 -0700 (PDT) Subject: Re: [PATCH v2] 802.11n IBSS: wlan0 stops receiving packets due to aggregation after sender reboot To: Johannes Berg , =?UTF-8?Q?Krzysztof_Ha=c5=82asa?= Cc: "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: From: Koen Vandeputte Message-ID: <30465e05-3465-f496-d57f-5e115551f5cb@ncentric.com> Date: Tue, 29 Oct 2019 09:41:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.10.19 13:21, Johannes Berg wrote: > On Fri, 2019-10-25 at 12:21 +0200, Krzysztof HaƂasa wrote: >> 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 = 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; > This is wrong, this is the case of *updating an existing session*, we > must not reset the head SN then. > > I think you just got very lucky (or unlucky) to have the same dialog > token, because we start from 0 - maybe we should initialize it to a > random value to flush out such issues. > > Really what I think probably happened is that one of your stations lost > the connection to the other, and didn't tell it about it in any way - so > the other kept all the status alive. > > I suspect to make all this work well we need to not only have the fixes > I made recently to actually send and parse deauth frames, but also to > even send an auth and reset the state when we receive that, so if we > move out of range and even the deauth frame is lost, we can still reset > properly. > > In any case, this is not the right approach - we need to handle the > "lost connection" case better I suspect, but since you don't say what > really happened I don't really know that that's what you're seeing. > > johannes Hi all, I can confirm the issue as I'm also seeing this sometimes in the field here. Sometimes when a devices goes out of range and then re-enters, the link refuses to "come up", as in rx looks to be "stuck" without any reports in system log or locking issues (lockdep enabled) I have dozens of devices installed offshore (802.11n based), both on static and moving assets, which cover from short (250m) up to very long distances (~35km) So .. while there is some momentum for this issue, I'm more than happy to provide extensive testing should fixes be posted regarding IBSS in general. Regards, Koen