Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5342091pxu; Tue, 22 Dec 2020 14:38:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpR69PNm9/BufezNHW2Wbhzy/Qo8hdVqOJEjV1iO7C6lTUTwHOrv7icPjLEWstDtzVvXJc X-Received: by 2002:a17:906:3099:: with SMTP id 25mr21840096ejv.321.1608676711094; Tue, 22 Dec 2020 14:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608676711; cv=none; d=google.com; s=arc-20160816; b=sLtoGa+6FPBcreogtVjGQdNgFaa2WI+Oeimfu2aPDXtsPr/k0co5mjt4j0RlkEcCJ2 rg8vd/BKuI3tjsF7fvDwrRr4d2932RIxmSavcZN2fn/DlchOEyk4O11MT+HT6e2TFlHH njKAHPijlX+K9kuQ6ucN60VyCcJUcBjEIHNbMPAaXnVYj1Sy/XYWhvH8dstnBd9VyavR 0AMC2fKfqyEgxcsxXST/FPaHhpCS9aF+IiEr+e6aD7mAd6LWzp9DSy+GI0ii8MbONXXa L7kLDWDan3W9oK/6w4+ZUmf2bHMSM3JfuSWWVO+cm0gsLRSfJ3r4Bby1gZJ5qaFQFoWC wUeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=djZGsbrkmGA94jAXMOhutdjZdetBTqkQXt4zsACd0OM=; b=oV+WKjras2CIrPzsGtWNIXUckXSz7SZAhOCFbuJIDmDjP34VNtf2X2ibdjNdYLU+iO 6bK5wq77rZ2Ho4w+ucEp4mUfITUh04z2fhfwHsJQtAdWCL4trf70hlKSwB9mp7R3skbd /2RJyWr0/GGRg4EsxASQ9TWfKT72X0p5YUDgR0KAA23UCUGU0zAMCgaBXXpF1qApLbJT BFRABMftvuRS0mxG1CUmBBNvomkojMKMwjhIvlEBBE3vh2n+1xuVhp/o+bBurHknvtPx FoSXJ8kGA+CP+da+sWJDtZn8HiPBjy8sxhRy26zwL4EdfFlm+FwTT0BrtCmHbg+fsacW TXjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z8Ugi74C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si13116982edi.210.2020.12.22.14.38.08; Tue, 22 Dec 2020 14:38:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z8Ugi74C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728563AbgLVWiA (ORCPT + 99 others); Tue, 22 Dec 2020 17:38:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728449AbgLVWiA (ORCPT ); Tue, 22 Dec 2020 17:38:00 -0500 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBF3BC0613D3 for ; Tue, 22 Dec 2020 14:37:19 -0800 (PST) Received: by mail-io1-xd35.google.com with SMTP id z136so13444378iof.3 for ; Tue, 22 Dec 2020 14:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=djZGsbrkmGA94jAXMOhutdjZdetBTqkQXt4zsACd0OM=; b=Z8Ugi74CxfCPMN3s/HZNn1ukTSQh20jHPmxZYidK/tLBsgUU85LmLkEK9m8Tiva5Du 9cVovmwScoIvz0x072sABbgGW852qliKBHsMYTnzCy4u5UtU/fx0an7c/QOq8EHgQZth S7BTWvhvN8nhQkA6W/noUD1I18PhFFoisCdFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=djZGsbrkmGA94jAXMOhutdjZdetBTqkQXt4zsACd0OM=; b=DY+wOcNcEpY8igEHNE7n0hRY5/ofxrRU3GYT2rVflQt4rP2eduLEsvYf6QW5JbxO0E cVfHJ0l3U/BfslSRxeHJuu5MSqw3HV1AY0tga1Q0pt4MQe96AaMw3XsHYm7h0e0ou0aJ tnZvTW/uR7uhFaKVlXWuMtxUICGk4T7Mu2NfmGnreoqT71SQF0Vr+5L/SBa9nSvvq6FM jC4T23zCOCUGSfdSIkMZDglnxkKiw9ct5JaKiLWgX3T+HU1t1Wpc74l0vLAPoUqZGmhc R2s60er++MeCGSX9GS9ynRTVlLeSH8KspYndo53fJEQD6JTHcZY6vG1ZXEI12wETu622 Y97A== X-Gm-Message-State: AOAM53346KoTvoOfxlQRDp6PY2c0FB+5Cvn1Q9lOqz0cB+ZJy4Wlsw+f 5PZwTzZ5w3ZRmGbcMcxJcHULxer0CUm03bV1Y2EUSQ== X-Received: by 2002:a02:a304:: with SMTP id q4mr20446611jai.97.1608676639053; Tue, 22 Dec 2020 14:37:19 -0800 (PST) MIME-Version: 1.0 References: <20201215172435.5388-1-youghand@codeaurora.org> In-Reply-To: <20201215172435.5388-1-youghand@codeaurora.org> From: Abhishek Kumar Date: Tue, 22 Dec 2020 14:36:58 -0800 Message-ID: Subject: Re: [PATCH 3/3] ath10k: Set wiphy flag to trigger sta disconnect on hardware restart To: Youghandhar Chintala Cc: ath10k , Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless , netdev , LKML , Douglas Anderson , Brian Norris , Rakesh Pillai Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 15, 2020 at 9:24 AM Youghandhar Chintala wrote: > > From: Rakesh Pillai > > Currently after the hardware restart triggered from the driver, > the station interface connection remains intact, since a disconnect > trigger is not sent to userspace. This can lead to a problem in > hardwares where the wifi mac sequence is added by the firmware. > > After the firmware restart, during subsytem recovery, the firmware > restarts its wifi mac sequence number. Hence AP to which our device > is connected will receive frames with a wifi mac sequence number jump > to the past, thereby resulting in the AP dropping all these frames, > until the frame arrives with a wifi mac sequence number which AP was > expecting. > > To avoid such frame drops, its better to trigger a station disconnect > upon the hardware restart. Indicate this support via a WIPHY flag > to mac80211, if the hardware params flag mentions the support to > add wifi mac sequence numbers for TX frames in the firmware. > > All the other hardwares, except WCN3990, are not affected by this > change, since the hardware params flag is not set for any hardware > except for WCN3990 > > Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 > Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 > Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00048 > > Signed-off-by: Rakesh Pillai > Signed-off-by: Youghandhar Chintala > --- > drivers/net/wireless/ath/ath10k/core.c | 15 +++++++++++++++ > drivers/net/wireless/ath/ath10k/hw.h | 3 +++ > drivers/net/wireless/ath/ath10k/mac.c | 3 +++ > 3 files changed, 21 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c > index 796107b..4155f94 100644 > --- a/drivers/net/wireless/ath/ath10k/core.c > +++ b/drivers/net/wireless/ath/ath10k/core.c > @@ -90,6 +90,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { > .hw_filter_reset_required = true, > .fw_diag_ce_download = false, > .tx_stats_over_pktlog = true, > + .tx_mac_seq_by_fw = false, Probably orthogonal to this patch, there is a static array maintained for different hardware configs and the structure members like "tx_mac_seq_by_fw" are initialized. This does not seem to be scalable and probably these parameters can be auto populated based on FW capabilities and so we don't have to maintain the static array. Thoughts? -Abhishek