Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4925404pxb; Tue, 5 Oct 2021 13:27:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwehU4uYDjbKywJjZLJi8ZviuWFJ5/0m9F2NN7a3iyZ2UYXC9xcgrat4ICOofrVW2uJ6Dhf X-Received: by 2002:a50:999e:: with SMTP id m30mr28845795edb.151.1633465642146; Tue, 05 Oct 2021 13:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633465642; cv=none; d=google.com; s=arc-20160816; b=vFkJcksrL15Z5sNsxB4/g3lr6LKw/i6NdQtOKpBOcJfunhV1YrE0MIWd4TEFeC8koz K4mwRzdQy6pBbJgVRF4FlTRCsgqBJSNlnhpCI1zqDeAJMBvxBzBrEjnsTAWQcsy0gnXK ThnZskBWz379Akd4Qk3VBB1zhHkPxNQdalUtLavqEXX3SKJY/IM887668L0OjpPLiDBI m9NWiddkUrkEe+/RDgGc+rFiXWSyraZs26gScoYsrN408NqpWlB03S/sbQcn9MFxdVH3 TKzLz89OeQ0HuJAnmOXeRFfzVXj4B3Fe7iL1vDflH1a5NkLhlpl4xEecdU4oyv0O9arD pZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BSZ5Mo4M9dj3mV8Pk+In2OzzUM/ire5PGBx8Xf6cIP8=; b=YMKAUDc7kFX1htVzRUbvKg0+Sw6sHNr+rxTiHAbpiz3DbSweVX+dl0pA5xrM3pr88z ii3T1V2isDglSQa1o1EA6VOO0xbCi8fw4PkzadD1k5OatrS5BNvAZWXTfjBuz5Poo1+/ Wa05yY+GtcacsgnNZXn5WS2lSBTosu/q10JEfT43WrWV78XyBBaJuQ1qeqlVEIddBdW7 1udo70FVtylqgDgQTos3YV4957v00BYZ+jfv6W/t8qDIhVAxvfvaubc/BR5sukawQ4BH ees+5nVuSWDd/9m424Oi/InSNymbzGQsoE8FTLlx5vX0vvqQBE9fhEkBvS++EjLBeg93 F8Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si22654125eji.157.2021.10.05.13.26.59; Tue, 05 Oct 2021 13:27:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235545AbhJEU1s (ORCPT + 75 others); Tue, 5 Oct 2021 16:27:48 -0400 Received: from mail.w1.fi ([212.71.239.96]:45786 "EHLO li674-96.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbhJEU1s (ORCPT ); Tue, 5 Oct 2021 16:27:48 -0400 X-Greylist: delayed 306 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Oct 2021 16:27:47 EDT Received: from localhost (localhost [127.0.0.1]) by li674-96.members.linode.com (Postfix) with ESMTP id 6DC7A110DE; Tue, 5 Oct 2021 20:20:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at w1.fi Received: from li674-96.members.linode.com ([127.0.0.1]) by localhost (mail.w1.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W-kqsIKIJhpv; Tue, 5 Oct 2021 20:20:47 +0000 (UTC) Received: by jm (sSMTP sendmail emulation); Tue, 05 Oct 2021 23:20:45 +0300 Date: Tue, 5 Oct 2021 23:20:45 +0300 From: Jouni Malinen To: Johannes Berg Cc: Youghandhar Chintala , Abhishek Kumar , Felix Fietkau , "David S. Miller" , Jakub Kicinski , linux-wireless , netdev , LKML , Douglas Anderson , Brian Norris , Rakesh Pillai , Manikanta Pubbisetty Subject: Re: [PATCH 2/3] mac80211: Add support to trigger sta disconnect on hardware restart Message-ID: <20211005202045.GA18000@w1.fi> References: <20201215172352.5311-1-youghand@codeaurora.org> <66ba0f836dba111b8c7692f78da3f079@codeaurora.org> <5826123db4731bde01594212101ed5dbbea4d54f.camel@sipsolutions.net> <30fa98673ad816ec849f34853c9e1257@codeaurora.org> <90d3c3c8cedcf5f8baa77b3b6e94b18656fcd0be.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <90d3c3c8cedcf5f8baa77b3b6e94b18656fcd0be.camel@sipsolutions.net> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Sep 24, 2021 at 11:20:50AM +0200, Johannes Berg wrote: > > We thought sending the delba would solve the problem as earlier thought > > but the actual problem is with TX PN in a secure mode. > > It is not because of delba that the Seq number and TX PN are reset to > > zero. > > It’s because of the HW restart, these parameters are reset to zero. > > Since FW/HW is the one which decides the TX PN, when it goes through > > SSR, all these parameters are reset. > > Right, we solved this problem too - in a sense the driver reads the > database (not just TX PN btw, also RX replay counters) when the firmware > crashes, and sending it back after the restart. mac80211 has some hooks > for that. This might be doable for some cases where the firmware is the component assigning the PN values on TX and the firmware still being in a state where the counter used for this could be fetched after a crash or detected misbehavior. However, this does not sound like a very reliable mechanism for cases where the firmware state for this cannot be trusted or for the cases where the TX PN is actually assigned by the hardware (which would get cleared on that restart and the value might be unreadable before that restart). Trying to pull for this information periodically before the issue is detected does not sound like a very robust design either, since that would both waste resources and have a race condition with the lower layers having transmitted additional frames. Obviously it would be nice to be able to restore this type of state in all cases accurately, but that may not really be a viable approach for all designs and it would seem to make sense to provide an alternative approach to minimize the user visible impact from the rare cases of having to restart some low level components during an association. -- Jouni Malinen PGP id EFC895FA